Dear Lammps users, a vaste literature is available on the matter of molecular mechanics simulations of layers, “slabs”so to say, of different materials floating on each other. Typical examples are layers or bilayers of lipids on water.
In the final simulation, more often than not we may find a central water slab with two molecular layers symmetrically disposed adjacent to the opposite surfaces of the water slab, so, for example, the disposition in, let’s say the z direction, is “molecular layer A” – “water slab” – “molecular layer A”
Additionally, two empty spaces are added on top (and below) the molecular layers to avoid mutual interactions between the molecules of the layers. I forgot to clarify that the system is periodic in all 3 directions.
Layers are usually “built” alone and equilibrated (with either fix NVT or NPT) and subsequently combined to give rise to the above described system, which is then submitted to the desired simulation.
I tried several times to follow this procedure and the major issue was to avoid to have images conflict which immediately stops the simulation rising an error.
I found a trick which consists of preparing the water and organic molecules slabs separately by using fix addforce to constrain the molecules (water and organic) of each box inside a relatively narrow layer. This system is somehow equilibrated with fix NVT.
In a second step, with a specific program I wrote, the complete system A-water-A is submitted to simulation.
Actually, the simulation finally runs, even if I am getting an “inconsistent image flags warning” .
Honestly, I feel uneasy with my “trick”. It seems to me unphysical and I doubt that the authors in literature made use of such a cumbersome procedure.
I hope to find some “ultra-patient” and competent gentleman willing to comment on this.
My field of research is the regular synthesis of 2-dimensional polymers at the liquid-air interface.
MD simulations are an essential tool in my research.
Thanks a lot for your attention
Paolo Botto
p.s. herebelow please find the Lammps input script of a “toy” system of 16 molecules:
# LAMMPS INPUT SCRIPT M44 16 filename: in-M44-16-00
units real
boundary p p p
atom_style full
pair_style lj/cut/coul/cut 10 12
bond_style harmonic
angle_style harmonic
dihedral_style opls
improper_style cvff
atom_modify map array
pair_modify table 0
read_data lamdata-M44-16-00
velocity all create 300 887723
fix mynve all nve
fix mylange all langevin 300 300 100 314159
group mygroup type 2 4 # force acts on Oxygen and Nitrogen only
region myregion1 block 1.0 10.0 -42.0 42.0 -42.0 42.0
fix myforce 1 mygroup addforce -1.0 0.0 0.0 region myregion1
region myregion2 block -10.0 -1.0 -42.0 42.0 -42.0 42.0
fix myforce2 mygroup addforce 1.0 0.0 0.0 region myregion2
neighbor 2 bin
neigh_modify delay 0 every 1 check yes page 100000 one 10000
thermo 1000 thermo_style custom cpu step etotal temp press density dump mydump all custom 1000 dump-M44-16-00 id type mol xs ys zs
restart 1000 rest1 rest2 run 500000
write_data dat-M44-16-00 write_restart restart-M44-16-00