LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] fix bond/create problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] fix bond/create problem

From: Axel Kohlmeyer <akohlmey@...24...>
Date: Fri, 27 Oct 2017 11:42:04 -0400

On Fri, Oct 27, 2017 at 8:45 AM, Massimo Pica Ciamarra
<picaciam@...24...> wrote:
> 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.


> Many thanks as usual!
> Massimo
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites,!
> _______________________________________________
> lammps-users mailing list

Dr. Axel Kohlmeyer  akohlmey@...24...
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.