VMD-L Mailing List
From: Vermaas, Joshua (Joshua.Vermaas_at_nrel.gov)
Date: Tue Feb 26 2019 - 16:33:31 CST
- Next message: Mikhail Suyetin: "GolP-CHARMM"
- Previous message: Bassam Haddad: "Re: Centering an atom over the length of a trajectory"
- In reply to: Nick Palmer: "Centering an atom over the length of a trajectory"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
You mean something like this?
set centersel [atomselect top "index 1234"]
set asel [atomselect top "all"]
for { set f 0 } { $f < [molinfo top get numframes] } { incr f } {
$centersel frame $f
$asel frame $f
$asel moveby [vecscale -1 [measure center $centersel]]
}
That will center whatever is in the "centersel" selection onto the origin over all loaded frames.
-Josh
On 2019-02-26 15:22:24-07:00 owner-vmd-l_at_ks.uiuc.edu wrote:
Hello everyone,
I was wondering if it is possible to center an atom, or perhaps a residue over the full course of a trajectory. I have been centering atoms with center in the options under mouse, but it centers the at the atoms current location, but then doesn't move with the simulation. I apologize if this has been covered before or is very simple, but I haven't been able to find anything I'm looking for.
Thank you in advance.
-- Nicholas J. Palmer
- Next message: Mikhail Suyetin: "GolP-CHARMM"
- Previous message: Bassam Haddad: "Re: Centering an atom over the length of a trajectory"
- In reply to: Nick Palmer: "Centering an atom over the length of a trajectory"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]