My software notes

June 26, 2012

[PyMOL] contact map (CMView)

Filed under: pymol/ molmol,softwares and scripts — kpwu @ 1:59 am
Tags: , ,

In PyMOL Wiki, there is a “contact map visualizer” plugin providing users to inspect the protein intramolecular contacts. However, this plugin requires “PyGame”, “Tkinter”, “PIL (python image library)” and most importantly, Gromacs!

I used Fink (Mac OSX 10.6.8) to successfully install Gromacs 4.1 but Fink reported problems while installing pygame. So I can generate xpm file of target protein structure by Gromacs but not inspect the contact map in PyMOL.

In contrast, I found another contact map visualizer called “CMView – Protein contact map visualization and analysis“. This program is written in Java and uses PyMOL as the molecular viewer.

Installation note (work platform: Mac OSX 10.6.8 with X11)

1. Download the CMView file, unzip it and move the folder to proper path)

2.Edit the “cmview.cfg” file and correct the path of pymol execute. Optional programs such as DSSP and DALI can be used if installed.

3. In terminal, call “” and load the PDB file from “CMView” and enjoy visualizing the molecules.

While the PDB is loaded, the CMView (run in Java) will show you the contact map.  You can use mouse to crop the region of interest and instantly see the contacts in the PDB file.


May 24, 2012

[PyMOL] different colors of nucleic acid rings

Filed under: pymol/ molmol — kpwu @ 12:55 am
Tags: , ,

The image below can be drew followed by steps in my earlier post, which shows single color of the nucleotide rings and bonds.

I saw a discussion list at PyMol forum today that an user requested a way to display different colors of the nucleotide rings. Below is the example image I tested (using PDB: 2WCC).

One thing to note: if you use “set cartoon_ring_color, xxx” in the beginning, you may not see your ring/bond in same color. Then you have to do one more step to color the bond color by using “color red, resn A (or DA, or other nucleic acids)”.

Pymol commands:

fetch 2WCC
as cartoon
bg_color white
select DNA, ///1 + ///2
cartoon oval, DNA
set cartoon_ring_mode, 3
set cartoon_nucleic_acid_color, blue
select dna_A, resn DA (here the Adenosine is named as DA)
select dna_C, resn DC
select dna_G, resn DG
select dna_T, resn DT
color yellow, dna_A
color red, dna_C
color gray40, dna_G
color palecyan, dna_T

* The 4 select can be skipped and use “color yellow, resn DA” in the coloring steps.

**IF you use “set cartoon_ring_color, orange” for all nucleotides in the beginning and wanna change colors for specific types of nucleotide rings, you may meet problems that command “set cartoon_ring_color, red, resn DA” (for the rings) and “color red, resn DA” (for the bonds in sidechain) don’t work sometimes. I somehow can change the bond color but not always (don’t know why– it works on my macbook but no on my iMac, both are MacPyMOL).

April 11, 2012

change display font/size in Sparky

Filed under: softwares and scripts — kpwu @ 10:00 pm
Tags: ,

The default font size of Sparky in my 13″ macbook is way big thus I have to move spectrum windows around or move some spectra windows to other desktop. Here is a solution to reduce the font size and the default display sizes of “pointer mode”, “Sparky main window” and individual windows will be smaller (because font is smaller..).

Example of Sparky MacOSX version (should be similar to Linux version):

1. found the path of installed Sparky. My sparky was extracted and moved to “/Applications”.

2. Go the Sparky-home/Contents/Resources/lib (the path in Linux version may be different, however, I don’t have linux machine with me, can’t provide example path of it)

3. edit the file “Sparky” (using vi or nedit, for example),  find a section about “Fonts” and change the fonts/size. Personally I like font size = 10.

=== The example of the Fonts section in this lib/Sparky  file”=====

! Fonts
! normalFont: for labels, buttons, menus, axis scales, res panels …
! fixedWidthFont: for lists where columns should line up
! scalableFont: for contour plot assignment labels
Sparky.normalFont: -family lucida -size 10
Sparky.fixedWidthFont: -family courier -size 10
Sparky.scalableFont: -family courier


The two figures shown below are displayed with font sizes 10 (top) and 16 (bottom). Smaller font size in Sparky clearly uses less space in the whole desktop. (the two windows are equally scaled–see same size of window title “Sparky 3.115”)

March 19, 2012

install procheck on MacOS 10.6

Filed under: mac,softwares and scripts — kpwu @ 10:50 pm
Tags: , , , , ,

Running system: MacOS X 10.6.8

First, followed by instruction of Procheck official site, download all required file. (you need to fax the license agreement first).

I use tar command to uncompress the procheck.tar.gz and aqua3.2.tar.gz.

