From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Wed Mar 23 2011 - 19:43:49 CDT

On Wed, Mar 23, 2011 at 7:49 PM, Anna Kuznetsova
<kuznetsova.ann_at_gmail.com> wrote:
> Hello everybody!
> I am new to VMD, so any suggestions and scripts would be very helpful for
> me.
> I am looking at 100 structures generated by XPLOR using NMR noe constraints
> and I need to calculate RMSD and validate all structures, overlay them.
> 1). Using the script below I was able to draw all 100 structures overlayed
> as separate molecules:
> set filelist [glob *.pdb]
>   foreach file $filelist {mol new $file waitfor all}
> 2) Now I need to apply different commands like "set sel1" or changing color
>  to all 100 structures in parallel to draw only their backbones. Does anyone
> know how can I operate on a $filelist with "set sel1" command for example to
> select the same atom or atoms in all 100 structures? I have only applied
> this command to one molecule so far and I am not sure how to apply it to the
> whole $filelist. Thank you in advance!

you have to learn some tcl scripting. for the visualization, you can
use the "Clone Representations" extension. you complete one visualization
and then "clone" it to "all" and they'll all be the same.

to operate on all the molecules, you are best off storing the
selections in an array.

set nmol [molinfo num]
for {set i 0} {$i < $nmol} {inrc i} {
   set sel1($i) [atomselect $i all]
   set sel2($i) [atomselect $i backbone]
   ....
}

and then you can write a script like you would do it for
a single molecule, for multiple, just looping over i with $nmol
iterations and referencing the selections as $sel1($i), $sel2($i)
and so on.

> 3) I also need to plot the list of all violations of my noe constraints
> (distances that differ more than 0.5A from my restraints in the noe table).
> I have noe table with distances, which I used to calculate structure of
> protein in XPLOR, and 100 calculated structures as an output of the
> calculation. Does anybody know how can I draw violated noe constraints for
> each  out of 100 structures?

figure out how to do this for one and then write a loop.

> 4) How can I calculate RMSD of the superimposed ensemble for any selection I
> choose (one residue or the whole backbone or all atoms):
> RMSD pairwise
> RMSD from the mean structure

same as above.
before computing the average or computing the rmsd, you have to
do a fit. there are script examples in the list archives and elsewhere.
all you have to do is to extend this to looping over the selection arrays.

> 5) How can I plot the list of backbone angles phi and psi for each structure
> on the scale phi -180 to +180 and psi -180 to +180 (Ramachandran plot).
> I am sorry for asking so many questions, but I do not expect all of them to
> be answered. Any advice or script that you may have written will help me a
> lot because I am new to VMD...

do you mean plot in the sense of an image, there are two options in the
existing ramachandran plot gui, or are you talking about just getting the
backbond dihedral angles? the former can be scripted with a little extra
effort and the latter should be available via
set sel [atomselect $i "name CA"]
$sel get {phi psi}

hope that helps,
    axel.

> Thank you for your help and understanding :)
> --
> Best regards,
> Anna
>

-- 
Dr. Axel Kohlmeyer
akohlmey_at_gmail.com  http://goo.gl/1wk0
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.