Skip to content

Home > Science > Fast and reliable DNA properties plotting tools:

Fast and reliable DNA properties plotting tools:

Getting the most from your DNA dynamics simulation.

Thursday 1 February 2007

This page explains how to get a fast an reliable analysis pipeline for AMBER simulations of DNAs. The softwares presented here are copyrighted by their respective author but the programs developped for this analysis are made available by Dr. Miguel-Angel Elizondo-Riojas and Dr. Stéphane Téletchéa under the GPL license.

The procedure has been first initiated by Dr. M-A Elizondo-Riojas and i would like to thank him for this knowledge and program transfer. All codes included on this page are licensed under GPL.

If you need to incorporate the pipeline in a commercial application, please contact me. All input files and programs are provided at the end of the article.

Setting Up your system

This pipeline has been extensively used under Mandriva Linux (, where the core software management is urpmi. Fedora/RedHat users should just replace it by yum, debian-based distributions by apt-get.

  • AMBER is a molecular modelling package. It is available on the AMBER web site.

You can find complete instructions on this other page.
In this article, i’ve used AMBER 6.0 but the pipeline should also be applied for newer versions.

  • Curves 5.1 is available on CURVES web site
    - Decompress the archive:
    tar -zxf Curves.tgz
    cd Curves

    - Patch Curves : Curves stops the analysis if a DNA fragment is not curved enough with the error message: ’LsFit not necessary’. This is to mention you don’t need to used the least square fitting procedure on this particular structure.
    Since we use least square fitting for all structures, we just want this message as a warning, not an error. Inclusion of this patch allows to transform the error into a warning.

    ### curves_nonstop.patch
    --- ./lsfit.f_orig      2004-02-05 17:45:21.000000000 +0100
    +++ ./lsfit.f   2004-02-05 17:45:42.000000000 +0100
    @@ -43,7 +43,6 @@
    100   format(/2x,'---- Lsfit determinant zero, ',
         1'FIT=.T. unnecessary ----'/)
    -      stop
          do i=1,6
    patch -p0 < curves_nonstop.patch

    - Build the software and install it into an available PATH directory (adjust to your needs):

    cp Curves_nonstop_pc /usr/local/bin
urpmi grace
tar -zxvf vmd-1.8.5.bin.LINUX.opengl.tar.gz
cd vmd-1.8.5/
cd src
make install

To get a better label drawing, you should use my own version of graphlabel.tcl and replace the original one:

cp graphlabels.tcl <vmd_installation_dir>/lib/vmd/scripts/vmd/

Trajectory: water stripping, ions stripping, removal of periodicity, least square fitting on the first structure element, data analysis

Edit, for instance for a decamer where we remove counter ions (CIP) and water (WAT):

trajin file1.crd.gz
trajin file2.crd.gz
trajout dna.crd nobox
center :1-20 mass origin
image origin
strip :WAT
strip :CIP
rms first out dna.dat time 1 :1-20

Launch ptraj:

ptraj prmtop &>ptraj.out

Have a look at ptraj.out to check for problems.

  • Plot the least-square data to check if the periodicity removal is correct:

xmgrace dna.dat

If the trajectory is correctly imaged the average RMSD should be around 2 Angstroëms. If you see big gaps, you’ll need to adjust parameters on the ptraj input file.

Getting DNA helicoïdal parameters from Curves

  • extract pdbs to feed Curves using AMBER’s carnal
     PARM    p1;
     STREAM  s1  dna.crd;
     COORD c1 pdb_norm/GCCGGGTCGC.pdb PDB;
     GROUP gALL (RES 1-20);
     RMS t1 FIT gALL s1;
     COORD c1 t1 SELECT(1-);
  • Update : since ptraj is more and more used, here is a contribution for producing the pdb files using ptraj:
    trajin traj1.mdcrd.gz
    trajin traj2.mdcrd.gz
    trajin traj3.mdcrd.gz
    trajin traj4.mdcrd.gz
    center :1-20 mass origin
    image origin
    strip :WAT
    strip :Na+
    trajout traj.pdb pdb nobox

We want to filter files in order to have clean directories:

mkdir pdb_norm

Run Carnal: carnal -i -o carnal_norm.out
Have a look at carnal_norm.out to check for problems.

Edit Curves_extract.bash (have a look inside the file to know what to do
Copy the programs needed by Cruves_extract:

cp Cur5_nonstop_pc .
cp Sel_Curves .

Run Curves_extract: ./Curvesextract.bash
Follow the progressions using ls -v1 c5_lis/

You can have a rapid check if a file is incorrect using ls -rS c5_lis/: all files should be about the same size, if one is significantly smaller than others, have a look at it to check what is wrong.

Curves outputs parameters between -180° and +180°, but for some of them, it is better to get a 0 to 360° value, we need to adjust this using the program renorm and the script renorm.bash:
cd c5_sel_out/
cp renorm .
cp renorm.bash .
Edit renorm.bash to adjust the length of the simulation and the dna length (here a decamer)
Run renorm: ./renorm.bash

For large data sets, it is better to mean them for getting a useful plot, we do it with the moy+moy.bash combination:
cd c5_sel_out/
cp moy .
cp moy.bash .
Edit moy.bash to adjust the length of the simulation and the dna length (here a decamer)
Run moy: ./moy.bash

Helicoidal Plots

Use, edit in particular title, subtitle and sequence, choose the output format (png, for a fast test and adjusting parameters, ps for a publication-type format). Guidelines are provided inside the headers comments, please read them before asking questions.
Launch the script: ./

  • Visualise the resulting plots and edit them with Xmgrace if needed

For instance with the chi :
cd Illustrations/
less ../c5_sel_out/chi_s1_5p3p.out (to check for values in case you have a doubt)
xmgrace -batch chi.batch

This will allow the interactive work on the file. You can save the resulting plot with an .agr extension for futher working on it. With this batch process, you have two modes of interaction: one is batched (faster but less flexible), the other one is interactive (but slower).

Specific plots: distances, mixed, ...

Edit param_these_GGG_parm98_natif.batch
xmgrace -batch param_these_GGG_parm98_natif.batch

Specific distance analysis using CARNAL: examples

mkdir Dists
cd Dists

 PARM    p1  ../../crd/GCCGGGTCGC_sans_ions.parm;
 STREAM  s1  ../../crd/GCCGGGTCGC.parm98_natif_20ns.crd;
 TABLE tab1   GUA1_H2prim2__GUA1_H8.dat;
 TABLE tab2   GUA1_H2prim2__CYT2_H5.dat;
 TABLE tab3   GUA1_H2prim2__CYT2_H6.dat;
 TABLE tab4   GUA1_H3prim__GUA1_H8.dat;
 TABLE tab5   GUA1_H8__CYT2_H6.dat;
 TABLE tab6   CYT2_H1prim__CYT3_H6.dat;
 TABLE tab7   CYT2_H2prim1__CYT2_H2prim2.dat;
 TABLE tab8   CYT2_H2prim1__CYT2_H6.dat;
 TABLE tab9   CYT2_H2prim1__CYT3_H6.dat;
 TABLE tab10  CYT2_H2prim2__CYT2_H6.dat;
 DIST d1   H2'2  1 H8    1;
 DIST d2   H2'2  1 H5    2;
 DIST d3   H2'2  1 H6    2;
 DIST d4   H3'   1 H8    1;
 DIST d5   H8    1 H6    2;
 DIST d6   H1'   2 H6    3;
 DIST d7   H2'1  2 H2'2  2;
 DIST d8   H2'1  2 H6    2;
 DIST d9   H2'1  2 H6    3;
 DIST d10  H2'2  2 H6    2;
 TABLE tab1   d1  ;
 TABLE tab2   d2  ;
 TABLE tab3   d3  ;
 TABLE tab4   d4  ;
 TABLE tab5   d5  ;
 TABLE tab6   d6  ;
 TABLE tab7   d7  ;
 TABLE tab8   d8  ;
 TABLE tab9   d9  ;
 TABLE tab10  d10 ;

carnal -i -o carnal.out
Have a look at carnal.out to check for problems.

Saving space

  1. gzip *.dat (XmGrace can handle gzipped files, it is always a good idea to already gzip them, to save space).
  2. Remove the one shot directories (pdb_norm, c5_lis) since it is quite easy to recreate them
  3. compress the c5_sel_out directory after the plots have been generated (tar -zcf c5_sel_out.tgz c5_sel_out).

Files and examples

dnaplots archive
Archive containing and all the associated programs needed to create the plots
Example of beta parameters showing a transition for G19 around 350 ps.
Delta is a much more moving DNA parameter, linked to the sugar pucker.



2007-10-23 : added contribution for producing pdb files using ptraj, from S. Barbe

Attached documents

  • dnaplots archive (GZ – 29.9 kb)

    Archive containing and all the associated programs needed to create the plots

Comment on this article