From: Vermaas, Joshua (
Date: Tue Feb 26 2019 - 16:33:31 CST

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.


On 2019-02-26 15:22:24-07:00 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