how to build water using lammps input file

Dear all,

I browsed the lammps user archives. I can see that most of them built the tip3p/tip4p simulation box using packmol. Is there any way to build the water box using lammps input script? I tried to do that with following input parameters:

#simulation of water
boundary p p p
units real
atom_style full

#read_data h2o.data
region box block 0 6 0 6 0 6 units box
create_box 2 box
create_atoms 2 box

mass 1 15.9994
mass 2 1.008
charge 1 −0.834
charge 2 0.417

pair_style lj/charmm/coul/long 10.0 12.0
pair_coeff 1 1 0.00 0.00
pair_coeff 1 2 0.00 0.00
pair_coeff 2 2 0.102 3.188
bond_style harmonic
bond_coeff 1 450 0.9572
angle_style charmm
angle_coeff 1 55 104.52 0.0 0.0

neigh_modify delay 2 every 1
thermo_style one
thermo 100

fix fshk all shake 1e-6 500 0 b 1 a 1
fix fnvt all nvt temp 300.0 300.0 200.0

velocity all create 0.722 8700 loop geom

write_restart restart.create

timestep 2.0

run 100000

But I got error message as:

ERROR: Cannot create atoms with undefined lattice
mpiexec: Warning: task 0 exited with status 1.

I read through the lammps manual, but i am still lost. Can I get some help here? Thanks a lot.

Dear all,

I browsed the lammps user archives. I can see that most of them built the
tip3p/tip4p simulation box using packmol. Is there any way to build the
water box using lammps input script? I tried to do that with following input

the error you report has nothing to do with setting up a water box.

the in my personal opinion (but i am biased) simplest way to set up
a water box in lammps is to import a pre-equilibrated box into VMD
and then use the topotools plugin to generate bond/angles and types
and then write out a lammps data file.

parameters:

#simulation of water
boundary p p p
units real
atom_style full

read_data h2o.data
region box block 0 6 0 6 0 6 units box
create_box 2 box
create_atoms 2 box

mass 1 15.9994
mass 2 1.008
charge 1 -0.834
charge 2 0.417

pair_style lj/charmm/coul/long 10.0 12.0
pair_coeff 1 1 0.00 0.00
pair_coeff 1 2 0.00 0.00
pair_coeff 2 2 0.102 3.188
bond_style harmonic
bond_coeff 1 450 0.9572
angle_style charmm
angle_coeff 1 55 104.52 0.0 0.0

neigh_modify delay 2 every 1
thermo_style one
thermo 100

fix fshk all shake 1e-6 500 0 b 1 a 1
fix fnvt all nvt temp 300.0 300.0 200.0

velocity all create 0.722 8700 loop geom

write_restart restart.create

timestep 2.0

run 100000

But I got error message as:

ERROR: Cannot create atoms with undefined lattice
mpiexec: Warning: task 0 exited with status 1.

I read through the lammps manual, but i am still lost. Can I get some help

you cannot use the create_atom command without
defining a lattice. how should lammps otherwise know
where to place the atoms?

cheers,
   axel.

Can someone send me a box of pre-equilibrated water? I know some guys built different sized water box using tip3p/tip4p model for others to download. But I am not sure where they are.

2011/8/31 zhangliqun <[email protected]...>:

Can someone send me a box of pre-equilibrated water? I know some guys built
different sized water box using tip3p/tip4p model for others to download.
But I am not sure where they are.

how about _looking_ for them?
there are tons of them on the web.

also many MD packages or MD related tools (e.g. VMD) ship with one.

axel.

I built a 10x10x10 water box using charmm codes. Could I know how to convert a pdb, or crd, or psf file in charmm format to lammps data file? Any hint is welcomed. Thanks a lot.

2011/8/31 zhangliqun <[email protected]...>:

I built a 10x10x10 water box using charmm codes. Could I know how to
convert a pdb, or crd, or psf file in charmm format to lammps data file? Any
hint is welcomed. Thanks a lot.

do you want somebody to write your paper, too?

axel.

I figured out how to use lammps tools to do that. I forgot to update my progress.