fix bond/create problem

Dear all,

It seems to me that there is a problem with fix bond/create (lammps 11Aug17 and 31Mar17)

It looks like bonds are only created if atom type = 1 (or at least one of the potentially bonded atoms is of type 1). I suspect the same error occurs with create_bonds.

I am attaching a simple example script. Type 1 and type 2 atoms are identical.

If you set the value of use_type to 1, the script only uses atom type 1, and everything works fine.
If you set the value of use_type to 2, the script on;y uses atom type 2, but no bonds are created.

In addition, the script ends with the computation of the number of atoms, using a compute property/local and a compute reduce sum. I expected the result of c_Nbond to be an integer, while it is a fraction.

Am I missing something?

Many thanks as usual!

Massimo

in.problem_bond (1.59 KB)

Dear all,

It seems to me that there is a problem with fix bond/create (lammps 11Aug17
and 31Mar17)

It looks like bonds are only created if atom type = 1 (or at least one of
the potentially bonded atoms is of type 1). I suspect the same error occurs
with create_bonds.

I am attaching a simple example script. Type 1 and type 2 atoms are
identical.
If you set the value of use_type to 1, the script only uses atom type 1, and
everything works fine.
If you set the value of use_type to 2, the script on;y uses atom type 2, but
no bonds are created.

the script is behaving correctly. you are only creating atoms of type
1 in your create_atoms command, and there is no set command or
anything else that will turn all or some of them into type 2 atoms.
with no atoms of type 2, there cannot be any bonds created with
use_type set to 2.

In addition, the script ends with the computation of the number of atoms,
using a compute property/local and a compute reduce sum. I expected the
result of c_Nbond to be an integer, while it is a fraction.

Am I missing something?

you are using reduced units, and thus themo_modify norm defaults to
yes. that means all extensive properties (or more precisely where
LAMMPS can detect they are extensive) will be normalized by the number
of atoms.

you can use either use: thermo_modify norm no
and turn normalization off, or assign the result of the compute to a
equal style variable and then LAMMPS will not be able to tell that you
are looking to output an extensive property.

axel.