VMD-L Mailing List
From: Mehdi Bagherpour (mehdi.bpour_at_gmail.com)
Date: Tue Feb 28 2017 - 13:22:23 CST
- Next message: Ashar Malik: "Re: creating the center of mass pdb file"
- Previous message: John Stone: "Re: VMD 1.9.3 crashes during loading GROMACS trr trajectory in linux."
- Next in thread: Ashar Malik: "Re: creating the center of mass pdb file"
- Reply: Ashar Malik: "Re: creating the center of mass pdb file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Dear VMD users,
I am trying to write the center of mass of residues in a separate .pdb file
(for all frames).
I have written this code but it does not work.
I get the error:
*atomselect: set: 3 data items doesn't match 24 selected atoms.*
0 to 181 are number of residues.
*set mol [molinfo top] *
*set nf [molinfo $mol get numframes] *
*############# *
*for {set i 0} {$i < $nf} {incr i} {*
*for {set x 0} {$x <= 181} {incr x} {*
*set selA [atomselect $mol "residue $x"]*
*#############*
*$selA frame $i*
*set com [measure center $selA weight mass] *
*$selA set {x y z} $com *
*$selA writepdb "com.pdb"*
*} *
*}*
Please let me know if you have any suggestion to this problem.
Cheers,
Mahdi
- Next message: Ashar Malik: "Re: creating the center of mass pdb file"
- Previous message: John Stone: "Re: VMD 1.9.3 crashes during loading GROMACS trr trajectory in linux."
- Next in thread: Ashar Malik: "Re: creating the center of mass pdb file"
- Reply: Ashar Malik: "Re: creating the center of mass pdb file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]