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

Hello LAMMPS users,

I am using the latest version of LAMMPS, and I am using these statements in LAMMPS input script to create bonds between atom type 1 and atome type 2 and also between these two types of atoms themselves:

fix 4 boundaryin bond/create 10 1 2 4.0 2 iparam 2 1 jparam 2 2 atype 2 dtype 4
fix 5 boundaryin bond/create 10 1 1 4.0 2 iparam 2 1 jparam 2 1 atype 2 dtype 4
fix 6 boundaryin bond/create 10 2 2 4.0 2 iparam 2 2 jparam 2 2 atype 2 dtype 4

However, an error is generated, saying that:
Fix bond/create induced too many angles/dihedrals/impropers per atom
Any opinion about what might cause this kind of error?
Thanks!

Best,
Jim Miao
Physics Dept.
Case Western Reserve Univ.

Hello LAMMPS users,

I am using the latest version of LAMMPS,

​"latest" is a very inaccurate description. it can change within an hour
what is the latest version. currently the latest is 6 June 2014. is that
the version you are using?​

and I am using these statements in LAMMPS input script to create bonds

between atom type 1 and atome type 2 and also between these two types of
atoms themselves:

fix 4 boundaryin bond/create 10 1 2 4.0 2 iparam 2 1 jparam 2 2 atype 2
dtype 4
fix 5 boundaryin bond/create 10 1 1 4.0 2 iparam 2 1 jparam 2 1 atype 2
dtype 4
fix 6 boundaryin bond/create 10 2 2 4.0 2 iparam 2 2 jparam 2 2 atype 2
dtype 4

However, an error is generated, saying that:
Fix bond/create induced too many angles/dihedrals/impropers per atom
Any opinion about what might cause this kind of error?

probably ​you didn't reserve sufficient space in LAMMPS internal data
structures to accommodate all those bonds/angles/dihedrals.

axel.

Hello axel,
Thank you for your reply.
I am sorry for the inaccurate description. I am using the lammps-29May14.

Hello axel,
Thank you for your reply.
I am sorry for the inaccurate description. I am using the lammps-29May14.

And I have reserved space in input script using:

special_bonds lj/coul 0 0.0 1.0 extra 22

And in datafile, using:

1 extra bond per atom

6 extra angle per atom
15 extra dihedral per atom

According to the molecule structure, there should be enough space.

Hello axel,
Thank you for your reply.
I am sorry for the inaccurate description. I am using the lammps-29May14.

And I have reserved space in input script using:

special_bonds lj/coul 0 0.0 1.0 extra 22

And in datafile, using:

1 extra bond per atom
6 extra angle per atom
15 extra dihedral per atom

According to the molecule structure, there should be enough space.

Well, evidently LAMMPS disagrees with you on this topic.

Also, if I set the “Rmin” in the “fix bond/create” to be 3.5 rather than 4.0, it works.
I checked the created bonds, dihedrals, and anlges, they are correct.
This error happens when Rmin is a little large.

Jim

在 2014-06-08 11:30:34,“Axel Kohlmeyer” <[email protected]…24…> 写道:

If you believe lammps is not working correctly, please provide a simple and complete test case, and we can look into it. Until then, we have to assume that the error is in your input deck. It is near impossible to debug things like this based on a few fragments of information.

Please check the documentation very carefully. Perhaps there is something that you have overlooked.

Hi Jim,

Also please post the exact error message. Do you still have this error if special bonds are changed from “0.0 0.0 1.0” to “0.0 0.0 0.99”?

Tim

Hello Tim,

The exact error massage is :
ERROR: Fix bond/create induced too many angles/dihedrals/impropers per atom (…/fix_bond_create.cpp:679)
I find this error happens when we issue these three fixes together:

fix 4 boundaryin bond/create 10 1 2 4.5 2 iparam 2 1 jparam 2 2 atype 2 dtype 4
fix 5 boundaryin bond/create 10 1 1 4.5 2 iparam 2 1 jparam 2 1 atype 2 dtype 4
fix 6 boundaryin bond/create 10 2 2 4.5 2 iparam 2 2 jparam 2 2 atype 2 dtype 4

If special bonds are changed from “0.0 0.0 1.0” to “0.0 0.0 0.99”, the error remains.

However this error can be avoided by issuing the fixes sequentially using a loop in input file:

label loop
variable a loop 300
fix 4 boundaryin bond/create 1 1 2 4.5 2 iparam 2 1 jparam 2 2 atype 2 dtype 4
run 10
fix 4 boundaryin bond/create 1 1 1 4.5 2 iparam 2 1 jparam 2 1 atype 2 dtype 4
run 10
fix 4 boundaryin bond/create 1 2 2 4.5 2 iparam 2 2 jparam 2 2 atype 2 dtype 4
run 10
next a
jump in.pvdf.txt loop

There are several ways for this error to be trigger, so its hard to know without seeing your input. The first check is to make sure there is really enough extra bonds, angles, dihedrals for all of the bonding possibilities. Also, since you are using 3 fixes to make the same type of bond, a bond can be formed by one fix and not seen by the other two fixes. Each fix counts the bonds per atom at the beginning of the run, then increments as new bonds are added. So one fix could be trying to form a bond with an atom that was already ‘maxed out’ by a different fix.

HTH,

Tim

Yes, these fixes seem to run parallelly if we put them together.
Thank you Tim for your help.

Best,
Jim