From: Justin Gullingsrud (justin_at_ks.uiuc.edu)
Date: Wed Jan 09 2002 - 11:23:07 CST

Hi,

On Mon, Jan 07, 2002 at 02:13:18PM +0530, Sanjeev B.S. wrote:
> Hello,
> Can anyone help me with the following problems please?
>
> 1) RMSD/Align
> After loading the PDBs if I want to superpose them, I get the error:
>
> Error: atomselect: cannot parse selection text:
>
> But if I play rmsd.tcl, it does align!

I'm not sure about this one; you'd have to tell us what you do when you try
to superimpose them.

>
> 2) Is there a way so that I can compute particular properties (like bond
> length/angles/dihedrals) using script and write the output to a file?

Sure! What you do is use "label add" to create the geometry monitor, then
use "label graph" to get out the value of the monitor for each frame. Say
you want to get the bond length between atoms with id 3 and 10 in molecule 0.
The syntax would be:

        label add Bonds 0/3 0/10
        set bond-03-10 [label graph Bonds 0]

The 0 in the "label graph" command says to use the very first bond monitor
added.

Here's a general script (I have it in my .vmdrc file, since I use it all the
time) for writing a Tcl list to a file:

proc write_vector { vec filename } {
  set fid [open $filename w]
  foreach elem $vec { puts $fid $elem }
  close $fid
}

So you could write your data to a file with:

        write_vector $bond-03-10 bond-03-10.dat

For angles and dihedrals, replace 'Bonds' with 'Angles' and 'Dihedrals',
and specify three or four atoms instead of two.

Cheers,

Justin

>
> I use VMD 1.7.1 on Linux.
>
> Thanks very much for any help,
>
> Sincerely,
> -Sanjeev

-- 
Justin Gullingsrud      3111 Beckman Institute
H: (217) 384-4220       I got a million ideas that I ain't even rocked yet...
W: (217) 244-8946       -- Mike D