Bond angle distribution

1) Firstly, OVITO can read LAMMPS trajectories.
So if OVITO does what you want, then stop reading this message.
(I really like OVITO)

2) More generally, you can extract the coordinates of your atoms from
your dump file using "pizza.py" or "dump2data.py -raw" and compute
angles from them yourself.

To extract the atomic coordinates, you can try these tools:

https://pizza.sandia.gov/doc/dump.html
(this requires installing "pizza.py")

https://github.com/jewettaij/moltemplate/blob/master/doc/utils/docs_dump2data.txt
(this requires installing "moltemplate" at https://moltemplate.org)

Warning:
To make it easier to extract coordinates from your trajectory files
("dump" files), I recommend that you use the "dump" command with the
"mol", "ix", "iy", and "iz" arguments. For example:

dump 1 all custom 2000 traj.lammpstrj id mol type x y z ix iy iz
For details, see:
https://lammps.sandia.gov/doc/dump.html

Note: You can create multiple dump files. One file can contain all of
the atoms. Another file can contain only the atoms from which you
want to calculate the angle or dihedral angle.

3) Then you can write a script to calculate the angle or dihedral
angle for the coordinates of these atoms. If you don't feel like
doing this, then I wrote such a script. See:

https://github.com/jewettaij/dlpdb/blob/master/dlpdb/coords2dihedrals.py
https://github.com/jewettaij/dlpdb/blob/master/dlpdb/coords2angles.py

The documentation for these scripts is included at the beginning of
each file. These scripts expect that the x,y,z coordinates for all of
the atoms are listed on the same line of your text file.
These scripts will read your file containing many lines, and compute
the angle or dihedral angle once per line. (To calculate a
bond-angle, you must have 9 numbers on each line. To calculate a
dihedral-angles, you must have 12 numbers on each line.)

Cheers

Andrew

1 Like