Friday, January 27, 2012

Useful commands in Pymol


load file.pdb
create protein, all and segid PROT
create water, all and resname WAT
create res40, protein and resid 40
# To set display to orthoscopic
cmd.set('''orthoscopic''','''1''',quiet=0)
# To reset to default view
reset
hide everything, all
hide everything, protein
show sticks, protein
show surface, protein
set transparency=0.5
bg_color white
# To save images
ray 1200,1200
save file.png
distance (selection1), (selection2)
distance name = (selection1), (selection1) [,cutoff [,mode] ]
fit (selection), (target-selection)
# Colors everything by chain id
util.cbc

Resources:
http://pymol.sourceforge.net/newman/ref/S1000comref.html
http://www.pymolwiki.org/index.php/TOPTOC
http://www.pymolwiki.org
http://www.pymol.org/support
http://www.pymolwiki.org/images/7/77/PymolRef.pdf
http://people.mbi.ucla.edu/sawaya/tutorials/Graphics/pymol.html

The last link is particularly useful in the post-beginner stage of using Pymol.


 
load xxx.pdb
hide everything, all
create protein, all and not name h*
show sticks, protein
distance resi 22 and name CD and chain A, resi 22 and name CD and chain B
distance resi 22 and name CD and chain B, resi 22 and name CD and chain C
distance resi 22 and name CD and chain C, resi 22 and name CD and chain D
distance resi 22 and name CD and chain D, resi 22 and name CD and chain E
distance resi 28 and name NZ and chain D, resi 23 and name OD1 and chain C
distance resi 28 and name NZ and chain D, resi 23 and name OD2 and chain C
distance resi 28 and name NZ and chain C, resi 23 and name OD1 and chain B
distance resi 28 and name NZ and chain C, resi 23 and name OD2 and chain B
distance resi 28 and name NZ and chain B, resi 23 and name OD1 and chain A
distance resi 28 and name NZ and chain B, resi 23 and name OD2 and chain A
hide labels, all

March 2nd 2012

create protein, all and not resn DT+DG+NAG+HOH+OG6
create rna, all and resn DG+DT
create nag, all and resn NAG
create og6, all and resn OG6
hide everything, all
show cartoon, rna
show lines, rna
create closeprotein, (rna around 10) and not resn DG+DT
show sticks, closeprotein
distance /rna//D/DT`13/O4, /closeprotein//H/ARG`75/NH1
distance /rna//D/DT`13/O4, /closeprotein//H/ARG`75/NH2
distance /rna//D/DG`2/OP2, /closeprotein//H/ARG`77A/NH1
distance /rna//D/DG`2/OP2, /closeprotein//H/ARG`77A/NH2


March 5th, 2012

 # simple example: label residue 22's atoms with their names
label i. 22, name
 
# Label residue #44's alpha carbon with it's residue name, number and B-factor.
label n. CA and i. 44, "(%s, %s, %s") % (resn, resi, b)


This link has a lot of info on labeling. http://pymolwiki.org/index.php/Label

No comments:

Post a Comment