From: Axel Kohlmeyer (akohlmey_at_vitae.cmm.upenn.edu)
Date: Thu Nov 17 2005 - 06:20:35 CST

On Thu, 17 Nov 2005, andrea spitaleri wrote:

hi,

> Below there is a script but it does not work properly. Could someone
> help me to understand what is wrong in it. Second, to run it, do I need
> to run in vmd console or can I run in a shell like vmd -script
> script,without gui ?
>
>
> proc calculate_rmsd {}{
> for { set i 1 } { $i < 100 } { incr i } {
> # pro is the root of the name of my structures
> mol load pdb pro_i.pdb
> set sel1 [atomselect "backbone"]

this should be: set sel1 [atomselect $i {backbone} ]

> for { set j i+1 } { $j < 100 } { incr j } {
> set sel2 [atomselect j "backbone"]

and here you need to use $j instead of j

> set rmsd [measure rmsd $sel1 $sel2]
> puts RMSD of $i $j is $rmsd

you should put a
        $sel2 delete
here, or you will have a memory leak.

> }

here seems to be a '}' missing.
and add: $sel1 delete

to start the script without graphics use

vmd -dispdev text -e script.tcl

axel.
>
> Thanks
>
> Regards,
>
> andrea
>
>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.