[gmx-users] which tool to use a measure a user-defined angle in a traj

TJ Piggot t.piggot at bristol.ac.uk
Mon Jul 16 02:26:00 CEST 2007


I would use g_bundle with the -z option.


--On 14 July 2007 10:51 -0400 chris.neale at utoronto.ca wrote:

>> For instance, I want to measure the angle defined by a carbonyl
>> vector (a vector going through a C=O bond) in my molecule and the
>> z-axis of the simulation box.
> Not sure if that tool exists. You could, however, do this:
> 1) use make_ndx to make an index group of only the two atoms of interest
> 2) trjconv -f entire.xtc -o two_atoms.gro
> 3) write a simple script to parse the output .gro trajectory file in
> order to obtain the angle to the z axis based on cos(theta)=(z2-z1)/r
> therefore theta=arccos[(z2-z1)/r] where the angle is defined to the
> negative z direction. If you used constraints for that bond then it  will
> be especially simple, otherwise you will need good old pythagoras  to get
> r.
> Note1) If you've got lots of angles that you want to average over, the
> process is the same but with more book-keeping.
> Note2) You could also try modifying template.c
> Good luck.
> PS: if you do write a script, please post it back to the list.
> _______________________________________________
> gmx-users mailing list    gmx-users at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-users
> Please search the archive at http://www.gromacs.org/search before posting!
> Please don't post (un)subscribe requests to the list. Use the www
> interface or send it to gmx-users-request at gromacs.org.
> Can't post? Read http://www.gromacs.org/mailing_lists/users.php

TJ Piggot
t.piggot at bristol.ac.uk
University of Bristol, UK.

More information about the gromacs.org_gmx-users mailing list