Disclaimer: All the contributions displayed on this page were made by subscribers of the PyMOL mailing list at
sourceforge.net and Warren L. DeLano himself. Although i have checked most of the things listed here, i cannot guarantee
that everythings works well. I cannot even guarantee that i have understood everything written on this page. Please be cautious.
Here is a simple script that saves the molecule with coordinates from the current orientation.
(invoke it with 'run save_transformed.py' and type the new save_transformed.py command thereafter).
There is a "translate" function similar to "rotate", the docs for these don't exist yet, because the implementation isn't finished. However, feel free to use them in the following forms:
translate vector,object-name,state (vector needs to be something like [x,y,z]) translate [1,0,0],pept rotate axis,angle,object-name,state (axis can be either the letter x,y,z or a 3D vector [x,y,z]) rotate x,90,pept rotate [1,1,1],10,pept
This means moving two parts of one object into different directions.
The easiest way to do this is to split the objects and then use the rotate command.
EXAMPLE: split.pml
There is also a new command in the 0.95 series:
split_states object-namewhich will spread a PDB "biological unit" (or any multi-state object -- including SD files) over a series of independent objects. This makes it possible to interact with such objects more naturally than with "all_states = 1".
Examples:
alter A/10:34/, ss='H' alter A/35:40/, ss='L' alter A/41:60/, ss='S'
Example:
alter (elem Fe),vdw=1.8 rebuild(The value for Fe is wrecked in PyMOL at the moment, so running the above line might be a good idea).
Example:
alter_state 1,(pdb1cse),x=x-10.0The latter section can contain formulae involving at least the xyz coordinates, lots of constants and the (+-*/) operators.
Select the bond using Ctrl-right-click, then either
unbond pk1,pk2or hit Ctrl-D.
The inversion function was changed in version 0.95 to take advantage
of multiple picked atoms. To invert a center, Ctrl-middle-click to pick the
center atom as pk1 and two stationary atoms as pk2 and pk3. Then type
Ctrl-E to invert.
You can use the "bond" command to attach them:
bond 24/sg,26/sg bond 56/sg,99/sg unpick(unpick will hide the bond baton which gets displayed.)
alter cys/,name='CYX'or for specific residues
alter 24+26+56+99/,name='CYX'
Regarding H-bonds. There isn't a built-in function yet, but you can show H-bonds between two objects using atom selections so long as hydrogens are present in both molecules. If you don't have hydrogens, you can use h_add on the proteins or provide ligands with valence information and then use h_add.
Two examples are below. For clarity, they draw dashes between the heavy atoms and hide the hydrogens.
EXAMPLE 1: Show hydrogen bonds between protein and docked ligands
EXAMPLE 2: Show hydrogen bonds between two proteins
There is also a script drawing nice hydrogen bonds from Gareth Stockwell
If your ligands come in with valid valencies and formal charges, PyMOL's
h_add command can protonate ligands. (NOTE that there is a minor
technical hiccup with SD-files which are loaded by default as immutable
"discrete" objects.) Suffice it to say that in order to make changes to
the chemical structure, an object must be loaded with the "discrete" flag
set to zero.
Unfortunately, much of the molecular editing stuff remains to be
documented. Here's an example sequence, but I'm not sure it will help to
much...as indicated in the manual, this is immature functionality with
some major gaps. Attach in particular is very limited...
# show valences
set valence=0.05
# load cysteine fragment
fragment cys
# remove hydrogens
remove (hydro)
# edit gamma S
edit cys////sg
# add hydrogen
attach H,1,1
# add planer, trivalent nitrogen onto C terminus
edit cys////C
attach N,3,3
# edit that nitrogen
edit (elem N and neighbor cys////C)
# attach a tetrahedral methyl (note random position)
attach C,4,4
# here's an example of adding a whole residue from the library
edit cys////N
editor.attach_amino_acid("pk1","ace")
# now restore missing hydrogens (note that the names are off...)
h_add
Using pair_fit requires that you specify a set of paired atoms in each structure. Fortunately, you no longer have to specify each pair separately, so long as the ordering is the same in each selection (almost always true).
pair_fit ( trna10 and resid 10:15 and name P ), ( ref4 and resid 10:15 and name P )Another example:
pair_fit prot1///11-26/CA, prot2///34-49/CAwould superimpose prot1 on prot2 using C-alphas from residues 11-26 in prot1 and 34-49 in prot2.
Rubor : http://www.rubor.de
Post an Kristian Rother:
kristian.rother@charite.de
Last modified: Wed Apr 28 07:24:35 CEST 2004