[Chimera-users] Select zone around COM

Elaine Meng meng at cgl.ucsf.edu
Fri Jul 3 09:03:59 PDT 2020

Hi Yasser,
If you can figure out commands to do it for a single frame, then you could put the commands into a per-frame script in MD Movie to execute at each frame.  It will probably not be that fast, however, if you're saving a file each time.

For example, could use "measure center" to measure center of mass of some set of atoms and add a marker at that point.

....then display only the stuff that you want to save, using a distance zone from that marker model.

Then in MD Movie add as per-frame script 

For example, a per-frame script something like:

measure center @* mark true modelId #5
display #0:hoh & #5 z<6.5
close #5
write relative #0 displayed #0 ~/Desktop/zone<FRAME>.pdb

If your waters are named WAT you would use that instead of HOH, of course, and you may want a different distance zone, different filename and location, etc.  Also I wasn't sure if you wanted to save all the atoms in the zone or only the waters.  The above shows only waters but you could modify to show whichever atoms you want to save.

I hope this helps,
Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco

> On Jul 3, 2020, at 3:31 AM, Yasser Almeida <yasser.almeida at gmail.com> wrote:
> Hello,
> I have a trajectory of a water box and I want to select, show only, save the waters that move in a zone around the COM of the whole system. Any thoughts?
> Thanks in advance,
> Yasser

More information about the Chimera-users mailing list