bond-angle-Dihedral Coeffs

Dear all,

I was wondering how I can indicate that each bond coeff/angle coeffs/Dihedral Coeffs (in the lammps data file) corresponds to which atom types?

Of course, one way is to go through bonds or angle … defined in data file and indicate the atoms which contribute in that bond/angle/dihedral and then indicate those atoms belong to which type of atom and so on? But as you know this would be tedious and time consuming for specially a system with large number of bond types or angle types … .

Any help would be highly appreciated.



Hi Henrik, this is most likely done through the tool that generates the data file. I know for sure that if you use TopoTools the type assignments are included as a comment in each line of the respective section.


Different molecule builder tools have different ways of assigning angle, dihedral, and improper parameters according to atom type.

If you are using moltemplate, then the procedure is demonstrated graphically on slides 51-54 of this PowerPoint presentation:

…and explained in detail in chapter 6.2 the moltemplate manual:

The way you do this in topotools is explained here:—part-2

and here:

I’d add that doing this manually is somewhat unusual. When simulating a reasonably complex system it would be tedious to write these rules yourself (for every possible quarter of atom types in your molecules).

People frequently use force fields like OPLSAA, CHARMM, AMBER(GAFF,GAFF2), GROMOS, COMPASS, PCFF, CVFF, …

Moltemplate currently includes a database of all of the OPLS, GAFF, GAFF2, and COMPASS force field parameters (and angle, dihedral, improper generation rules, and in some cases, rules for generating partial charges.) These rules are written using the same syntax I mentioned above. Simple examples of force fields in moltemplate format are located here:

The EMC molecule builder includes the
Born, COMPASS, PCFF, CHARMM, OPLS, CVFF force fields.

In both programs some of the COMPASS, PCFF, CVFF parameters have to be omitted due to potential copyright issues.)

I hope this helps.

(Disclaimer: I wrote moltemplate, so I tend to explain how to use it in more detail.)