My software notes

September 18, 2012

[PyMOL] side-by-side comparison of 3 electrostatic surface potentials

Filed under: pymol/ molmol — kpwu @ 2:22 am
Tags: , , , ,

Here is an example using “grid mode” provided in PyMOL to show the charged states of a protein (PDB entry: 1Z66) at pH 4 (left), 7 (center) and 11 (right).  PyMOL script is attached after the figure.

First,  the potential maps at three pH states have to be generated. I used APBS web server combined with PROPKA to get  calculated pH-dependent potentials (.dx files).

Then I load 1z66.pdb and load all 3 .dx files. Draw first protein with one of the potentials. After that, turn on the grid mode and then duplicate pdb object twice.

Last, assign the potentials to duplicated objects. The electrostatic surface views at 3 pH states can be shown easily!

I really like the grid mode in PyMOL!  No need to use any image editor to assemble 3 potential views. No worry of sizes of molecules if generated separately.

Tips of “grid mode” can be found in my earlier post: [PyMOL] grid mode.

Steps to “Draw the electrostatic surface” can be checked at my earlier post, too.

=======pymol log.pml =================

load 1z66.pdb
load 1z66-pH4.dx, emap_pH4
load 1z66-pH7.dx, emap_pH7
load 1z66-pH11.dx, emap_pH11
set grid_mode, on
cmd.show_as(“surface” ,”1z66″)
ramp_new elvl1, emap_pH4, [-5,0,5]
set surface_color, elvl1, 1z66,
ramp_new elvl2, emap_pH7, [-5,0,5]
set surface_color, elvl2, obj01,
ramp_new elvl3, emap_pH11, [-5,0,5]
set surface_color, elvl3, obj02,
bg_color white
ray 600
png 1z66.png


July 19, 2012

[Xplor-NIH] modified residues (protein)

Filed under: xplor/xplor-nih/cns — kpwu @ 1:02 am
Tags: , , ,

I searched the Xplor-NIH mailing list to know how many modified amino acids are supported in Xplor-NIH.

So far, I can see N-terminal acetylation and spin labeled (MTSL) cysteine are documented in the mailing list. I wonder to know if acetylated lysine, phosphorylated serine, threonine and methylation are also supported in Xplor-NIH.

Here is the example of N-terminal acetylation and MTSL-labeled cysteine:

code: ACE = N-terminal acetylation. Xplor-NIH set it as an individual residue
CYSP = spin labeled cysteine.

Steps to do:

  1.  edit your sequence file: (3-letter code, residues are separated by space), add ACE as the first residue and change the desire CYS to CSYP
  2. in typical xplor-nih (see such example scripts in xplor-nih home/eginputs), around line 35-45, change to:
    # generate PSF data from sequence and initialize the correct parameters.
    from psfGen import seqToPSF
    seqToPSF(“xyza.seq”, seqType=’prot’, startResid=0)

    –> The original script was marked off and a similar script was shown here. I also alter the number start residue to “0”.  That will be easier for me while doing NOESY assignment without shifting my residue numbers

  3. Then, run “xplor -py” to check if the generated template PDB have correct residue numbers and the modified amino acids.

Here is the snapshot of my generated template PDB. (ACE as residue 0, CYSP as residue 2)

October 6, 2011

[PyMOL] assign secondary structural regions

Filed under: Uncategorized — kpwu @ 3:25 pm
Tags: , , ,


Sometimes I displayed the cartoon view of a protein in PyMOL as the figures shown below that I don’t really see the helix and strands.

It often happens when I merged 10 or 20 structures into a NMR ensemble file. All 20 structures are aligned but the secondary structural regions are not clearly displayed in PyMOL (commands: set all_states, on)

PyMOL provides two simple means to quickly draw helices and strands on the target proteins.

1. use command “dss”.

Simply type “dss” in the command line, PyMOL automatically calculates, rebuilds and draw the secondary structural regions. If the “all_states” is turned on, all structures will also be displayed properly. Here are two figures show the results of “dss” with single and all 20 states of my target protein.

The command “dss” provides simple but quick way to draw helical and strand regions, however, using other programs such as “DSSP” or “STRIDE” to clearly define the regions of helices and regions is highly recommended.

2. Use command “alter”

As I just said, “dss” doesn’t work perfectly. In this example case, I found length of first two sheets are not long enough, and the loop is a bit longer. I can use command “alter” to manually assign the secondary structural regions of my target proteins.

alter 3-9/, ss=’H’
alter 12-18/, ss=’H’

The above 3 lines are the commands I typed in and the sheets are now longer (see the right up corner). To change the length of loop and sheets, just type alter xx-yy/, ss=’L’, and alter aa-bb/, ss=’S’, respectively.


October 5, 2011

[PyMOL] customized display of helices and strands

Filed under: pymol/ molmol — kpwu @ 11:43 am
Tags: , ,

The  default view of cartoon presentation in PyMOL is provided below.

PyMOL provides commands “cartoon_oval_length“, “cartoon_oval_width“, “cartoon_rect_length” and “cartoon_rect_width” to customize the display of helices and strands.

PyMOL users should be aware that the 4 commands can’t be combined with “cartoon_fancy_helices” and “cartoon_fancy_strands”.  Once the fancy mode is turned on, the manually customized width/length will be changed back to default number.

The first few examples will be related to the oval view

command: set cartoon_oval_length 0.2

command: set cartoon_oval_length 1

command: set cartoon_oval_length 1.7

We can also change the thickness of the helix in our target by using “cartoon_oval_width”

The figure below shows the default thickness of helix.

command: set cartoon_oval_width 0.8

command: set cartoon_oval_width 1.5

Now. let me show you some examples to change the width and thickness of strand by using PyMOL.

command: set cartoon_rect_length 0.3

command: set cartoon_rect_length 0.7

command: set cartoon_rect_length 2

command: set cartoon_rect_width 0.1

command: set cartoon_rect_width 0.9

command: set cartoon_rect_width 1.6

May 16, 2011

statistics of NMR/X-ray determined protein structures in PDB (up to May 10, 2011)

Filed under: web — kpwu @ 4:48 pm
Tags: , , , ,

Two brief plots of protein structures (protein-DNA/RNA/ligand complexes are excluded) determined by either X-ray or NMR. Structures determined by hybrid method are not counted in the two plots. The dataset was obtain from PDB based on its released statistics by May 10th, 2011.

Molecules with sequence length longer than 1200 residues are also excluded. There are 5075 and 2 structures determined by X-ray and NMR methods, respectively in this category.

FYI: I obtained individual numbers from this statistics page at PDB.

Sequence length-dependent distribution plots of X-ray and NMR-determined protein structures.

The magnified NMR section.

Blog at