neigh_modify exclude molecule/intra all and mol_id = 0

Dear all,

while developing a program involving rigid molecules and polymerization,
I noticed that
“neigh_modify exclude molecule/intra all”

prevents the formation of bonds (using “fix bond/create”) between single atoms.
I am using lammps 11Aug17 as a library.

This is consistent with the documentation, as non bonded atoms share the same molecule id = 0. However, this is not consistent with the use of a molecule id = 0 as a flag to identify single atoms, not actual molecules, as in others lammps commands.

I am adding an example file; if “neigh_modify exclude molecule/intra all” is not
commented out, then no bonds are created.

I would suggest to change this behavior, or to add a note in the documentation.

Minor and unrelated:
In the documentation of create_bonds many, rmax is defined as the “minimum” distance, while it should be the “maximum” one.

Many thanks,
Massimo

in.problem (2.35 KB)

Dear all,

while developing a program involving rigid molecules and polymerization,
I noticed that
"neigh_modify exclude molecule/intra all"
prevents the formation of bonds (using "fix bond/create") between single
atoms.
I am using lammps 11Aug17 as a library.

This is consistent with the documentation, as non bonded atoms share the
same molecule id = 0. However, this is not consistent with the use of a
molecule id = 0 as a flag to identify single atoms, not actual molecules,
as in others lammps commands.

I am adding an example file; if "neigh_modify exclude molecule/intra all"
is not
commented out, then no bonds are created.

I would suggest to change this behavior, or to add a note in the
documentation.

​i don't consider this inconsistent. LAMMPS does specify in each command
when molecule id == 0 has a special meaning. so it is a mistake to assume
this elsewhere. e.g. for neigh_modify it doesn't apply.
rather than depending on some convention, why don't you just make your
intention explicit?

group bodies molecule != 0
neigh_modify exclude module/intra bodies​

​axel.​