LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Inquiry on Results Using Compute Bond/Local
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Inquiry on Results Using Compute Bond/Local

From: Steve Plimpton <sjplimp@...24...>
Date: Tue, 17 Apr 2018 08:48:00 -0600

I can't really help you interpret the output of your simluation.  The compute bond/local and releated
comands do something simple.  They just loop over all the bonds in the system
and generate some output, e.g. which you can dump or average.  For any large system
there will be a distribution of bond lenghts, energies, etc, which very rapidly with
time (bond frequency).  So it is up to you to do suitable time or spatial averaging
of those quantities to learn something useful about your system.


On Mon, Apr 16, 2018 at 5:53 AM, MASATO KOIZUMI <mkoizumi@...3709...> wrote:
Dear Dr. Steve Plimpton and LAMMPS Users,

Thank you, Dr. Plimpton for your advice.

I was curious if I could ask a question regarding the compute bond/local command.

I am currently studying the force-displacement response of a polymer strand in a freely jointed chain where I define polymer strand as the polymer chain segment flanked by two crosslinks. 

I have created a simple polymer matrix consisting 4 chains each comprised of 10 beads. There are 5 crosslink bonds that link these different chains. The bonds that connect to form a chain and the crosslink bonds are governed by FENE potential and non-connected beads interact with LJ potential. 

I have applied uniaxial deformation such that the simulation box elongates to twice its original box length (stretch = 2.0) at strain rate of 0.00001 in LJ units.

However, I have plotted (and attached) the average bond lengths for the 4 chains with respect to stretch, and I am observing a random fluctuation without any signs of upward trend. I am expecting that the average bond length of the 4 chains should increase with respect to increasing stretch. 

Furthermore, I have plotted (and attached) the tension experienced by polymer strand at maximum elongation (stretch = 2.0) and the strand tension varies randomly with respect to r/L (strand end-to-end distance/strand contour length). 

In both of these plots, I should see an upward trend, and I should not see data points in the negative region of the force plot since this would imply bonds being compressed when in fact the simulation box is elongating. 

I tried with larger stretch but I am continuing to see random pattern in these plots.

Following the documentation, I understand that compute bond/local calculates the bond length, bond potential and bond force between every atom, but I was curious if I am interpreting and using the compute bond incorrectly. Simulating a larger polymer matrix, I am obtaining reasonable stress strain curve, but I am still seeing random fluctuation in bond length and force as well as in strand tension.

According to the documentation and from physical interpretation, I should see an upward trend in both of the attached plots. I would greatly appreciate if I could request for any comments or advice.

I also attached my LAMMPS script and the external data file if needed. Thank you so much for your time.


Masato Koizumi

On Thu, Apr 12, 2018 at 8:55 AM, Steve Plimpton <sjplimp@...24...> wrote:
The error is likely due to the original data file (or read_data) command not
allowing for extra space for more future atoms types (2,3).  See
the read_data command for how to do this.


On Thu, Apr 12, 2018 at 4:31 AM, MASATO KOIZUMI <mkoizumi@...3709...> wrote:
Dear LAMMPS Users,

Thank you for your advice, Wahab.

I am currently writing script that deposits water molecules into a simulation box filled with molecules. My input script reads a data file (via read_data command) that consists of 1 atom type and 1 bond type. A portion of my data file is displayed as follows:

1250 atoms
1225 bonds

1 atom types
1 bond types

-5.6859149999999996e+000 5.6859149999999996e+000 xlo xhi
-5.6859149999999996e+000 5.6859149999999996e+000 ylo yhi
-5.6859149999999996e+000 5.6859149999999996e+000 zlo zhi

1 1

Pair Coeffs
1 1 1

Bond Coeffs
1 30 1.5 1 1

Atoms # bond

1021 21 1 0 -4.1502851628629784e+00 -5.0205756757887103e+00 5.5686512384180418e+00 0 1 -1
1124 23 1 0 -2.2865743827773772e+00 -5.5953483083714382e+00 -4.6511594383680359e+00 1 0 0
1123 23 1 0 -1.9036279292246638e+00 -4.8641269372881135e+00 -5.2194964650898221e+00 1 0 0

Meanwhile, using fix deposit command, the molecule command reads the data file that consists of 2 atom types labeled as type 2 and type 3 as follows

# dimer molecule

2 atoms
1 bonds

1 0 0 0
2 1 0 0

1 2
2 3

1 1 1 2

Special Bond Counts
1 1 0 0
2 1 0 0

Special Bonds
1 2
2 1

My fix deposit command are specified as:

fix    7 addatoms deposit 100 0 100 12345 region slab near 0.0 mol dimer vx -1.0 -1.0 vy -1.0 -1.0 vz -1.0 -1.0

However, I am obtaining an error that states "Invalid atom type in fix deposit mol command (../fix_deposit.cpp:115)"

Reading the documentation, I am coming to the conclusion that I need to specify "0" for the type argument in fix deposit, since my atom type in my original read_data file is 1 and my atoms in molecule file has type 2 and type 3. Therefore, the dump file will consist of atoms that will contain type 1, 2 and 3 atoms.

I was curious if I could request for any advice on this error. Thank you.


Masato Koizumi

On Thu, Apr 12, 2018 at 2:56 AM, Wahab Mirco <> wrote:
On 12.04.2018 11:32, MASATO KOIZUMI wrote:

> Hello. Just following up, I was curious if LAMMPS could perform a
> mu-P-T, i.e. constant chemical potential, constant pressure and constant
> temperature. I am planning to create a dynamic simulation where
> molecules are inserted into the simulation box under isobaric and
> isothermal conditions. I would like to have the volume of the simulation
> box change.

A µ-P-T ensemble isn't a real thermodynamical ensemble. You can figure
that out if you consider the relation of µ and P in an ideal gas.

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
lammps-users mailing list

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
lammps-users mailing list