Hi!

I am going to do some metadynamics calculation from the article

http://journals.aps.org/prb/abstract/10.1103/PhysRevB.89.224103

I want to define colvar variable which is equal to the sum of

x-coordinates of atoms in one group minus sum of x-coordinates of

atoms in another group. In colvars manual I found only distanceZ

variable that define only the distance projection on axis

between different group center masses, but this doesn’t work to me.

I can define 160 different distanceZ loops between randomly chosen

atom in the cell and each atom in my two group (total number of atoms in two groups is about 160), but I’m sure there should be more easy answer.

Can you help me to define this colvar variable in Colvars module?

Best wishes,

Ilya Bryukhanov

The center of mass is a linear function of all atomic coordinates, and so is distanceZ.

What you are looking for, if I understood correctly, is a single distanceZ variable between the two groups.

Giacomo

Hi!

I am going to do some metadynamics calculation from the article

http://journals.aps.org/prb/abstract/10.1103/PhysRevB.89.224103

I want to define colvar variable which is equal to the sum of

x-coordinates of atoms in one group minus sum of x-coordinates of

atoms in another group. In colvars manual I found only distanceZ

variable that define only the distance projection on axis

between different group center masses, but this doesn’t work to me.

I can define 160 different distanceZ loops between randomly chosen

atom in the cell and each atom in my two group (total number of atoms in two groups is about 160), but I’m sure there should be more easy answer.

Can you help me to define this colvar variable in Colvars module?

Best wishes,

Ilya Bryukhanov

Thank you for the answer!

Now, it’s become clear. Could you answer one more question?

Is there a way to define colvars that is position vector projection of atom’s group

along the chosen axis. In distanceZ I can define only distanceZ between two groups (main and

reference keywords).

Yes. Use a dummy atom as ref.