Fix bond/create induced too many angles/dihedrals/impropers per atom

Hi all,

thanks to the mailing list i’ve managed to simulate crosslinking of poly-propylene using fix bond/create…
However, if I use the dtype option in order to induce a new dihedral type I always get the error:Fix bond/create induced too many angles/dihedrals/impropers per atom

I really dont see the origin of the problem…If I dont use dtype, all new bonds/angles and impropers are properly induced. In this case i get the following warning: WARNING: Bond/angle/dihedral extent > half of periodic box length (…/domain.cpp:877). This is something I also dont understand: If I define the maximum distance for a bond-attempt as 4.0 and the box is 14x14x14, how can the newly formed bond/angles/impropers extent half the box-length (that would be at least 7.0)

I’ve appended a little test-case, where you can reproduce the error.

Here’s the input-script:

To run it use: lammps-daily -in -v infile deleted.lmps -v id1 17 -v id2 69 -v cut 4.0

Molecular dynamics NVT script with class2 ff for simulated polymerization

deleted.lmps (60 KB) (1.25 KB)

Hi again,

and sorry posting twice. The input-script is incomplete (I forgot dtype)… theres a line missing in the fix bond/create command… it should be as follows:

fix 1 both bond/create 1 6 3 ${cut} 9 &
iparam 1 5 &
jparam 1 5 &
atype 5 atype 6 atype 7 &
itype 5 itype 20 itype 17 itype 18 &
dtype 5


Hi all,
I’ve found a solution.

for those who are interested:

add “X extra dihedral per atom” (where x corresponds to an integer number) to the header of your lammps-data-file. I dont know why, but this way it works.



Good job finding the solution by yourself. It is actually documented at, it has to do with how much space LAMMPS assigns to store bond/angle/dihedral/improper info in:
IMPORTANT NOTE: To create a new bond, the internal LAMMPS data structures that store this information must have space for it. When LAMMPS is initialized from a data file, the list of bonds is scanned and the maximum number of bonds per atom is tallied. If some atom will acquire more bonds than this limit as this fix operates, then the “extra bond per atom” parameter must be set to allow for it. Ditto for “extra angle per atom”, “extra dihedral per atom”, and “extra improper per atom” if angles, dihedrals, or impropers are being added when bonds are created. See the read_data or create_box command for more details. Note that a data file with no atoms can be used if you wish to add unbonded atoms via the create atoms command, e.g. for a percolation simulation.