# defining group with specific atoms

Hello,

I am trying to calculate the angle between three atoms when two of them are at the two corners of the box and the other one is at the middle of a box edge. How can I set up the group containing these three atoms?

Thanks a lot,
Nazanin

Hello,

I am trying to calculate the angle between three atoms when two of them are
at the two corners of the box and the other one is at the middle of a box
edge. How can I set up the group containing these three atoms?

check out the group documentation for the various options to define groups

your description is not very "machine friendly", you'll have to come
up with a less vague description of how to locate those atoms.

axel.

Thanks for you reply,axel.

Now I am able to define a group with those three specific atoms. I set up the mentioned group by means of “dump custom” and “VMD” together.

I thought the command " compute angle/local " would be helpful if I had been able to set up the special group. But it is not, since in my simulation I have atom_style atomic & units metal & no angle_style is defined.

Is there any way to compute the angle between three atoms (with knowing their ids and coordinates)?

Any help is appreciated.

Thanks for you reply,axel.

Now I am able to define a group with those three specific atoms. I set up
the mentioned group by means of "dump custom" and "VMD" together.

I thought the command " compute angle/local " would be helpful if I had been
able to set up the special group. But it is not, since in my simulation I
have atom_style atomic & units metal & no angle_style is defined.

well, you *can* define an angle interaction and just set its
force constant to 0.0, but you have to be careful with the
special_bonds command. you'll probably have to change it
to 1.0 1.0 1.0.

a simpler approach might be to use the colvars package.
it allows to define and monitor constraints for all kinds of
groups of atoms based on their atom id. again, if you set
the force constant to 0.0 it won't add any forces and just
write out a trajectory of the "collective variable".

Is there any way to compute the angle between three atoms (with knowing
their ids and coordinates)?

do you need this information during the run?
it is probably easiest to compute this in post-processing.

axel.

I will try your suggestions.
Yes I need the information during the run since I should draw the plot of the angle change.
About the post processing, VMD gives the angle but I need a text file in order to be able to draw the curve.

I will try your suggestions.
Yes I need the information during the run since I should draw the plot of
the angle change.
About the post processing, VMD gives the angle but I need a text file in
order to be able to draw the curve.

have a closer look at the VMD user's guide.

you can export the graph of a defined angle via the Labels menu,
or script it. if properly set up, VMD will export directly into plot
window, but you can also export it from there to XmGrace or
you can use the script interface and write a plain file. it helps
if you teach yourself a little Tcl scripting first.

axel.