ERROR: Bond atoms missing

I want to create a CO2 molecule, set lj potential and coulomb potential for C-C, C-O and O-O respectively, and add an angle_style harmonic to the O-C-O bond, but I get "ERROR on proc 0: Bond atoms 4 5 I am getting an error “ERROR on proc 0: Bond atoms 4 5 missing on proc 0 at step 1257”.
When I look at the orbitals of the atoms in OVITO, I see a behavior where the O is moving away from the C.
I would appreciate it if you could help me.
co2.mol (507 Bytes)
in.CO2 (1.1 KB)


Any reason for using bond_style zero? From the documentation:

Using an bond style of zero means bond forces and energies are not computed, but the geometry of bond pairs is still accessible to other commands.

What you observe seems like the expected behavior.


Thanks for the reply.
I’m thinking of using the pair_style command to create a molecule and then apply the angle_style to the angles in that molecule, any suggestions?

I solved this problem by using bond/create and bond/break together.

I am not really sure what you are doing here. A more common option is to use a bond_style other than zero, such as bond_style harmonic. Any reason why you are using such complicated protocol with bond/create ?


Your issue is unrelated to bond assignment but to the way you are uncorrectly handling the case of a molecule generally represented with a rigid model.

As @simongravelle mentioned, using bond_style zero will result in no force maintaining the distance of your atoms, hence the C atoms going away from O atoms.

You have to modify the commented fix shake command in your script so that it does not apply on the angles but only on the bonds.

fix rigid     all shake 0.0001 20 0 b 1

You might also have numerical instabilities because your P_damp barostat parameter is too low. A value of 1000\ \mathrm{fs} will be more stable.

I would like to have variable join lengths, with constraints only on the join angles.