SPC/E configurations

Dear Lammps users,

I was hoping someone might be able to give me advice regarding generating pure SPC/E water systems for given densities and box dimension ratios.

Ideally I want to be able to generate a read_data input file for an SPC/E system contained in a cuboid box with side ratios 1:1:5 with a specified density and am interested to know what the easiest way of going about this is.

Thank you in advance, Jeff.

Jeff:

You can use Packmol to create a PDB file, which can then be imported into VMD. Using VMD’s topotools package, you can create the LAMMPS data file.

–AEI

Dear Lammps users,

I was hoping someone might be able to give me advice regarding generating
pure SPC/E water systems for given densities and box dimension ratios.

Ideally I want to be able to generate a read_data input file for an SPC/E
system contained in a cuboid box with side ratios 1:1:5 with a specified
density and am interested to know what the easiest way of going about this
is.

Jeff:

You can use Packmol to create a PDB file, which can then be imported into

rather than using packmol, i'd recommend to start from a
preequilibrated water box. there are quite a few of them
downloadable on the web and/or bundled with modeling
packages. it doesn't matter what water potential
was used, it will be much better and save you a lot of
equilibration troubles compared to starting from scratch.

axel.

Hi Jeffrey
  There's an example how to build a simple water box for lammps of any
size in chapter 3 of the manual for "moltemplate" (moltemplate.org).
I know I mentioned it to you before. Anyway here's a quick summary:

You need to define a "lammps template" for each molecule that you
need. For SPC/E, it has been done for you. The SPC/E water molecule
definition is here:
http://www.moltemplate.org/examples/waterSPCE+Na+Cl/spce.lt

You can use this file to build a box of water (or a combination of
water and other molecules). In the example from the manual, we
created a new file (for example "system.lt") containing this text:
# ----- system.lt -------
import "spce.lt"
wat = new SPCE [10].move(0,0,3.45)
                [10].move(0,3.45,0)
                [10].move(3.45,0,0)

write_once("Data Boundary") {
0.0 34.5 xlo xhi
0.0 34.5 ylo yhi
0.0 34.5 zlo zhi
}
# ------------
That's it.
Then you can generate the DATA and input-script files that you need
to run LAMMPS using:

moltemplate.sh system.lt

These files contain a complete description of your system including
force-field parameters, topology information, and coordinates.
(This will generate a 10x10x10 cubic water box example. This (3.45
A)^3 initial spacing between water molecules seems to work reasonably
well, but it's a little too dense. You will have to run the system at
constant pressure for a short while to equilibrate the volume, and
randomize the molecular positions. The following LAMMPS input script
does this reasonably well:
http://www.moltemplate.org/examples/waterSPCE+Na+Cl/run.in.npt
This input script includes files which were created when you ran
moltemplate.sh above.)

    Solute & water mixtures:

By editing your ".LT" file, you can also cut out (rectangular) holes
in the solvent to make space for solutes or other objects manually
using the "delete" command:
(For an example, see:
http://www.moltemplate.org/images/translocation/solvent.jpg
http://www.moltemplate.org/examples/translocation/solvent.lt)

(If you have many such solutes, you can create a new "object", which
is functionally similar to a molecule, however the atoms in it do not
have to be bonded together. Each object contains a solute molecule as
well as the water molecules surrounding it. Then you can stack them
together the same way you stacked individual water molecules together
above. To do this, just surround the text which defines this object
with {} brackets. Your "system.lt" file would look something like
this:
import "wat.lt"
import "solute.lt"
UnitCell {
   wat = new SPCE [4].move(3.45,0,0)
                  [4].move(0,3.45,0)
                  [4].move(0,0,3.45)
   delete wat[1-2][1-2][1-2] # 2x2x2 hole for solute
   solute = new Solute.move(5.175,5.175,5.175)
}
cells = new UnitCell[3].move(13.8,0,0)
                    [3](0,13.8,0)
                    [3](0,0,13.8)

Thank you for all the replies. I will certainly give moltemplate a try at point in the near future, however it seems that packmol combined with VMD's topotool is quite useful for the simple systems I am currently looking at.

The suggestion of using pre-equilibrated systems might be sensible, however I thought that in my case since I was looking at elongated systems (For use with non-equilibrium thermal gradients) that it would be difficult to find the non-cubic simulations and thus given the data manipulation required to replicate them in one dimension I might be better off learning a more general approach to generating systems in lammps.

Many thanks again for what as always is very swift and useful advice, Jeff.

Thank you for all the replies. I will certainly give moltemplate a try at point in the near future, however it seems that packmol combined with VMD's topotool is quite useful for the simple systems I am currently looking at.

The suggestion of using pre-equilibrated systems might be sensible, however I thought that in my case since I was looking at elongated systems (For use with non-equilibrium thermal gradients) that it would be difficult to find the non-cubic simulations and thus given the data manipulation required to replicate them in one dimension I might be better off learning a more general approach to generating systems in lammps.

nonsense. creating an elongated system is _trivial_.
i forgot to mention it, because it is so simple. once
you have your properly equilibrated cube, you can
use LAMMPS' "replicate" command that will easily
create the shape you want.

...and if that is not to your liking, also topotools
has a replicate options.

axel.

That is indeed an efficient way of generating the configuration, I was not aware of the replicate command. Thank you again for the advice.

Jeff.