Re: Getting the z coordinate

From: Diship Srivastava (
Date: Mon May 17 2021 - 12:10:56 CDT

You can use the colvars module for this measurement. The required function
is distanceZ. For more information*x1-60002.3__;Iw!!DZ3fjg!onu4K8K6kVG8Bxqux-PfbwcfZXA_kMrVqjXT4ySPxFBFKBMsF3zk7Lj9dUFCIr-dbQ$

On Mon, 17 May 2021, 21:32 Isaac Asare Kwaku, <> wrote:

> Hello guys,
> This is more of a tcl script problem but I was hoping I could get some
> help. I am measuring the center of mass of two different residues of a
> protein in VMD. Now I want to find the difference between only the z
> coordinates of the center of mass of the residues. The command "measure
> center $sel weight mass" gives me the x,y,z coordinates of the center of
> mass but I am looking for a way to store just the z coordinates so I can
> find the difference between them. I have tried to assign the value
> of "measure center $sel weight mass" to a variable as a list so I use
> "lindex listname 2" to get the z coordinate. However the assignment of the
> output of the "measure" command has proved futile. How do I get only the z
> coordinate of the center of mass?
> Regards,
> Isaac.

Diship Srivastava
Department of Chemistry
IIT(ISM) - Dhanbad

This archive was generated by hypermail 2.1.6 : Fri Dec 31 2021 - 23:17:11 CST