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 "" or " -raw" and compute
angles from them yourself.

To extract the atomic coordinates, you can try these tools:
(this requires installing "")
(this requires installing "moltemplate" at

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:

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:

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.)



1 Like