LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] Inserting atoms via fix deposit command and FENE bonds
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] Inserting atoms via fix deposit command and FENE bonds


From: MASATO KOIZUMI <mkoizumi@...3709...>
Date: Sun, 29 Apr 2018 01:39:29 -0700

Dear LAMMPS Users

First, Thank you, Dr. Plimpton, for your advice. 

I have created my input script where my simulation box is changing its volume. The box contains 4 polymer chains each consisting 10 atoms which is being read from the external data file, polymer_4c10m.

The polymer chains consist of 3 types of bonds: Type 1 bonds connect the beads in each chain, Type 2 bonds are crosslink bonds which one atom from one chain connects to another atom from another chain, Type 3 bonds are harmonic bonds contained in each chain.

As the simulation box size is inflating, I am inserting water molecules into the box. The water molecules are contained in the file molecule.dimer where the two atoms are Type 2 and the bond that connects these two atoms are Type 4.

Adhering to your advice, I have allowed extra space for the Type 2 atoms and the Type 4 bond by modifying my read_data command.

However, when I run my simulation, I am running into an issue where my Type 2 bonds are exceeding its critical bond length (FENE bond too long). 

I confirmed that the fix deform command which is inflating the simulation box size is not responsible for the excessive bond length. 

Therefore, I was curious if I could request for any suggestions or advice on why my Type 2 FENE bonds in my original input script is exceeding their critical length when I insert the water molecules.

Reading the documentation, I am expecting that my dump files will consist of Type 1 and 2 atoms and Type 1, 2, 3, and 4 bonds since I specified the offset as "0" in my fix deposit command.

A portion of my original script is as follows:

units              lj
atom_style         full
neighbor           0.36 bin
neigh_modify       delay 2
pair_style         lj/cut 2.5
bond_style hybrid harmonic fene
special_bonds    lj  0.0 1.0 1.0
read_data polymer_4c10m extra/atom/types 1 extra/bond/types 1
mass * 1.0
pair_coeff         * * 1.0 1.0 2.5
bond_coeff * fene 30.0 1.5 1.0 1.0
bond_coeff 3 harmonic 1000.0 1.20
pair_modify        shift yes
timestep        0.010
reset_timestep 0

fix   1 all langevin 1.0 1.0 2.0 542305
fix   2 all press/berendsen iso 0.0 0.0 10.0
fix   3 all nve

thermo     100
thermo_style custom step temp pe etotal epair pxx pyy pzz lx ly lz

run 1000
unfix 2

variable tmp equal "lx"
variable L0 equal ${tmp}
print "Initial Length, L0: ${L0}"

# Perform Volume Inflation
reset_timestep 0

fix 7 all deform 1 x erate 0.01 y erate 0.01 z erate 0.01 remap v
region          vol block EDGE EDGE EDGE EDGE EDGE EDGE side in
molecule        dimer molecule.dimer
group   Add_Atom id 2

fix    8 Add_Atom deposit 50 0 100 12345 region vol near 0.0 &
                mol dimer vx -1.0 -1.0 vy -1.0 -1.0 vz -1.0 -1.0

fix    9 Add_Atom nve
fix    10 Add_Atom langevin 0.1 0.1 0.1 587283
fix    11 Add_Atom nve
              
compute p all pressure thermo_temp
fix 12 all ave/time 4 25 100 c_p[1] c_p[2] c_p[3] c_p[4] c_p[5] c_p[6] file press.1

run 1000

My water molecule data is as follows:

2 atoms
1 bonds

Coords

1 0 0 0
2 1 0 0

Types

1 2
2 2

Bonds

1 4 1 2

Special Bond Counts

1 1 0 0
2 1 0 0

Special Bonds

1 2
2 1


Thank you.

Sincerely,

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.

Steve

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

Masses
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

Coords
1 0 0 0
2 1 0 0

Types
1 2
2 3

Bonds
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.

Sincerely,

Masato Koizumi

On Thu, Apr 12, 2018 at 2:56 AM, Wahab Mirco <Mirco.Wahab@...7554...g.de> 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.
(https://en.wikipedia.org/wiki/Gibbs%E2%80%93Duhem_equation)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...655....net
https://lists.sourceforge.net/lists/listinfo/lammps-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...655....net
https://lists.sourceforge.net/lists/listinfo/lammps-users