VMD-L Mailing List
From: Eduard Schreiner (eduard.schreiner_at_rub.de)
Date: Tue Feb 13 2007 - 06:52:21 CST
- Next message: greddy1_at_umd.edu: "Bug in the tcl script"
- Previous message: Alessandro Cembran: "Re: namd-l: Re: ionize (big, big, big system!)"
- In reply to: dimka: "average structure"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
On Monday 12 February 2007 20:42, dimka wrote:
> To calculate the average structure form a trajectory I execute the
> following command executed:
> measure avpos [atomselect 0 all] first 0 last 499 step 1
>
> How can I create a new molecule (say molecule 1) that would contain
> these coordinates?
>
> dmitry
>
Hey Dmitry,
load one step of your trajectory in a new molecule and set the coordinates of the atoms
to the calculated values.
Something like this should work (I hope)
mol new TRAJECTORY type TYPE first 0 last 0
set sel1 [atomselect 0 "SEL-TEXT"]
set sel2 [atomselect 1 "SEL-TEXT"]
set newpos [measure avpos $sel1 first 0 last 499 step 1]
#note the average positions are now in a list
$sel2 lmoveto $newpos
#unset variables
$sel1 delete; unset sel1
$sel2 delete; unset sel2
unset newpos
eddi
-- -- ============================================================================= Eduard Schreiner e-mail: eduard.schreiner_at_theochem.rub.de Lehrstuhl fuer Theoretische Chemie Phone: ++49 (0)234/32-22121 Ruhr-Universitaet Bochum - NC 03/52 Fax: ++49 (0)234/32-14045 D-44780 Bochum http://www.theochem.rub.de =============================================================================
- Next message: greddy1_at_umd.edu: "Bug in the tcl script"
- Previous message: Alessandro Cembran: "Re: namd-l: Re: ionize (big, big, big system!)"
- In reply to: dimka: "average structure"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]