VMD-L Mailing List
From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Fri Aug 25 2006 - 09:40:54 CDT
- Next message: Thomas Caulfield: "removing structures from a psf&pdb"
- Previous message: alexandra.marques_at_fc.up.pt: "gyration radius for a trajectory"
- In reply to: alexandra.marques_at_fc.up.pt: "gyration radius for a trajectory"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
hi alex,
On 8/25/06, alexandra.marques_at_fc.up.pt <alexandra.marques_at_fc.up.pt> wrote:
>
> Hi
>
> I based in the sasa.tcl script to write a script to calculate the gyration
> radius over simulation time. I wonder if someone could tell me if my script is
> correct...or have any suggestion to improve it.
script looks basically ok (it is simple enough, after all).
however, i have two remarks.
> set outfile [open rgyr.txt w]
> set nf [molinfo top get numframes]
> set all [atomselect top "resid 1 to 255"]
please note that resid is the residue number
written in the psf/pdb file and not guaranteed
to be unique (e.g. there may be 255 waters, that
match this selection as well). if you want the
select the first 255 residues you schould use
"residue 0 to 254" instead (as residue is the
internal number and guaranteed to be unique.)
> for {set i 0} {$i<$nf} {incr i} {
> $all frame $i
> $all update
since the coordinates matching your selection _cannot_
change during the trajectory, you can omit the
'$all update' and avoid the (costly) recalculation of the
selection and speed up your script a little.
the update is primarily needed for selections that use
'within' or refer to coordinates ('x > 10.0').
cheers,
axel.
> set rgyr [measure rgyr $all]
> puts $outfile "Frame $i, rgyr $rgyr"
> }
> close $outfile
>
> Thanks in advance
> Alex
>
-- ======================================================================= 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.
- Next message: Thomas Caulfield: "removing structures from a psf&pdb"
- Previous message: alexandra.marques_at_fc.up.pt: "gyration radius for a trajectory"
- In reply to: alexandra.marques_at_fc.up.pt: "gyration radius for a trajectory"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]