<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pymol.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bell</id>
	<title>PyMOL Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bell"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php/Special:Contributions/Bell"/>
	<updated>2026-05-07T13:01:18Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=User:Speleo3&amp;diff=13484</id>
		<title>User:Speleo3</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=User:Speleo3&amp;diff=13484"/>
		<updated>2016-03-07T03:47:42Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is Thomas Holder and I work for PyMOL at [http://schrodinger.com Schrödinger].&lt;br /&gt;
&lt;br /&gt;
I was awarded the [http://pymol.org/fellowship Warren L. DeLano Memorial PyMOL Open-Source Fellowship] for 2011-2012.&lt;br /&gt;
&lt;br /&gt;
== Contact ==&lt;br /&gt;
&lt;br /&gt;
* speleo3/users.sourceforge.net&lt;br /&gt;
* thomas.holder/schrodinger.com&lt;br /&gt;
&lt;br /&gt;
== Scripts written by me ==&lt;br /&gt;
&lt;br /&gt;
* [[AAindex]]&lt;br /&gt;
* [[AngleBetweenHelices]]&lt;br /&gt;
* [[Extra fit]]&lt;br /&gt;
* [[PluginDirectory]]&lt;br /&gt;
* [[Pml2py]]&lt;br /&gt;
* [[Polarpairs]]&lt;br /&gt;
* [[Save settings]]&lt;br /&gt;
* [[Show bumps]]&lt;br /&gt;
* [[Sidechaincenters]]&lt;br /&gt;
* [[Spectrumany]]&lt;br /&gt;
* [[Spectrum states]]&lt;br /&gt;
* [[Supercell]]&lt;br /&gt;
&lt;br /&gt;
== Scripts Pastebin ==&lt;br /&gt;
&lt;br /&gt;
Some random scripts with no dedicated PyMOLWiki page.&lt;br /&gt;
&lt;br /&gt;
Launch interactive python terminal with PyMOL process:&lt;br /&gt;
(see also [[Launching From a Script]])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/python2.6 -i&lt;br /&gt;
&lt;br /&gt;
import sys, os&lt;br /&gt;
&lt;br /&gt;
# autocompletion&lt;br /&gt;
import readline&lt;br /&gt;
import rlcompleter&lt;br /&gt;
readline.parse_and_bind('tab: complete')&lt;br /&gt;
&lt;br /&gt;
# pymol environment&lt;br /&gt;
moddir='/opt/pymol-svn/modules'&lt;br /&gt;
sys.path.insert(0, moddir)&lt;br /&gt;
os.putenv('PYMOL_PATH', os.path.join(moddir, 'pymol/pymol_path'))&lt;br /&gt;
&lt;br /&gt;
# pymol launching&lt;br /&gt;
import pymol&lt;br /&gt;
pymol.pymol_argv = ['pymol','-qc'] + sys.argv[1:]&lt;br /&gt;
pymol.finish_launching()&lt;br /&gt;
cmd = pymol.cmd&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Build PyMOL:&lt;br /&gt;
(see also [[Linux Install]])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -e&lt;br /&gt;
&lt;br /&gt;
src=/tmp&lt;br /&gt;
prefix=/opt/pymol-git&lt;br /&gt;
&lt;br /&gt;
pyinstall() {&lt;br /&gt;
    cd $src&lt;br /&gt;
    name=$(basename $2)&lt;br /&gt;
    &lt;br /&gt;
    if [[ -e $name ]]; then&lt;br /&gt;
        cd $name &amp;amp;&amp;amp; $1 pull&lt;br /&gt;
    else&lt;br /&gt;
        $1 clone $2 &amp;amp;&amp;amp; cd $name&lt;br /&gt;
    fi&lt;br /&gt;
&lt;br /&gt;
    python setup.py build install \&lt;br /&gt;
        --home=$prefix \&lt;br /&gt;
        --install-lib=$prefix/modules \&lt;br /&gt;
        --install-scripts=$prefix&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pyinstall git git@github.com:speleo3/pymol&lt;br /&gt;
pyinstall git git@github.com:speleo3/pymol-psico&lt;br /&gt;
pyinstall hg https://hg.codeplex.com/csb&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Build FREEMOL (see also [[MovieSchool 6]])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -e&lt;br /&gt;
&lt;br /&gt;
src=/tmp&lt;br /&gt;
prefix=/opt/pymol-git&lt;br /&gt;
export FREEMOL=$prefix/freemol&lt;br /&gt;
&lt;br /&gt;
freemoltrunk=$src/freemol-trunk&lt;br /&gt;
if [[ ! -e $freemoltrunk ]]; then&lt;br /&gt;
    svn co svn://bioinformatics.org/svnroot/freemol/trunk $freemoltrunk&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
cd $freemoltrunk&lt;br /&gt;
&lt;br /&gt;
sed -i 's/vdwtype\[11\]/vdwtype[14]/' src/mengine/src/field.h&lt;br /&gt;
&lt;br /&gt;
for name in mpeg_encode mengine apbs pdb2pqr; do&lt;br /&gt;
    (cd src/$name &amp;amp;&amp;amp; ./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install)&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
cp -na freemol/libpy/freemol $prefix/modules/&lt;br /&gt;
&lt;br /&gt;
ln -sfT $FREEMOL $prefix/modules/pymol/pymol_path/freemol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download all PyMOL scripts from Robert L. Campbell's website:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget -r -np -nd --level=1 -A .py \&lt;br /&gt;
    http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Render movie from PNG files (save as &amp;lt;code&amp;gt;png2mpeg1.sh&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
set -e&lt;br /&gt;
&lt;br /&gt;
usage=&amp;quot;usage: $(basename $0) [-w width] [-f fps] [-b vbitrate] &amp;lt;indir&amp;gt; &amp;lt;outfile.mpeg&amp;gt;&amp;quot;&lt;br /&gt;
width=&amp;quot;&amp;quot;&lt;br /&gt;
fps=25&lt;br /&gt;
vbitrate=16000&lt;br /&gt;
&lt;br /&gt;
args=&amp;quot;$(getopt w:f:b:h &amp;quot;$@&amp;quot;)&amp;quot; || args=&amp;quot;-h&amp;quot;&lt;br /&gt;
set -- $args&lt;br /&gt;
&lt;br /&gt;
while [[ $# &amp;gt; 0 ]]; do&lt;br /&gt;
    case &amp;quot;$1&amp;quot; in&lt;br /&gt;
        --) shift; break ;;&lt;br /&gt;
        -w) width=$2; shift 2 ;;&lt;br /&gt;
        -f) fps=$2; shift 2 ;;&lt;br /&gt;
        -b) vbitrate=$2; shift 2 ;;&lt;br /&gt;
        -h) echo $usage; exit 1 ;;&lt;br /&gt;
        *) echo &amp;quot;argument error: $1&amp;quot;; exit 1 ;;&lt;br /&gt;
    esac&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
if [[ $# &amp;gt; 2 ]]; then&lt;br /&gt;
    echo &amp;quot;too many arguments: $3 ...&amp;quot;&lt;br /&gt;
    echo $usage&lt;br /&gt;
    exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
indir=&amp;quot;$1&amp;quot;&lt;br /&gt;
outfile=&amp;quot;$2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
if [[ -z &amp;quot;$indir&amp;quot; ]]; then&lt;br /&gt;
    echo &amp;quot;error: indir missing&amp;quot;&lt;br /&gt;
    echo $usage&lt;br /&gt;
    exit 2&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if [[ -z &amp;quot;$outfile&amp;quot; ]]; then&lt;br /&gt;
    echo &amp;quot;error: outfile missing&amp;quot;&lt;br /&gt;
    echo $usage&lt;br /&gt;
    exit 3&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
MENCODER=&amp;quot;mencoder -quiet&amp;quot;&lt;br /&gt;
MPEG1ARGS=&amp;quot;-mf type=png:fps=$fps -ovc lavc -forceidx -noskip \&lt;br /&gt;
    -of rawvideo -mpegopts format=mpeg1 \&lt;br /&gt;
    -lavcopts vcodec=mpeg1video:vbitrate=$vbitrate:vhq:trell:keyint=25&amp;quot;&lt;br /&gt;
&lt;br /&gt;
if [[ -n &amp;quot;$width&amp;quot; ]]; then&lt;br /&gt;
    MPEG1ARGS=&amp;quot;-zoom -xy $width -sws 9 $MPEG1ARGS&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
pattern=&amp;quot;mf://$indir/*.png&amp;quot;&lt;br /&gt;
$MENCODER &amp;quot;$pattern&amp;quot; $MPEG1ARGS:vpass=1 -o /dev/null&lt;br /&gt;
$MENCODER &amp;quot;$pattern&amp;quot; $MPEG1ARGS:vpass=2 -o &amp;quot;$outfile&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== load_mtz_cctbx: Load MTZ files with a [[CCTBX]] wrapper (3 files) ===&lt;br /&gt;
&lt;br /&gt;
1) ~/bin/mtz2ccp4.sh&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
export PATH=/opt/ccp4/ccp4-6.5/bin:$PATH&lt;br /&gt;
exec cctbx.python ~/bin/mtz2ccp4.py &amp;quot;$@&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) ~/bin/mtz2ccp4.py&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#!/opt/ccp4/ccp4-6.5/bin/cctbx.python&lt;br /&gt;
&lt;br /&gt;
import os&lt;br /&gt;
import sys&lt;br /&gt;
import tempfile&lt;br /&gt;
&lt;br /&gt;
def mtz2ccp4maps(filename, prefix='map'):&lt;br /&gt;
    '''&lt;br /&gt;
Creates a temporary directory and dumps all maps from the given MTZ file&lt;br /&gt;
into this directory as CCP4 maps files. Returns the path of the temporary&lt;br /&gt;
directory.&lt;br /&gt;
    '''&lt;br /&gt;
    from iotbx.reflection_file_reader import any_reflection_file&lt;br /&gt;
&lt;br /&gt;
    hkl_in = any_reflection_file(file_name=filename)&lt;br /&gt;
&lt;br /&gt;
    temp_dir = tempfile.mkdtemp()&lt;br /&gt;
&lt;br /&gt;
    for i_map, array in enumerate(hkl_in.as_miller_arrays()):&lt;br /&gt;
        if array.is_complex_array():&lt;br /&gt;
            fft_map = array.fft_map(resolution_factor=0.25).apply_sigma_scaling()&lt;br /&gt;
            map_filename = os.path.join(temp_dir,&lt;br /&gt;
                    prefix + '_' + '_'.join(array.info().labels) + '.ccp4')&lt;br /&gt;
            fft_map.as_ccp4_map(file_name=map_filename)&lt;br /&gt;
&lt;br /&gt;
    return temp_dir&lt;br /&gt;
&lt;br /&gt;
# print the name of the temporary directory to standard output&lt;br /&gt;
print mtz2ccp4maps(*sys.argv[1:])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) ~/.pymolrc.py&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
@cmd.extend&lt;br /&gt;
def load_mtz_cctbx(filename, prefix=''):&lt;br /&gt;
    '''&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
&lt;br /&gt;
    Load all maps from an MTZ file, using the mtz2ccp4.sh wrapper which&lt;br /&gt;
    uses iotbx (cctbx).&lt;br /&gt;
    '''&lt;br /&gt;
    import subprocess&lt;br /&gt;
    import glob&lt;br /&gt;
    import shutil&lt;br /&gt;
&lt;br /&gt;
    if not prefix:&lt;br /&gt;
        prefix = os.path.basename(filename).rpartition('.')[0]&lt;br /&gt;
&lt;br /&gt;
    outdir = subprocess.Popen([os.path.expanduser('~/bin/mtz2ccp4.sh'),&lt;br /&gt;
        filename, prefix], stdout=subprocess.PIPE).stdout.readlines()[0].strip()&lt;br /&gt;
&lt;br /&gt;
    for mapfilename in glob.glob(os.path.join(outdir, '*.ccp4')):&lt;br /&gt;
        cmd.load(mapfilename)&lt;br /&gt;
&lt;br /&gt;
    shutil.rmtree(outdir)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ccmutate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
@cmd.extend&lt;br /&gt;
def ccmutate(code, selection='??sele|?pk1', sculpt=1):&lt;br /&gt;
    '''&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
&lt;br /&gt;
    Mutate selected residue.&lt;br /&gt;
&lt;br /&gt;
ARGUMENTS&lt;br /&gt;
&lt;br /&gt;
    code = str: 3-letter PDBeChem chemical component identifier&lt;br /&gt;
&lt;br /&gt;
    selection = str: single residue selection {default: pk1 or sele}&lt;br /&gt;
&lt;br /&gt;
    sculpt = 0/1: try to adopt conformation of replaced sidechain, followed&lt;br /&gt;
    by relaxation using sculpting {default: 1}&lt;br /&gt;
&lt;br /&gt;
EXAMPLE&lt;br /&gt;
&lt;br /&gt;
    fetch 1ubq, async=0&lt;br /&gt;
    ccmutate 0HG, resi 24&lt;br /&gt;
&lt;br /&gt;
SEE ALSO&lt;br /&gt;
&lt;br /&gt;
    fetch ..., type=cc&lt;br /&gt;
    wizard mutagenesis&lt;br /&gt;
    '''&lt;br /&gt;
    code = code.upper()&lt;br /&gt;
&lt;br /&gt;
    tmp_sele = cmd.get_unused_name('_sele')&lt;br /&gt;
    tmp_frag = cmd.get_unused_name('_frag')&lt;br /&gt;
    tmp_Nnbr = cmd.get_unused_name('_Nnbr')&lt;br /&gt;
    tmp_back = cmd.get_unused_name('_back')&lt;br /&gt;
    tmp_tmpl = cmd.get_unused_name('_tmpl')&lt;br /&gt;
    tmp_sc_o = cmd.get_unused_name('_sc_o')&lt;br /&gt;
    tmp_sc_n = cmd.get_unused_name('_sc_n')&lt;br /&gt;
&lt;br /&gt;
    try:&lt;br /&gt;
        cmd.select(tmp_sele, 'byres (' + selection + ')', 0)&lt;br /&gt;
