Das Erwachen

Bioinformatics

"Python looks to me like the illegitimate spawn of C and BASIC, but then I used to program in 6502 machine code so what do I know ..." (Laurence Pearl, PyMOL user)

 
 

Tips for PyMOL from the PyMOL mailing list

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.

Kristian Rother

Available Subtopics:


Advanced PyMOL features


 

Meaning of the get_view output

Of the 18 numbers in the output array,
0-8 is the 3x3 rotation matrix,
9-11 is the camera location,
12-14 is the origin of rotation,
15-16 are the clipping distances,
and 17 is the orthoscopic flag.


Robert Campbell, Paolo Martel and Warren


 

Altering atom coordinates

Example:

alter_state 1,(pdb1cse),x=x-10.0 
The latter section can contain formulae involving at least the xyz coordinates, lots of constants and the (+-*/) operators.


 

Translate or rotate individual objects

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

Warren DeLano


 

Moving one segment relative to the rest

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

Warren DeLano


 

What is in a selection?

Atom selections aren't directly exposed to Python, but you can have PyMOL build a Python list containing whatever information you need:

Using PyMOL commands:

list=[]
iterate (name ca),list.append((resi,resn))
print list

[('ASP', '1'), ('CYS', '2'), ('ALA', '3'), ('TRP', '4'), ('HIS', '5'), ('LEU',
 '6'), ('GLY', '7'), ('GLU', '8'), ('LEU', '9'), ('VAL', '10'), ('TRP', '11'), 
('CYS', '12'), ('THR', '13')]
or using a Python script (in PyMOL):
from pymol import cmd,stored
stored.list=[]
cmd.iterate("(name ca)","stored.list.append((resi,resn))")
print stored.list

[('1', 'ASP'), ('2', 'CYS'), ('3', 'ALA'), ('4', 'TRP'), ('5', 'HIS'), ('6', '
LEU'), ('7', 'GLY'), ('8', 'GLU'), ('9', 'LEU'), ('10', 'VAL'), ('11', 'TRP'), 
('12', 'CYS'), ('13', 'THR')]

Warren DeLano


 

How does the Density Wizard work?

The answer:

  • Load a map
  • Load a model structure
  • Activate the Density Wizard
  • Control-middle click to pick any atom in the model to get the map drawn about it.
  • Each of the blue rows in the Wizard is a pop-up menu. You can select multiple or different maps to be displayed at different levels as you traverse the model.
    Warren DeLano


     

    What the heck is molecular sculpting?

    Molecular sculpting works like a real-time energy minimizer, except that it isn't minimizing the energy. Instead, its just trying to return local atomic geometries (bonds, angles, chirality, planarity) to the configuration the molecules possess when they were first loaded into PyMOL.

    To actually use this feature:

    1. Load a PDB file.
    2. Configure the mouse for editing (Mouse menu) or click in the mouse/key matrix box.
    3. Select "auto-sculpting" from the Sculpting menu.
    4. Select Sculpting from the Wizard menu.
    5. Ctrl-middle-click on any atom in your protein to activate sculpting
      the green part will be free to move
      the cyan part will be a fixed cushion to provide context
      the grey part will be excluded.
    6. Now perform any conformational editing operation in the green region such as:
      ctrl-left-click-and-drag on an atom
      ctrl-right-click on a bond, then ctrl-left-click-and-drag about that bond.
    You can adjust the radius and cushion using the blue pop-up menus.

    Right now I'm not sure the sculpting feature is more than entertainment, but my expectation is that it will become part of PyMOL's crystallographic model building system in the future.

    Warren DeLano


     

    Align proteins with CA fit

    If the proteins have significant homology, then you can use the align command:

    align prot1////ca,prot2
    
    which will perform a sequence alignment of prot1 against prot2, and then an optimizing fit using the CA positions. I'm not sure if the help text for align got into 0.82, but the next version will definitely have it.
    Warren DeLano

     
    Rubor : http://www.rubor.de
    Post an Kristian Rother: kristian.rother@charite.de

    Last modified: Wed Apr 28 07:24:35 CEST 2004