Secondly, in procheck folder, edit the Makefile and change two lines:

F77 = gfortran # Your FORTRAN compiler
CC = gcc # Your C compiler

I have two F77 compilers, g77 and gfortran in my Mac 10.6.8 X11 environment. g77 was failed to compile the fortran macros but gfortran does very well. The gfortran package can be installed through fink. (similar solution/discussion at CCP4bb forum)

Step 3: After modifying the “Makefile”, simply type “make” at procheck folder and you will see several warnings but the required executable  macros will be generated (e.g. vplot…).

Step 4: copy the cshrc section preloaded in to your .cshrc (or .tcsrch) file, remember to update the absolute path of your procheck (e.g. /User/admin/program/procheck). You have to update the path at “set    prodir” and “setenv   prodir“— two lines.

After updating the C shell environment (source $HOME/.cshrc), I successfully run Procheck analysis at my local iMac! Here are the example figures generated in my test run.

LigPlot on Mac OS X 10.6

Filed under: mac,softwares and scripts,web — kpwu @ 12:20 am
Tags: ,

A quick note of test of LigPlot on my Mac.

==background ===

If you have ever used the PDBSum service, you may notice many provided useful information including the protein-protein interaction/interface, protein-ligand or protein-DNA (or RNA) interaction/interface, Rama plot, topology and sequence.

For example (see image below), the banner of PDB file (2XUV) entry in PDBSum provides links of “protein, “ligands”, protein-protein interaction” and “clefts” for users to see the detail molecular interactions. When you click the link “ligands” in the banner or the “SO4” link in the “Contents” at left corner, you will see a image generated by LigPlot which shows both hydrophobic and hydrogen bonding interactions between ligand and protein.

=== installation on Mac =====

Following by the instruction described at LigPlot official site, I downloaded the LigPlot binary files (Linux/Unix version) to run it on my iMac (10.6.8).

After uncompressing the hbplus and ligplot file,  as instructed in the “install.doc” text file, 3 steps are essential to make ligplot run well on Mac OS 10.6:

1. user has to manually compile some files in ligplot (GCC must be installed first) :
cc -o ligplot ligplot.c -lm
cc -o hbadd hbadd.c -lm
cc -o dimer dimer.c

2. run “make” in the hbplus to compile all required C files.

3. edit either tcsh, csh or bash shell environment file as suggested in the “install.doc” file.

=== run LigPlot on Mac, an example ===

I have used HADDOCK to generate some protein-RNA docked model and LigPlot was used to see the protein-RNA contacts. Here is the example result:


Note: The ligplot author has another specific version called NucPlot to draw the protein-DNA or protein-RNA contacts, I didn’t try it because it just draw the molecular contacts in different style.

February 24, 2012

add protons (hydrogens) to structure

Filed under: pymol/ molmol,servers,softwares and scripts — kpwu @ 6:08 pm
Tags: , ,