&lt;br /&gt;
        # check input selection&lt;br /&gt;
        if cmd.count_atoms('name CA &amp;amp; ?' + tmp_sele) != 1:&lt;br /&gt;
            raise pymol.CmdException('selection must include exactly one residue')&lt;br /&gt;
        if cmd.count_atoms('name N+CA+C &amp;amp; ?' + tmp_sele) != 3:&lt;br /&gt;
            raise pymol.CmdException(&amp;quot;selected residue doesn't have N+CA+C atoms&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
        # PDBeChem fragment&lt;br /&gt;
        cmd.fetch(code, tmp_frag, type='cc', zoom=0)&lt;br /&gt;
&lt;br /&gt;
        # check if fragment is amino acid&lt;br /&gt;
        if cmd.count_atoms('name N+CA+C &amp;amp; ?' + tmp_frag) != 3:&lt;br /&gt;
            raise pymol.CmdException(&amp;quot;residue '%s' doesn't have N+CA+C atoms&amp;quot; % (code))&lt;br /&gt;
&lt;br /&gt;
        # only keep hydrogens if target also has hydrogens&lt;br /&gt;
        if cmd.count_atoms('hydro &amp;amp; ?' + tmp_sele) == 0:&lt;br /&gt;
            cmd.remove('hydro &amp;amp; ?' + tmp_frag)&lt;br /&gt;
&lt;br /&gt;
        # update residue name for old residue&lt;br /&gt;
        cmd.alter(tmp_sele, 'resn = ' + repr(code))&lt;br /&gt;
&lt;br /&gt;
        # superpose fragment on backbone&lt;br /&gt;
        cmd.align(&lt;br /&gt;
                'name N+CA+C &amp;amp; ?' + tmp_frag,&lt;br /&gt;
                'name N+CA+C &amp;amp; ?' + tmp_sele)&lt;br /&gt;
&lt;br /&gt;
        # extra N bonds, like in PRO&lt;br /&gt;
        cmd.select(tmp_Nnbr, 'neighbor (name N &amp;amp; ?' + tmp_frag + ')', 0)&lt;br /&gt;
&lt;br /&gt;
        # backbone selection&lt;br /&gt;
        cmd.select(tmp_back, 'name CA+C+O+N+OXT', 0)&lt;br /&gt;
        cmd.select(tmp_back, 'hydro &amp;amp; neighbor ?' + tmp_back, 0, merge=1)&lt;br /&gt;
&lt;br /&gt;
        # remove complementary atoms&lt;br /&gt;
        cmd.remove(           '?' + tmp_frag + ' &amp;amp; ' + tmp_back)&lt;br /&gt;
        cmd.extract(tmp_tmpl, '?' + tmp_sele + ' &amp;amp; !' + tmp_back, zoom=0)&lt;br /&gt;
&lt;br /&gt;
        if cmd.count_atoms(tmp_frag):&lt;br /&gt;
            # attach new sidechain&lt;br /&gt;
            cmd.fuse('name CB &amp;amp; ?' + tmp_frag, 'name CA &amp;amp; ?' + tmp_sele, mode=1, move=0)&lt;br /&gt;
            cmd.unpick()&lt;br /&gt;
&lt;br /&gt;
            # new atom selections&lt;br /&gt;
            cmd.select(tmp_sc_n, '(byres ?' + tmp_sele + ') &amp;amp; !?' + tmp_sele, 0)&lt;br /&gt;
            cmd.select(tmp_sc_o, '?' + tmp_sc_n + ' like ?' + tmp_tmpl, 0)&lt;br /&gt;
&lt;br /&gt;
            # extra N bonds, like in PRO&lt;br /&gt;
            if cmd.count_atoms(tmp_Nnbr):&lt;br /&gt;
                cmd.bond('?' + tmp_sc_n + ' like ?' + tmp_Nnbr, 'name N &amp;amp; ?' + tmp_sele)&lt;br /&gt;
&lt;br /&gt;
            # adopt old conformation, if possible&lt;br /&gt;
            if int(sculpt):&lt;br /&gt;
                model = cmd.get_object_list('?' + tmp_sele)[0]&lt;br /&gt;
                cmd.protect(model)&lt;br /&gt;
                cmd.deprotect('?' + tmp_sc_n + ' &amp;amp; !?' + tmp_sc_o)&lt;br /&gt;
                cmd.sculpt_activate(model)&lt;br /&gt;
                if cmd.count_atoms(tmp_sc_o):&lt;br /&gt;
                    cmd.update(tmp_sc_o, tmp_tmpl)&lt;br /&gt;
                    cmd.set('sculpt_field_mask', 63) # local geom + vdw&lt;br /&gt;
                    cmd.sculpt_iterate(model, cycles=100)&lt;br /&gt;
                    cmd.deprotect(tmp_sc_o)&lt;br /&gt;
                cmd.set('sculpt_field_mask', 0xff) # all&lt;br /&gt;
                cmd.sculpt_iterate(model, cycles=200)&lt;br /&gt;
                cmd.set('sculpt_field_mask', 31) # local geom&lt;br /&gt;
                cmd.sculpt_iterate(model, cycles=200)&lt;br /&gt;
&lt;br /&gt;
    finally:&lt;br /&gt;
        cmd.delete(tmp_sele)&lt;br /&gt;
        cmd.delete(tmp_frag)&lt;br /&gt;
        cmd.delete(tmp_Nnbr)&lt;br /&gt;
        cmd.delete(tmp_back)&lt;br /&gt;
        cmd.delete(tmp_tmpl)&lt;br /&gt;
        cmd.delete(tmp_sc_o)&lt;br /&gt;
        cmd.delete(tmp_sc_n)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Set_Key&amp;diff=13482</id>
		<title>Set Key</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Set_Key&amp;diff=13482"/>
		<updated>2016-03-07T03:47:41Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''set_key''' binds a Python function or PyMOL command to a key press.&lt;br /&gt;
Such key binding customization is typically done with your [[pymolrc]] startup script.&lt;br /&gt;
&lt;br /&gt;
''Changes with PyMOL version:''&lt;br /&gt;
&lt;br /&gt;
* 1.8: decorator support&lt;br /&gt;
* 1.7: second argument can also be a string in PyMOL command syntax&lt;br /&gt;
&lt;br /&gt;
== PyMOL API ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.set_key(string key, function fn, tuple arg=(), dict kw={})&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Also supported since PyMOL 1.7:''&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.set_key(string key, string command)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Decorator support since PyMOL 1.8:''&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.set_key(string key)(function fn)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== PyMOL Command (since PyMOL 1.7) ==&lt;br /&gt;
&lt;br /&gt;
 set_key key, command&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
&lt;br /&gt;
# define a custom function which colors a selection blue&lt;br /&gt;
def make_it_blue(selection): cmd.color(&amp;quot;blue&amp;quot;, selection)&lt;br /&gt;
&lt;br /&gt;
# color &amp;quot;object1&amp;quot; blue when the F1 key is pressed&lt;br /&gt;
cmd.set_key( 'F1' , make_it_blue, [ &amp;quot;object1&amp;quot; ] )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# zoom on everything&lt;br /&gt;
cmd.set_key( 'CTRL-C' , cmd.zoom )   &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# turn camera by 90 degrees&lt;br /&gt;
cmd.set_key( 'ALT-A' , cmd.turn, ('x',90) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # zoom on first ligand when pressing F1 (PyMOL 1.7+)&lt;br /&gt;
 set_key F1, zoom byres (first organic), animate=1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# zoom on first ligand when pressing F1 (all PyMOL versions)&lt;br /&gt;
cmd.set_key('F1', cmd.zoom, ['byres (first organic)'], {'animate': 1})&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# decorator syntax (PyMOL 1.8+)&lt;br /&gt;
@cmd.set_key('F1')&lt;br /&gt;
def zoom_ligand():&lt;br /&gt;
    cmd.zoom('byres (first organic)', animate=1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== KEYS WHICH CAN BE REDEFINED ==&lt;br /&gt;
 F1 to F12&lt;br /&gt;
 left, right, pgup, pgdn, home, insert&lt;br /&gt;
 CTRL-A to CTRL-Z &lt;br /&gt;
 ALT-0 to ALT-9, ALT-A to ALT-Z&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[alias]]&lt;br /&gt;
* [[extend|cmd.extend]]&lt;br /&gt;
* [[Button]]&lt;br /&gt;
* [[Check Key]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Set Key]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Set_Color&amp;diff=13480</id>
		<title>Set Color</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Set_Color&amp;diff=13480"/>
		<updated>2016-03-07T03:47:40Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Set_Color]] defines a new color with color indices (0.0-1.0). Numbers between 0 an 255 can be used as well. (If at least one value is larger than 1, pymol will interpret all 3 values as between 0 and 255). If an existing color name is used, the old color will be overridden. &lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set_color name, [ red-float, green-float, blue-float ]&lt;br /&gt;
set_color name = [ red-float, green-float, blue-float ]  #(DEPRECATED)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===PYMOL API===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.set_color( string name, float-list rgb )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
PyMOL&amp;gt;set_color red, [1,0.01,0.01]&lt;br /&gt;
 Color: &amp;quot;red&amp;quot; defined as [ 1.000, 0.010, 0.010 ].&lt;br /&gt;
PyMOL&amp;gt;set_color khaki, [195,176,145]&lt;br /&gt;
 Color: &amp;quot;khaki&amp;quot; defined as [ 0.765, 0.690, 0.569 ].&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These will be added to the end of the list of Pymol's color indices that you can view the [[Get Color Indices]] command.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Get_Color_Tuples]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Set Color]]&lt;br /&gt;
[[Category:Coloring|Set Color]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Load_Traj&amp;diff=13478</id>
		<title>Load Traj</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Load_Traj&amp;diff=13478"/>
		<updated>2016-03-07T03:47:39Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''load_traj''' loads a trajectory as &amp;quot;states&amp;quot; into an already loaded molecular object.&lt;br /&gt;
&lt;br /&gt;
Since version 1.0, PyMOL uses the [http://www.ks.uiuc.edu/Research/vmd/plugins/molfile/ Molfile Plugin] backend, which supports a variety of trajectory file formats. Older versions only supported the ascii AMBER format (&amp;quot;.trj&amp;quot; file extension).&lt;br /&gt;
&lt;br /&gt;
Loading a large trajectory may take up a lot of RAM, unless the [[defer_builds_mode]] is set to 3.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load_traj filename [,object [,state [,format [,interval [,average ]&lt;br /&gt;
                   [,start [,stop [,max [,selection [,image [,shift &lt;br /&gt;
                   [, plugin ]&lt;br /&gt;
                   ]]]]]]]]]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
&lt;br /&gt;
* '''filename''' = str: trajectory file path&lt;br /&gt;
* '''object''' = str: name of the molecular object where the trajectory should be appended as states {default: guess from filename}&lt;br /&gt;
* '''state''' = int: object state where to start appending states. To discard the currently loaded coordinates, use ''state=1''. To append new states, use ''state=0'' {default: 0}&lt;br /&gt;
* '''format''' = str: specify file type instead of guessing from file extension (only affects AMBER .trj format, use &amp;quot;plugin&amp;quot; argument for Molfile Plugin types) {default: }&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# topology from PDB file, trajectory from DCD file&lt;br /&gt;
load      sampletrajectory.pdb&lt;br /&gt;
load_traj sampletrajectory.dcd&lt;br /&gt;
&lt;br /&gt;
# gromacs trajectory, using &amp;quot;mytraj&amp;quot; as object name&lt;br /&gt;
load      sampletrajectory.gro, mytraj&lt;br /&gt;
load_traj sampletrajectory.xtc, mytraj&lt;br /&gt;
&lt;br /&gt;
# playing through states, memory optimized (but eventually slower)&lt;br /&gt;
set defer_builds_mode, 3&lt;br /&gt;
mplay&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
*PyMOL does not know how to wrap the truncated octahedron used by Amber You will need to use the [http://amber.scripps.edu/tutorials/basic/tutorial5/index.html ptraj] program first to do this.&lt;br /&gt;
*The average option is not a running average.  To perform this type of average, use the [[smooth]] command after loading the trajectory file.&lt;br /&gt;
*For quickly viewing Trajectories as a movie, use the [[mset]] command to map each state to a movie frame.&lt;br /&gt;
&lt;br /&gt;
useful notes from the email list:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
http://www.mail-archive.com/pymol-users@lists.sourceforge.net/msg04272.html&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
http://www.mail-archive.com/pymol-users@lists.sourceforge.net/msg10266.html&lt;br /&gt;
&lt;br /&gt;
in one line convert dcd and psf to pdb :&lt;br /&gt;
&lt;br /&gt;
catdcd -o all.pdb -otype pdb -s autopsf.psf -stype psf out.dcd&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[[Load]], [[defer_builds_mode]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Load Traj]]&lt;br /&gt;
[[Category:Performance|Load Traj]]&lt;br /&gt;
[[Category:States|Load Traj]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Lisica&amp;diff=13476</id>
		<title>Lisica</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Lisica&amp;diff=13476"/>
		<updated>2016-03-07T03:47:38Z</updated>

		<summary type="html">&lt;p&gt;Bell: 2 revisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|filename  = plugins/lisica.py&lt;br /&gt;
|author    = Janez Konc&lt;br /&gt;
|license   = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==  Description == &lt;br /&gt;
&lt;br /&gt;
LiSiCA is a software for 2D and 3D ligand based virtual screening. It uses a fast maximum clique algorithm to find two- and three- dimensional similarities &lt;br /&gt;
between reference compound and a database of target compounds in Mol2 format. The similarities are expressed using Tanimoto coefficients and the target compounds are ranked accordingly.&lt;br /&gt;
LiSiCA is developed and maintained at '''National Institute of Chemistry, Slovenia'''. &lt;br /&gt;
&lt;br /&gt;
LiSiCA Plugin is '''free for Academic (NON-COMMERCIAL) use'''. However, for '''COMMERCIAL use the potential users have to write to [mailto:konc@cmm.ki.si Janez Konc]'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  LiSiCA Plugin Features == &lt;br /&gt;
&lt;br /&gt;
# Graphical User Interface which facilitate the choice of parameters for LiSiCA.&lt;br /&gt;
# Results displayed according to the ranking in similarities as measured by Tanimoto coefficients.&lt;br /&gt;
# Structural similarity between molecules visualized using PyMOL viewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Requirements == &lt;br /&gt;
&lt;br /&gt;
The plugin should work on Windows and all variety of Unix like systems. Most of the tests were performed on Windows 7, Ubuntu 14.04 and Linux Mint.  &lt;br /&gt;
To work properly, the plugin requires Python with Tkinter and PyMOL. The plugin was mainly tested with PyMOL 1.7.x.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Installation == &lt;br /&gt;
&lt;br /&gt;
This plugin is ready &amp;quot;out-of-box&amp;quot; for both Linux and Windows users through the project Pymol-script-repo. &lt;br /&gt;
&lt;br /&gt;
The lisica.py script initializes the installation of the plugin. The script downloads and installs all the required files. On successful installation, a directory named .lisicagui is downloaded and saved in the home directory. This folder contains the executables, log files, icon files, python modules etc. &lt;br /&gt;
&lt;br /&gt;
Once the files are properly installed, LiSiCA plugin version will be ready to use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Important note''': For complete installation of the plugin, a stable INTERNET connection is required at the user end.  &lt;br /&gt;
Note for Linux users : It is advisable to start PyMOL from the terminal using '''sudo pymol''' command. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Usage == &lt;br /&gt;
&lt;br /&gt;
The plugin window has four tabs. &lt;br /&gt;
&lt;br /&gt;
==== Input Tab ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Both the reference and the target compound files need to be in the Tripos mol2 format. The reference file should contain only one (reference) compound; &lt;br /&gt;
the target file may contain many compounds. If the reference file contains more than one compound, the first molecule is used as a reference. The molecules&lt;br /&gt;
in the target file having the same name are considered as different conformers of the same molecule. By default only the best-scoring (by Tanimoto coefficient) &lt;br /&gt;
conformer will be shown in the final output for the 3D screening option.&lt;br /&gt;
&lt;br /&gt;
In the mol2 input files, the name of the molecule (ZINC ID) must be specified under the line for @&amp;lt;TRIPOS&amp;gt;MOLECULE tag. For example,&lt;br /&gt;
&lt;br /&gt;
   @&amp;lt;TRIPOS&amp;gt;MOLECULE&lt;br /&gt;
   '''ZINC73655097'''&lt;br /&gt;
   46    48     0     0     0&lt;br /&gt;
   SMALL&lt;br /&gt;
   USER_CHARGES&lt;br /&gt;
   &lt;br /&gt;
   @&amp;lt;TRIPOS&amp;gt;ATOM&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
LiSiCA checks similarities based on the mol2 atom types. Hence '''SYBYL''' atom types have to be specified in the mol2 files. For example, under the @&amp;lt;TRIPOS&amp;gt;ATOM tag, each atom specification should include the SYBYL atom type, as in:&lt;br /&gt;
&lt;br /&gt;
   1 C1         -0.0647    1.4496   -0.0592   '''C.3'''       1 &amp;lt;0&amp;gt;        -0.167&lt;br /&gt;
&lt;br /&gt;
In the above line from a mol2 file, in bold, in column 5, the SYBYL atom type is specified.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In 2D screening, the  option '''Maximum Allowed Shortest path Difference''' corresponds to the maximum allowed difference in shortest-path length between &lt;br /&gt;
atoms of the two compared product graph vertices. Lesser values correspond to a more rigorous screening. By default this value is unit bond.&lt;br /&gt;
&lt;br /&gt;
In 3D screening, the  option '''Maximum Allowed Spatial Distance Difference''' corresponds to the maximum allowed difference in distances between atoms of &lt;br /&gt;
the two compared product graph vertices. Lesser values correspond to a more rigorous screening. By default this value is 1 Å.&lt;br /&gt;
The '''Number of Conformations'''  option corresponds to the maximum number of outputted files of one molecule in different conformations and is to be used only for 3D screening.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File: InputTab2DLiSiCALinuxv1.0.0.png|550 px]] [[File: InputTab3DLiSiCALinuxv1.0.0.png|520 px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to the value of '''Number of highest ranked molecules to be written to the output (say W)''', LiSiCA will create mol2 files of that many (W) highest scoring &lt;br /&gt;
target molecules with a comment section at the end of the file where the matching atom pairs are displayed. This value is by default 100. The resulting mol2 files &lt;br /&gt;
are written into a time-stamp directory in the folder specified in '''Save results in:'''. By default this folder is the user's home directory. Also, a text file named &lt;br /&gt;
lisica_results.txt with the target molecules with (in the descending order of) Tanimoto coefficients is written to the time-stamp folder. &lt;br /&gt;
&lt;br /&gt;
The '''Number of CPU cores to be used''' allows selection of CPU threads used for LiSiCA. By default, it tries to detect the number of CPUs available.&lt;br /&gt;
The '''Consider Hydrogen''' options lets the user to choose if the hydrogen atoms are to be considered for the calculation of the similarity using the maximum clique algorithm. &lt;br /&gt;
By default, hydrogen atoms are not considered in finding the largest substructure common to the reference and target molecules, so as to obtain faster results.  &lt;br /&gt;
&lt;br /&gt;
==== Load Project Tab ==== &lt;br /&gt;
&lt;br /&gt;
The plugin also has a feature to load saved results. On the '''Load Project''' tab, the user can choose the directory with the saved results (mol2 files of each target &lt;br /&gt;
and the reference) and the lisica_results.txt file. &lt;br /&gt;
When the load button is clicked, the results will be loaded onto the output tab and the PyMOL Viewer window.&lt;br /&gt;
&lt;br /&gt;
==== Output Tab ==== &lt;br /&gt;
&lt;br /&gt;
In the output tab, there are two listboxes:&lt;br /&gt;
* One contains ZINC ID and Tanimoto Coefficients of target molecules in the decreasing order of the Tanimoto coefficient values. &lt;br /&gt;
Any single target molecule can be selected on this listbox using a mouse click or using up/down arrow keys. &lt;br /&gt;
The selected target molecule is displayed with the reference molecule on the PyMOL viewer window.&lt;br /&gt;
* Depending on the target molecule chosen on the first listbox, the corresponding atoms from reference and the target molecules are displayed on the other listbox. &lt;br /&gt;
Any single pair of corresponding atoms can be selected on this listbox using a mouse click or using up/down arrow keys. &lt;br /&gt;
The selected pair is highlighted on the PyMOL viewer window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For '''2D Screening''', the two molecules (the reference and the selected target) are visualized side by side on the PyMOL viewer screen.&lt;br /&gt;
 &lt;br /&gt;
[[File: 2DResultOutputtabPyMOLViewerLinux1.png|700 px|2D LiSiCA output- Note the reference and target molecules are aligned side by side]] &lt;br /&gt;
&lt;br /&gt;
For '''3D Screening''', the 3D structures of the two molecules (the reference and the selected target) are superimposed on one another to visualize the similarity on the PyMOL viewer screen.&lt;br /&gt;
&lt;br /&gt;
[[File: 3DResultsOutputtabPyMOLViewer1.png|700 px|3D LiSiCA output-Note that the reference and target molecules are superimposed]]&lt;br /&gt;
&lt;br /&gt;
==== About Tab ==== &lt;br /&gt;
&lt;br /&gt;
The users can get information on new updates if available on the About tab. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Reference == &lt;br /&gt;
&lt;br /&gt;
'''If you are using LiSiCA in your work, please cite:'''&lt;br /&gt;
&lt;br /&gt;
S. Lesnik, T. Stular, B. Brus, D. Knez, S. Gobec, D. Janezic, J. Konc, LiSiCA: A Software for Ligand-Based Virtual Screening and Its Application for the Discovery of Butyrylcholinesterase Inhibitors, J. Chem. Inf. Model., 2015, 55, 1521–1528.&lt;br /&gt;
&lt;br /&gt;
[http://pubs.acs.org/doi/abs/10.1021/acs.jcim.5b00136 Read the article] &lt;br /&gt;
&lt;br /&gt;
[http://pubs.acs.org/doi/pdf/10.1021/acs.jcim.5b00136 PDF Link]&lt;br /&gt;
&lt;br /&gt;
==  Known Bugs ==&lt;br /&gt;
&lt;br /&gt;
If you receive the error '''&amp;lt;class '_tkinter.TclError'&amp;gt;: can't find package treectrl''' during the LiSiCA installation process, you should fix this by installing tktreectrl: sudo apt-get install tktreectrl.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Licensing == &lt;br /&gt;
&lt;br /&gt;
LiSiCA software is copyrighted by : &lt;br /&gt;
&lt;br /&gt;
:'''Janez Konc''' &lt;br /&gt;
:National Institute of Chemistry &lt;br /&gt;
:Laboratory for Molecular Modeling &lt;br /&gt;
:Hajdrihova 19 &lt;br /&gt;
:SI-1000 Ljubljana &lt;br /&gt;
:Slovenia.&lt;br /&gt;
&lt;br /&gt;
The terms stated in the following agreement apply to all files associated with the software &lt;br /&gt;
unless explicitly disclaimed in individual files.&lt;br /&gt;
 &lt;br /&gt;
    '''LiSiCA SOFTWARE LICENSE AGREEMENT'''&lt;br /&gt;
 &lt;br /&gt;
  1. Grant Of Limited License; Software Use Restrictions. The programs received by you will be used only for NON COMMERCIAL purposes.&lt;br /&gt;
     This license is issued to you as an individual.&lt;br /&gt;
     &lt;br /&gt;
     For COMMERCIAL use of the software, please contact Janez Konc for details about commercial usage license agreements.&lt;br /&gt;
     For any question regarding license agreements, please contact:&lt;br /&gt;
     &lt;br /&gt;
     Janez Konc&lt;br /&gt;
     National Institute of Chemistry&lt;br /&gt;
     Laboratory for Molecular Modeling&lt;br /&gt;
     Hajdrihova 19&lt;br /&gt;
     SI-1000 Ljubljana&lt;br /&gt;
     Slovenia.&lt;br /&gt;
     &lt;br /&gt;
  2. COMMERCIAL USAGE is defined as revenues generating activities. These&lt;br /&gt;
     include using this software for consulting activities and selling&lt;br /&gt;
     applications built on top of, or using this software. Scientific &lt;br /&gt;
     research in an academic environment and teaching are considered &lt;br /&gt;
     NON COMMERCIAL.&lt;br /&gt;
 &lt;br /&gt;
  3. Copying Restrictions. You will not sell or otherwise distribute commercially &lt;br /&gt;
     these programs or derivatives to any other party, whether with or without &lt;br /&gt;
     consideration.&lt;br /&gt;
 &lt;br /&gt;
  4. Ownership of Software. You will not obtain, and will not attempt to &lt;br /&gt;
     obtain copyright coverage thereon without the express purpose written &lt;br /&gt;
     consent of Janez Konc.&lt;br /&gt;
 &lt;br /&gt;
  5. IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY&lt;br /&gt;
     FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES&lt;br /&gt;
     ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY&lt;br /&gt;
     DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE&lt;br /&gt;
     POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
 &lt;br /&gt;
  6. THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,&lt;br /&gt;
     INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,&lt;br /&gt;
     FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE&lt;br /&gt;
     IS PROVIDED ON AN &amp;quot;AS IS&amp;quot; BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE&lt;br /&gt;
     NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR&lt;br /&gt;
     MODIFICATIONS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Ignore_case&amp;diff=13473</id>
		<title>Ignore case</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Ignore_case&amp;diff=13473"/>
		<updated>2016-03-07T03:47:36Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[ignore_case]] setting (default: '''on''', ''except in PyMOL 1.8.0.0 - 1.8.0.4'') controls whether PyMOL does case sensitive matching of atomic identifiers and selection operators in the selection language. Most notably, it affects whether chain identifiers are matched case sensitive, which becomes relevant when using upper and lower case chain identifiers in a structure with more than 26 chains.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px 20px; border: 1px solid #c33; background-color: #fcc&amp;quot;&amp;gt;&lt;br /&gt;
The default value was changed to '''off''' in PyMOL 1.8.0.0. However, due to undesired side effects, the '''on''' default was restored in 1.8.0.5.&lt;br /&gt;
&lt;br /&gt;
The next PyMOL version (expect 1.8.2) will introduce a new [[ignore_case_chain]] setting to address the issue of mixed case chain identifiers.&lt;br /&gt;
&lt;br /&gt;
See also: https://sourceforge.net/p/pymol/mailman/message/34815599/&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Load 1a00 which has chains A, B, C, D&lt;br /&gt;
&lt;br /&gt;
 PyMOL&amp;gt;fetch 1a00, async=0&lt;br /&gt;
&lt;br /&gt;
1) case insensitive selection language (default for PyMOL &amp;lt;= 1.7.6 and &amp;gt;= 1.8.0.5)&lt;br /&gt;
&lt;br /&gt;
 PyMOL&amp;gt;set ignore_case&lt;br /&gt;
  Setting: ignore_case set to on.&lt;br /&gt;
 PyMOL&amp;gt;count_atoms chain A&lt;br /&gt;
  count_atoms: 1164 atoms&lt;br /&gt;
 PyMOL&amp;gt;count_atoms chain a&lt;br /&gt;
  count_atoms: 1164 atoms&lt;br /&gt;
&lt;br /&gt;
2) case sensitive selection language (default for PyMOL 1.8.0.0 - 1.8.0.4)&lt;br /&gt;
&lt;br /&gt;
 PyMOL&amp;gt;set ignore_case, off&lt;br /&gt;
  Setting: ignore_case set to off.&lt;br /&gt;
 PyMOL&amp;gt;count_atoms chain A&lt;br /&gt;
  count_atoms: 1164 atoms&lt;br /&gt;
 PyMOL&amp;gt;count_atoms chain a&lt;br /&gt;
  count_atoms: 0 atoms&lt;br /&gt;
&lt;br /&gt;
== Best Practice for Scripting ==&lt;br /&gt;
&lt;br /&gt;
When writing scripts or plugins, all selection expressions should be strict about case (e.g. &amp;quot;name CA&amp;quot; and not &amp;quot;name ca&amp;quot;) to not depend on the users setting of [[ignore_case]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings]]&lt;br /&gt;
[[Category:Selecting]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_Names&amp;diff=13471</id>
		<title>Get Names</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_Names&amp;diff=13471"/>
		<updated>2016-03-07T03:47:36Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''get_names''' returns a list of object and/or selection names.&lt;br /&gt;
&lt;br /&gt;
===PYMOL API===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.get_names(type,enabled_only,selection)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ARGUMENTS===&lt;br /&gt;
* '''type : string''' determines the type of objects to be returned. It can take any of the following values:&lt;br /&gt;
** '''objects''' Structure objects&lt;br /&gt;
** '''selections''' All selection&lt;br /&gt;
** '''all''' Objects and Selections&lt;br /&gt;
** '''public_objects''' (default)&lt;br /&gt;
** '''public_selections'''&lt;br /&gt;
** '''public_nongroup_objects'''&lt;br /&gt;
** '''public_group_objects'''&lt;br /&gt;
** '''nongroup_objects'''&lt;br /&gt;
** '''group_objects'''&lt;br /&gt;
* '''enabled_only : boolean''' If 1, only enabled objects are returned. Default 0 (all objects)&lt;br /&gt;
* '''selection'''&lt;br /&gt;
===NOTES===&lt;br /&gt;
The default behavior is to return only object names.&lt;br /&gt;
&lt;br /&gt;
=== EXAMPLES ===&lt;br /&gt;
Multiple alignments&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# structure align all proteins in PyMOL to the protein named &amp;quot;PROT&amp;quot;.  Effectively a &lt;br /&gt;
# poor multiple method for multiple structure alignment.&lt;br /&gt;
for x in cmd.get_names(&amp;quot;all&amp;quot;): cealign( &amp;quot;PROT&amp;quot;, x)&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Determine whether or not an object (objName) is enabled:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
if objName in cmd.get_names(enabled_only=1):&lt;br /&gt;
    print objName, &amp;quot;is enabled&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[get_type]], [[get_names_of_type]], [[count_atoms]], [[count_states]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Get Names]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_Color_Tuples&amp;diff=13469</id>
		<title>Get Color Tuples</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_Color_Tuples&amp;diff=13469"/>
		<updated>2016-03-07T03:47:36Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Get Color Indices]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_Color_Indices&amp;diff=13467</id>
		<title>Get Color Indices</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_Color_Indices&amp;diff=13467"/>
		<updated>2016-03-07T03:47:36Z</updated>

		<summary type="html">&lt;p&gt;Bell: 10 revisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''get_color_indices''' in combination with '''get_color_tuple''' will retrieve the RGB values for colors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
print cmd.get_color_indices()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will retrieve the Pymol color names and corresponding internal color indices. The Pymol names can be used to designate color for objects, see [[Color]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;print cmd.get_color_tuple(index-number)&amp;lt;/source&amp;gt; will retrieve individual RGB components when ''index-number'' is replaced with one of the color indices from above.&lt;br /&gt;
&lt;br /&gt;
The color index, an integer, gets returned when color is returned while employing [[Iterate]]. You can thus use the  '''get_color_tuple''' command above to convert that to RGB color values if you need to use the colors outside Pymol.&lt;br /&gt;
&lt;br /&gt;
Tangentially related is the fact you can name additional colors,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set_color color-name, [r,b,g]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will create a new color that will appear in the GUI list.  From the&lt;br /&gt;
open-source GUI you can use the &amp;quot;add&amp;quot; button in the color list viewer.&lt;br /&gt;
In MacPyMOL, enter the new name into the MacPyMOL color editor window,&lt;br /&gt;
set the RGBs, and then click Apply.&lt;br /&gt;
See [[Set Color]] for more details and examples.&lt;br /&gt;
The colors created will be added to the end of the list of Pymol's color indices that you can view the '''get_color_indices()''' command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Get_Color_Tuples]]&lt;br /&gt;
* [[Iterate]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Get Color Indices]]&lt;br /&gt;
[[Category:Coloring|Get Color Indices]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Fuse&amp;diff=13456</id>
		<title>Fuse</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Fuse&amp;diff=13456"/>
		<updated>2016-03-07T03:47:33Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''fuse''' joins two objects into one by forming a bond.  A copy of&lt;br /&gt;
the object containing the first atom is moved so as to form an&lt;br /&gt;
approximately reasonable bond with the second, and is then merged&lt;br /&gt;
with the first object.&lt;br /&gt;
 &lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
 fuse [ selection1 [, selection2 [, mode [, recolor [, move ]]]]]&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
 &lt;br /&gt;
* selection1 = str: single atom selection (will be copied to object 2) {default: (pk1)}&lt;br /&gt;
* selection2 = str: single atom selection {default: (pk2)}&lt;br /&gt;
* mode = int: {default: 0}&lt;br /&gt;
** mode=0: &lt;br /&gt;
** mode=1: adopt segi/chain/resn`resi&lt;br /&gt;
** mode=2: adopt segi/chain&lt;br /&gt;
** mode=3: don't move and don't create a bond, just combine into single object&lt;br /&gt;
* recolor = bool: recolor C atoms to match target {default: 1}&lt;br /&gt;
* move = bool: {default: 1}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Phosphorylate a serine residue:&lt;br /&gt;
&lt;br /&gt;
 fetch 1ubq, async=0&lt;br /&gt;
 &lt;br /&gt;
 fragment phosphite&lt;br /&gt;
 remove phosphite &amp;amp; elem H&lt;br /&gt;
 &lt;br /&gt;
 fuse phosphite &amp;amp; elem P, /1ubq///65/OG, mode=1&lt;br /&gt;
 delete phosphite&lt;br /&gt;
 &lt;br /&gt;
 show sticks, resi 65&lt;br /&gt;
 orient resi 65&lt;br /&gt;
 unpick&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
Each selection must include a single atom in each object.&lt;br /&gt;
The atoms can both be hydrogens, in which case they are&lt;br /&gt;
eliminated, or they can both be non-hydrogens, in which&lt;br /&gt;
case a bond is formed between the two atoms.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Bond]], [[Unbond]], [[Attach]], [[Replace]], [[Remove_picked]] &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Fuse]]&lt;br /&gt;
[[Category:Editing Module|Fuse]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Color&amp;diff=13454</id>
		<title>Color</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Color&amp;diff=13454"/>
		<updated>2016-03-07T03:47:32Z</updated>

		<summary type="html">&lt;p&gt;Bell: 5 revisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''color''' sets the color of an object or an atom selection to a predefined, named color. For an overview of predifined colors, see [[Color Values]]. For a script that enumerates all the colors see, [[List_Colors]]. If you want to define your own colors, see [[Set_Color]].&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
color color-name&lt;br /&gt;
color color-name, object-name&lt;br /&gt;
color color-name, (selection)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===PYMOL API===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;cmd.color( string color, string selection )&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==EXAMPLES==&lt;br /&gt;
===Color all carbons yellow===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;color yellow, (name C*)&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Color by Spectrum Example===&lt;br /&gt;
Color by spectrum is in the GUI menu but did you realize that the spectrum is not limited to a simple rainbow?&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
spectrum count, palette, object_name&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For available palettes and more details see: [[spectrum]]&lt;br /&gt;
&lt;br /&gt;
===B-Factors===&lt;br /&gt;
The command to color a molecule by B-Factors (B Factors) is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
spectrum b, selection=SEL&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where '''SEL''' is a valid selection, for example, &amp;quot;protA and n. CA&amp;quot;, for protein A's alpha carbons.&lt;br /&gt;
&lt;br /&gt;
For more details see: [[spectrum]]&lt;br /&gt;
&lt;br /&gt;
====Reassigning B-Factors and Coloring====&lt;br /&gt;
It is commonplace to replace the B-Factor column of a protein with some other  biochemical property at that residue, observed from some calculation or experiment.  PyMOL can easily reassign the B-Factors and color them, too.  The following example will load a protein, set ALL it's B Factors to &amp;quot;0&amp;quot;, read in a list of properties for each alpha carbon in the proteins, assign those new values as the B-Factor values and color by the new values.  This example is possible because commands PyMOL  does not recognize are passed to the Python interpreter --- a very powerful tool.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# load the protein&lt;br /&gt;
cmd.load(&amp;quot;protA.pdb&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# open the file of new values (just 1 column of numbers, one for each alpha carbon)&lt;br /&gt;
inFile = open(&amp;quot;newBFactors&amp;quot;, 'r')&lt;br /&gt;
&lt;br /&gt;
# create the global, stored array&lt;br /&gt;
stored.newB = []&lt;br /&gt;
&lt;br /&gt;
# read the new B factors from file&lt;br /&gt;
for line in inFile.readlines(): stored.newB.append( float(line) )&lt;br /&gt;
&lt;br /&gt;
# close the input file&lt;br /&gt;
inFile.close()&lt;br /&gt;
&lt;br /&gt;
# clear out the old B Factors&lt;br /&gt;
alter protA, b=0.0&lt;br /&gt;
&lt;br /&gt;
# update the B Factors with new properties&lt;br /&gt;
alter protA and n. CA, b=stored.newB.pop(0)&lt;br /&gt;
&lt;br /&gt;
# color the protein based on the new B Factors of the alpha carbons&lt;br /&gt;
cmd.spectrum(&amp;quot;b&amp;quot;, &amp;quot;protA and n. CA&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to save the file with the new B Factor values for each alpha carbon,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.save(&amp;quot;protA_newBFactors.pdb&amp;quot;, &amp;quot;protA&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or similar is all you need.&lt;br /&gt;
&lt;br /&gt;
A script (data2bfactor.py) that loads data into the B-factor (b) or occupancy (q) columns from an external file can be found in Robert Campbell's PyMOL script repository (http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/)&lt;br /&gt;
&lt;br /&gt;
====Reassigning B-Factors and Coloring - from file ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
reinitialize&lt;br /&gt;
prot=&amp;quot;1XYZ&amp;quot;&lt;br /&gt;
cmd.fetch(prot,async=0)&lt;br /&gt;
&lt;br /&gt;
# Set b value to zero&lt;br /&gt;
cmd.alter(prot,b=0.0)&lt;br /&gt;
cmd.show_as(&amp;quot;cartoon&amp;quot;,prot)&lt;br /&gt;
&lt;br /&gt;
python&lt;br /&gt;
inFile = open(&amp;quot;phi_values.txt&amp;quot;, 'r')&lt;br /&gt;
val_list = []&lt;br /&gt;
for line in inFile.readlines()[1:]:&lt;br /&gt;
    split = line.split()&lt;br /&gt;
    resn = split[0][0] &lt;br /&gt;
    resi = split[0][1:-1]&lt;br /&gt;
    phi_ppm2 = float(split[1])&lt;br /&gt;
    phi_ppm2_err = float(split[3])&lt;br /&gt;
    R2_0 = float(split[4])&lt;br /&gt;
    R2_0_err = float(split[6])&lt;br /&gt;
    print &amp;quot;Resn=%s Resi=%s, phi_ppm2=%2.2f, phi_ppm2_err=%2.2f, R2_0=%2.2f, R2_0_err=%2.2f&amp;quot;%(resn,resi,phi_ppm2,phi_ppm2_err,R2_0,R2_0_err)&lt;br /&gt;
&lt;br /&gt;
    val_list.append(phi_ppm2)&lt;br /&gt;
    cmd.alter(&amp;quot;%s and resi %s and n. CA&amp;quot;%(prot,resi), &amp;quot;b=%s&amp;quot;%phi_ppm2)&lt;br /&gt;
&lt;br /&gt;
python end&lt;br /&gt;
minval = min(val_list)&lt;br /&gt;
print minval&lt;br /&gt;
maxval = max(val_list)&lt;br /&gt;
print maxval&lt;br /&gt;
cmd.spectrum(&amp;quot;b&amp;quot;, &amp;quot;blue_white_red&amp;quot;, &amp;quot;%s and n. CA&amp;quot;%prot, minimum=0, maximum=maxval)&lt;br /&gt;
cmd.ramp_new(&amp;quot;ramp_obj&amp;quot;, prot, range=[0, minval, maxval], color=&amp;quot;[blue, white, red ]&amp;quot;)&lt;br /&gt;
cmd.save(&amp;quot;%s_newBFactors.pdb&amp;quot;%prot, &amp;quot;%s&amp;quot;%prot)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expanding to Surface ===&lt;br /&gt;
See [[Expand_To_Surface]].&lt;br /&gt;
&lt;br /&gt;
If you have run the above code and would like the colors to be shown in the [[Surface]] representation, too, then you need to do the following:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Assumes alpha carbons colored from above.&lt;br /&gt;
create ca_obj, your-object-name and name ca &lt;br /&gt;
ramp_new ramp_obj, ca_obj, [0, 10], [-1, -1, 0]&lt;br /&gt;
set surface_color, ramp_obj, your-object-name&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thanks to Warren, for this one.&lt;br /&gt;
&lt;br /&gt;
=== Getting Atom Colors ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
stored.list = []&lt;br /&gt;
iterate all, stored.list.append(color) # use cmd.get_color_tuple(color) to convert color index to RGB values&lt;br /&gt;
print stored.list&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, you can [[label]] each atom by it's color code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
label all, color&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What colors does PyMOL currently have? ===&lt;br /&gt;
basic colors can be manually accessed and edited from the PyMOL menu under '''Setting''' --&amp;gt; '''Colors...'''&amp;lt;br&amp;gt;&lt;br /&gt;
At the Pymol prompt, you can use the command [[Get Color Indices]] to get a list of Pymols named colors.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Get_colors]] is a script that allows accessing colors as well.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Color States Individually ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1nmr&lt;br /&gt;
set all_states&lt;br /&gt;
&lt;br /&gt;
# the object has 20 states, so we can set separate line colors&lt;br /&gt;
# for each state as follows:&lt;br /&gt;
for a in range(1,21): cmd.set(&amp;quot;line_color&amp;quot;,&amp;quot;auto&amp;quot;,&amp;quot;1nmr&amp;quot;,a)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Or, we can do it differently,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# start over,&lt;br /&gt;
fetch 1nmr&lt;br /&gt;
&lt;br /&gt;
# break apart the object by state&lt;br /&gt;
split_states 1nmr&lt;br /&gt;
&lt;br /&gt;
# delete the original&lt;br /&gt;
dele 1nmr&lt;br /&gt;
&lt;br /&gt;
# and color by object (carbons only)&lt;br /&gt;
util.color_objs(&amp;quot;elem c&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# (all atoms)&lt;br /&gt;
util.color_objs(&amp;quot;all&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SEE ALSO ==&lt;br /&gt;
&lt;br /&gt;
* [[Advanced Coloring]]&lt;br /&gt;
* [[Get Color Indices]]&lt;br /&gt;
* [[spectrum]]&lt;br /&gt;
* [[Ramp_New]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Objects_and_Selections|Color]]&lt;br /&gt;
[[Category:Commands|Color]]&lt;br /&gt;
[[Category:States|Coloring states individually]]&lt;br /&gt;
[[Category:Coloring|Color]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=COLLADA&amp;diff=13448</id>
		<title>COLLADA</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=COLLADA&amp;diff=13448"/>
		<updated>2016-03-07T03:47:30Z</updated>

		<summary type="html">&lt;p&gt;Bell: 2 revisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''COLLADA''' is an XML-based open 3D graphics format, designed to be used as an interchange format among various graphics programs.  Beginning with version 1.7.3.2 (SVN rev4097) in the Open Source codebase, PyMOL is able to export COLLADA files, which have a &amp;quot;.dae&amp;quot; extension.&lt;br /&gt;
&lt;br /&gt;
=Details=&lt;br /&gt;
COLLADA format defines a scene, with a camera and various geometric elements, which are colored and lit according to the properties of the material the object is made from and any effects (e.g. shaders) applied to it.  PyMOL exports the scene exactly as it looks in the viewport when the save command is executed, so the orientations and colors of the objects should be the same.  It currently saves every enabled object in the scene, regardless of any selection passed to the `save` command.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
save file.dae&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Full support of all standard representations (cartoon, stick, line, sphere, surface, etc.)&lt;br /&gt;
* Customizable output quality and file size, based on quality settings for active representations (e.g. [[surface_quality]])&lt;br /&gt;
* Transparency support&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related Settings ==&lt;br /&gt;
* [[collada_export_lighting]] - Optionally include PyMOL's lighting information.&lt;br /&gt;
* [[collada_geometry_mode]] - Specify how geometry elements are presented.&lt;br /&gt;
* [[geometry_export_mode]] - Exclude camera as well as lighting information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
* '''Shaders.'''  In version 1.4 of the COLLADA specification, only vertex-based meshes are defined, so all regular geometric shapes (e.g. spheres, cylinders, cones) have to be converted into a series of triangle meshes.  This produces output similar to what you would see in PyMOL with `use_shaders` turned off.  (Version 1.5 of the COLLADA spec includes &amp;quot;boundary representation&amp;quot; (&amp;lt;brep&amp;gt;) elements that define such geometric shapes as you might expect: a sphere is defined by a point and a radius, a cylinder by two points and a radius, a cone by two points and two radii.  However, apparently due to the complexity of the physics portion of the 1.5 specification, few programs have even attempted to adopt it yet, so we're stuck with old-school triangle meshes.)&lt;br /&gt;
&lt;br /&gt;
* '''Lighting.'''  Whereas in PyMOL, the lighting of the object appears similar no matter how the object is rotated--that is, the lights move with the camera or viewport--in COLLADA, the lights are fixed in the scene with the objects, and therefore, with PyMOL `[[light_count]]` of 2 or higher, only one side of the objects is lit with the directional lights; the other side appears dark.  For this reason, PyMOL's lights are excluded from COLLADA output files by default.  To include lighting in the output file, turn on the `[[collada_export_lighting]]` setting.&lt;br /&gt;
&lt;br /&gt;
* '''Labels.'''  Like lights, labels would be fixed with the objects, so from all but a narrow range of orientations, the text would be unreadable.&lt;br /&gt;
&lt;br /&gt;
* '''Volumes.'''  PyMOL's volume representation consists of a series of evenly spaced planes perpendicular to the viewport, the orientation of which is changed whenever the view is changed.  Unfortunately, this makes them essentially useless in a COLLADA scene as well, as, once the original orientation is changed, the planes would look less like a 3D volume projection, and more like a stack of flat images slicing through the rest of the scene.&lt;br /&gt;
&lt;br /&gt;
== Increasing the Quality ==&lt;br /&gt;
You can increase the number of triangles exported, and therefore the smoothness of the resulting objects, by increasing the following settings. &lt;br /&gt;
* surface_quality&lt;br /&gt;
* sphere_quality&lt;br /&gt;
* stick_quality&lt;br /&gt;
* cartoon_sampling&lt;br /&gt;
Conversely, to decrease the file size, decrease the settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:OutputFormats]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Auto_show_classified&amp;diff=13445</id>
		<title>Auto show classified</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Auto_show_classified&amp;diff=13445"/>
		<updated>2016-03-07T03:47:29Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When loading structure files, the [[auto_show_classified]] setting sets up representations based on molecule classification (depends on [[auto_classify_atoms]]).&lt;br /&gt;
&lt;br /&gt;
Available from the Tcl/Tk menu: '''Setting &amp;gt; Auto Show ... &amp;gt; ...'''&lt;br /&gt;
&lt;br /&gt;
''New in PyMOL 1.8.2''&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
 set auto_show_classified&lt;br /&gt;
 fetch 1rx1&lt;br /&gt;
&lt;br /&gt;
== Values ==&lt;br /&gt;
&lt;br /&gt;
* 0: off (default)&lt;br /&gt;
* 1: show [[Single-word_Selectors|polymer]] as [[cartoon]], [[Single-word_Selectors|organic]] as [[sticks]], and [[Single-word_Selectors|inorganic]] as [[spheres]]&lt;br /&gt;
* 2: like 1, but apply [[auto_show_lines]] and [[auto_show_nonbonded]] in addition&lt;br /&gt;
* 3: simplified version, show polymer as [[ribbon]], organic and inorganic as [[lines]] or [[nonbonded]]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[show]]&lt;br /&gt;
* [[hide]]&lt;br /&gt;
* [[auto_show_lines]]&lt;br /&gt;
* [[auto_show_nonbonded]]&lt;br /&gt;
* [[auto_classify_atoms]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Advanced_Coloring&amp;diff=13443</id>
		<title>Advanced Coloring</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Advanced_Coloring&amp;diff=13443"/>
		<updated>2016-03-07T03:47:29Z</updated>

		<summary type="html">&lt;p&gt;Bell: 2 revisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Coloring Molecules=&lt;br /&gt;
&lt;br /&gt;
==Basic Coloring==&lt;br /&gt;
Any molecule in PyMOL can be assigned a color using the small rightmost buttons in the object list (in the upper right part of the main GUI window. The [[Color]] command will do the same.&lt;br /&gt;
&lt;br /&gt;
PyMOL has a predefined set of colors that can be edited in the ''Settings-&amp;gt;Colors'' menu. &lt;br /&gt;
Alternatively, you can use the [[Set_Color]] command. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Coloring secondary structures==&lt;br /&gt;
To assign helices, sheets and loops individual colors, do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
color red, ss h&lt;br /&gt;
color yellow, ss s&lt;br /&gt;
color green, ss l+''&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the colour bleeds from the ends of helices and sheets into loops, do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set cartoon_discrete_colors, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Or activate ''Cartoon -&amp;gt; Discrete Colors'' in the GUI menu.&lt;br /&gt;
&lt;br /&gt;
==Coloring by atom type==&lt;br /&gt;
The util.cba* (&amp;quot;Color By Atom&amp;quot;) commands color atoms according to type: oxygen in red, nitrogen in blue, hydrogen in white. Carbon will get a different colors, depending on the command:&lt;br /&gt;
{|&lt;br /&gt;
! command&lt;br /&gt;
! carbon color&lt;br /&gt;
|-&lt;br /&gt;
| util.cba'''g'''&lt;br /&gt;
| green&lt;br /&gt;
|-&lt;br /&gt;
| util.cba'''c'''&lt;br /&gt;
| cyan&lt;br /&gt;
|-&lt;br /&gt;
| util.cba'''m'''&lt;br /&gt;
| light magenta&lt;br /&gt;
|-&lt;br /&gt;
| util.cba'''y'''&lt;br /&gt;
| yellow&lt;br /&gt;
|-&lt;br /&gt;
| util.cba'''s'''&lt;br /&gt;
| salmon&lt;br /&gt;
|-&lt;br /&gt;
| util.cba'''w'''&lt;br /&gt;
| white/grey&lt;br /&gt;
|-&lt;br /&gt;
| util.cba'''b'''&lt;br /&gt;
| slate&lt;br /&gt;
|-&lt;br /&gt;
| util.cba'''o'''&lt;br /&gt;
| bright orange&lt;br /&gt;
|-&lt;br /&gt;
| util.cba'''p'''&lt;br /&gt;
| purple&lt;br /&gt;
|-&lt;br /&gt;
| util.cba'''k'''&lt;br /&gt;
| pink&lt;br /&gt;
|}&lt;br /&gt;
For instance:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
  util.cbay three&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will color the object ''three'' by atom type, with the carbon atoms in yellow.&lt;br /&gt;
&lt;br /&gt;
The util.cnc command will color all the atoms according to type, as in the util.cba* commands stated above, except for the C-atoms.&lt;br /&gt;
&lt;br /&gt;
For instance:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
  util.cnc three&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will color the object ''three'' by atom type, but leave the color of the C-atom unaltered.&lt;br /&gt;
&lt;br /&gt;
==CMYK-safe Colors==&lt;br /&gt;
There are two distinct color spaces on computers: RGB (red-green-blue), which is for screens, and CMYK (cyan-magenta-yellow-black), which is for printing.&lt;br /&gt;
Some RGB triplets do not have equivalents in CMYK space. As a result, a figure that looks great on a screen can come out with unpredictable colors when printed.&lt;br /&gt;
&lt;br /&gt;
Most applications do a good job with RGB-to-CMYK conversions for photos, but do not do such a good job with graphics that use pure primary colors. For example, reds are generally OK, but pure blues and greens do not translate very well.&lt;br /&gt;
&lt;br /&gt;
Here are some RGB values that are within the CMYK gamut (i.e. are &amp;quot;CMYK-safe&amp;quot;):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#optimized rgb values for cmyk output:&lt;br /&gt;
set_color dblue= [0.05 , 0.19 , 0.57]&lt;br /&gt;
set_color blue=  [0.02 , 0.50 , 0.72]&lt;br /&gt;
set_color mblue= [0.5  , 0.7  , 0.9 ]&lt;br /&gt;
set_color lblue= [0.86 , 1.00 , 1.00]&lt;br /&gt;
&lt;br /&gt;
set_color green= [0.00 , 0.53 , 0.22]&lt;br /&gt;
set_color lgreen=[0.50 , 0.78 , 0.50]&lt;br /&gt;
set_color yellow=[0.95 , 0.78 , 0.00]&lt;br /&gt;
set_color orange=[1.00 , 0.40 , 0.0 ]&lt;br /&gt;
&lt;br /&gt;
# these are trivial&lt;br /&gt;
set_color red=   [1.00 , 0.00 , 0.00]&lt;br /&gt;
set_color mred=  [1.00 , 0.40 , 0.40]&lt;br /&gt;
set_color lred=  [1.00 , 0.80 , 0.80]&lt;br /&gt;
set_color vlred= [1.00 , 0.90 , 0.90]&lt;br /&gt;
set_color white= [1.00 , 1.00 , 1.00]&lt;br /&gt;
set_color vlgray=[0.95 , 0.95 , 0.95]&lt;br /&gt;
set_color lgray= [0.90 , 0.90 , 0.90]&lt;br /&gt;
set_color gray=  [0.70 , 0.70 , 0.70]&lt;br /&gt;
set_color dgray= [0.50 , 0.50 , 0.50]&lt;br /&gt;
set_color vdgray=[0.30 , 0.30 , 0.30]&lt;br /&gt;
set_color black= [0.00 , 0.00 , 0.00]&lt;br /&gt;
##&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that there are default atom colors such as &amp;quot;carbon&amp;quot;, &amp;quot;nitrogen&amp;quot;, &amp;quot;oxygen&amp;quot;, &amp;quot;hydrogen&amp;quot;, &amp;quot;sulfur&amp;quot;, etc. which should also be redefined:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set_color carbon= [0.00 , 0.53 , 0.22]&lt;br /&gt;
etc.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Coloring with 'chainbows' from a script==&lt;br /&gt;
The chainbow function can be invoked by:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
util.chainbow(&amp;quot;object-name&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Assign color by B-factor==&lt;br /&gt;
B-factor coloring can be done with the [[spectrum]] command. Example:&lt;br /&gt;
&lt;br /&gt;
 spectrum b, blue_white_red, minimum=20, maximum=50&lt;br /&gt;
 as cartoon&lt;br /&gt;
 cartoon putty&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
[[Color]], [[Spectrum]]&lt;br /&gt;
&lt;br /&gt;
==Creating a Color bar==&lt;br /&gt;
To show a vertical/horizontal color bar indiacting the b-factor variation, use the script pseudobar.pml on the structure pseudobar.pdb, or do the following:&lt;br /&gt;
# Create a pdb-file which contains CA positions only, whereas the numbers correspond to your wanted increments of colors. Be sure that CA's are separated by a contant value, say 5 Angstroem.&lt;br /&gt;
# Load this new pseudobar-pdb file into PyMOL, make bonds between increment 1 and increment 2 [increment 2 and increment 3 and so on...], define/assign a smooth color for each increment (copy colors definition from automatically created colors made by b-factor script) and show the b-factor bar as lines (or sticks).&lt;br /&gt;
&lt;br /&gt;
Also, see the newly created [[spectrumbar]] script!&lt;br /&gt;
&lt;br /&gt;
==Coloring insides and outsides of helices differently==&lt;br /&gt;
The inside of helices can be adressed with:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set cartoon_highlight_color, red&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==Coloring all objects differently==&lt;br /&gt;
Is there a simple way to colour each object currently loaded, with a different colour?&lt;br /&gt;
There is a script [[Color_Objects |color_obj.py]] that does the job.&lt;br /&gt;
&lt;br /&gt;
USAGE&lt;br /&gt;
&lt;br /&gt;
        color_obj(rainbow=0)&lt;br /&gt;
&lt;br /&gt;
	This function colours each object currently in the PyMOL heirarchy&lt;br /&gt;
	with a different colour.  Colours used are either the 22 named&lt;br /&gt;
	colours used by PyMOL (in which case the 23rd object, if it exists,&lt;br /&gt;
	gets the same colour as the first), or are the colours of the rainbow&lt;br /&gt;
&lt;br /&gt;
==List the color of atoms==&lt;br /&gt;
To retrieve the color for all residues in a selection, you can iterate over it from the PyMOL command line&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
iterate all, print color&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
In Python, it looks like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import pymol&lt;br /&gt;
pymol.color_list = []&lt;br /&gt;
cmd.iterate('all', 'pymol.color_list.append(color)')&lt;br /&gt;
print pymol.color_list&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The colors listed will be in terms of Pymol indexing system, see [[Get Color Indices]] for converting to names or rgb values.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Ramp_New]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Publication_Quality|Advanced Coloring]]&lt;br /&gt;
[[Category:Coloring|Advanced Coloring]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Talk:SuperSym&amp;diff=13440</id>
		<title>Talk:SuperSym</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Talk:SuperSym&amp;diff=13440"/>
		<updated>2016-02-08T05:26:53Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wow, nice contribution.  If it's this large, can you package it up in a tar/zip file for easier download?&lt;br /&gt;
[[User:Inchoate|Tree]] 23:02, 1 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
FYI, PyMOLWiki pages see more action and downloads when they have images/screenshots of what is being offered.  Just a hint.&lt;br /&gt;
[[User:Inchoate|Tree]] 15:34, 18 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== this script does not work ==&lt;br /&gt;
&lt;br /&gt;
I am running a six month old laptop with Windows 7. I have installed Python 3.1, cctbx and numpy 1.5 and this script still will not run at all. It keeps quitting saying &amp;quot;OOOPs&amp;quot; please install cctbx and numpy, which I can clearly see are installed. This script clearly needs more work.&lt;br /&gt;
&lt;br /&gt;
: I was also unable to get this plugin working with a resonable amount of effort. The cctbx python modules are available using the cctbx-python script, but I was unable to get PyMOL to launch from that python environment. --[[User:Sbliven|Sbliven]] ([[User talk:Sbliven|talk]]) 12:08, 13 January 2016 (UTC)&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Stereo_3D_Display_Options&amp;diff=13438</id>
		<title>Stereo 3D Display Options</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Stereo_3D_Display_Options&amp;diff=13438"/>
		<updated>2016-02-08T05:26:53Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is for aggregating the latest know-how and links to current Stereo 3D display options best suited for molecular graphics applications like PyMOL.  Please strive to provide objective factual information based on first-hand experiences while using the displays for real work and teaching.&lt;br /&gt;
&lt;br /&gt;
Let's figure out together what stereo solutions work well in this brave new post-CRT world!&lt;br /&gt;
&lt;br /&gt;
== Categories ==&lt;br /&gt;
&lt;br /&gt;
* '''[[#Active_Stereo_3D|Active Stereo 3D]]''' -- requires expensive and/or bulky shutter glasses.  For decades, this has been the standard solution for stereo 3D molecular visualization on the desktop.&lt;br /&gt;
* '''[[#Passive_Stereo_3D|Passive Stereo 3D]]''' -- requires inexpensive lightweight polarized glasses.  This is the standard solution for delivering stereo 3D to audiences of more than a small group of people.&lt;br /&gt;
* '''[[#Autostereoscopic_3D|Autostereoscopic 3D]]''' -- means that no glasses are required.  However, current autostereoscopic displays tend do not to work well for molecular graphics due to their inability to faithfully represent fine detail such as thin bonds and wire meshes.&lt;br /&gt;
&lt;br /&gt;
== Active Stereo 3D (High-Refresh) Displays ==&lt;br /&gt;
&lt;br /&gt;
This solution would be analogous to using desktop CRT monitors with shutter glasses.  &lt;br /&gt;
&lt;br /&gt;
=== LCD Displays (120 Hz)===&lt;br /&gt;
&lt;br /&gt;
* [http://us.acer.com/ac/en/US/content/model/ET.UG5HP.001 ACER GD235HZ]. 1920x1080 120Hz 2ms .&lt;br /&gt;
&lt;br /&gt;
* [http://www.planar3d.com/3d-products/sa2311w/ Planar SA2311W].  This is a high-end 23&amp;quot; 3D-ready monitor.  The resolution is 1900x1280 and has a 2ms refresh time.  This worked well for us.&lt;br /&gt;
&lt;br /&gt;
* [http://www.engadget.com/2008/08/26/viewsonic-shows-off-a-120hz-lcd-display-for-computers ViewSonic VX2265wm] (VX2268wm in Europe) - [http://www.google.com/products?q=ViewSonic%20VX2265wm&amp;amp;btnG=Search+Froogle&amp;amp;lmode=unknown On the market] and [http://sourceforge.net/mailarchive/forum.php?thread_name=DED5C399-7534-4D3D-8B19-E3676C4F1867%40weizmann.ac.il&amp;amp;forum_name=pymol-users verified working under FC 12]&lt;br /&gt;
&lt;br /&gt;
* [http://www.nvidia.com/object/product_GeForce_3D_VisionBundle_us.html Samsung 2233RZ] - On the market. Quad buffered stereo in Linux works with a [http://en.wikipedia.org/wiki/Nvidia_Quadro G8x based graphics core] or better Quadro FX card with the 3 pin mini din stereo connector (currently, the cheapest card that works in Linux is the Quadro FX 3700), 195.22 (or newer) nvidia linux binary driver, and the Nvidia 3d vision kit. Even though the Quadro FX 1400/3450/4000 cards have a 3 pin stereo connector, these will not work with Nvidia 3D vision since these have core versions less than G8x. For more information see this forum post [http://forums.nvidia.com/index.php?showtopic=91072&amp;amp;view=findpost&amp;amp;p=968627 at the Nvidia Forums]. - SP&lt;br /&gt;
&lt;br /&gt;
* USB only based stereo with the 3D vision kit works only in MS Windows (e.g. with a low end Quadro FX 370 that has no 3 pin mini din stereo connector). For more information see this forum post [http://forums.nvidia.com/index.php?showtopic=91072&amp;amp;view=findpost&amp;amp;p=968627 at the Nvidia Forums]. - SP&lt;br /&gt;
&lt;br /&gt;
* The 195.22 Nvidia linux drivers do not support the Samsung 2233RZ in Stereo mode 3 or 10 for quad buffered stereo with other stereo kits, emitters, or goggles such as those purchased from NuVision, Stereographics, or Edimensional. You cannot use NuVision, Stereographics, or Edimensional goggles with the Nvidia 3D Vision emitters. - SP&lt;br /&gt;
&lt;br /&gt;
* NVidia 3D NVision kit only supports DirectX software for GeForce (gaming cards) on Windows; users are reporting that they are not able to run PyMOL with NVision with these cards. Get a newer model low end quadro (&amp;gt; G8x graphics core) without the 3 pin mini din (e.g. Quadro 370) or with the 3 pin mini din (e.g. Quadro 3700) for Windows.&lt;br /&gt;
&lt;br /&gt;
==== NVidia NVision 3D Setup ====&lt;br /&gt;
The NVidia 3D NVision setup provides a very nice 3D experience.  You need the following to enable PyMOL to show NVision 3D on Windows.  Please review the hardware and software requirements before moving on to the installation and setup.&lt;br /&gt;
&lt;br /&gt;
=====Necessary Hardware=====&lt;br /&gt;
* Monitor: 120 Hz LCD: a [http://www.samsung.com/us/consumer/office/monitors/specialty/LS22CMFKFV/ZA/index.idx?pagetype=prd_detail&amp;amp;returnurl=|Samsung 2233RZ] or a [http://www.viewsonic.com/products/desktop-monitors/lcd/x-series/vx2265wm-fuhzion-lcd.htm|ViewSonic Fuhzion vx2265wm]&lt;br /&gt;
* Cable: [http://images.google.com/imgres?imgurl=http://www.logicsupply.com/images/dvi_connector_types.gif&amp;amp;imgrefurl=http://www.logicsupply.com/faq&amp;amp;usg=__G2BLaVTqBN4ie8fz_LJR1zc3zBc=&amp;amp;h=261&amp;amp;w=440&amp;amp;sz=15&amp;amp;hl=en&amp;amp;start=0&amp;amp;sig2=_hFM6ICIsxPq5WIAv8BCqg&amp;amp;zoom=1&amp;amp;tbnid=NIcKIs_BW_2rmM:&amp;amp;tbnh=135&amp;amp;tbnw=228&amp;amp;ei=KHN2TL-UC8P_lgfr44nsCw&amp;amp;prev=/images%3Fq%3Ddual%2Blink%2Bdvi%26hl%3Den%26biw%3D1475%26bih%3D1042%26gbv%3D2%26tbs%3Disch:1&amp;amp;itbs=1&amp;amp;iact=hc&amp;amp;vpx=136&amp;amp;vpy=323&amp;amp;dur=3153&amp;amp;hovh=173&amp;amp;hovw=292&amp;amp;tx=227&amp;amp;ty=74&amp;amp;oei=KHN2TL-UC8P_lgfr44nsCw&amp;amp;esq=1&amp;amp;page=1&amp;amp;ndsp=30&amp;amp;ved=1t:429,r:6,s:0 Dual Link DVI cable]; most  120Hz monitors will come with this cable--regardless, the cable is necessary&lt;br /&gt;
* Quadro Card: recent   [http://www.nvidia.com/page/quadrofx_family.html Quadro]   series graphics card (not a GeForce card) such as an FX 380 or 570 or later.  The GeForce cards do not support windowed openGL stereo, so we do not support these series of cards for the NVision 3D solution. For linux, you must have a quadro card that has a 3 pin mini din connector. The cheapest/oldest card that will work with linux is the Quadro 3700.&lt;br /&gt;
** '''WARNING''': The Quadro FX1400 does not support 3d vision stereo on Windows7 or Linux.&lt;br /&gt;
* Emitter: [http://www.nvidia.com/object/3d-vision-main.html|GeForce 3D Vision] hardware kit (an emitter with 3D shutter glasses). For Linux, make sure your kit comes with the 3 pin mini din &amp;quot;VESA&amp;quot; to 2.5mm stereo cable to connect from the stereo output on the video card into the emitter.&lt;br /&gt;
* GeForce Cards from series 400 onward have gained OpenGl support in recent Nvidia driver iterations (314+). This allows Pymol to be viewed in 3D using the quad buffered stereo setting with a GeForce card, 120Hz screen and 3D Vision kit.&lt;br /&gt;
&lt;br /&gt;
=====Necessary Software=====&lt;br /&gt;
* Windows XP 32 bit (testing other OSs soon!), Windows Vista&lt;br /&gt;
* Latest Quadro [http://www.nvidia.com/Download/index.aspx?lang=en-us|Graphics Drivers from NVidia].&lt;br /&gt;
* Latest [http://www.nvidia.com/Download/index.aspx?lang=en-us|3D Graphics drivers for the NVision system]--under '''Product Type''' choose '''3D Vision'''.&lt;br /&gt;
&lt;br /&gt;
=====Installation Instructions=====&lt;br /&gt;
======System Setup======&lt;br /&gt;
# Install the Quadro '''Graphics Drivers''' and reboot your machines&lt;br /&gt;
# Install the NVision Installation, hooking up the 3D emitter and glasses as directed in the instructions&lt;br /&gt;
## Make sure the 3D demos work&lt;br /&gt;
## Complete the '''3D Vision Drivers''' install (I had errors/warnings about old drivers but this did't matter)&lt;br /&gt;
# Specify how to drive the 3D by, click on&lt;br /&gt;
:::'''Windows Start Button''' &amp;gt; '''Control Panel''' &amp;gt; '''NVidia Control Panel''' &amp;gt; '''Manage 3D Settings''' (tab) &amp;gt; '''Global Settings''' (tab on the right) &amp;gt; '''Base Profile''' (tab).  Then, under '''Settings''' choose '''Stereo - Display Mode'''.  Next, select '''Generic Active Stereo (with NVidia IR Emitter)'''.  If you have a DLP monitor/TV choose the corresponding DLP option.  You '''must''' also set '''Stereo - Enable''' to '''on'''. &lt;br /&gt;
&lt;br /&gt;
======Running PyMOL======&lt;br /&gt;
That's it!  PyMOL should now work in Quad Buffered 3D Stereo using the NVidia 3D NVision system.  To run PyMOL in 3D mode on:&lt;br /&gt;
*Windows&lt;br /&gt;
:: '''Start &amp;gt; PyMOL &amp;gt; PyMOL &amp;gt; PyMOL 3D Launch (last menu option) &amp;gt; PyMOL Stereo (Quad Buffered 3D)'''&lt;br /&gt;
*Linux&lt;br /&gt;
:: pymol -S -t 1&lt;br /&gt;
* Mac&lt;br /&gt;
:: Sorry, at this time the NVision system is not known to work on Macs.&lt;br /&gt;
&lt;br /&gt;
=== DLP Projection Televisions ===&lt;br /&gt;
&lt;br /&gt;
Projection televisions tend to be too large and fuzzy for desktop use.  Also, a band of about 20 pixels around on the edge of the display are invisible, and this limitation cannot be eliminated through overscan since the image must be scanned at native resolution in order to support stereo 3D.  The workaround is to shrink the PyMOL window to cover the visible portion of the screen.  It is worth noting that true 3D-capable LCDs (as distinct from 3D-capable HDTVs) do not suffer from this problem.&lt;br /&gt;
&lt;br /&gt;
Aside from the above concerns, the quality of the DLP stereo 3D effect is exceptional:  there is absolutely no ghosting or cross-talk between the two images. &lt;br /&gt;
&lt;br /&gt;
* [http://pages.samsung.com/us/dlp3d Samsung 3D-Ready DLP HDTVs] - work with PyMOL 1.2b3 &amp;amp; later without any special drivers.  Quadro driver support is still lacking as of Feb. 1st, 2009 - WLD&lt;br /&gt;
&lt;br /&gt;
* [http://www.mitsubishi-tv.com/ Mitsubishi 3D-Ready DLP HDTVs] - not yet tested, but are expected to work with PyMOL 1.2b3 &amp;amp; later without any special drivers.  - WLD&lt;br /&gt;
&lt;br /&gt;
See [http://www.3dmovielist.com/3dhdtvs.html The 3D HDTV List] for more 3D-capable HDTV options.&lt;br /&gt;
&lt;br /&gt;
== Passive Stereo 3D Displays == &lt;br /&gt;
&lt;br /&gt;
=== One Piece Multi-layer LCD Displays ===&lt;br /&gt;
&lt;br /&gt;
Affordable!&lt;br /&gt;
&lt;br /&gt;
==== Zalman ====&lt;br /&gt;
'''iZ3D, the original supplier of Zalman display drivers has ceased operation and support as of 31 July 2012. DO NOT PURCHASE THESE MONITORS WITHOUT FURTHER CONFIRMATION of display support, the iZ3D support (required drivers, etc) is not activatable. If you do have further information, please post it here.''' [[User:Jedgold|Jedgold]] 12:21, 12 September 2012 (CDT)&lt;br /&gt;
&lt;br /&gt;
* [http://www.zalman.co.kr/eng/product/Product_read.asp?Idx=219 Zalman 22-inch 3D LCD monitor] - works with PyMOL 1.2b3 &amp;amp; later without any special drivers.  Great stereo quality provided that all drawn lines are at least 2 pixels thick.  Menus are a bit awkward to use while in stereo mode, but even so, this 650 USD display provides excellent 3D molecular visualization in both full-screen in windowed modes.  - WLD  ('''The Zalman ZM-M220W is DeLano Scientific's RECOMMENDED SOLUTION as of Feb 11, 2009!''').&lt;br /&gt;
* [http://www.zalman.co.kr/Eng/product/Product_Read.asp?idx=391 Zalman 24-inch 3D LCD monitor] - also works with PyMOL 1.2b3 &amp;amp; later under LINUX (Centos 5 x86_64 plain kernel + NVidia driver from ELRepo). I'm using an NVidia Quadro FX 580 (G96GL) graphics card (£125).  Monitor cost around £350. PyMOL automagically detects that quad buffered stereo is available on startup.--[[User:Bosmith|Bosmith]] 16:32, 2 December 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==== LG ====&lt;br /&gt;
* [http://www.lg.com/us/computer-products/monitors/LG-led-monitor-D2342P-PN.jsp LG D2342P-PN]&lt;br /&gt;
* [http://www.lg.com/uk/support-product/lg-DM2752D-PZ LG DM2752D] This (and other LG passive 3D monitors/TVs) work with PyMOL. I'm driving them using NVidia Quadro 600 graphics cards under LINUX (CentOSes 5, 6 &amp;amp; 7) with the NVidia driver from ELRepo.&lt;br /&gt;
===== On Linux =====&lt;br /&gt;
* setup by editing the xorg.conf file:&lt;br /&gt;
    Option &amp;quot;Stereo&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
&lt;br /&gt;
in the Screen section of xorg.conf and an additional:&lt;br /&gt;
&lt;br /&gt;
    Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
        Option         &amp;quot;Composite&amp;quot; &amp;quot;Disable&amp;quot;&lt;br /&gt;
    EndSection&lt;br /&gt;
&lt;br /&gt;
* launch using:&lt;br /&gt;
    pymol -S -t 6&lt;br /&gt;
&lt;br /&gt;
===== On Windows =====&lt;br /&gt;
# From the Start Menu: In the &amp;quot;PyMOL&amp;quot; folder, go into the &amp;quot;Stereo 3D Launch&amp;quot; subfolder, and select &amp;quot;PyMOL Zalman 3D (By Row)&amp;quot;. You might want to control-drag a copy of that shortcut on to your desktop in order to drag &amp;amp; drop content files onto it for stereo 3D visualization&lt;br /&gt;
# From the Command Line:&lt;br /&gt;
&lt;br /&gt;
    &amp;quot;C:\Program Files\DeLano Scientific\PyMOL\PyMOLWin.exe&amp;quot; -S -t 6&lt;br /&gt;
&lt;br /&gt;
===== On Mac =====&lt;br /&gt;
# MacPyMOL: Copy and rename the &amp;quot;MacPyMOL&amp;quot; application bundle to &amp;quot;MacPyMOLZalman&amp;quot;. You can then double-click on the MacPyMOLZalman icon or drop data files directly onto it to visualize content in the Zalman stereo 3D mode.&lt;br /&gt;
# PyMOL X11 Hybrid Mode: Copy and rename the &amp;quot;MacPyMOL&amp;quot; appplication bundle to &amp;quot;PyMOLX11Zalman&amp;quot;. After launching X11, you can then double-click on the PyMOLX11Zalman icon or drop data files directly onto it to visualize that content in the Zalman stereo 3D mode.&lt;br /&gt;
&lt;br /&gt;
''For all platforms, remember to toggle stereo on and off using the &amp;quot;set stereo&amp;quot; command:''&lt;br /&gt;
    set stereo, on&lt;br /&gt;
&lt;br /&gt;
==== iZ3D ====&lt;br /&gt;
* [http://www.iz3d.com IZ3D] - works with PyMOL 1.2b3 &amp;amp; later without any special drivers.  However, this display exhibits far too much cross-talk and interference between the two stereo images.  Not suitable for professional use.  - WLD&lt;br /&gt;
&lt;br /&gt;
* IZ3D is closed as of 31 July 2012, and will not offer support to their products. [[User:Jedgold|Jedgold]] 12:26, 12 September 2012 (CDT)&lt;br /&gt;
&lt;br /&gt;
=== Mirror-based Multi-LCD Solutions ===&lt;br /&gt;
&lt;br /&gt;
Expensive!&lt;br /&gt;
&lt;br /&gt;
* [http://www.planar3d.com Planar3D] &amp;quot;I have used these displays with nVidia Quadro graphics cards under both Windows and Linux running both PyMOL and Maestro.  They work well, and the stereo quality is excellent!&amp;quot; - WLD.&lt;br /&gt;
* [http://www.inition.co.uk/inition/product.php?URL_=product_stereovis_omnia_mimo&amp;amp;SubCatID_=3 Omnia MIMO]&lt;br /&gt;
&lt;br /&gt;
== Autostereoscopic LCD Displays ==&lt;br /&gt;
&lt;br /&gt;
Some autostereoscopic displays have the ability to switch between 2D and 3D display modes.  Others are built for 3D only.&lt;br /&gt;
&lt;br /&gt;
* [http://www.dti3d.com Dimension Technologies Inc.]&lt;br /&gt;
* [http://www.seereal.com SeeReal Technologies] &lt;br /&gt;
* [http://www.newsight.com/3d-products/displays.html NewSight Corp.]&lt;br /&gt;
&lt;br /&gt;
== Stereo 3D Projectors ==&lt;br /&gt;
&lt;br /&gt;
Although these displays require shutter glasses out of the box, when combined with the adapters below and a special &amp;quot;silvered&amp;quot; screen, they can be used to project Passive Stereo 3D to a large audience.&lt;br /&gt;
&lt;br /&gt;
=== Active Stereo 3D DLP Projectors ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.depthq.com DepthQ Stereoscopic] &amp;quot;The original DepthQ gave a very good stereo 3D effort with PyMOL, but I haven't seen their latest products.&amp;quot; - WLD.&lt;br /&gt;
* [http://www.christiedigital.com/AMEN/Products/christieMirageS4K.htm Christie MIRAGE S+4K SXGA+ 6500 LUMEN DLP™ STEREOSCOPIC PROJECTOR] &amp;quot;I have been very impressed with the stereo 3D effect produced by MIRAGE projectors equipped with StereoGraphic ZScreens running PyMOL under Windows with a high-end nVidia Quadro card.&amp;quot; - WLD.&lt;br /&gt;
&lt;br /&gt;
=== Passive Stereo 3D Adaptor Hardware for Active Stereo 3D Projectors ===&lt;br /&gt;
&lt;br /&gt;
These devices make it possible for a large audience to see projected stereo 3D using inexpensive polarized glasses.&lt;br /&gt;
&lt;br /&gt;
* [http://reald-corporate.com/scientific/projectorzscreen.asp RealD StereoGraphics Projection ZScreen]&lt;br /&gt;
&lt;br /&gt;
== Who Says What? ==&lt;br /&gt;
&lt;br /&gt;
If you provide a specific quote or endorsement above, please say who you are so that everyone can know the source of the information.&lt;br /&gt;
&lt;br /&gt;
* WLD = Warren L. DeLano of DeLano Scientific LLC&lt;br /&gt;
* SP = Sabuj Pattanayek of the Center For Structural Biology, Vanderbilt University&lt;br /&gt;
&lt;br /&gt;
[[Category:Hardware_Options]]&lt;br /&gt;
[[Category:Stereo_3D_Display]]&lt;br /&gt;
[[Category:Stereo]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Launching_From_a_Script&amp;diff=13436</id>
		<title>Launching From a Script</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Launching_From_a_Script&amp;diff=13436"/>
		<updated>2016-02-08T05:26:52Z</updated>

		<summary type="html">&lt;p&gt;Bell: 5 revisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;background-color: #ccc; padding: 20px&amp;quot;&amp;gt;&lt;br /&gt;
The recommended way to run PyMOL-Python scripts is by using PyMOL as the interpreter. This is supported by all versions of PyMOL, including the pre-compiled bundles provided by Schrödinger.&lt;br /&gt;
&lt;br /&gt;
Example from a shell:&lt;br /&gt;
&lt;br /&gt;
 shell&amp;gt; pymol -cq script.py&lt;br /&gt;
&lt;br /&gt;
Example from a running PyMOL instance:&lt;br /&gt;
&lt;br /&gt;
 PyMOL&amp;gt; run script.py&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For advanced users, Open-Source PyMOL (as well as the Schrödinger-provided &amp;quot;[http://pymol.org/download Mac alternative X11-only build]&amp;quot;) also allows to run PyMOL from an existing Python process. After importing the '''pymol''' module, PyMOL's event loop has to be started with a call to '''pymol.finish_launching()'''.&lt;br /&gt;
&lt;br /&gt;
== Example 1 ==&lt;br /&gt;
&lt;br /&gt;
Here is an example script that launches PyMol for stereo viewing on a [http://www.visbox.com/boxMain.html VisBox].  It runs PyMol fullscreen stereo, and disables the internal gui.&lt;br /&gt;
The environment (PYTHON_PATH and PYMOL_PATH) must already be set up for this example to work (see [[#Example 2|Example 2]] below for how to setup within the script).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/env python&lt;br /&gt;
 &lt;br /&gt;
# Tell PyMOL we don't want any GUI features.&lt;br /&gt;
import __main__&lt;br /&gt;
__main__.pymol_argv = [ 'pymol', '-qei' ]&lt;br /&gt;
 &lt;br /&gt;
# Importing the PyMOL module will create the window.&lt;br /&gt;
import pymol&lt;br /&gt;
 &lt;br /&gt;
# Call the function below before using any PyMOL modules.&lt;br /&gt;
pymol.finish_launching()&lt;br /&gt;
 &lt;br /&gt;
from pymol import cmd&lt;br /&gt;
cmd.stereo('walleye')&lt;br /&gt;
cmd.set('stereo_shift', 0.23)&lt;br /&gt;
cmd.set('stereo_angle', 1.0)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example 2 ==&lt;br /&gt;
&lt;br /&gt;
This script launches PyMOL without any GUI for scripting only. It enables tab-completion on the python command line and does the PyMOL environment setup (you need to adjust the '''moddir''' variable!). ''Hint: You may save this as &amp;quot;pymol-cli&amp;quot; executable.''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/python2.6 -i&lt;br /&gt;
&lt;br /&gt;
import sys, os&lt;br /&gt;
&lt;br /&gt;
# autocompletion&lt;br /&gt;
import readline&lt;br /&gt;
import rlcompleter&lt;br /&gt;
readline.parse_and_bind('tab: complete')&lt;br /&gt;
&lt;br /&gt;
# pymol environment&lt;br /&gt;
moddir='/opt/pymol-svn/modules'&lt;br /&gt;
sys.path.insert(0, moddir)&lt;br /&gt;
os.environ['PYMOL_PATH'] = os.path.join(moddir, 'pymol/pymol_path')&lt;br /&gt;
&lt;br /&gt;
# pymol launching&lt;br /&gt;
import pymol&lt;br /&gt;
pymol.pymol_argv = ['pymol','-qc'] + sys.argv[1:]&lt;br /&gt;
pymol.finish_launching()&lt;br /&gt;
cmd = pymol.cmd&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== STDOUT ==&lt;br /&gt;
&lt;br /&gt;
PyMOL captures '''sys.stdout''' and '''sys.stderr''', to control it with it's own [[feedback]] mechanism. To prevent that, save and restore both streams, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
stdout = sys.stdout&lt;br /&gt;
stderr = sys.stderr&lt;br /&gt;
pymol.finish_launching(['pymol', '-xiq'])&lt;br /&gt;
sys.stdout = stdout&lt;br /&gt;
sys.stderr = stderr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Command Line Options]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Launching]]&lt;br /&gt;
[[Category:Script_Library]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Dssr_block&amp;diff=13430</id>
		<title>Dssr block</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Dssr_block&amp;diff=13430"/>
		<updated>2016-02-08T05:26:51Z</updated>

		<summary type="html">&lt;p&gt;Bell: 2 revisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = script&lt;br /&gt;
|filename  = dssr_block.py&lt;br /&gt;
|author    = [[User:Speleo3|Thomas Holder]]&lt;br /&gt;
|license   = BSD-2-Clause&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This script adds the [[dssr_block]] command, which is a simple wrapper for the '''DSSR''' program and can create &amp;quot;block&amp;quot; shaped cartoons for nucleic acid bases and base pairs.&lt;br /&gt;
&lt;br /&gt;
''Requires the '''x3dna-dssr''' executable, obtainable from http://x3dna.org''&lt;br /&gt;
&lt;br /&gt;
See also the blog post by DSSR author Xiang-Jun Lu: http://x3dna.org/highlights/dssr-base-blocks-in-pymol-interactively&lt;br /&gt;
&lt;br /&gt;
== Recommended Setup ==&lt;br /&gt;
&lt;br /&gt;
Place the '''x3dna-dssr''' executable into '''$PATH'''. Examples:&lt;br /&gt;
&lt;br /&gt;
* Linux/Mac: '''/usr/bin/x3dna-dssr'''&lt;br /&gt;
* Windows: '''C:\Program Files\PyMOL\PyMOL\x3dna-dssr.exe'''&lt;br /&gt;
&lt;br /&gt;
The script can be [[run]], imported as a Python module, or installed with the [[Plugin Manager]].&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
 dssr_block [ selection [, state [, block_file [, block_depth&lt;br /&gt;
        [, name [, exe ]]]]]]&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
&lt;br /&gt;
* '''selection''' = str: atom selection {default: all}&lt;br /&gt;
* '''state''' = int: object state (0 for all states) {default: -1, current state}&lt;br /&gt;
* '''block_file''' = face|edge|wc|equal|minor|gray: Corresponds to the '''--block-file''' option (see [http://x3dna.org/ DSSR manual]). Values can be combined, e.g. &amp;quot;wc-minor&amp;quot;. {default: face}&lt;br /&gt;
* '''block_depth''' = float: thickness of rectangular blocks {default: 0.5}&lt;br /&gt;
* '''name''' = str: name of new CGO object {default: dssr_block##}&lt;br /&gt;
* '''exe''' = str: path to &amp;quot;x3dna-dssr&amp;quot; executable {default: x3dna-dssr}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Combining DSSR block representation with regular PyMOL cartoons:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1ehz, async=0&lt;br /&gt;
as cartoon&lt;br /&gt;
set cartoon_ladder_radius, 0.1&lt;br /&gt;
set cartoon_ladder_color, gray&lt;br /&gt;
set cartoon_nucleic_acid_mode, 1&lt;br /&gt;
dssr_block&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Joined base-pair blocks (block_file=wc):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1ehz, async=0&lt;br /&gt;
dssr_block block_file=wc&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Multi-state Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 2n2d, async=0&lt;br /&gt;
dssr_block 2n2d, 0&lt;br /&gt;
set all_states&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[3DNA]] (old, obsoleted by x3dna-dssr)&lt;br /&gt;
* [[Overview of nucleic acid cartoons]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Structural_Biology_Scripts]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=3DNA&amp;diff=13427</id>
		<title>3DNA</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=3DNA&amp;diff=13427"/>
		<updated>2016-02-08T05:26:51Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'' '''Update:''' See also the [[dssr_block]] wrapper script for '''x3dna-dssr'''.''&lt;br /&gt;
&lt;br /&gt;
3DNA[http://x3dna.org/] provides a ruby script (&amp;lt;b&amp;gt;blocview&amp;lt;/b&amp;gt;) which produces Calladine-Drew style block representations based on the standard reference frame for nucleic acids. The produced files are in raster3D format, and are also processed by molscript. Therefore to produce the following representations you will need to install:&lt;br /&gt;
&lt;br /&gt;
- 3DNA  [http://x3dna.org/]&lt;br /&gt;
&lt;br /&gt;
- Raster 3D [http://skuld.bmsc.washington.edu/raster3d/raster3d.html]&lt;br /&gt;
&lt;br /&gt;
- Molscript [http://www.avatar.se/molscript/download.html]&lt;br /&gt;
&lt;br /&gt;
Once you have the previous software installed, and the path to their binaries correctly configured, you can get the block representation for any nucleic acid. The next example shows how to do it for tRNA (PDB:ID 1ehz)&lt;br /&gt;
&lt;br /&gt;
== Invoking ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
pdb_get.py 1ehz&lt;br /&gt;
blocview -o 1ehz.pdb&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The pdb_get python script comes from [http://pldserver1.biochem.queensu.ca/~rlc/work/scripts/pdb_get.py]Dr. Robert Campbell's website.&lt;br /&gt;
&lt;br /&gt;
Once blocview is run it will generate various r3d files which can be combined with the original pdb files to produce the following image:&lt;br /&gt;
&lt;br /&gt;
== Example 1 ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:trna.png|Using tb.pdb  and t2.r3d&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To generate the previous image the following script was used:&lt;br /&gt;
trna.pml&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load tb.pdb&lt;br /&gt;
load t2.r3d&lt;br /&gt;
bg_color white&lt;br /&gt;
hide lines&lt;br /&gt;
zoom *,-5&lt;br /&gt;
set ray_trace_mode, 3&lt;br /&gt;
set ray_trace_fog, 0&lt;br /&gt;
set ray_shadows, 0&lt;br /&gt;
set orthoscopic, 1&lt;br /&gt;
set antialias, 5&lt;br /&gt;
set valence, 1&lt;br /&gt;
util.cba(29)&lt;br /&gt;
color grey, (elem C)&lt;br /&gt;
cartoon arrow&lt;br /&gt;
set cartoon_ladder_mode, 0&lt;br /&gt;
set cartoon_rect_width, 0.2&lt;br /&gt;
set cartoon_rect_length, 0.5&lt;br /&gt;
show cartoon&lt;br /&gt;
set stick_radius, 0.14&lt;br /&gt;
show sticks&lt;br /&gt;
set_view (\&lt;br /&gt;
     0.680474579,   -0.153203458,   -0.716576934,\&lt;br /&gt;
     0.658882320,   -0.300013036,    0.689829707,\&lt;br /&gt;
    -0.320666909,   -0.941552401,   -0.103208199,\&lt;br /&gt;
    -0.000084338,    0.000022471, -263.030426025,\&lt;br /&gt;
    57.723434448,   45.338260651,   20.895099640,\&lt;br /&gt;
   218.710235596,  307.348541260,    1.000000000 )&lt;br /&gt;
set cartoon_color, green, resn G&lt;br /&gt;
set cartoon_color, yellow, resn C&lt;br /&gt;
set cartoon_color, red, resn A&lt;br /&gt;
set cartoon_color, cyan, resn U&lt;br /&gt;
ray 1024,768&lt;br /&gt;
png trna.png&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example 2 ==&lt;br /&gt;
&lt;br /&gt;
An automatically generated pymol ray traced image can also be obtained by running &amp;lt;b&amp;gt;blocview&amp;lt;/b&amp;gt; from 3DNA v. 2.0 directly. Using the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
blocview -o -t=100 1ehz.pdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the result is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:X3dna_r3d_pymol.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== More ==&lt;br /&gt;
&lt;br /&gt;
For more examples of figures obtained using 3DNA and pymol follow the next link:&lt;br /&gt;
[[http://mesguerra.org/render/render.htm]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Nucleic_Acids]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Overview_of_nucleic_acid_cartoons&amp;diff=13425</id>
		<title>Overview of nucleic acid cartoons</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Overview_of_nucleic_acid_cartoons&amp;diff=13425"/>
		<updated>2016-02-08T05:26:50Z</updated>

		<summary type="html">&lt;p&gt;Bell: 4 revisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
Pymol has a complex group of settings for controlling the way nucleic acids are represented, broadly separated into:&lt;br /&gt;
* ring, for ribose and base ring(s)&lt;br /&gt;
* ladder, for the sticks connecting the backbone, ribose and base ring(s)&lt;br /&gt;
* nucleic acid, for the smooth backbone path&lt;br /&gt;
&lt;br /&gt;
Each setting can be altered with the set command. The cartoon settings affect each other so experimentation may be necessary to achieve what you want. Many of the mode settings only seem to work at the global level and cannot be applied to individual objects or selections.&lt;br /&gt;
&lt;br /&gt;
== Ring settings ==&lt;br /&gt;
&lt;br /&gt;
=== Ring mode ===&lt;br /&gt;
&lt;br /&gt;
Ring mode defines the representation of the ribose and base.&lt;br /&gt;
&amp;lt;pre&amp;gt;set cartoon_ring_mode, value&amp;lt;/pre&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!value !!align=&amp;quot;left&amp;quot;|  effect&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 0 || stick from backbone atom to N1 of purines and N3 of pyrimidines&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 1 || simple plane for ribose and base rings covering area between ring bonds&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 2 || simple plane for ribose and base rings covering area inside sticks (slightly smaller than mode 1)&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 3 || plane bounded by sticks for ribose and base rings&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 4 || large sphere of ring diameter at centre of ribose and each base ring&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 5 || small sphere of 1/10 diameter at centre of ribose and each base ring&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 6+ || appears to default to ring mode 2&lt;br /&gt;
|}&lt;br /&gt;
=== Ring finder ===&lt;br /&gt;
&lt;br /&gt;
Ring finder defines the rings which are recognised&lt;br /&gt;
&amp;lt;pre&amp;gt;set cartoon_ring_finder, value&amp;lt;/pre&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!value !! align=&amp;quot;left&amp;quot; | effect&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 0 || no rings or sticks joining them&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 1 || both ribose and base ring&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 2 || only base ring(s), stick connects directly from phosphate to ring&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 3 || very similar to ring finder 1, slight effect on transparency = distinct behaviour?&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 4 || very similar to ring finder 1, slight effect on transparency = distinct behaviour?&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 5 || sticks visible but rings invisible&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 6+ || appears to default to ring finder 5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Other settings for ring ===&lt;br /&gt;
&amp;lt;pre&amp;gt;set cartoon_ring_xxx, value&amp;lt;/pre&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
! align=&amp;quot;center&amp;quot; | xxx !! value !! align=&amp;quot;left&amp;quot; | effect&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | color || align=&amp;quot;center&amp;quot; |color || set the colour of the ring or sphere&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | width || align=&amp;quot;center&amp;quot; | float || thickness of ring for planes and sticks (modes 1, 2, 3)&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | radius ||  align=&amp;quot;center&amp;quot; |float || radius of ring for spheres (modes 4, 5), negative number gives sphere of same radius as ring in mode 4, approx 1/10 ring diameter in mode 5&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | transparency ||  align=&amp;quot;center&amp;quot; |float || transparency of ring or sphere, does not affect sticks in ring mode 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Ladder settings ==&lt;br /&gt;
&lt;br /&gt;
=== Ladder mode ===&lt;br /&gt;
&lt;br /&gt;
Ladder mode affects the sticks connecting the backbone to ribose and ribose to base, and ring mode 0 or ring finder 5.&lt;br /&gt;
&amp;lt;pre&amp;gt;set cartoon_ladder_mode, value&amp;lt;/pre&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!value !! align=&amp;quot;left&amp;quot; | effect&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 0 || no sticks shown&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 1 || sticks show&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 2+ || appears to default to ladder mode 1&lt;br /&gt;
|}&lt;br /&gt;
=== Other settings for ladder ===&lt;br /&gt;
&amp;lt;pre&amp;gt;set cartoon_ladder_xxx, value&amp;lt;/pre&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
! align=&amp;quot;center&amp;quot; | xxx !! value !! align=&amp;quot;left&amp;quot; | effect&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | color || color || colour of the stick&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | radius || float || stick width for ring modes 1, 4 and 5 (default is 0.25), in other ring modes the ladder stick width is controlled by the ring width instead&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Nucleic acid settings ==&lt;br /&gt;
&lt;br /&gt;
=== Nucleic acid mode ===&lt;br /&gt;
&amp;lt;pre&amp;gt;set cartoon_nucleic_acid_mode, value&amp;lt;/pre&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!value !! align=&amp;quot;left&amp;quot; | effect&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; |0 || smooth backbone passing through phosphorus atoms, backbone terminates at last phosphorus on either end of chain &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 1 || smooth backbone passing through ribose C3' atoms, backbone terminates at last C3' on either end of chain&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 2 || smooth backbone passing through phosphorus atoms, backbone terminates at last phosphorus on 5' end and O3' on 3' end (note takes O3' colour at terminus in default colouring)&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 3 || appears same as mode 0&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 4 || appears same as mode 2? Seems to be what Pymol uses when it first opens nucleic acid containing file because any other settings change ends and colors. &amp;lt;!--to see this in action open 1e7k and focus on chain c--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | 5+ || appears to defult to nucleic acid mode 0&lt;br /&gt;
|}&lt;br /&gt;
==== Note ====&lt;br /&gt;
Note that in ring mode 0 or ring finder 2  the stick projects from the backbone at a point midway between phosphates&lt;br /&gt;
&amp;lt;pre&amp;gt;set ribbon_nucleic_acid_mode, value&amp;lt;/pre&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
! align=&amp;quot;center&amp;quot; |xxx !! value !! align=&amp;quot;left&amp;quot; | effect&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | ribbon_nucleic_acid_mode || align=&amp;quot;center&amp;quot; | integer || has the equivalent behaviour to cartoon_nucleic_acid_mode&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Other settings for nucleic acid ===&lt;br /&gt;
&amp;lt;pre&amp;gt;set cartoon_nucleic_acid_xxx, value&amp;lt;/pre&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
! xxx !! value !! align=&amp;quot;left&amp;quot; | effect&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot; | color || color || backbone colour (default is backbone atom colour)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Third-party Wrappers ==&lt;br /&gt;
&lt;br /&gt;
* [[dssr_block]] can create &amp;quot;block&amp;quot; shaped base pair cartoons with DSSR&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Protect&amp;diff=13420</id>
		<title>Protect</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Protect&amp;diff=13420"/>
		<updated>2016-02-08T05:26:50Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''protect''' protects a set of atoms from tranformations performed using the editing features.  This is most useful when you are modifying an internal portion of a chain or cycle and do not wish to affect the rest of the molecule.&lt;br /&gt;
&lt;br /&gt;
==USAGE==&lt;br /&gt;
 protect (selection)&lt;br /&gt;
&lt;br /&gt;
==PYMOL API==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.protect(string selection)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
This example makes a very cool little, and fake, molecular movie.  Copy/paste this into PyMOL:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load $PYMOL_PATH/test/dat/pept.pdb, obj&lt;br /&gt;
&lt;br /&gt;
# create the fake trajectory (of states)&lt;br /&gt;
for a in range(2,31): cmd.create(&amp;quot;obj&amp;quot;,&amp;quot;obj&amp;quot;,1,a)&lt;br /&gt;
# remove the bond&lt;br /&gt;
unbond 5/C, 6/N&lt;br /&gt;
# This protects everything but all atoms witing 4&lt;br /&gt;
# Ang. of residue 5's carbon and residue 6's nitrogen.&lt;br /&gt;
protect not ((5/C or 6/N) extend 4)&lt;br /&gt;
&lt;br /&gt;
# do some quick sculpting&lt;br /&gt;
sculpt_activate obj, 30&lt;br /&gt;
sculpt_iterate obj, 30, 100&lt;br /&gt;
smooth obj, 30, 3&lt;br /&gt;
&lt;br /&gt;
# then program a bond-break/re-form movie&lt;br /&gt;
mset 1 x30 1 -30 30 x30 30 -1 &lt;br /&gt;
mdo 45: unbond 5/C, 6/N, quiet=1&lt;br /&gt;
mdo 100: bond 5/C, 6/N, quiet=1&lt;br /&gt;
&lt;br /&gt;
frame 100&lt;br /&gt;
&lt;br /&gt;
as sticks&lt;br /&gt;
orient 5-6/N+CA+C&lt;br /&gt;
mplay&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
[[Deprotect]], [[Mask]], [[Unmask]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Protect]]&lt;br /&gt;
[[Category:Editing Module|Protect]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Main_Page&amp;diff=13418</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Main_Page&amp;diff=13418"/>
		<updated>2016-02-08T05:26:50Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; style=&amp;quot;padding-bottom: 4em;&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-size:210%; font-weight: bold; color:#032d45; text-align:center; padding: 5px; margin-bottom: 4px;&amp;quot; | Welcome to the PyMOL Wiki!&lt;br /&gt;
|- style=&amp;quot;text-align:center; font-weight:bold; color: #6d6003; font-size: 140%; font-style: italic; font-family: serif;&amp;quot;&lt;br /&gt;
| The community-run support site for the [http://pymol.org PyMOL] molecular viewer.&lt;br /&gt;
|- style=&amp;quot;text-align:center; font-weight:bold; color: #6d6003; font-size: 140%; font-style: italic; font-family: serif;&amp;quot;&lt;br /&gt;
| New accounts: email jason (dot) vertrees (@) gmail dot com&lt;br /&gt;
|- style=&amp;quot;text-align:center; font-weight:bold; color: #6d6003; font-size: 140%; font-style: italic; font-family: serif;&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;45%&amp;quot; style=&amp;quot;background: #EDEBD5; margin-bottom: 4em; border-bottom: 1px solid #AFB29E; border-left: 1px solid #AFB29E; border-right: 1px solid #AFB29E;&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-size: 1.4em; font-weight: bold; color: #032d45; text-align:center; background: #5F7F96; padding-top:0.5em; padding-bottom: 0.25em; border-top: 2px solid #AFB29E; border-bottom: 1px solid #fff;&amp;quot; |Quick Links&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;font-size: 1.1em; color #61021F; padding: 0.5em 1em 0.5em 3em;&amp;quot;|'''[[:Category:Tutorials|Tutorials]]''' || '''[[TOPTOC|Table of Contents]]''' || '''[[:Category:Commands|Commands]]'''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;font-size: 1.1em; color #61021F; padding: 0.5em 1em 0.5em 3em;&amp;quot;|'''[[:Category:Script_Library|Script Library]]''' || '''[[:Category:Plugins|Plugins]]''' || '''[[:Category:FAQ|FAQ]]'''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;font-size: 1.1em; color #61021F; padding: 0.5em 1em 0.5em 3em;&amp;quot;|'''[[Gallery]]''' | '''[[Covers]]'''&lt;br /&gt;
||'''[[CheatSheet|PyMOL Cheat Sheet]]''' (''[[Media:PymolRef.pdf|PDF]]'')&lt;br /&gt;
||'''[[PyMOL_mailing_list|Getting Help]]'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| style=&amp;quot;vertical-align: top; width: 40%&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;jtable&amp;quot; style=&amp;quot;float: left; width: 90%;&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-size: 1.4em; font-weight: bold; text-align:left; border-bottom: 2px solid #6678b1;&amp;quot; | News &amp;amp;amp; Updates&lt;br /&gt;
|-&lt;br /&gt;
! New Script&lt;br /&gt;
| [[dssr_block]] is a wrapper for DSSR (3dna) and creates block-shaped nucleic acid cartoons&lt;br /&gt;
|-&lt;br /&gt;
! New Plugin&lt;br /&gt;
| [[Lisica|LiSiCA]] is a new plugin for 2D and 3D ligand based virtual screening using a fast maximum clique algorithm.&lt;br /&gt;
|-&lt;br /&gt;
! Official Release&lt;br /&gt;
| [http://pymol.org PyMOL v1.8.0 has been released] on Nov 18, 2015.&lt;br /&gt;
|-&lt;br /&gt;
! PyMOL Open-Source Fellowship&lt;br /&gt;
| Schrödinger is now accepting applications for the PyMOL Open-Source Fellowship program! Details on http://pymol.org/fellowship&lt;br /&gt;
|-&lt;br /&gt;
! Official Release&lt;br /&gt;
| [http://pymol.org PyMOL, AxPyMOL, and JyMOL v1.7.6 have all been released] on May 4, 2015.&lt;br /&gt;
|-&lt;br /&gt;
! New Plugin&lt;br /&gt;
| [[PyANM|PyANM]] is a new plugin for easier Anisotropic Network Model (ANM) building and visualising in PyMOL.&lt;br /&gt;
|-&lt;br /&gt;
! New Plugin&lt;br /&gt;
| [[Bondpack]] is a collection of PyMOL plugins for easy visualization of atomic bonds.&lt;br /&gt;
|-&lt;br /&gt;
! New Plugin&lt;br /&gt;
| [[MOLE 2.0: advanced approach for analysis of biomacromolecular channels|MOLE 2.0]] is a new plugin for rapid analysis of biomacromolecular channels in PyMOL.&lt;br /&gt;
|-&lt;br /&gt;
! 3D using Geforce&lt;br /&gt;
| PyMOL can now be [http://forums.geforce.com/default/topic/571604/3d-vision/3d-vision-working-with-qbs-in-opengl-software-using-geforce/2/ visualized in 3D using Nvidia GeForce video cards] (series 400+) with 120Hz monitors and Nvidia 3D Vision, this was previously only possible with Quadro video cards.&lt;br /&gt;
|-&lt;br /&gt;
! Older News&lt;br /&gt;
| See [[Older_News|Older News]].&lt;br /&gt;
|}&lt;br /&gt;
|style=&amp;quot;vertical-align: top; width: 40%&amp;quot;|&lt;br /&gt;
{| class=&amp;quot;jtable&amp;quot; style=&amp;quot;float: right; width: 90%&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-size: 1.4em; font-weight: bold; text-align:left; border-bottom: 2px solid #6678b1;&amp;quot; |Did you know...&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;div class=&amp;quot;didyouknow&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;DynamicPageList&amp;gt;&lt;br /&gt;
randomcount=1&lt;br /&gt;
category=Commands|Plugins|Script_Library|Settings&lt;br /&gt;
includepage=*&lt;br /&gt;
includemaxlength=1050&lt;br /&gt;
escapelinks=false&lt;br /&gt;
allowcachedresults=false&lt;br /&gt;
resultsheader=__NOTOC__ __NOEDITSECTION__&lt;br /&gt;
listseparators=,&amp;lt;h3&amp;gt;[[%PAGE%]]&amp;lt;/h3&amp;gt;,,\n&lt;br /&gt;
&amp;lt;/DynamicPageList&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
|style=&amp;quot;vertical-align: top; width: 18%&amp;quot;|&lt;br /&gt;
&amp;lt;DynamicPageList&amp;gt;&lt;br /&gt;
imagecontainer=Covers&lt;br /&gt;
randomcount=1&lt;br /&gt;
escapelinks=false&lt;br /&gt;
openreferences=true&lt;br /&gt;
listseparators=[[,%PAGE%,|thumb|185px|A Random PyMOL-generated Cover.  See [[Covers]].]],\n&lt;br /&gt;
ordermethod=none&lt;br /&gt;
allowcachedresults=false&lt;br /&gt;
&amp;lt;/DynamicPageList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Load_img_stack&amp;diff=13416</id>
		<title>Load img stack</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Load_img_stack&amp;diff=13416"/>
		<updated>2016-02-08T05:26:45Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = script&lt;br /&gt;
|filename  = load_img_stack.py&lt;br /&gt;
|author    = [[User:Speleo3|Thomas Holder]]&lt;br /&gt;
|license   = BSD-2-Clause&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This script adds the [[load_img_stack]] command, which loads a set of images as a map object. The images can either be individual files, or contained in a multi-page TIFF file.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
 load_img_stack pattern [, name [, grid [, channel [, normalize [, extent ]]]]]&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
&lt;br /&gt;
* '''pattern''' = str: image filename or pattern&lt;br /&gt;
* '''name''' = str: map object name to create&lt;br /&gt;
* '''grid''' = float: grid spacing in Angstrom {default: 1.0}&lt;br /&gt;
* '''channel''' = int: color channel for RGB images {default: 0}&lt;br /&gt;
* '''normalize''' = 0 or 1: normalize data {default: 1}&lt;br /&gt;
* '''extent''' = 3-float: (a,b,c) edge lengths in Angstrom, overwrites &amp;quot;grid&amp;quot; arguments if given {default: }&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
 load_img_stack img*.png, name=map, extent=(10.0, 10.0, 5.0)&lt;br /&gt;
 volume vol, map, rainbow&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[tiff2ccp4]]&lt;br /&gt;
* [[volume]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Windows_Install&amp;diff=13414</id>
		<title>Windows Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Windows_Install&amp;diff=13414"/>
		<updated>2016-02-08T05:26:45Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to install PyMOL on Microsoft Windows.&lt;br /&gt;
&lt;br /&gt;
== Incentive PyMOL ==&lt;br /&gt;
&lt;br /&gt;
[http://www.schrodinger.com Schrödinger] provides an MSI installer to paying sponsors. The bundle also includes ready-to-use [[APBS]], [[morph|RigiMOL]], an MPEG encoder for movie export, and a small molecule energy minimization engine.&lt;br /&gt;
&lt;br /&gt;
Download: http://pymol.org/download&lt;br /&gt;
&lt;br /&gt;
== Open-Source PyMOL ==&lt;br /&gt;
&lt;br /&gt;
Open-Source PyMOL is available [https://sourceforge.net/p/pymol/code/HEAD/tree/trunk/pymol/LICENSE free of charge]. It also allows sponsors to create highly customized PyMOL installations which might not be possible with the MSI installer.&lt;br /&gt;
&lt;br /&gt;
Pre-compiled Open-Source PyMOL is available free from [http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymol Christoph Gohlke of the Laboratory for Fluorescence Dynamics, University of California, Irvine].&lt;br /&gt;
&lt;br /&gt;
# Install Python 2.7 for Windows (e.g., by going to http://www.python.org/downloads/). Use the standard options (which should mean that the installation directory is C:\Python27). It may be useful if C:\Python27 is listed in your system PATH variable. &lt;br /&gt;
# Download the [http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymol appropriate wheel files], along with all requirement wheel files (including [http://www.lfd.uci.edu/~gohlke/pythonlibs/#pip pip], [http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy Numpy] and [http://www.lfd.uci.edu/~gohlke/pythonlibs/#pmw PMW]) into a single file directory, e.g., &amp;lt;code&amp;gt;C:\PyMOL_installation&amp;lt;/code&amp;gt;&lt;br /&gt;
# From this installation directory (to get there you can run &amp;lt;source lang = python&amp;gt;cd C:\PyMOL_installation&amp;lt;/source&amp;gt; from the command prompt), run:&lt;br /&gt;
&amp;lt;source lang = python&amp;gt;C:\Python27\python.exe pip-6.x.x-py2.py3-none-any.whl/pip install --no-index --find-links=&amp;quot;%CD%&amp;quot; pymol_launcher&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if &amp;lt;code&amp;gt;C:\Python27&amp;lt;/code&amp;gt; is part of your PATH variable, then running (where x refers to the version number of pip):&lt;br /&gt;
&amp;lt;source lang = python&amp;gt;python pip-6.x.x-py2.py3-none-any.whl/pip install --no-index --find-links=&amp;quot;%CD%&amp;quot; pymol_launcher&amp;lt;/source&amp;gt;&lt;br /&gt;
should suffice. To update PyMOL update the files in the PyMOL install directory and run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = python&amp;gt;pip install --upgrade --no-deps pymol.whl&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;pymol.whl&amp;lt;/code&amp;gt; is replaced by the PyMOL wheel file name (not the launcher, the launcher should not require updating). &lt;br /&gt;
&lt;br /&gt;
=== Extend PyMOL with additional scripts ===&lt;br /&gt;
If you now want to extend the capabilities of PyMOL, and take advantage of all the available plugins+scripts &amp;quot;out there&amp;quot;, then do the following. &amp;lt;br&amp;gt;&lt;br /&gt;
# First install &amp;quot;numpy&amp;quot; as an available module to Python. [http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy Select appropriate installer from here]&lt;br /&gt;
# Download the script/plugin collection [[Git | Pymol-script-repo]] from [https://github.com/Pymol-Scripts/Pymol-script-repo/zipball/master a .zip file from here]&lt;br /&gt;
 git clone https://github.com/Pymol-Scripts/Pymol-script-repo&lt;br /&gt;
# Unpack it to here: '''C:\Python27\Lib\site-packages\pymol\pymol_path\Pymol-script-repo'''   Double check that the folder name is correct and the same.&lt;br /&gt;
Open &amp;quot;Notepad&amp;quot; and write.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Add paths to sys.path so PyMOL can find modules and scripts&lt;br /&gt;
import sys, os&lt;br /&gt;
pymol_git = os.path.abspath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
os.environ['PYMOL_GIT_MOD'] = os.path.join(pymol_git,'modules')&lt;br /&gt;
sys.path.append(pymol_git)&lt;br /&gt;
sys.path.append(os.environ['PYMOL_GIT_MOD'])&lt;br /&gt;
&lt;br /&gt;
# Make setting changes to Plugin Manager&lt;br /&gt;
import pymol.plugins&lt;br /&gt;
pymol.plugins.preferences = {'instantsave': False, 'verbose': False}&lt;br /&gt;
pymol.plugins.autoload = {'apbs_tools': False}&lt;br /&gt;
pymol.plugins.set_startup_path([os.path.join(pymol_git, 'plugins'), os.path.join(sys.prefix, 'Lib', 'site-packages', 'pmg_tk', 'startup')])&lt;br /&gt;
pymol.plugins.preferences = {'instantsave': True, 'verbose': False}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
'''Then &amp;quot;File-&amp;gt;Save as-&amp;gt;All files-&amp;gt; C:\Python27\Lib\site-packages\pymol\pymol_path\run_on_startup.py'''&lt;br /&gt;
&lt;br /&gt;
Now start pymol, and enjoy all the plugins available from the menu.&lt;br /&gt;
&lt;br /&gt;
'''PyMOL''' shortcut&amp;lt;br&amp;gt;&lt;br /&gt;
Make a '''pymol''' directory in your homepath. '''mkdir %HOMEPATH%\pymol'''  Then make sure, PyMOL starts here, when you open the shortcut.&amp;lt;br&amp;gt;&lt;br /&gt;
Make a shortcut to the .cmd file, and modify it. &amp;lt;br&amp;gt;&lt;br /&gt;
Target: C:\python27\PyMOL\pymol.cmd &amp;lt;br&amp;gt;&lt;br /&gt;
Start in: %HOMEPATH%\pymol&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[pymolrc]]&lt;br /&gt;
* [[Linux Install]]&lt;br /&gt;
* [[MAC Install]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Windows]]&lt;br /&gt;
[[Category:Technical Issues|Windows Install]]&lt;br /&gt;
[[Category:Windows]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13412</id>
		<title>MAC Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MAC_Install&amp;diff=13412"/>
		<updated>2016-02-08T05:26:44Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to install PyMOL on Mac OS X.&lt;br /&gt;
&lt;br /&gt;
== Incentive PyMOL ==&lt;br /&gt;
&lt;br /&gt;
=== MacPyMOL ===&lt;br /&gt;
&lt;br /&gt;
MacPyMOL is available exclusively to paying sponsors. [http://www.schrodinger.com Schrödinger] provides a DMG package which also includes ready-to-use [[APBS]], [[morph|RigiMOL]], an MPEG encoder for movie export, and a small molecule energy minimization engine.&lt;br /&gt;
&lt;br /&gt;
Download: http://pymol.org/download&lt;br /&gt;
&lt;br /&gt;
Installation: Drag '''MacPyMOL.app''' on the '''/Applications''' shortcut. (In principle, you could drag it into any Finder window and run it from there, it doesn’t have to live in /Applications).&lt;br /&gt;
&lt;br /&gt;
Uninstallation: Move '''/Applications/MacPyMOL.app''' to Trash&lt;br /&gt;
&lt;br /&gt;
=== Launching from Command Line ===&lt;br /&gt;
&lt;br /&gt;
The unix executable resides at '''/Applications/MacPyMOL.app/Contents/MacOS/MacPyMOL'''&lt;br /&gt;
&lt;br /&gt;
=== X11 Hybrid ===&lt;br /&gt;
&lt;br /&gt;
MacPyMOL can optionally run with the same two-window GUI which PyMOL uses on Windows and Linux. This GUI has some additional features, like the [[Plugins|Plugin]] menu and the [[Builder]].&lt;br /&gt;
&lt;br /&gt;
Requires [http://xquartz.macosforge.org/ XQuartz].&lt;br /&gt;
&lt;br /&gt;
There are two ways to launch the X11 interface:&lt;br /&gt;
# rename '''/Applications/MacPyMOL.app''' to '''/Applications/MacPyMOLX11Hybrid.app'''&lt;br /&gt;
# launch the unix executable with the '''-m''' flag: '''/Applications/MacPyMOL.app/Contents/MacOS/MacPyMOL -m'''&lt;br /&gt;
&lt;br /&gt;
=== Stereo on Second Monitor ===&lt;br /&gt;
The trick to getting MacPyMOL to work in stereo on the second monitor is to force it to initially open on that display by providing an appropriate &amp;quot;-X #&amp;quot; (and perhaps -Y #) option on launch.  That way the OpenGL context will be created with stereo support.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000&lt;br /&gt;
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000 -Y 100&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Source:''' ''Warren DeLano; PyMOL Users Archive''&lt;br /&gt;
&lt;br /&gt;
== Open-Source PyMOL ==&lt;br /&gt;
&lt;br /&gt;
=== Pre-compiled ===&lt;br /&gt;
&lt;br /&gt;
Pre-compiled Open-Source PyMOL is available [https://sourceforge.net/p/pymol/code/HEAD/tree/trunk/pymol/LICENSE free of charge] with the [https://www.macports.org/ MacPorts], [http://www.finkproject.org/ Fink] and [http://brew.sh/ Homebrew] environments.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Fink&lt;br /&gt;
fink install pymol-py27&lt;br /&gt;
&lt;br /&gt;
# MacPorts&lt;br /&gt;
sudo port install pymol&lt;br /&gt;
&lt;br /&gt;
# Homebrew&lt;br /&gt;
brew install homebrew/science/pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that the dependencies are installed with the required flags:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# MacPorts&lt;br /&gt;
sudo port install tcl -corefoundation&lt;br /&gt;
sudo port install tk -quartz&lt;br /&gt;
&lt;br /&gt;
# Homebrew&lt;br /&gt;
brew install tcl-tk --with-threads --with-x11&lt;br /&gt;
brew install python --with-tcl-tk&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install from Source ===&lt;br /&gt;
&lt;br /&gt;
If you want the latest PyMOL code (warning: might include experimental changes), then follow the [[Linux_Install#Install_from_source|Linux installation instructions]]. You will need an environment like Fink, MacPorts or Homebrew to install the dependencies. Make sure you use the appropriate python interpreter (e.g. '''/sw/bin/python2.7''' when using Fink).&lt;br /&gt;
&lt;br /&gt;
=== Install APBS with Fink ===&lt;br /&gt;
&lt;br /&gt;
To use the electrostatics plugin, you will need [http://apbs.sourceforge.net/ APBS] and its dependencies.  These are also available as Fink packages, and include [http://pdb.finkproject.org/pdb/package.php/apbs APBS], [http://pdb.finkproject.org/pdb/package.php/maloc maloc] and [http://pdb.finkproject.org/pdb/package.php/pdb2pqr pdb2pqr]. If you have multiple processors available, you might wish to install the [http://pdb.finkproject.org/pdb/package.php/apbs-mpi-openmpi MPI version of APBS].&lt;br /&gt;
&lt;br /&gt;
Issuing the command&lt;br /&gt;
&lt;br /&gt;
 fink install apbs&lt;br /&gt;
&lt;br /&gt;
will install apbs and its required dependencies for you.  The fink pymol package is already preconfigured to do the right thing to use apbs as a plugin.&lt;br /&gt;
&lt;br /&gt;
=== Stereo issues ===&lt;br /&gt;
Some older Macs seem to crash with stereo graphics. If this happens to you, a workaround is to launch PyMOL explicitly in Mono mode with `pymol -M`.  You can also set up an alias in your ~/.profile:&lt;br /&gt;
&lt;br /&gt;
 alias pymol='pymol -M'&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[pymolrc]]&lt;br /&gt;
* [[Linux Install]]&lt;br /&gt;
* [[Windows Install]]&lt;br /&gt;
* [[MovieSchool_6#Exporting_your_Movie|FreeMOL installation for MPEG movie export]]&lt;br /&gt;
* [[User:Wgscott|Bill Scott’s]] [[MacOSX-specific .pymolrc file]] and his crystallographic software [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Main_Page wiki] and [http://chemistry.ucsc.edu/~wgscott/xtal/ website], including instructions on [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Getting_your_fink_installation_to_use_packages_that_I_have_pre-compiled how to install precompiled binary packages using fink].&lt;br /&gt;
* [[Launching_PyMOL#MacOS_X]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Mac]]&lt;br /&gt;
[[Category:Nucleic_Acids|MAC Install]]&lt;br /&gt;
[[Category:Technical Issues|MAC Install]]&lt;br /&gt;
[[Category:Mac|MAC Install]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=13410</id>
		<title>Linux Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=13410"/>
		<updated>2016-02-08T05:26:43Z</updated>

		<summary type="html">&lt;p&gt;Bell: 2 revisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to install PyMOL on Linux.&lt;br /&gt;
&lt;br /&gt;
== Incentive PyMOL ==&lt;br /&gt;
&lt;br /&gt;
[http://www.schrodinger.com Schrödinger] provides pre-compiled (64 bit) PyMOL to paying sponsors. The bundle also includes ready-to-use [[APBS]], [[morph|RigiMOL]], an MPEG encoder for movie export, and a small molecule energy minimization engine.&lt;br /&gt;
&lt;br /&gt;
Download: http://pymol.org/download&lt;br /&gt;
&lt;br /&gt;
== Open-Source PyMOL in Linux Distros ==&lt;br /&gt;
&lt;br /&gt;
Many Linux distributions provide binary packages for open-source PyMOL. They often do not provide the latest version, but if the provided package fits your needs this is the most convenient way to install PyMOL.&lt;br /&gt;
&lt;br /&gt;
Command line install examples for some popular distributions (note that all of these commands must be run as root or superuser):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Arch/Manjaro&lt;br /&gt;
pacman -S pymol&lt;br /&gt;
&lt;br /&gt;
# CentOS with EPEL&lt;br /&gt;
rpm -i http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm&lt;br /&gt;
yum --enablerepo=epel install pymol&lt;br /&gt;
&lt;br /&gt;
# Debian/Ubuntu/Mint&lt;br /&gt;
apt-get install pymol&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
dnf install pymol&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
emerge -av pymol&lt;br /&gt;
&lt;br /&gt;
# openSUSE (12.1 and later)&lt;br /&gt;
zypper install pymol&lt;br /&gt;
&lt;br /&gt;
# Sabayon&lt;br /&gt;
equo i -av pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install from source ==&lt;br /&gt;
&lt;br /&gt;
Installation from source gives you the latest version and is the generic way to install PyMOL.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Libraries as well as development files (headers) of the following software is&lt;br /&gt;
required:&lt;br /&gt;
&lt;br /&gt;
* [http://subversion.apache.org/ Subversion] to download the source code&lt;br /&gt;
* [http://www.python.org/ Python] (with distutils)&lt;br /&gt;
* [http://pmw.sf.net Pmw] (Python Megawidgets)&lt;br /&gt;
* OpenGL driver (I use [http://www.nvidia.com/object/unix.html NVidia])&lt;br /&gt;
* libpng&lt;br /&gt;
* freetype&lt;br /&gt;
* libxml2&lt;br /&gt;
&lt;br /&gt;
On many Linux systems, one of the following commands installs all requirements (and must be run as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Debian/Ubuntu/Mint&lt;br /&gt;
apt-get install subversion build-essential python-dev python-pmw libglew-dev \&lt;br /&gt;
  freeglut3-dev libpng-dev libfreetype6-dev libxml2-dev&lt;br /&gt;
&lt;br /&gt;
# CentOS&lt;br /&gt;
yum install subversion gcc gcc-c++ kernel-devel python-devel tkinter python-pmw glew-devel \&lt;br /&gt;
  freeglut-devel libpng-devel freetype-devel libxml2-devel&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
dnf install subversion gcc gcc-c++ kernel-devel python-devel tkinter python-pmw glew-devel \&lt;br /&gt;
  freeglut-devel libpng-devel freetype-devel libxml2-devel&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
emerge -av dev-vcs/subversion dev-lang/python dev-python/pmw media-libs/glew \&lt;br /&gt;
  media-libs/freeglut media-libs/libpng media-libs/freetype&lt;br /&gt;
&lt;br /&gt;
# openSUSE&lt;br /&gt;
zypper install python-devel freeglut-devel gcc-c++ glew-devel libpng-devel python-pmw subversion&lt;br /&gt;
&lt;br /&gt;
# Sabayon&lt;br /&gt;
equo i -av dev-vcs/subversion dev-lang/python dev-python/pmw media-libs/glew \&lt;br /&gt;
  media-libs/freeglut media-libs/libpng media-libs/freetype&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get latest source from SVN ===&lt;br /&gt;
&lt;br /&gt;
This will download the latest source to '''/tmp/pymol''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
svn co svn://svn.code.sf.net/p/pymol/code/trunk/pymol&lt;br /&gt;
cd pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile and install ===&lt;br /&gt;
&lt;br /&gt;
This will install PyMOL as normal user into '''/opt/pymol-svn'''. If you don't have write permissions to '''/opt''', change the &amp;lt;code&amp;gt;prefix&amp;lt;/code&amp;gt; variable to something like '''$HOME/pymol-svn'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -e&lt;br /&gt;
&lt;br /&gt;
prefix=/opt/pymol-svn&lt;br /&gt;
modules=$prefix/modules&lt;br /&gt;
&lt;br /&gt;
# enable c++11&lt;br /&gt;
export CPPFLAGS=&amp;quot;-std=c++0x&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you want to install as root, then split this line up in &amp;quot;build&amp;quot;&lt;br /&gt;
# and &amp;quot;install&amp;quot; and run the &amp;quot;install&amp;quot; with &amp;quot;sudo&amp;quot;&lt;br /&gt;
python setup.py build install \&lt;br /&gt;
    --home=$prefix \&lt;br /&gt;
    --install-lib=$modules \&lt;br /&gt;
    --install-scripts=$prefix&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now launch PyMOL like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/opt/pymol-svn/pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally, in order to allow running the command &amp;lt;code&amp;gt;pymol&amp;lt;/code&amp;gt; from the terminal to launch the program do:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ln -s /opt/pymol-svn/pymol /usr/bin/pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Updating====&lt;br /&gt;
To update the installation merely run:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo rm -r /opt/pymol-svn/pymol&lt;br /&gt;
rm -r /tmp/pymol&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
and redo the installation from the beginning with the latest release.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
* On Linux Mint 11 there have been reports of gcc-4.5 breaking Pymol. You could use gcc-4.4 instead. (reported by [[User:Tlinnet]])&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left: 2em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install build-essential gcc-4.4 g++-4.4&lt;br /&gt;
export CC=/usr/bin/gcc-4.4&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you get an error message &amp;quot;ImportError: No module named Pmw&amp;quot; and lack half of the user interface, then append &amp;lt;code&amp;gt;--bundled-pmw&amp;lt;/code&amp;gt; to the install command line.&lt;br /&gt;
&lt;br /&gt;
* If you're using Ubuntu 11.10 with an Intel Sandy Bridge video card and get graphics oddities. Please see [https://launchpad.net/~glasen/+archive/intel-driver Intel Driver Post for Ubuntu].&lt;br /&gt;
&lt;br /&gt;
* If you are using Ubuntu with a NVIDIA graphic card and generic drivers you may experience bad rendering, black pixelation and other graphical oddities. A guide to installing NVIDIA proprietary drivers can be found under [https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia Ubuntu community Nvidia Drivers How To]&lt;br /&gt;
&lt;br /&gt;
== Customized Installations ==&lt;br /&gt;
&lt;br /&gt;
* [[User:Tlinnet/Linux_Install|Troels Linnet's installations scripts]]: Detailed installation scripts for Ubuntu, Mint 12 and RHEL 6, including MPEG support from FREEMOL&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Linux Installation]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=PluginArchitecture&amp;diff=13407</id>
		<title>PluginArchitecture</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=PluginArchitecture&amp;diff=13407"/>
		<updated>2016-02-08T05:26:40Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page concerns the development for new PyMOL Plugin Architecture.  We are requesting ideas, code, etc on how to best implement a successful plug in system.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
PyMOL enjoys widespread use as 3D molecular visualization program with strengths in rendering and visualization.  PyMOL at current does not have a robust extension mechanism for adding new plug-in based features to PyMOL.  It only allows a script of one file and has very limited support for installation and removal.  This project aims to correct that lacking functionality.  We aim for simplicity and robustness especially in a cross-platform manner.&lt;br /&gt;
&lt;br /&gt;
A '''Plug-In''' (or '''Plugin''') is a modular piece of software that extends PyMOL's functionality.&lt;br /&gt;
&lt;br /&gt;
== Wanna' Help? ==&lt;br /&gt;
If you want to take part in helping out with this, please send Jason Vertrees an email letting him know as such.&lt;br /&gt;
&lt;br /&gt;
= PyMOL OS Fellowship Project 2011/2012 =&lt;br /&gt;
&lt;br /&gt;
[[User:Speleo3|Thomas Holder]] was working on the new plugin system as part of his [http://pymol.org/fellowship 2011-2012 Fellowship]. The improvements were incorporated into PyMOL 1.5.0.5.&lt;br /&gt;
&lt;br /&gt;
* graphical [[Plugin Manager]]&lt;br /&gt;
* multiple files per plugin/module (see below: [[#More than one file per plugin]])&lt;br /&gt;
* user plugin directory&lt;br /&gt;
* rarely used plugins can be disabled for better performance and enabled on demand&lt;br /&gt;
* metadata support (version, author, description, citation, tags, ...)&lt;br /&gt;
* install from online repositories&lt;br /&gt;
* settings API for plugins (see below: [[#Config files]])&lt;br /&gt;
&lt;br /&gt;
= Review of Current Plugin System =&lt;br /&gt;
&lt;br /&gt;
Essentially the current system inits all the scripts in the startup directory, which adds their entry to the Plugins menu.  When called, it fires off a command passing to it PyMOL's Tk menu.  The instance can get access to pymol's cmd layer with, &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;from pymol import cmd&amp;lt;/source&amp;gt;.  Also, as it's in Python, the user can extend Python (even in C) or call low-level functions utilizing the web or touching the file system.&lt;br /&gt;
&lt;br /&gt;
* For a tutorial on the current system. see [[Plugins_Tutorial]].&lt;br /&gt;
&lt;br /&gt;
= Ideas/Features for the New Plugin System =&lt;br /&gt;
* Plugins must be ''safe''. That is, they must not destroy the users' data for file system.&lt;br /&gt;
* Plugins must be ''secure'' in that they do not transmit data the user doesn't want transmitted.&lt;br /&gt;
** We can take an approach like Warren did with sessions--warn the user on sessions s/he didn't create and ask for trusting or not.&lt;br /&gt;
* Plugins should be able to query PyMOL for features&lt;br /&gt;
* PyMOL should take care of unpacking, installing, uninstalling, updating (?) the plugins&lt;br /&gt;
* '''MUST''' be backwards compatible with the current system&lt;br /&gt;
* '''MUST''' run cross platform&lt;br /&gt;
* Save user-specific information&lt;br /&gt;
* Support proxy information/setup for downloading scripts&lt;br /&gt;
&lt;br /&gt;
== More than one file per plugin ==&lt;br /&gt;
&lt;br /&gt;
I'd like plugins that behave like proper Python modules with the ability to span multiple files/directories. One simple way to do this would be to distribute plugins as zip files. E.g. if we have a directory Foo that contains&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;Python&amp;quot;&amp;gt;&lt;br /&gt;
MyMod&lt;br /&gt;
    __init__.py&lt;br /&gt;
          &amp;quot;&amp;quot;&amp;quot;Some documentation here&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    Foo.py&lt;br /&gt;
        def doit():&lt;br /&gt;
            print &amp;quot;It is done!&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can zip it up like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
zip MyMod.zip Foo/*&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you stick MyMod.zip in a plugins directory like /blahblah/Pymol/plugins/MyMod.zip&lt;br /&gt;
you can then say this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;Python&amp;quot;&amp;gt;&lt;br /&gt;
sys.path.append('/blahblah/Pymol/plugins/MyMod.zip')&lt;br /&gt;
from MyMod import Foo&lt;br /&gt;
Foo.doit()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Python does not impose the restriction that the module/directory name (MyMod) should be the same as the zip file name (MyMod.zip), but we might want to.&lt;br /&gt;
&lt;br /&gt;
Then we need to formally spell out the API by which the Plugin is launched.&lt;br /&gt;
&lt;br /&gt;
This makes it very easy to install/uninstall plugins, and PyMOL can just have a simple loop that iterates over the plugins directory, adds the appropriate things to sys.path, verifies that the resulting objects support the API, and adds them to the menu.&lt;br /&gt;
&lt;br /&gt;
== Config files ==&lt;br /&gt;
&lt;br /&gt;
Some sort of persistent config files where users can store things like paths to relevant files, settings, etc. would be very useful. The APBS plugin, for instance, is a bit of a bother to use when you have APBS installed in a non-standard location. It would be very convenient if you could set the location once and have it persist.&lt;br /&gt;
&lt;br /&gt;
== Meeting Notes ==&lt;br /&gt;
=== May 3, 2010 ===&lt;br /&gt;
In attendance: Nathan Baker, Mike Beachy, Greg Landrum, David Gohara, Yong Huang, Jay Ponder, Jason Vertrees&lt;br /&gt;
&lt;br /&gt;
Additional ideas people wanted to see implemented:&lt;br /&gt;
* As scripts will be accessing internal data for computation, improved access to PyMOL internal data structures, like DX maps, is required.&lt;br /&gt;
** I/O for maps is the rate limiting step;&lt;br /&gt;
** data structures can be large, so skipping the disk would also be nice&lt;br /&gt;
* Skeleton code for plugins would help people write new ones; good tutorial as well; we need to make things easier for the novice&lt;br /&gt;
** Make a new site for plugins: plugins dot pymol dot org?&lt;br /&gt;
&lt;br /&gt;
= Liked Plugin Systems =&lt;br /&gt;
* [https://addons.mozilla.org/en-US/developers FireFox Devel/Docs]&lt;br /&gt;
* Google Chrome -- URL?&lt;br /&gt;
&lt;br /&gt;
= Disliked Plugin Systems =&lt;br /&gt;
&lt;br /&gt;
= Links on the topic =&lt;br /&gt;
* [http://stackoverflow.com/questions/323202/designing-extensible-software-plugin-architecture StackOverflow Discussion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Open/closed_principle Dr. Meyers' Open/Closed Principle]&lt;br /&gt;
* [http://www.codeguru.com/cpp/misc/misc/plug-insadd-ins/article.php/c3879 Nice overview in C]&lt;br /&gt;
&lt;br /&gt;
= The Name =&lt;br /&gt;
* Plugins, Plug-Ins?&lt;br /&gt;
* Add-ons?&lt;br /&gt;
* Extensions?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Developers]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Morph&amp;diff=13405</id>
		<title>Morph</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Morph&amp;diff=13405"/>
		<updated>2016-02-08T05:26:40Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[morph]] command is an incentive PyMOL feature (not available in open-source version). Given two or more conformations, either as two objects or one multi-state object, '''morph''' can create an interpolated trajectory from the first to the second conformation.&lt;br /&gt;
&lt;br /&gt;
''This command is new in PyMOL 1.6, for older versions see [[rigimol.morph]], which requires some scripting.''&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
 morph name, sele1 [, sele2 [, state1 [, state2 [, refinement [, steps [, method [, match ]]]]]]]&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
&lt;br /&gt;
* name = string: name of object to create&lt;br /&gt;
* sele1 = string: atom selection of first conformation&lt;br /&gt;
* sele2 = string: atom selection of second conformation {default: &amp;lt;sele1&amp;gt;}&lt;br /&gt;
* state1 = int: sele1 state {default: 1}. If state1=0 and sele1 has N states, create N morphings between all consecutive states and back from state N to 1 (so the morph will have N*steps states). If state2=0, create N-1 morphings and stop at last state.&lt;br /&gt;
* state2 = int: sele2 state {default: 2 if sele1=sele2, else 1}&lt;br /&gt;
* refinement = int: number of sculpting refinement cycles to clean distorted intermediates {default: 3}&lt;br /&gt;
* steps = int: number of states for sele2 object {default: 30}&lt;br /&gt;
* method = string: rigimol or linear {default: rigimol}&lt;br /&gt;
* match = string: method how to match '''sele1''' and '''sele2''' {default: align}&lt;br /&gt;
** in: match atoms by [[Selection Algebra|&amp;quot;in&amp;quot;]] selection operator&lt;br /&gt;
** like: match atoms by [[Selection Algebra|&amp;quot;like&amp;quot;]] selection operator&lt;br /&gt;
** align: match atoms with [[align]] function (with cycles=0)&lt;br /&gt;
** super: match atoms with [[super]] function (with cycles=0)&lt;br /&gt;
** ''name of alignment object'': use given alignment&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
=== Default Parameters ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1akeA 4akeA, async=0&lt;br /&gt;
align 1akeA, 4akeA&lt;br /&gt;
morph mout, 1akeA, 4akeA &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Morphing with Ligand ===&lt;br /&gt;
&lt;br /&gt;
Since the default '''match=align''' method ignores ligands in most situations, we'll use the &amp;quot;in&amp;quot; match method. In this case, both input structures need matching identifiers. The default post-RigiMOL sculpting refinement tends to let all molecules that are not connected to the protein backbone bounce around; that's why '''refinement=0''' might give better results in this case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# get two hemoglobin beta chains, the &amp;quot;ligand&amp;quot; will be the heme hetero group&lt;br /&gt;
fetch 1hbb, async=0&lt;br /&gt;
create conf1, chain B&lt;br /&gt;
create conf2, chain D&lt;br /&gt;
delete 1hbb&lt;br /&gt;
&lt;br /&gt;
# important: identifiers must be the same&lt;br /&gt;
alter conf2, chain=&amp;quot;B&amp;quot;&lt;br /&gt;
alter all, segi=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# optional: styling&lt;br /&gt;
as cartoon&lt;br /&gt;
show sticks, not polymer&lt;br /&gt;
show nb_spheres&lt;br /&gt;
&lt;br /&gt;
# superpose and morph&lt;br /&gt;
align conf1, conf2&lt;br /&gt;
morph mout, conf1, conf2, match=in, refinement=0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== GUI ==&lt;br /&gt;
&lt;br /&gt;
The morph feature is available from the object menu panel: '''A &amp;gt; generate &amp;gt; morph'''&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[rigimol.morph]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]]&lt;br /&gt;
[[Category:Modeling_and_Editing_Structures]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Ignore_case&amp;diff=13403</id>
		<title>Ignore case</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Ignore_case&amp;diff=13403"/>
		<updated>2016-02-08T05:26:40Z</updated>

		<summary type="html">&lt;p&gt;Bell: 2 revisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[ignore_case]] setting (default: '''off''' in PyMOL 1.8, '''on''' in previous versions) controls whether PyMOL does case sensitive matching of atomic identifiers and selection operators in the selection language. Most notably, it affects whether chain identifiers are matched case sensitive, which becomes relevant when using upper and lower case chain identifiers in a structure with more than 26 chains.&lt;br /&gt;
&lt;br /&gt;
''The default value was changed to '''off''' in PyMOL 1.8. With more and more &amp;quot;big&amp;quot; structures in the PDB, the old default was not practical anymore and led to confusion and unexpected results.''&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Load 1a00 which has chains A, B, C, D&lt;br /&gt;
&lt;br /&gt;
 PyMOL&amp;gt;fetch 1a00, async=0&lt;br /&gt;
&lt;br /&gt;
1) case insensitive selection language (default for PyMOL &amp;lt;= 1.7.6)&lt;br /&gt;
&lt;br /&gt;
 PyMOL&amp;gt;set ignore_case&lt;br /&gt;
  Setting: ignore_case set to on.&lt;br /&gt;
 PyMOL&amp;gt;count_atoms chain A&lt;br /&gt;
  count_atoms: 1164 atoms&lt;br /&gt;
 PyMOL&amp;gt;count_atoms chain a&lt;br /&gt;
  count_atoms: 1164 atoms&lt;br /&gt;
&lt;br /&gt;
2) case sensitive selection language (default for PyMOL &amp;gt; 1.7.6)&lt;br /&gt;
&lt;br /&gt;
 PyMOL&amp;gt;set ignore_case, off&lt;br /&gt;
  Setting: ignore_case set to off.&lt;br /&gt;
 PyMOL&amp;gt;count_atoms chain A&lt;br /&gt;
  count_atoms: 1164 atoms&lt;br /&gt;
 PyMOL&amp;gt;count_atoms chain a&lt;br /&gt;
  count_atoms: 0 atoms&lt;br /&gt;
&lt;br /&gt;
== Best Practice for Scripting ==&lt;br /&gt;
&lt;br /&gt;
When writing scripts or plugins, all selection expressions should be strict about case (e.g. &amp;quot;name CA&amp;quot; and not &amp;quot;name ca&amp;quot;) to not depend on the users setting of [[ignore_case]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings]]&lt;br /&gt;
[[Category:Selecting]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=BiologicalUnit/Quat&amp;diff=13400</id>
		<title>BiologicalUnit/Quat</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=BiologicalUnit/Quat&amp;diff=13400"/>
		<updated>2016-02-08T05:26:39Z</updated>

		<summary type="html">&lt;p&gt;Bell: 2 revisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This script does more or less the same as [[BiologicalUnit]]. It creates the '''quat'''ernary structure (BIOMOLECULE 1 assembly) from the REMARK 350 header.&lt;br /&gt;
&lt;br /&gt;
This script is convenient to use because it searches automatically for the PDB file in the current directory, in [[Fetch_Path|fetch_path]] and (if available) in your local PDB mirror.&lt;br /&gt;
&lt;br /&gt;
= Example Usage =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 3bw1, type=pdb&lt;br /&gt;
quat 3bw1&lt;br /&gt;
as cartoon&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= The Code =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
'''&lt;br /&gt;
(c) 2010-2011 Thomas Holder, MPI for Developmental Biology&lt;br /&gt;
&lt;br /&gt;
Module for reading REMARK records from PDB files and in particular&lt;br /&gt;
generate quaterny structure from REMARK 350.&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
import sys, os&lt;br /&gt;
from pymol import cmd, stored&lt;br /&gt;
&lt;br /&gt;
local_mirror_divided = '/mnt/bio/db/pdb.divided'&lt;br /&gt;
&lt;br /&gt;
def pdbremarks(filename):&lt;br /&gt;
    '''&lt;br /&gt;
    Read REMARK lines from PDB file. Return dictionary with remarkNum as key&lt;br /&gt;
    and list of lines as value.&lt;br /&gt;
    '''&lt;br /&gt;
    remarks = dict()&lt;br /&gt;
    if not isinstance(filename, basestring):&lt;br /&gt;
        f = filename&lt;br /&gt;
    elif filename[-3:] == '.gz':&lt;br /&gt;
        import gzip&lt;br /&gt;
        f = gzip.open(filename)&lt;br /&gt;
    else:&lt;br /&gt;
        f = open(filename)&lt;br /&gt;
    for line in f:&lt;br /&gt;
        recname = line[0:6]&lt;br /&gt;
        if recname == 'REMARK':&lt;br /&gt;
            num = int(line[7:10])&lt;br /&gt;
            lstring = line[11:]&lt;br /&gt;
            remarks.setdefault(num, []).append(lstring)&lt;br /&gt;
    return remarks&lt;br /&gt;
&lt;br /&gt;
def quat350(rem350):&lt;br /&gt;
    '''&lt;br /&gt;
    Get transformation matrices for biomolecule 1 from REMARK 350.&lt;br /&gt;
    '''&lt;br /&gt;
    biomt = dict()&lt;br /&gt;
    chains = tuple()&lt;br /&gt;
    seenbiomolecule = False&lt;br /&gt;
    for line in rem350:&lt;br /&gt;
        if line.startswith('BIOMOLECULE:'):&lt;br /&gt;
            if seenbiomolecule:&lt;br /&gt;
                break&lt;br /&gt;
            seenbiomolecule = True&lt;br /&gt;
        elif line.startswith('APPLY THE FOLLOWING TO CHAINS:'):&lt;br /&gt;
            chains = tuple(chain.strip() for chain in line[30:].split(','))&lt;br /&gt;
        elif line.startswith('                   AND CHAINS:'):&lt;br /&gt;
            chains += tuple(chain.strip() for chain in line[30:].split(','))&lt;br /&gt;
        elif line.startswith('  BIOMT'):&lt;br /&gt;
            row = int(line[7])&lt;br /&gt;
            num = int(line[8:12])&lt;br /&gt;
            vec = line[12:].split()&lt;br /&gt;
            vec = map(float, vec)&lt;br /&gt;
            biomt.setdefault(chains, dict()).setdefault(num, []).extend(vec)&lt;br /&gt;
    return biomt&lt;br /&gt;
&lt;br /&gt;
def quat(name=None, filename=None, prefix=None, quiet=0):&lt;br /&gt;
    '''&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
&lt;br /&gt;
    Read REMARK 350 from `filename` and create biological unit&lt;br /&gt;
    (quaternary structure)&lt;br /&gt;
&lt;br /&gt;
USAGE&lt;br /&gt;
&lt;br /&gt;
    quat [name [, filename [, prefix]]]&lt;br /&gt;
&lt;br /&gt;
ARGUMENTS&lt;br /&gt;
&lt;br /&gt;
    name = string: name of object and basename of PDB file, if&lt;br /&gt;
    filename is not given {default: first loaded object}&lt;br /&gt;
&lt;br /&gt;
    filename = string: file path {default: &amp;lt;name&amp;gt;.pdb}&lt;br /&gt;
&lt;br /&gt;
    prefix = string: prefix for new objects {default: &amp;lt;name&amp;gt;}&lt;br /&gt;
&lt;br /&gt;
EXAMPLE&lt;br /&gt;
&lt;br /&gt;
    fetch 1rmv, type=pdb&lt;br /&gt;
    quat 1rmv&lt;br /&gt;
    '''&lt;br /&gt;
    quiet = int(quiet)&lt;br /&gt;
    if name is None:&lt;br /&gt;
        name = cmd.get_object_list()[0]&lt;br /&gt;
    if prefix is None:&lt;br /&gt;
        prefix = name&lt;br /&gt;
    if filename is None:&lt;br /&gt;
        candidates = [&lt;br /&gt;
            '%s.pdb' % (name),&lt;br /&gt;
            '%s/%s.pdb' % (cmd.get('fetch_path'), name),&lt;br /&gt;
            '%s/%s/pdb%s.ent.gz' % (local_mirror_divided, name[1:3], name),&lt;br /&gt;
        ]&lt;br /&gt;
        for filename in candidates:&lt;br /&gt;
            if os.path.exists(filename):&lt;br /&gt;
                break&lt;br /&gt;
        else:&lt;br /&gt;
            print 'please provide filename'&lt;br /&gt;
            return&lt;br /&gt;
        if not quiet:&lt;br /&gt;
            print 'loading from %s' % (filename)&lt;br /&gt;
    remarks = pdbremarks(filename)&lt;br /&gt;
    if 350 not in remarks:&lt;br /&gt;
        print 'There is no REMARK 350 in', filename&lt;br /&gt;
        return&lt;br /&gt;
    quat = quat350(remarks[350])&lt;br /&gt;
    for chains in quat:&lt;br /&gt;
        matrices = quat[chains]&lt;br /&gt;
        for num in matrices:&lt;br /&gt;
            mat = matrices[num][0:12]&lt;br /&gt;
            mat.extend([0,0,0,1])&lt;br /&gt;
            copy = '%s_%d' % (prefix, num)&lt;br /&gt;
            if not quiet:&lt;br /&gt;
                print 'creating %s' % (copy)&lt;br /&gt;
            cmd.create(copy, '/%s//%s' % (name, '+'.join(chains)))&lt;br /&gt;
            cmd.alter(copy, 'segi=&amp;quot;%d&amp;quot;' % (num))&lt;br /&gt;
            cmd.transform_object(copy, mat)&lt;br /&gt;
    cmd.disable(name)&lt;br /&gt;
    cmd.group('%s_quat' % (prefix), '%s_*' % (prefix))&lt;br /&gt;
&lt;br /&gt;
cmd.extend('quat', quat)&lt;br /&gt;
&lt;br /&gt;
# vi:expandtab:smarttab&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
*[[BiologicalUnit]]&lt;br /&gt;
*[[Supercell]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Math_Scripts]]&lt;br /&gt;
[[Category:Structural_Biology_Scripts]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Azahar&amp;diff=13397</id>
		<title>Azahar</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Azahar&amp;diff=13397"/>
		<updated>2016-02-08T05:26:39Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|download  = https://github.com/agustinaarroyuelo/Azahar/releases/tag/v0.8.5-beta&lt;br /&gt;
|author   = Agustina Arroyuelo and [[User:OsvaldoMartin|Osvaldo Martin]]&lt;br /&gt;
|license   = GPL&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
[[Image:Azahar_GUI.png|480px|thumb|Azahar GUI.]]&lt;br /&gt;
&lt;br /&gt;
Azahar (pronounced /ɑːsɑːˈɑːr/) is a plugin that extends the PyMOL's capabilities to visualize, analyze and model glycans and glycoconjugated molecules. &lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
The plugin have been tested on Linux and Windows and should also works on Mac Os X.&lt;br /&gt;
To install the plugin just download [https://github.com/agustinaarroyuelo/Azahar/releases/tag/v0.8.5-beta this] zip file and install it using the plugin manager. &lt;br /&gt;
&lt;br /&gt;
Azahar can be used without any dependencies (i.e. you don't need to install anything else)  but if you have installed OpenBabel (and OpenBabel Python bindings) Azahar will use it to perform certain calculations like optimize the geometry of your newly created molecule. OpenBabel is also used during the Monte Carlo with Minimization routine.&lt;br /&gt;
&lt;br /&gt;
If you still want to install OpenBabel on your computer see instructions [http://openbabel.org/wiki/Get_Open_Babel here]. Users of 64-bit Windows OS, please install OpenBabel 64-bit from [http://www.lfd.uci.edu/~gohlke/pythonlibs/#openbabel here]&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
The plugin's GUI displays three interactive tabs: Creation, Visualization and Calculations. &lt;br /&gt;
Usage is described by tab:&lt;br /&gt;
&lt;br /&gt;
=== Glycan Creation ===&lt;br /&gt;
&lt;br /&gt;
The Creation tab contains:&lt;br /&gt;
 &lt;br /&gt;
*Three option menus, two of which are used to specify residues to be connected from a list of predefined templates. And the third one, selects the chemical bond to be used. &lt;br /&gt;
&lt;br /&gt;
*Three entry boxes, the first one it's called &amp;quot;Repetitions&amp;quot;, where the user can enter the number of residues to be connected. The &amp;quot;Position&amp;quot; entry box indicates the index of the residue to which the next bond will be added. On a typical glycan molecule constructed using this plugin, the user would use the &amp;quot;Position&amp;quot; entry box and the bonds menu to specify ramifications. And in the &amp;quot;New Molecule&amp;quot; entry box the user can write the name of the PyMOL object corresponding to the newly created glycan molecule.&lt;br /&gt;
&lt;br /&gt;
*Finally, The &amp;quot;add&amp;quot; button, when clicked, writes a text file containing the connectivity of the glycan molecule to be created. The user can edit this file or provide it as input. The connectivity instructions are also printed in PyMOL's external GUI. When the &amp;quot;create&amp;quot; button is clicked, the molecule is constructed and displayed in the PyMOL's GUI. The &amp;quot;reset&amp;quot; button resets the entry box's parameters. &lt;br /&gt;
&lt;br /&gt;
=== Visualization ===&lt;br /&gt;
&lt;br /&gt;
On this tab the user will find options to visualize glycans with 3 different ''cartoon-like'' representations. The ''cartoon'' representation is build using PyMOL's [[CGO]] and hence the color of the object has to be define it before creating it. Azahar provides a color menu for that purpose, you can choose from a list of colors or use the ''auto'' option (default), that reads the atom colors from the object. For example if you want to color a glycan cartoon using the b-factors, you should first choose that option from the PyMOL's menu and then tell Azahar to create a cartoon representation with the ''auto'' color option.&lt;br /&gt;
&lt;br /&gt;
You can ''cartoonize'' glycan molecules created by this plugin or loaded from other sources. &lt;br /&gt;
&lt;br /&gt;
=== Calculations ===&lt;br /&gt;
&lt;br /&gt;
Radius of gyration and Ramachandran Plot are useful tools for the analysis of glycan molecules. Through this plugin's GUI the user can easily select a range of states to compute these calculations, and in case of the RG, the result will be displayed in the PyMOL's external GUI.&lt;br /&gt;
&lt;br /&gt;
=== Monte Carlo ===&lt;br /&gt;
This feature will be available in the next stable release (although is already available at [https://github.com/agustinaarroyuelo/Azahar github]).&lt;br /&gt;
&lt;br /&gt;
A Monte Carlo with Minimization (MCM) is a global optimization method that have proven very efficient to sample the conformational states of complex molecules like proteins, It was first published by [http://www.ncbi.nlm.nih.gov/pmc/articles/PMC299132/ Li and Scheraga], and is some circles is also know as basin hopping. Briefly, the conformational search is done by perturbing a torsional angle (psi, psi, omega or chi), follow by and energy minimization and the new (minimized) conformation is accepted or rejected following the Metropolis-criteria. If the conformation is accepted the next iteration start from the new conformation, otherwise the old conformation is perturbed again.&lt;br /&gt;
&lt;br /&gt;
From the GUI the user can choose the number of iterations to run, whether or not to use a SASA model to take into account the solvent contribution, and whether or not to start from a random conformation.&lt;br /&gt;
&lt;br /&gt;
After the  MCM procedure is completed the user will get:&lt;br /&gt;
&lt;br /&gt;
* one .pdb file for each accepted conformation. &lt;br /&gt;
* one multi-state .pdb file (automatically uploaded at the end of the run)&lt;br /&gt;
* one .pdb file for the conformation with the minimum energy.&lt;br /&gt;
* a plain text listing the energy of each saved conformation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The internal energy is computed using the MMFF94 force field (as implemented on open-babel) and the contribution of the solvent is approximated using a SASA model (the validity of the SASA model for glycans and the relative weight of the internal and salvation energies needs further test).&lt;br /&gt;
&lt;br /&gt;
== New templates ==&lt;br /&gt;
&lt;br /&gt;
You can add your own templates by adding a .pdb file to the Azahar/db_glycans folder, that was created during the plugin installation. The residue number of the template should be 0 and atoms names should have certain names. When in doubt just take a look at one of the already available templates and do not hesitate to contact us.&lt;br /&gt;
&lt;br /&gt;
== Change log ==&lt;br /&gt;
&lt;br /&gt;
* 2015-10-2 (Version 0.8.5)&lt;br /&gt;
*# Fix templates: reorder atoms, standardize nomenclature and minimize conformations&lt;br /&gt;
*# Add new templates&lt;br /&gt;
*# Add Monte Carlo with Minimization Routine&lt;br /&gt;
*# fix cartoonize for 1-6 and 6-1 bonds&lt;br /&gt;
*# add 2 new cartoon-like representations&lt;br /&gt;
*# fix minor bugs, clean code and GUI&lt;br /&gt;
&lt;br /&gt;
* 2015-08-31 (Version 0.8.1)&lt;br /&gt;
*# Several bugs fixed, including problems when creating branches.&lt;br /&gt;
&lt;br /&gt;
* 2015-08-28 (Version 0.8)&lt;br /&gt;
*# First beta version and first public version (several bugs expected!).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Morph&amp;diff=13404</id>
		<title>Morph</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Morph&amp;diff=13404"/>
		<updated>2016-01-30T06:03:05Z</updated>

		<summary type="html">&lt;p&gt;Bell: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[morph]] command is an incentive PyMOL feature (not available in open-source version). Given two or more conformations, either as two objects or one multi-state object, '''morph''' can create an interpolated trajectory from the first to the second conformation.&lt;br /&gt;
&lt;br /&gt;
''This command is new in PyMOL 1.6, for older versions see [[rigimol.morph]], which requires some scripting.''&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
 morph name, sele1 [, sele2 [, state1 [, state2 [, refinement [, steps [, method [, match ]]]]]]]&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
&lt;br /&gt;
* name = string: name of object to create&lt;br /&gt;
* sele1 = string: atom selection of first conformation&lt;br /&gt;
* sele2 = string: atom selection of second conformation {default: &amp;lt;sele1&amp;gt;}&lt;br /&gt;
* state1 = int: sele1 state {default: 1}. If state1=0 and sele1 has N states, create N morphings between all consecutive states and back from state N to 1 (so the morph will have N*steps states). If state2=0, create N-1 morphings and stop at last state.&lt;br /&gt;
* state2 = int: sele2 state {default: 2 if sele1=sele2, else 1}&lt;br /&gt;
* refinement = int: number of sculpting refinement cycles to clean distorted intermediates {default: 3}&lt;br /&gt;
* steps = int: number of states for sele2 object {default: 30}&lt;br /&gt;
* method = string: rigimol or linear {default: rigimol}&lt;br /&gt;
* match = string: method how to match '''sele1''' and '''sele2''' {default: align}&lt;br /&gt;
** in: match atoms by [[Selection Algebra|&amp;quot;in&amp;quot;]] selection operator&lt;br /&gt;
** like: match atoms by [[Selection Algebra|&amp;quot;like&amp;quot;]] selection operator&lt;br /&gt;
** align: match atoms with [[align]] function (with cycles=0)&lt;br /&gt;
** super: match atoms with [[super]] function (with cycles=0)&lt;br /&gt;
** ''name of alignment object'': use given alignment&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
=== Default Parameters ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1akeA 4akeA, async=0&lt;br /&gt;
align 1akeA, 4akeA&lt;br /&gt;
morph mout, 1akeA, 4akeA &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Morphing with Ligand ===&lt;br /&gt;
&lt;br /&gt;
Since the default '''match=align''' method ignores ligands in most situations, we'll use the &amp;quot;in&amp;quot; match method. In this case, both input structures need matching identifiers. The default post-RigiMOL sculpting refinement tends to let all molecules that are not connected to the protein backbone bounce around; that's why '''refinement=0''' might give better results in this case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# get two hemoglobin beta chains, the &amp;quot;ligand&amp;quot; will be the heme hetero group&lt;br /&gt;
fetch 1hbb, async=0&lt;br /&gt;
create conf1, chain B&lt;br /&gt;
create conf2, chain D&lt;br /&gt;
delete 1hbb&lt;br /&gt;
&lt;br /&gt;
# important: identifiers must be the same&lt;br /&gt;
alter conf2, chain=&amp;quot;B&amp;quot;&lt;br /&gt;
alter all, segi=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# optional: styling&lt;br /&gt;
as cartoon&lt;br /&gt;
show sticks, not polymer&lt;br /&gt;
show nb_spheres&lt;br /&gt;
&lt;br /&gt;
# superpose and morph&lt;br /&gt;
align conf1, conf2&lt;br /&gt;
morph mout, conf1, conf2, match=in, refinement=0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== GUI ==&lt;br /&gt;
&lt;br /&gt;
The morph feature is available from the object menu panel: '''A &amp;gt; generate &amp;gt; morph'''&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[rigimol.morph]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]]&lt;br /&gt;
[[Category:Modeling_and_Editing_Structures]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=File:2DResultOutputtabPyMOLViewerLinux1.png&amp;diff=13395</id>
		<title>File:2DResultOutputtabPyMOLViewerLinux1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=File:2DResultOutputtabPyMOLViewerLinux1.png&amp;diff=13395"/>
		<updated>2016-01-11T06:43:25Z</updated>

		<summary type="html">&lt;p&gt;Bell: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=File:3DResultsOutputtabPyMOLViewer1.png&amp;diff=13394</id>
		<title>File:3DResultsOutputtabPyMOLViewer1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=File:3DResultsOutputtabPyMOLViewer1.png&amp;diff=13394"/>
		<updated>2016-01-11T06:43:25Z</updated>

		<summary type="html">&lt;p&gt;Bell: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=File:InputTab2DLiSiCALinuxv1.0.0.png&amp;diff=13393</id>
		<title>File:InputTab2DLiSiCALinuxv1.0.0.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=File:InputTab2DLiSiCALinuxv1.0.0.png&amp;diff=13393"/>
		<updated>2016-01-11T06:43:25Z</updated>

		<summary type="html">&lt;p&gt;Bell: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=File:InputTab3DLiSiCALinuxv1.0.0.png&amp;diff=13392</id>
		<title>File:InputTab3DLiSiCALinuxv1.0.0.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=File:InputTab3DLiSiCALinuxv1.0.0.png&amp;diff=13392"/>
		<updated>2016-01-11T06:43:25Z</updated>

		<summary type="html">&lt;p&gt;Bell: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Scene&amp;diff=13391</id>
		<title>Scene</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Scene&amp;diff=13391"/>
		<updated>2016-01-11T06:32:24Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''scene''' makes it possible to save and restore multiple scenes scene within a single session.  A scene consists of the view, all object activity information, all atom-wise visibility, color, representations, and the global frame index.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
 scene [ key [, action [, message [, view [, color [, active [, rep&lt;br /&gt;
     [, frame [, animate [, new_key ]]]]]]]]]]&lt;br /&gt;
&lt;br /&gt;
=== Arguments ===&lt;br /&gt;
* '''key''' = string, new, auto, or *: use new for an automatically numbered new scene, use auto for the current scene (if one exists), and use * for all scenes (clear and recall actions only).&lt;br /&gt;
* '''action''' = store, recall, insert_after, insert_before, next, previous, update, rename, clear or append: (default = recall).  If rename, then a new_key argument must be explicitly defined.&lt;br /&gt;
* '''message''' = string: a text message to display with the scene.&lt;br /&gt;
* '''view''' = 1 or 0: controls whether the view is stored {default: 1}&lt;br /&gt;
* '''color''' = 1 or 0: controls whether colors are stored {default: 1}&lt;br /&gt;
* '''active''' = 1 or 0: controls whether activity (objects enabled/disabled) is stored {default: 1}&lt;br /&gt;
* '''rep''' = 1 or 0: controls whether the representations are stored {default: 1}&lt;br /&gt;
* '''frame''' = 1 or 0: controls whether the frame is stored {default: 1}&lt;br /&gt;
* '''animate''' = float: animation duration in seconds {default: ''scene_animation_duration''}&lt;br /&gt;
* '''new_key''' = string: the new name for the scene&lt;br /&gt;
&lt;br /&gt;
== Using Scene ==&lt;br /&gt;
The [[Scene]] command has quite a few actions/options that can be enabled by using the mouse and the keyboard through the usual [[Scene]] command or hot-keys.  Also, you can shift the scenes around using the new [[Scene_buttons]] and just dragging the scene names.&lt;br /&gt;
&lt;br /&gt;
=== Storing scenes ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# store this scene in the next spot, giving it the default name.&lt;br /&gt;
scene auto, store&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
has the hot-key equivalent of '''CTRL-PageDown''' (FN+CTRL+DownArrow on the Mac).  Try turning on [[Scene_Buttons]] and then doing CTRL-PageDown; see the scene buttons popping up?&lt;br /&gt;
&lt;br /&gt;
=== Scenes as Movies ===&lt;br /&gt;
If you desire to make a movie that only has camera changes or representation changes, then scenes are your friend.  Simply setup each view and then when ready you can do Scene-&amp;gt;Store from the PyMOL menus (or ''scene auto, store'' on the command line or the third method Ctrl+PgDn (Fn+Ctrl+DownArrow on the Mac)).  Do this for each view you setup.  Once done, you can scroll through your scenes by pushing PgUp/PgDn.  PyMOL automatically interpolates when you use the PgUp/PgDn buttons, so you get the desired smooth transitions.  Mix this with [http://www.pymol.org/ax/ AxPyMOL] and you have movies in PowerPoint with very little work.&lt;br /&gt;
&lt;br /&gt;
=== Auto-play through Scenes ===&lt;br /&gt;
With this simple trick you can auto-play through scenes. This is similar to &amp;quot;Movie &amp;gt; Program &amp;gt; Scene Loop&amp;quot; but uses only a single frame.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.mset('1x1')&lt;br /&gt;
cmd.set('scene_loop')&lt;br /&gt;
cmd.set('movie_fps', 1.0 / 5.0)&lt;br /&gt;
cmd.mdo(1, 'scene auto, next')&lt;br /&gt;
cmd.mplay()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Simple Examples.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
scene F1, store&lt;br /&gt;
scene F2, store, This view shows you the critical hydrogen bond.&lt;br /&gt;
 &lt;br /&gt;
scene F1&lt;br /&gt;
scene F2&lt;br /&gt;
&lt;br /&gt;
scene *&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example shows how to use scenes in a movie!&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# SUMMARY&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# This script demonstrates one way of creating a movie from scenes.&lt;br /&gt;
# It assumes that we have three scenes, each running for 10 seconds&lt;br /&gt;
# (300 frames apiece) including 2-second transitions.&lt;br /&gt;
&lt;br /&gt;
# 1) Load or create content for three scenes (this could just as easily&lt;br /&gt;
#    come from a session file).&lt;br /&gt;
&lt;br /&gt;
load $TUT/1hpv.pdb&lt;br /&gt;
util.cbc&lt;br /&gt;
turn x,180&lt;br /&gt;
orient&lt;br /&gt;
as cartoon&lt;br /&gt;
scene 001, store&lt;br /&gt;
&lt;br /&gt;
show sticks, organic&lt;br /&gt;
orient organic&lt;br /&gt;
scene 002, store&lt;br /&gt;
&lt;br /&gt;
hide cartoon&lt;br /&gt;
show lines, byres organic expand 5&lt;br /&gt;
turn x,45&lt;br /&gt;
turn y,45&lt;br /&gt;
scene 003, store&lt;br /&gt;
&lt;br /&gt;
# 2) Specify a 30-second movie -- state 1, 900 frames at 30 frames per second.&lt;br /&gt;
&lt;br /&gt;
mset 1 x900&lt;br /&gt;
&lt;br /&gt;
# 3) Program scene matrices as movie views at appopriate frames&lt;br /&gt;
#    and also add y-axis rocking between scenes.&lt;br /&gt;
&lt;br /&gt;
scene 001, animate=0&lt;br /&gt;
mview store, 1&lt;br /&gt;
mview store, 240&lt;br /&gt;
&lt;br /&gt;
turn y,-30&lt;br /&gt;
mview store, 70&lt;br /&gt;
turn y,60&lt;br /&gt;
mview store, 170&lt;br /&gt;
&lt;br /&gt;
scene 002, animate=0&lt;br /&gt;
mview store, 300&lt;br /&gt;
mview store, 540&lt;br /&gt;
&lt;br /&gt;
turn y,-30&lt;br /&gt;
mview store, 370&lt;br /&gt;
turn y,60&lt;br /&gt;
mview store, 470&lt;br /&gt;
&lt;br /&gt;
scene 003, animate=0&lt;br /&gt;
mview store, 600&lt;br /&gt;
mview store, 840&lt;br /&gt;
&lt;br /&gt;
turn y,-30&lt;br /&gt;
mview store, 670&lt;br /&gt;
turn y,60&lt;br /&gt;
mview store, 770&lt;br /&gt;
&lt;br /&gt;
# 4) Now interpolate the movie camera.&lt;br /&gt;
&lt;br /&gt;
mview interpolate&lt;br /&gt;
mview smooth&lt;br /&gt;
mview smooth&lt;br /&gt;
&lt;br /&gt;
# 5) Activate scene content at the appropriate movie frames.&lt;br /&gt;
 &lt;br /&gt;
mdo 1: scene 001, view=0, quiet=1&lt;br /&gt;
mdo 240: scene 002, view=0, quiet=1&lt;br /&gt;
mdo 540: scene 003, view=0, quiet=1&lt;br /&gt;
mdo 840: scene 001, view=0, quiet=1&lt;br /&gt;
&lt;br /&gt;
# 6) Force frame 1 content to load.&lt;br /&gt;
&lt;br /&gt;
rewind&lt;br /&gt;
&lt;br /&gt;
# 6) And play the movie.&lt;br /&gt;
&lt;br /&gt;
mplay&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== PyMOL API ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.scene(str key='auto', str action='recall', str-or-list message=None, bool view=1, bool color=1,&lt;br /&gt;
    bool active=1, bool rep=1, bool frame=1, float animate=-1, str new_key=None)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* To scroll through your frames, as in a presentation, just use the PG-UP and PG-DN keys.  Very handy.&lt;br /&gt;
*Scenes F1 through F12 are automatically bound to function keys provided that &amp;quot;set_key&amp;quot; hasn't been used to redefine the behaviour of the respective key.&lt;br /&gt;
*If you have a script that modifies the representation of the molecules and stores them, quickly, then the stored frames may not be up to date.  I suggest calling &amp;quot;refresh&amp;quot; between the commands.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[[View]], [[Set_View]], [[Get_View]], [[Movie_from_scenes]]&lt;br /&gt;
&lt;br /&gt;
==DEVELOPMENT TO DO==&lt;br /&gt;
Add support for save/restore of a certain global and object-and-state specific settings, such as: state, surface_color, ribbon_color, stick_color, transparency, sphere_transparency, etc.  This would probably best be done by defining a class of &amp;quot;scene&amp;quot; settings which are treated in this manner.  The current workaround is to create separate objects which are enabled/disabled differentially.&lt;br /&gt;
&lt;br /&gt;
[[Category:Scenes]]&lt;br /&gt;
[[Category:States]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Main_Page&amp;diff=13389</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Main_Page&amp;diff=13389"/>
		<updated>2016-01-11T06:32:23Z</updated>

		<summary type="html">&lt;p&gt;Bell: 2 revisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; style=&amp;quot;padding-bottom: 4em;&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-size:210%; font-weight: bold; color:#032d45; text-align:center; padding: 5px; margin-bottom: 4px;&amp;quot; | Welcome to the PyMOL Wiki!&lt;br /&gt;
|- style=&amp;quot;text-align:center; font-weight:bold; color: #6d6003; font-size: 140%; font-style: italic; font-family: serif;&amp;quot;&lt;br /&gt;
| The community-run support site for the [http://pymol.org PyMOL] molecular viewer.&lt;br /&gt;
|- style=&amp;quot;text-align:center; font-weight:bold; color: #6d6003; font-size: 140%; font-style: italic; font-family: serif;&amp;quot;&lt;br /&gt;
| New accounts: email jason (dot) vertrees (@) gmail dot com&lt;br /&gt;
|- style=&amp;quot;text-align:center; font-weight:bold; color: #6d6003; font-size: 140%; font-style: italic; font-family: serif;&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;45%&amp;quot; style=&amp;quot;background: #EDEBD5; margin-bottom: 4em; border-bottom: 1px solid #AFB29E; border-left: 1px solid #AFB29E; border-right: 1px solid #AFB29E;&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-size: 1.4em; font-weight: bold; color: #032d45; text-align:center; background: #5F7F96; padding-top:0.5em; padding-bottom: 0.25em; border-top: 2px solid #AFB29E; border-bottom: 1px solid #fff;&amp;quot; |Quick Links&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;font-size: 1.1em; color #61021F; padding: 0.5em 1em 0.5em 3em;&amp;quot;|'''[[:Category:Tutorials|Tutorials]]''' || '''[[TOPTOC|Table of Contents]]''' || '''[[:Category:Commands|Commands]]'''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;font-size: 1.1em; color #61021F; padding: 0.5em 1em 0.5em 3em;&amp;quot;|'''[[:Category:Script_Library|Script Library]]''' || '''[[:Category:Plugins|Plugins]]''' || '''[[:Category:FAQ|FAQ]]'''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;font-size: 1.1em; color #61021F; padding: 0.5em 1em 0.5em 3em;&amp;quot;|'''[[Gallery]]''' | '''[[Covers]]'''&lt;br /&gt;
||'''[[CheatSheet|PyMOL Cheat Sheet]]''' (''[[Media:PymolRef.pdf|PDF]]'')&lt;br /&gt;
||'''[[PyMOL_mailing_list|Getting Help]]'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| style=&amp;quot;vertical-align: top; width: 40%&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;jtable&amp;quot; style=&amp;quot;float: left; width: 90%;&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-size: 1.4em; font-weight: bold; text-align:left; border-bottom: 2px solid #6678b1;&amp;quot; | News &amp;amp;amp; Updates&lt;br /&gt;
|-&lt;br /&gt;
! New Plugin&lt;br /&gt;
| [[Lisica|LiSiCA]] is a new plugin for 2D and 3D ligand based virtual screening using a fast maximum clique algorithm.&lt;br /&gt;
|-&lt;br /&gt;
! Official Release&lt;br /&gt;
| [http://pymol.org PyMOL v1.8.0 has been released] on Nov 18, 2015.&lt;br /&gt;
|-&lt;br /&gt;
! PyMOL Open-Source Fellowship&lt;br /&gt;
| Schrödinger is now accepting applications for the PyMOL Open-Source Fellowship program! Details on http://pymol.org/fellowship&lt;br /&gt;
|-&lt;br /&gt;
! Official Release&lt;br /&gt;
| [http://pymol.org PyMOL, AxPyMOL, and JyMOL v1.7.6 have all been released] on May 4, 2015.&lt;br /&gt;
|-&lt;br /&gt;
! New Plugin&lt;br /&gt;
| [[PyANM|PyANM]] is a new plugin for easier Anisotropic Network Model (ANM) building and visualising in PyMOL.&lt;br /&gt;
|-&lt;br /&gt;
! New Plugin&lt;br /&gt;
| [[Bondpack]] is a collection of PyMOL plugins for easy visualization of atomic bonds.&lt;br /&gt;
|-&lt;br /&gt;
! New Plugin&lt;br /&gt;
| [[MOLE 2.0: advanced approach for analysis of biomacromolecular channels|MOLE 2.0]] is a new plugin for rapid analysis of biomacromolecular channels in PyMOL.&lt;br /&gt;
|-&lt;br /&gt;
! 3D using Geforce&lt;br /&gt;
| PyMOL can now be [http://forums.geforce.com/default/topic/571604/3d-vision/3d-vision-working-with-qbs-in-opengl-software-using-geforce/2/ visualized in 3D using Nvidia GeForce video cards] (series 400+) with 120Hz monitors and Nvidia 3D Vision, this was previously only possible with Quadro video cards.&lt;br /&gt;
|-&lt;br /&gt;
! Older News&lt;br /&gt;
| See [[Older_News|Older News]].&lt;br /&gt;
|}&lt;br /&gt;
|style=&amp;quot;vertical-align: top; width: 40%&amp;quot;|&lt;br /&gt;
{| class=&amp;quot;jtable&amp;quot; style=&amp;quot;float: right; width: 90%&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-size: 1.4em; font-weight: bold; text-align:left; border-bottom: 2px solid #6678b1;&amp;quot; |Did you know...&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;div class=&amp;quot;didyouknow&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;DynamicPageList&amp;gt;&lt;br /&gt;
randomcount=1&lt;br /&gt;
category=Commands|Plugins|Script_Library|Settings&lt;br /&gt;
includepage=*&lt;br /&gt;
includemaxlength=1050&lt;br /&gt;
escapelinks=false&lt;br /&gt;
allowcachedresults=false&lt;br /&gt;
resultsheader=__NOTOC__ __NOEDITSECTION__&lt;br /&gt;
listseparators=,&amp;lt;h3&amp;gt;[[%PAGE%]]&amp;lt;/h3&amp;gt;,,\n&lt;br /&gt;
&amp;lt;/DynamicPageList&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
|style=&amp;quot;vertical-align: top; width: 18%&amp;quot;|&lt;br /&gt;
&amp;lt;DynamicPageList&amp;gt;&lt;br /&gt;
imagecontainer=Covers&lt;br /&gt;
randomcount=1&lt;br /&gt;
escapelinks=false&lt;br /&gt;
openreferences=true&lt;br /&gt;
listseparators=[[,%PAGE%,|thumb|185px|A Random PyMOL-generated Cover.  See [[Covers]].]],\n&lt;br /&gt;
ordermethod=none&lt;br /&gt;
allowcachedresults=false&lt;br /&gt;
&amp;lt;/DynamicPageList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Alter&amp;diff=13386</id>
		<title>Alter</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Alter&amp;diff=13386"/>
		<updated>2016-01-03T07:02:36Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[iterate]]&lt;br /&gt;
&lt;br /&gt;
'''alter''' changes one or more atomic properties over a selection using the python evaluator with a separate name space for each atom.  The symbols defined in the name space, which are are explained in [[Iterate]] are:&lt;br /&gt;
 name, resn, resi, chain, alt, elem, q, b, segi,&lt;br /&gt;
 type (ATOM,HETATM), partial_charge, formal_charge,&lt;br /&gt;
 text_type, numeric_type, ID, vdw&lt;br /&gt;
&lt;br /&gt;
All strings must be explicitly quoted.  This operation typically takes several seconds per thousand atoms altered.&lt;br /&gt;
&lt;br /&gt;
'''WARNING''': You should always issue a '''sort''' command on an object&lt;br /&gt;
after modifying any property which might affect canonical atom&lt;br /&gt;
ordering (names, chains, etc.).  Failure to do so will confound&lt;br /&gt;
subsequent &amp;quot;create&amp;quot; and &amp;quot;byres&amp;quot; operations.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
 alter (selection),expression&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
&lt;br /&gt;
====Change chain label and residue index====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 alter (chain A),chain='B'&lt;br /&gt;
 alter (all),resi=str(int(resi)+100)&lt;br /&gt;
 sort&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Change van der Waals radius of a given atom====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter (name P), vdw=1.90&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note that is if dots, spheres, mesh or surface representation is used. You have to refresh the view with&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Renumber the amino acids in a protein, so that it starts from 0 instead of its offset as defined in the structure file====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# The first residue in the structure file for 1cll is 4.  To change this to 0, maybe to match scripts&lt;br /&gt;
# outputted from other programs, just remove the offset of 4 from each atom&lt;br /&gt;
alter 1cll, resi=str(int(resi)-4)&lt;br /&gt;
# refresh (turn on seq_view to see what this command does).&lt;br /&gt;
sort&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Change the b values of all atoms to the distance of the atoms to a reference point====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# reference point&lt;br /&gt;
x0,y0,z0=[1,2,3]  &lt;br /&gt;
# calculate distance values between the reference point and all the atoms&lt;br /&gt;
alldist = []&lt;br /&gt;
iterate_state 1, yourstruc, alldist.append(((x-x0)**2.0+(y-y0)**2.0+(z-z0)**2.0)**0.5)&lt;br /&gt;
# assign distance values to b-factors &lt;br /&gt;
di = iter(alldist)&lt;br /&gt;
alter yourstruc, b=di.next()&lt;br /&gt;
# visualize the distances&lt;br /&gt;
spectrum b, rainbow, yourstruc&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Copy (transfer) the color from one object to another====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
stored.colors = {}&lt;br /&gt;
iterate obj1, stored.colors[chain,resi,name] = color&lt;br /&gt;
alter obj2, color = stored.colors.get((chain,resi,name), color)&lt;br /&gt;
recolor&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PYMOL API ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.alter(string selection, string expression, int quiet=1, dict space=None)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As explained before, all strings must be explicitly quoted. For example to change all HETATM records to ATOM you should do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.alter('all', 'type=&amp;quot;ATOM&amp;quot;')&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Alter_State]], [[iterate]], [[Iterate_State]], [[sort]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Alter]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Alter_State&amp;diff=13384</id>
		<title>Alter State</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Alter_State&amp;diff=13384"/>
		<updated>2016-01-03T07:02:36Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[iterate]]&lt;br /&gt;
&lt;br /&gt;
'''alter_state''' changes the atomic coordinates of a particular state using the python evaluator with a separate name space for each atom.  The symbols defined in the name space are:&lt;br /&gt;
* x&lt;br /&gt;
* y&lt;br /&gt;
* z&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter_state state,(selection),expression&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Alter the X coordinate for all&lt;br /&gt;
alter_state 1,(all),x=x+5&lt;br /&gt;
&lt;br /&gt;
#Shift the coordinates of the entire PDB file&lt;br /&gt;
alter_state 1,selection,(x,y,z)=(newx,newy,newz)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Iterate_State]], [[alter]], [[iterate]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Alter State]]&lt;br /&gt;
[[Category:States|Alter State]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Iterate_State&amp;diff=13382</id>
		<title>Iterate State</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Iterate_State&amp;diff=13382"/>
		<updated>2016-01-03T07:02:35Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[iterate]]&lt;br /&gt;
&lt;br /&gt;
Iterate state can be used to extract position data from an object or selection.  The expression can use the variables x, y, and z which are the position of the current atom.  One common usage is to extract the positions as a python list to alter then write back to the molecule using alter_state.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
 iterate_state state, (selection), expression&lt;br /&gt;
&lt;br /&gt;
=== ARGUMENTS ===&lt;br /&gt;
&lt;br /&gt;
* state = integer: state-index if positive number or any of these:&lt;br /&gt;
** state = 0: all states&lt;br /&gt;
** state = -1: current state&lt;br /&gt;
* selection = string: atom selection&lt;br /&gt;
* expression = string: expression in valid [http://en.wikipedia.org/wiki/Python_syntax_and_semantics python syntax]&lt;br /&gt;
* space = dict: namespace dictionary (API only) {default: pymol namespace}&lt;br /&gt;
* atomic = 0/1: provide atomic properties as variables if 1, or only x/y/z if 0 (atomic=0 gives some speed improvement) {default: 1}&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
==From PyMOL command line==&lt;br /&gt;
To get the sum of x coordinates:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
stored.sum_x = 0.0&lt;br /&gt;
iterate_state 1,(all),stored.sum_x = stored.sum_x + x&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
To get a list of the positions in a selection&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
stored.pos = []&lt;br /&gt;
iterate_state 1, (all), stored.pos.append((x,y,z))&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
==From Python==&lt;br /&gt;
To get a list of positions&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# either with global stored object&lt;br /&gt;
from pymol import stored&lt;br /&gt;
stored.pos = []&lt;br /&gt;
cmd.iterate_state(1, 'all', 'stored.pos.append((x,y,z))')&lt;br /&gt;
&lt;br /&gt;
# or with local object, passed with space argument&lt;br /&gt;
pos = []&lt;br /&gt;
cmd.iterate_state(1, 'all', 'pos.append((x,y,z))', space={'pos': pos})&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[iterate]], [[alter]], [[Alter_State]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Iterate State]]&lt;br /&gt;
[[Category:States|Iterate State]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Iterate&amp;diff=13380</id>
		<title>Iterate</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Iterate&amp;diff=13380"/>
		<updated>2016-01-03T07:02:35Z</updated>

		<summary type="html">&lt;p&gt;Bell: 2 revisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''iterate''' command executes a Python expression for all atoms in a selection. The local namespace exposes all atomic identifiers and properties as read-only Python variables. The global namespace by default is the '''pymol''' module namespace, and thus exposes objects like '''cmd''' and '''stored'''. The order of iteration is that of the internal atom ordering.&lt;br /&gt;
&lt;br /&gt;
The '''alter''' command is equivalent to '''iterate''', but provides read-write access to the exposed variables. This can for example be used to rename a chain or to assign new b-factors. If changing identifiers which would affect atom ordering, calling [[sort]] is necessary to reorder based on the new identifiers.&lt;br /&gt;
&lt;br /&gt;
The '''iterate_state''' command is similar to '''iterate''', but iterates over the coordinates in the given state and selection, and exposes '''x, y, z''' in addition to the atomic identifiers and properties.&lt;br /&gt;
&lt;br /&gt;
The '''alter_state''' command is equivalent to '''iterate_state''', but allows modification of '''x, y, z''' (and atom-state level settings in Incentive PyMOL 1.7+).&lt;br /&gt;
&lt;br /&gt;
== Exposed Variables ==&lt;br /&gt;
&lt;br /&gt;
All commands in the '''iterate'''-family expose the following variables:&lt;br /&gt;
&lt;br /&gt;
*'''model''' (str): the object name (appearing in the selection panel on the right) (cannot be altered)&lt;br /&gt;
*'''name''' (str): the atom name&lt;br /&gt;
*'''resn''' (str): the residue name&lt;br /&gt;
*'''resi''' (str): the residue identifier (residue number) as a string, including optional insertion code&lt;br /&gt;
*'''resv''' (int): the residue identifier (residue number) as an integer, excluding insertion code&lt;br /&gt;
*'''chain''' (str): the chain name&lt;br /&gt;
*'''alt''' (str): alternate location identifier&lt;br /&gt;
*'''elem''' (str): the chemical element&lt;br /&gt;
*'''q''' (float): occupancy&lt;br /&gt;
*'''b''' (float): the B Factor&lt;br /&gt;
*'''segi''' (str): segment identifier (columns 73-76 in PDB file)&lt;br /&gt;
*'''type''' (str: ATOM,HETATM): the atom type (PDB convention for canonical polymer residues)&lt;br /&gt;
*'''formal_charge''' (int): the formal charge of the atom&lt;br /&gt;
*'''partial_charge''' (float): the partial charge of the atom&lt;br /&gt;
*'''numeric_type'''&lt;br /&gt;
*'''text_type''' (str): automatic mol2 atom typing (Incentive PyMOL 1.4+)&lt;br /&gt;
*'''stereo''' (str): automatic stereochemical R/S label (Incentive PyMOL 1.4+)&lt;br /&gt;
*'''ID''' (int): PDB atom id (not guaranteed to be unique)&lt;br /&gt;
*'''rank''' (int): atom index from original file import (not guaranteed to be unique)&lt;br /&gt;
*'''index''' (int): internal atom index (unique per object, sensitive to [[sort|sorting]] and [[remove|removing]] of atoms, cannot be altered)&lt;br /&gt;
*'''vdw''' (float): Van der Waals radius&lt;br /&gt;
*'''ss''' (str): secondary structure&lt;br /&gt;
*'''color''' (int): color index&lt;br /&gt;
*'''reps''' (int): numeric mask of shown representations (PyMOL 1.7.4+)&lt;br /&gt;
*'''protons''' (int): (PyMOL 1.7.4+)&lt;br /&gt;
*'''p''' (object): property object to access user-defined properties like '''p.abc''' (Incentive PyMOL 1.7+)&lt;br /&gt;
*'''s''' (object): settings object to access settings, e.g. '''s.sphere_scale''' (Incentive PyMOL 1.7+, Open-Source PyMOL 1.8.1+)&lt;br /&gt;
&lt;br /&gt;
The '''iterate_state''' and '''alter_state''' commands in addition expose:&lt;br /&gt;
&lt;br /&gt;
*'''x''' (float): x-coordinate&lt;br /&gt;
*'''y''' (float): y-coordinate&lt;br /&gt;
*'''z''' (float): z-coordinate&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
 iterate (selection), expression&lt;br /&gt;
&lt;br /&gt;
 iterate_state state, (selection), expression&lt;br /&gt;
&lt;br /&gt;
 alter (selection), expression&lt;br /&gt;
&lt;br /&gt;
 alter_state state, (selection), expression&lt;br /&gt;
&lt;br /&gt;
=== Arguments ===&lt;br /&gt;
&lt;br /&gt;
* '''state''' = int: object state, -1 for current state, 0 for all states&lt;br /&gt;
* '''selection''' = str: atom selection&lt;br /&gt;
* '''expression''' = str: expression in Python language&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Example: Print b-factors ===&lt;br /&gt;
&lt;br /&gt;
The following prints the atom names ('''name''' variable) and b-factors ('''b''' variable) for residue #1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
iterate (resi 1), print name, round(b, 2)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example: Get b-factor list ===&lt;br /&gt;
&lt;br /&gt;
The following example fills a list, '''stored.bfactors''' with the f-factors ('''b''' variable) from residue #1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
stored.bfactors = []&lt;br /&gt;
iterate (resi 1), stored.bfactors.append(b)&lt;br /&gt;
print stored.bfactors&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example: Get coordinates ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
stored.coords = []&lt;br /&gt;
iterate_state 1, (all), stored.coords.append([x,y,z])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example: Modify coordinates ===&lt;br /&gt;
&lt;br /&gt;
This example shifts the selection by 10 Angstrom along the model x-axis.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter_state 1, (all), x += 10.0&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example: Rename chain ===&lt;br /&gt;
&lt;br /&gt;
This renames chain '''A''' to '''C'''. Note the difference between the selection syntax (first argument) and the Python syntax with the quoted string (second argument). The [[sort]] call is necessary if let's say there is also a chain B, and you expect chain B to appear before chain C (formerly A) in the sequence viewer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter chain A, chain=&amp;quot;C&amp;quot;&lt;br /&gt;
sort&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example: Sequence numbering offset ===&lt;br /&gt;
&lt;br /&gt;
Assume the residue numbering in a PDB file starts at 100, then the following updates the residue numbers to start at 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter (chain A), resv -= 99&lt;br /&gt;
sort&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example: Net Charge ===&lt;br /&gt;
&lt;br /&gt;
The following example calculates the net charge of an object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
stored.net_charge = 0&lt;br /&gt;
iterate (all), stored.net_charge += partial_charge&lt;br /&gt;
print 'Net charge:', stored.net_charge&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example: Color transfer ===&lt;br /&gt;
&lt;br /&gt;
Copy (transfer) the color from one object to another&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
stored.colors = {}&lt;br /&gt;
iterate obj1, stored.colors[chain,resi,name] = color&lt;br /&gt;
alter obj2, color = stored.colors.get((chain,resi,name), color)&lt;br /&gt;
recolor&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  PYMOL API ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.iterate(str selection, str expression, int quiet=1, dict space=None)&lt;br /&gt;
&lt;br /&gt;
cmd.iterate_state(int state, str selection, str expression, int quiet=1, dict space=None)&lt;br /&gt;
&lt;br /&gt;
cmd.alter(str selection, str expression, int quiet=1, dict space=None)&lt;br /&gt;
&lt;br /&gt;
cmd.alter_state(int state, str selection, str expression, int quiet=1, dict space=None)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Arguments ===&lt;br /&gt;
&lt;br /&gt;
* '''state''' = int: state-index if positive number or any of these:&lt;br /&gt;
** '''state''' = 0: all states&lt;br /&gt;
** '''state''' = -1: current state&lt;br /&gt;
* '''selection''' = str: atom selection&lt;br /&gt;
* '''expression''' = str: expression in valid [http://en.wikipedia.org/wiki/Python_syntax_and_semantics python syntax]&lt;br /&gt;
* '''space''' = dict: namespace dictionary {default: pymol namespace}&lt;br /&gt;
* '''atomic''' = 0/1: provide atomic properties as variables if 1, or only x/y/z if 0 (in older PyMOL versions, atomic=0 gives some speed improvement) {default: 1}&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;space&amp;quot; argument ===&lt;br /&gt;
&lt;br /&gt;
The '''space''' argument can be used to pass local objects into the expression namespace, instead of evaluating the expression in the global '''pymol''' module namespace.&lt;br /&gt;
&lt;br /&gt;
The b-factor list example from above but without the global '''pymol.stored''' variable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
myspace = {'bfactors': []}&lt;br /&gt;
cmd.iterate('(all)', 'bfactors.append(b)', space=myspace)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
User defined functions can also be included in the namespace:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
def myfunc(resi,resn,name):&lt;br /&gt;
    print '%s`%s/%s' % (resn ,resi, name)&lt;br /&gt;
&lt;br /&gt;
myspace = {'myfunc': myfunc}&lt;br /&gt;
cmd.iterate('(all)', 'myfunc(resi,resn,name)', space=myspace)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[sort]]&lt;br /&gt;
* [[Get_Model|get_model]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Iterate]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_coordset&amp;diff=13377</id>
		<title>Get coordset</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_coordset&amp;diff=13377"/>
		<updated>2016-01-03T07:02:34Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[get_coordset]] is an API only function that returns the coordinates of one object-state (one &amp;quot;coordinate set&amp;quot;) as a numpy array.&lt;br /&gt;
&lt;br /&gt;
''New in PyMOL 1.7.4''&lt;br /&gt;
&lt;br /&gt;
The order of coordinates might differ from functions like [[iterate]] or [[get_coords]]. The function does '''not''' take the state or TTT matrices into account.&lt;br /&gt;
&lt;br /&gt;
== PyMOL API ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.get_coordset(str name, int state=1, int copy=1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Returns:''' ndarray, shape (N, 3), where N is the number of atoms.&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
&lt;br /&gt;
* '''selection''' = str: atom selection&lt;br /&gt;
* '''state''' = int: state index {default: 1}&lt;br /&gt;
* '''copy''' = 0/1: {default: 1} '''Warning: only use copy=0 if you know what you're doing.''' copy=0 will return a numpy array which is a wrapper of the internal coordinate set memory and provides read-write access. If the internal memory gets freed or reallocated, this wrapper will become invalid.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Move an object to its geometric center:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cs = cmd.get_coordset('1ubq', copy=0)&lt;br /&gt;
cs -= cs.mean(0)&lt;br /&gt;
cmd.rebuild()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[load_coordset]]&lt;br /&gt;
* [[get_coords]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_coords&amp;diff=13375</id>
		<title>Get coords</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_coords&amp;diff=13375"/>
		<updated>2016-01-03T07:02:34Z</updated>

		<summary type="html">&lt;p&gt;Bell: 3 revisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[get_coords]] is an API only function that returns the coordinates of a selection as a numpy array.&lt;br /&gt;
&lt;br /&gt;
''New in PyMOL 1.7.4''&lt;br /&gt;
&lt;br /&gt;
The order of coordinates is that of the internal atom ordering, like in [[iterate]], and unlike in [[get_coordset]]. The function considers the object state and TTT matrices, like in [[Get_Model|get_model]].&lt;br /&gt;
&lt;br /&gt;
== PyMOL API ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.get_coords(str selection='all', int state=1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Returns:''' ndarray, shape (N, 3), where N is the number of atoms if '''state &amp;gt; 0''', or (natoms * nstates) if '''state=0'''.&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
&lt;br /&gt;
* '''selection''' = str: atom selection {default: all}&lt;br /&gt;
* '''state''' = int: state index or all states if state=0 {default: 1}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[load_coords]]&lt;br /&gt;
* [[get_coordset]]&lt;br /&gt;
* [[Get Coordinates I]]&lt;br /&gt;
&lt;br /&gt;
For state &amp;gt; 0, the function is equivalent to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
numpy.array(cmd.get_model(selection, state).get_coord_list())&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_Coordinates_I&amp;diff=13371</id>
		<title>Get Coordinates I</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_Coordinates_I&amp;diff=13371"/>
		<updated>2016-01-03T07:02:33Z</updated>

		<summary type="html">&lt;p&gt;Bell: 6 revisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are several ways to extract or load atomic coordinates in PyMOL using the python API.&lt;br /&gt;
&lt;br /&gt;
== Extract coordinates using [[get_coords]] ==&lt;br /&gt;
&lt;br /&gt;
''New in PyMOL 1.7.4''. This is the fastest method to extract coordinates from a selection. It considers the object rotation matrix.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
xyz = cmd.get_coords('sele', 1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Extract coordinates using [[get_coordset]] ==&lt;br /&gt;
&lt;br /&gt;
''New in PyMOL 1.7.4''. Operates on the object-state level, not on selections. Does '''not''' consider the object rotation matrix. Retrieves coordinates in original order (e.g. PDB file atom order), not in sorted atom order. Faster than [[get_coords]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
xyz = cmd.get_coordset(objectname, 1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Extract coordinates using [[Get_Model|get_model]] ==&lt;br /&gt;
&lt;br /&gt;
Before 1.7.4, this was the fastest method to extract coordinates. It considers the object rotation matrix.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
xyz = cmd.get_model('sele', 1).get_coord_list()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Extract coordinates using [[iterate_state]] ==&lt;br /&gt;
&lt;br /&gt;
This is much slower than the first method. It does '''not''' consider the object rotation matrix.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
xyz = []&lt;br /&gt;
cmd.iterate_state(1, 'sele', 'xyz.append([x,y,z])', space=locals(), atomic=0)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Load coordinates using [[Alter_State|alter_state]] ==&lt;br /&gt;
&lt;br /&gt;
This is the most convenient way to load coordinates and works equivalent to '''iterate_state'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
xyz = [...] # some Nx3 list with coordinates&lt;br /&gt;
xyz_iter = iter(xyz)&lt;br /&gt;
cmd.alter_state(1, 'sele', '(x,y,z) = xyz_iter.next()', space=locals())&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Load coordinates using [[update]] ==&lt;br /&gt;
&lt;br /&gt;
This example gets a copy of the coordinates in Python, rotates the object about the Z axis, and then updates the coordinates in the original object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
model = cmd.get_model('pept')&lt;br /&gt;
for a in model.atom:&lt;br /&gt;
    a.coord = [ -a.coord[1], a.coord[0], a.coord[2]]&lt;br /&gt;
&lt;br /&gt;
cmd.load_model(model, &amp;quot;_tmp&amp;quot;)&lt;br /&gt;
cmd.update(&amp;quot;pept&amp;quot;, &amp;quot;_tmp&amp;quot;)&lt;br /&gt;
cmd.delete(&amp;quot;_tmp&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Load coordinates using [[load_coords]] ==&lt;br /&gt;
&lt;br /&gt;
''Changed in PyMOL 1.7.3''. Update selection coordinates from a Nx3 float array.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.load_coords(xyz, selection)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Load coordinates using [[load_coordset]] ==&lt;br /&gt;
&lt;br /&gt;
''New in PyMOL 1.7.4''. Update object state coordinates from a Nx3 float array. Can also append a state. Order of coordinates equivalent to [[get_coordset]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.load_coordset(xyz, objectname, 1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Load coordinates using [[get_coordset]] ==&lt;br /&gt;
&lt;br /&gt;
''New in PyMOL 1.7.4''. The [[get_coordset]] function can also return a memory view instead of a copy. This allows modifying the coordinates in place.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
xyz = cmd.get_coordset(objectname, 1, copy=0)&lt;br /&gt;
xyz[:] = newxyz&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|Get Coordinates I]]&lt;br /&gt;
[[Category:ObjSel_Scripts]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Main_Page&amp;diff=13364</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Main_Page&amp;diff=13364"/>
		<updated>2016-01-03T07:02:33Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; style=&amp;quot;padding-bottom: 4em;&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-size:210%; font-weight: bold; color:#032d45; text-align:center; padding: 5px; margin-bottom: 4px;&amp;quot; | Welcome to the PyMOL Wiki!&lt;br /&gt;
|- style=&amp;quot;text-align:center; font-weight:bold; color: #6d6003; font-size: 140%; font-style: italic; font-family: serif;&amp;quot;&lt;br /&gt;
| The community-run support site for the [http://pymol.org PyMOL] molecular viewer.&lt;br /&gt;
|- style=&amp;quot;text-align:center; font-weight:bold; color: #6d6003; font-size: 140%; font-style: italic; font-family: serif;&amp;quot;&lt;br /&gt;
| New accounts: email jason (dot) vertrees (@) gmail dot com&lt;br /&gt;
|- style=&amp;quot;text-align:center; font-weight:bold; color: #6d6003; font-size: 140%; font-style: italic; font-family: serif;&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;45%&amp;quot; style=&amp;quot;background: #EDEBD5; margin-bottom: 4em; border-bottom: 1px solid #AFB29E; border-left: 1px solid #AFB29E; border-right: 1px solid #AFB29E;&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-size: 1.4em; font-weight: bold; color: #032d45; text-align:center; background: #5F7F96; padding-top:0.5em; padding-bottom: 0.25em; border-top: 2px solid #AFB29E; border-bottom: 1px solid #fff;&amp;quot; |Quick Links&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;font-size: 1.1em; color #61021F; padding: 0.5em 1em 0.5em 3em;&amp;quot;|'''[[:Category:Tutorials|Tutorials]]''' || '''[[TOPTOC|Table of Contents]]''' || '''[[:Category:Commands|Commands]]'''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;font-size: 1.1em; color #61021F; padding: 0.5em 1em 0.5em 3em;&amp;quot;|'''[[:Category:Script_Library|Script Library]]''' || '''[[:Category:Plugins|Plugins]]''' || '''[[:Category:FAQ|FAQ]]'''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;font-size: 1.1em; color #61021F; padding: 0.5em 1em 0.5em 3em;&amp;quot;|'''[[Gallery]]''' | '''[[Covers]]'''&lt;br /&gt;
||'''[[CheatSheet|PyMOL Cheat Sheet]]''' (''[[Media:PymolRef.pdf|PDF]]'')&lt;br /&gt;
||'''[[PyMOL_mailing_list|Getting Help]]'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| style=&amp;quot;vertical-align: top; width: 40%&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;jtable&amp;quot; style=&amp;quot;float: left; width: 90%;&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-size: 1.4em; font-weight: bold; text-align:left; border-bottom: 2px solid #6678b1;&amp;quot; | News &amp;amp;amp; Updates&lt;br /&gt;
|-&lt;br /&gt;
! New Plugin&lt;br /&gt;
| [[Lisica|LiSiCA]] is a new plugin for 2D and 3D ligand based virtual screening using a fast maximum clique algorithm.&lt;br /&gt;
|-&lt;br /&gt;
! Official Release&lt;br /&gt;
| [http://pymol.org PyMOL v1.8.0 has been released] on Nov 18, 2015.&lt;br /&gt;
|-&lt;br /&gt;
! PyMOL Open-Source Fellowship&lt;br /&gt;
| Schrödinger is now accepting applications for the PyMOL Open-Source Fellowship program! Details on http://pymol.org/fellowship&lt;br /&gt;
|-&lt;br /&gt;
! Official Release&lt;br /&gt;
| [http://pymol.org PyMOL, AxPyMOL, and JyMOL v1.7.6 have all been released] on May 4, 2015.&lt;br /&gt;
|-&lt;br /&gt;
! New Plugin&lt;br /&gt;
| [[PyANM|PyANM]] is a new plugin for easier Anisotropic Network Model (ANM) building and visualising in PyMOL.&lt;br /&gt;
|-&lt;br /&gt;
! New Plugin&lt;br /&gt;
| [[Bondpack]] is a collection of PyMOL plugins for easy visualization of atomic bonds.&lt;br /&gt;
|-&lt;br /&gt;
! New Plugin&lt;br /&gt;
| [[MOLE 2.0: advanced approach for analysis of biomacromolecular channels|MOLE 2.0]] is a new plugin for rapid analysis of biomacromolecular channels in PyMOL.&lt;br /&gt;
|-&lt;br /&gt;
! 3D using Geforce&lt;br /&gt;
| PyMOL can now be [http://forums.geforce.com/default/topic/571604/3d-vision/3d-vision-working-with-qbs-in-opengl-software-using-geforce/2/ visualized in 3D using Nvidia GeForce video cards] (series 400+) with 120Hz monitors and Nvidia 3D Vision, this was previously only possible with Quadro video cards.&lt;br /&gt;
|-&lt;br /&gt;
! Older News&lt;br /&gt;
| See [[Older_News|Older News]].&lt;br /&gt;
|}&lt;br /&gt;
|style=&amp;quot;vertical-align: top; width: 40%&amp;quot;|&lt;br /&gt;
{| class=&amp;quot;jtable&amp;quot; style=&amp;quot;float: right; width: 90%&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-size: 1.4em; font-weight: bold; text-align:left; border-bottom: 2px solid #6678b1;&amp;quot; |Did you know...&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;div class=&amp;quot;didyouknow&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;DynamicPageList&amp;gt;&lt;br /&gt;
namespace=&lt;br /&gt;
category=Commands|Plugins|Script_Library|Settings&lt;br /&gt;
includepage=*&lt;br /&gt;
includemaxlength=1050&lt;br /&gt;
escapelinks=false&lt;br /&gt;
resultsheader=__NOTOC__ __NOEDITSECTION__&lt;br /&gt;
randomcount=1&lt;br /&gt;
listseparators=,&amp;lt;h3&amp;gt;[[%PAGE%]]&amp;lt;/h3&amp;gt;,,\n&lt;br /&gt;
&amp;lt;/DynamicPageList&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
|style=&amp;quot;vertical-align: top; width: 18%&amp;quot;|&lt;br /&gt;
&amp;lt;DynamicPageList&amp;gt;&lt;br /&gt;
imagecontainer=Covers&lt;br /&gt;
randomcount=1&lt;br /&gt;
escapelinks=false&lt;br /&gt;
openreferences=true&lt;br /&gt;
listseparators=[[,%PAGE%,|thumb|185px|A Random PyMOL-generated Cover.  See [[Covers]].]],\n&lt;br /&gt;
ordermethod=none&lt;br /&gt;
&amp;lt;/DynamicPageList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Draw_Protein_Dimensions&amp;diff=13362</id>
		<title>Draw Protein Dimensions</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Draw_Protein_Dimensions&amp;diff=13362"/>
		<updated>2016-01-03T07:02:29Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = script&lt;br /&gt;
|filename  = Draw_Protein_Dimensions.py&lt;br /&gt;
|author    = [[User:PabloGuardado|Pablo Guardado Calvo]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This script will draw the dimensions of a protein based on an Inertia Axis Aligned Bounding Box (IABB).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The idea behind this script is to calculate an approximate minimal bounding box (MBB) to extract the cell dimensions of a protein. To calculate the MBB is not trivial and usually the Axis Aligned Bounding Box (AABB) does not show up the real dimensions of the protein. This script calculates the inertia tensor of the object, extract the eigenvectors and use them to rotate the molecule (using as rotation matrix the transpose of the eigenvector matrix). The result is a molecule oriented with the inertia axis aligned with the cartesian axis. A new Bounding Box is calculated, which is called Inertia Axis Aligned Bounding Box (IABB), with a volume always lower than the AABB volume, and in many cases may correspond with the MBB. &lt;br /&gt;
&lt;br /&gt;
As always with these type of things, you have to use at your own risk. I did not try all the possible combinations, but if you find a bug, do&lt;br /&gt;
not hesitate to contact me (pablo.guardado (at) gmail.com) or try to modify the code for yourself to correct it.&lt;br /&gt;
&lt;br /&gt;
To load the script just type:&lt;br /&gt;
&lt;br /&gt;
'''run path-to-the-script/Draw_Protein_Dimensions.py'''&lt;br /&gt;
&lt;br /&gt;
or if you want something more permanent add the previous line to your .pymolrc file&lt;br /&gt;
&lt;br /&gt;
The script works just typing:&lt;br /&gt;
&lt;br /&gt;
'''draw_Protein_Dimensions ''selection'''''&lt;br /&gt;
&lt;br /&gt;
This will draw the cell dimensions of your selection based on a IABB box. It also generates the IABB box and the inertia axis, you just need to do &amp;quot;show cgo&amp;quot; to display them.&lt;br /&gt;
&lt;br /&gt;
You could also try:&lt;br /&gt;
&lt;br /&gt;
'''draw_BB ''selection'''''&lt;br /&gt;
&lt;br /&gt;
This will draw the AABB and IABB boxes with their cell dimensions and show up their volumes, you can compare them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# download the source and save as Draw_Protein_Dimensions.py&lt;br /&gt;
run Draw_Protein_Dimensions.py&lt;br /&gt;
fetch 2vak&lt;br /&gt;
# calculate the dimensions of the full ASU&lt;br /&gt;
draw_Protein_Dimensions 2vak&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=3 widths=350 heights=350&amp;gt; &lt;br /&gt;
File:2vak_ASU.png |Dimensions of 2vak ASU&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# you can extract only one chain and calculates the dimensions&lt;br /&gt;
draw_Protein_Dimensions obj01&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=3 widths=350 heights=350&amp;gt; &lt;br /&gt;
File:2vak_A.png |Dimensions of one protomer (chain A - 2vak)&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# You can also draw the Bounding boxes (AABB and IABB) to compare them.&lt;br /&gt;
fetch 2vak&lt;br /&gt;
draw_BB 2vak&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=3 widths=350 heights=350&amp;gt; &lt;br /&gt;
File:2vak_AABB.png |Axis-aligned bounding box &lt;br /&gt;
File:2vak_IABB.png |Inertia-axis-aligned bounding box&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Math_Scripts]]&lt;br /&gt;
[[Category:Structural_Biology_Scripts]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=User:Tlinnet&amp;diff=13360</id>
		<title>User:Tlinnet</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=User:Tlinnet&amp;diff=13360"/>
		<updated>2015-12-14T04:40:41Z</updated>

		<summary type="html">&lt;p&gt;Bell: 3 revisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Author of following PyMOL scripts ==&lt;br /&gt;
[[Propka | PROPKA for PyMOL]] 2015/11/19 42k&amp;lt;br&amp;gt;&lt;br /&gt;
[[DisplacementMap | Displacement map for conformational changes]] 2015/11/19 43k&amp;lt;br&amp;gt;&lt;br /&gt;
[[Forster-distance-calculator | Forster distance calculator]] 2015/11/19 22k &amp;lt;br&amp;gt;&lt;br /&gt;
[[Rotkit | Rotation matrix calculator]] 015/11/19 17k &amp;lt;br&amp;gt;&lt;br /&gt;
[[ColorByDisplacement | Color by displacement]] 2015/11/19 13k &amp;lt;br&amp;gt;&lt;br /&gt;
[[Cyspka | Surface Cysteine pKa predictor]] 2015/11/19 12k&lt;br /&gt;
&lt;br /&gt;
149 k&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
[[Biochemistry_student_intro | Biochemistry student intro]] 2015/11/19 60k&lt;br /&gt;
&lt;br /&gt;
== Test ==&lt;br /&gt;
&amp;lt;nowiki&amp;gt; &amp;lt;include src=&amp;quot;https://raw.github.com/Pymol-Scripts/Pymol-script-repo/master/cyspka.py&amp;quot; /&amp;gt; &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=TransformSelectionByCameraView&amp;diff=13356</id>
		<title>TransformSelectionByCameraView</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=TransformSelectionByCameraView&amp;diff=13356"/>
		<updated>2015-12-14T04:40:41Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This little script was posted to the PyMol list.  It will orient the molucule like cmd.orient() does, but does so by the camera view.&lt;br /&gt;
&lt;br /&gt;
https://sourceforge.net/p/pymol/mailman/message/10097639/&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# transform selection coordinates by the camera view&lt;br /&gt;
#&lt;br /&gt;
# The script answers this:&lt;br /&gt;
#   Thanks!&lt;br /&gt;
#   But translate[x,y,z] only translate the molecule.&lt;br /&gt;
#   What I want  is to put longest length of molecule in the X axes, the &lt;br /&gt;
#   second Y axes, the third z axes.&lt;br /&gt;
#   Just like what orient command does which change the view of camera but &lt;br /&gt;
#   not the coordinates.&lt;br /&gt;
#   Now I want the coordinates also change after orient it.&lt;br /&gt;
#&lt;br /&gt;
cv=list(cmd.get_view())&lt;br /&gt;
&lt;br /&gt;
cmd.transform_selection(&amp;quot;all&amp;quot;, \&lt;br /&gt;
  cv[0:3]+[0.0]+ \&lt;br /&gt;
  cv[3:6]+[0.0]+ \&lt;br /&gt;
  cv[6:9]+[0.0]+ \&lt;br /&gt;
  cv[12:15]+[1.0], transpose=1)&lt;br /&gt;
&lt;br /&gt;
cmd.reset()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Math_Scripts]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Selection_Algebra&amp;diff=13354</id>
		<title>Selection Algebra</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Selection_Algebra&amp;diff=13354"/>
		<updated>2015-12-14T04:40:41Z</updated>

		<summary type="html">&lt;p&gt;Bell: 1 revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
Selections can be made more precise or inclusive by combining them with logical operators, including the boolean '''and''', '''or''', and '''not'''. The boolean '''and''' selects only those items that have both (or all) of the named properties, and the boolean '''or''' selects items that have either (or any) of them. Venn diagrams show that '''and ''' selects the areas of overlap, while '''or''' selects both areas. &lt;br /&gt;
&lt;br /&gt;
See [http://pymol.sourceforge.net/newman/user/S0220venn.jpg simple logic Venn diagram].&lt;br /&gt;
&lt;br /&gt;
== Selection Operator/Modifier Table ==&lt;br /&gt;
Selection operators and modifiers are listed below. The dummy variables ''s1'' and ''s2'' stand for selection-expressions such as &amp;quot;chain a&amp;quot; or &amp;quot;hydro.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{| border=1 cellpadding=10&lt;br /&gt;
|-&lt;br /&gt;
! Operator&lt;br /&gt;
! Short Form&lt;br /&gt;
! Effect&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| not ''s''1&lt;br /&gt;
| !''s''1&lt;br /&gt;
| Selects atoms that are not included in ''s''1. &lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select sidechains, ! bb&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 and ''s''2&lt;br /&gt;
| ''s''1 &amp;amp;amp; ''s''2&lt;br /&gt;
| Selects atoms included in both ''s''1 and ''s''2. &lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select far_bb, bb &amp;amp;amp;farfrm_ten&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 or ''s''2&lt;br /&gt;
| ''s''1 | ''s''2&lt;br /&gt;
| Selects atoms included in either ''s''1 or ''s''2. &lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select all_prot, bb | sidechain&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 in ''s''2&lt;br /&gt;
| ''s''1 in ''s''2&lt;br /&gt;
|Selects atoms in ''s''1 whose identifiers name, resi, resn, chain and segi &amp;lt;u&amp;gt;'''all'''&amp;lt;/u&amp;gt; match atoms in ''s''2.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select same_atms, pept in prot&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 like ''s''2&lt;br /&gt;
| ''s''1 l. ''s''2&lt;br /&gt;
| Selects atoms in ''s''1 whose identifiers name and resi match atoms in ''s''2.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select similar_atms, pept like prot&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 gap ''X''&lt;br /&gt;
|&lt;br /&gt;
|Selects all atoms whose van der Waals radii are separated from the van der Waals radii of ''s''1 by a minimum of'' X'' Angstroms.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select farfrm_ten, resi 10 gap 5&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 around ''X''&lt;br /&gt;
| ''s''1 a. ''X''&lt;br /&gt;
|Selects atoms with centers within'' X'' Angstroms of the center of any atom in''s''1.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select near_ten, resi 10 around 5&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 expand ''X''&lt;br /&gt;
| ''s''1 x. ''X''&lt;br /&gt;
|Expands ''s''1 by all atoms within ''X'' Angstroms of the center of any atom in ''s''1.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select near_ten_x, near_ten expand 3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 within ''X'' of ''s''2&lt;br /&gt;
| ''s''1 w. ''X'' of ''s''2&lt;br /&gt;
| Selects atoms in ''s''1 that are within ''X'' Angstroms of any atom in ''s''2.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select bbnearten, bb w. 4 of resi 10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 near_to ''X'' of ''s''2&lt;br /&gt;
| ''s''1 nto. ''X'' of ''s''2&lt;br /&gt;
| Same as ''within'', but excludes ''s''2 from the selection (and thus is identical to &amp;lt;code&amp;gt;s1 and ''s2'' around X&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 beyond ''X'' of ''s''2&lt;br /&gt;
| ''s''1 be. ''X'' of ''s''2&lt;br /&gt;
| Selects atoms in ''s1'' that are at least ''X'' Anstroms away from ''s2''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| byres ''s''1&lt;br /&gt;
| br. ''s''1&lt;br /&gt;
| Expands selection to complete residues.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select complete_res, br. bbnear10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| bymolecule ''s''1&lt;br /&gt;
| bm. ''s''1&lt;br /&gt;
| Expands selection to complete molecules.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select complete_mol, bm. bbnear10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| byfragment ''s''1&lt;br /&gt;
| bf. ''s''1&lt;br /&gt;
| Expands selection to complete fragments.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select complete_frag, bf. bbnear10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| bysegment ''s''1&lt;br /&gt;
| bs. ''s''1&lt;br /&gt;
| Expands selection to complete segments.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select complete_seg, bs. bbnear10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| byobject ''s''1&lt;br /&gt;
| bo. ''s''1&lt;br /&gt;
| Expands selection to complete objects.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select near_obj, bo. near_res&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| bycell ''s''1&lt;br /&gt;
| &lt;br /&gt;
| Expands selection to unit cell.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select complete_cell, bycell orig_res&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| neighbor ''s''1&lt;br /&gt;
| nbr. ''s''1&lt;br /&gt;
| Selects atoms directly bonded to ''s''1, excludes ''s''1.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select vicinos, neighbor resi 10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| bound_to ''s1''&lt;br /&gt;
| bto. ''s1''&lt;br /&gt;
| Selects atoms directly bonded to ''s1'', may include ''s1''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ''s''1 extend ''X''&lt;br /&gt;
| ''s''1 xt. ''X''&lt;br /&gt;
| Extends ''s''1 by ''X'' bonds connected to atoms in ''s''1.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select connect_x, near10 extend 3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| pepseq ''SEQ''&lt;br /&gt;
| ps. ''SEQ''&lt;br /&gt;
| Selects peptide sequence matching upper-case one-letter sequence ''SEQ'' (see also [[FindSeq]]).&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select 1tvn and ps. FATEW&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| rep ''rep''&lt;br /&gt;
|&lt;br /&gt;
| Selects atoms which show representation ''rep''.&lt;br /&gt;
&amp;lt;pre&amp;gt;PyMOL&amp;gt; select sele, rep spheres&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of distance operators ==&lt;br /&gt;
&lt;br /&gt;
There are serveral very similar operators that select by pairwise atom distances. The following table lists the details how they differ.&lt;br /&gt;
&lt;br /&gt;
'''Syntax 1''': ''s1'' operator X of ''s2''&amp;lt;br&amp;gt;&lt;br /&gt;
'''Syntax 2''': ''s1'' and (''s2'' operator X)&lt;br /&gt;
&lt;br /&gt;
{| border=1 cellspacing=0 cellpadding=4 style=&amp;quot;text-align:center&amp;quot; class=wikitable&lt;br /&gt;
! operator !! distance is ... !! measured from !! includes s2 !! syntax !! notes&lt;br /&gt;
|-&lt;br /&gt;
|  near_to ||  ≤ X            ||     center    ||    never    ||   1    || equivalent to &amp;quot;around&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|   within ||  ≤ X            ||     center    ||if matches s1||   1    ||&lt;br /&gt;
|-&lt;br /&gt;
|   beyond ||  &amp;gt; X            ||     center    ||    never    ||   1    ||&lt;br /&gt;
|-&lt;br /&gt;
|      gap ||  &amp;gt; X            ||   center+vdw  ||    never    ||   2    ||&lt;br /&gt;
|-&lt;br /&gt;
|   around ||  ≤ X            ||     center    ||    never    ||   2    || equivalent to &amp;quot;near_to&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|   expand ||  ≤ X            ||     center    ||   always    ||   2    ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Logical selections can be combined. For example, you might select atoms that are part of chain a, but not residue number 125:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# selects atoms that are part of chain a, but not residue number 125.&lt;br /&gt;
select chain a and (not resi 125)&lt;br /&gt;
&lt;br /&gt;
# The following two selections are equivalent, &lt;br /&gt;
select (name cb or name cg1 or name cg2) and chain A&lt;br /&gt;
&lt;br /&gt;
# select c-beta's, c-gamma-1's and c-gamma-2's &lt;br /&gt;
# that are in chain A.&lt;br /&gt;
select name cb+cg1+cg2 and chain A&lt;br /&gt;
&lt;br /&gt;
# select all residues within 5 Ang. or any organic small molecules&lt;br /&gt;
select br. all within 5 of organic&lt;br /&gt;
&lt;br /&gt;
# select helices&lt;br /&gt;
select ss 'h'&lt;br /&gt;
&lt;br /&gt;
# select anything shown as a line&lt;br /&gt;
select rep lines&lt;br /&gt;
&lt;br /&gt;
# select all residues with a b-factor less than 20, within 3 angstroms of any water&lt;br /&gt;
select br. b&amp;lt;20 &amp;amp; (all within 3 of resn HOH)&lt;br /&gt;
&lt;br /&gt;
# select anything colored blue&lt;br /&gt;
select color blue&lt;br /&gt;
&lt;br /&gt;
# select the 1st arginine&lt;br /&gt;
select first resn arg&lt;br /&gt;
&lt;br /&gt;
# select 1foo's segment G's chain X's residue 444's alpha carbon&lt;br /&gt;
select 1foo/G/X/444/CA&lt;br /&gt;
# same thing&lt;br /&gt;
select 1foo and segi G and c. X and i. 444 and n. CA&lt;br /&gt;
&lt;br /&gt;
# select the entire object that residue 23's beta caron is in:&lt;br /&gt;
select bo. i. 23 and n. CA&lt;br /&gt;
&lt;br /&gt;
# select the molecule that chain C is in&lt;br /&gt;
select bm. c. C&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like the results of groups of arithmetic operations, the results of groups of logical operations depend on which operation is performed first. They have an order of precedence. To ensure that the operations are performed in the order you have in mind, use parentheses:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;byres ((chain a or (chain b and (not resi 125))) around 5)&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PyMOL will expand its logical selection out from the innermost parentheses.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Single-word Selectors]], [[Selection Macros]], [[Property_Selectors]], [[Identify]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Selector Quick Reference]]&lt;br /&gt;
[[Category:Selecting|Selection Algebra]]&lt;/div&gt;</summary>
		<author><name>Bell</name></author>
	</entry>
</feed>