A list of online servers or programs as I know which can add hydrogens on the structures (most likely determined by X-ray crystallography).

  1. WHATIF server (
    –> check “Hydrogen (bonds)” in the left frame
  2. Molprobity server (
    –> after uploading a PDB file, you will see “add hydrogen” in the online interface.
  3. HAAD: (a computer algorithm for constructing hydrogen atoms from protein heavy-atom structures)
  4. PyMOL (Win/Linux/Mac)
  5. SPDB (Swiss PDB Viewer)

In my own test, WHATIF is more friendly for other CNS/Xplor-NIH/Haddock-related works because WHATIF generates CNS/Xplor compatible PDB format.

Molprobity generates PDB with added hydrogens but the added hydrogens are ALL numbered as “0”. Thus I have to use other program to reset all atom numbers.

PyMOL adds hydrogens,too (object -> A -> hydrogens -> add) but the nomenclature of hydrogens in proteins seems weird (see below). The hydrogens are named as H01, H02, H03.. etc. I don’t think CNS/Xplor-NIH can take it for further calculation purposes.

February 22, 2012

Things must be changed before Protein-RNA docking using Haddock

Filed under: xplor/xplor-nih/cns — kpwu @ 8:10 pm
Tags: , ,

Just a note for RNA-protein docking using Haddock 2.1

System: Mac OS 10.6.8, CNS 1.3, Haddock 2.1

1. RNA (or DNA) nomenclature in CNS is not same as the names in PDB.

e.g. ACU in PDB = ADE CYT URI in CNS

The “nucleic acid builder” developed in David  Case group can generate template structure 100% satisfied to CNS format

2. change all paramenters/toppar file from version 5.3 to 5.4 (if using Mac/CNS 1.3)

3. Assume molecule B is RNA/DNA, then in

A. “filenames”, change {===>} dna_B=false; to {===>} dna_B=true (for DNA);

B. “DNA-RNA restraints”, change {===>} dnarest_on=false;  to {===>} dnarest_on=true;
also copy file “dna-rna_restraints.def” to run1/data/sequence (if it’s run1 in your path)

The “dan-rna_restraints.def” can be found in the Haddock example folder — see 3cro
–> change the resid numbers at lines 30, 35
=== example ===
{========================== base planarity ===========================}

{* Nucleic acid residues to have base planarity restrained. This selection
must only include nucleotide residues *}
{===>} bases_planar=(resid 1:11 and segid B);

{========================== sugar puckers ============================}

{* residues with sugar pucker restrained – group 1 *}
{===>} pucker_1=(resid 1:11 and segid B);


C. “topology and parameter files”, change

C1. prot_top_B=”” to prot_top_B=”
C2. prot_link_B=”topallhdg5.4.pep to  to prot_link_B=”
C3.  prot_par_B=”” to prot_par_B=”dna-rna-allatom-hj-opls-1.3.param

February 14, 2012

[web server] RNA Frabase 2.0

Filed under: servers — kpwu @ 8:48 pm

My colleague asked me to know if I can generate/model 3D structure of a short, single chain RNA. I know there are some servers doing such task but I am not sure how reliable the de novo structures are.

Instead of de novo structure model, I found there is a nice website called “RNA Frabase 2.0” ( which provides easy-to-use interface.

For example, I put a short RNA sequence “UAUUC” to search the published RNA structures. I got a lot of hits:

The outputs provide very detail information include “secondary structure”, “chain”, “position of start and end in matched sequence”, “method of structure determination”, “source of RNA (class)”, and “resolution”.

From this search and quickly inspect the structure from the Jmol plugin, users can decide  and pick up which RNA structure fragment best fits to their purpose (e.g. linear, circular…).

February 8, 2012

water refinement in Xplor-NIH

Filed under: xplor/xplor-nih/cns — kpwu @ 1:23 pm

Starting at Xplor-NIH 2.26 (now it’s version 2.29 on Feb. 8th, 2012), official Xplor-NIH package provides an example script doing explicit solvent refinement. The short description made by Xplor-NIH author:

refinement with explicit solvent and full electrostatics. Includes rdcs, noes, jcoupling terms and dihedral restraints. This is a work-in-progress. Please compare with other protocols. In particular, this protocol seems to result in structures for which the DIHE term is large.

Note on J-coupling violations:

Calculated structures exhibit at least four consistently violated J-coupling restraints. These restraints are at or near mobile loop regions where the single structure approximation breaks down. In these regions an ensemble of structures must be used to fit all experimental data. Please see the gb3_ensemble directory for an example of ensemble refinement.

The script can be found (after version 2.26) at : XPLOR-NIH HOME/eginput/gb1_rdc

I did a quick try using a 90-aa protein–a small protein I am working on determining the solution structure. The input structure was originally refined by the refinement script provided by Xplor-NIH (with NOE, CDIH, RDC) from simulated annealed  templates. The structural quality after regular refinement has been improved a lot ( by checking the Ramachandran plot: from ~60% to 85%). But the water refinement makes the solution structure better (85% –> 95%) although a lot of DIHE violations are noted by Xplor-NIH (same issue as issued by the author).

Here is the analysis done by Molprobity ( showing improved scores and structural quality.

1. Ramachandran plot of structure refined by NOE, CDIH and RDC only.

2. Structure in #1 was refined by water refinement

3. Molprobity analysis of structures in 1 (up) and 2 (down) (click to see full sized snapshots)

December 20, 2011

GUARDD: user-friendly MATLAB software for rigorous analysis of CPMG RD NMR data

Filed under: softwares and scripts — kpwu @ 5:49 pm
Tags: , ,

There is an article published at Journal of Biomolecular NMR recently which describes a package of MATLAB scripts to analyze CPMG relaxation dispersion NMR data. I haven’t done CPMG RD experiments on my target proteins, however, I know the analysis of CPMG RD data is not trivial. This program, GUARDD, seems to be a very useful and UI-friendly toolkit to efficiently obtain information of Rex, Kex and other relaxation rates from CPMG RD data.

The following snapshots are directly linked to GUARDD homepage.

More information about GUARDD:

Title: : GUARDD: user-friendly MATLAB software for rigorous analysis of CPMG RD NMR data.
Journal: Journal of Biomolecular NMR (online published first, Dec.20. 2011)
Homepage at google code: 

Additional information:
Matlab, a product from Mathworks
CATIA (Cpmg, Anti-trosy, and Trosy Intelligent Analysis) from Lewis Kay’s group
CPMGFit from Arther Palmer’s group

« Previous PageNext Page »

Create a free website or blog at