1
# This is a relatively complex example containing two different types of
2
# molecules, and a hybrid of Lennard-Jones and 3-body SW "pair" styles.
5
import "cyclododecane.lt"
7
write_once("Data Boundary") {
8
0.000000 48.000 xlo xhi
9
0.000000 48.000 ylo yhi
10
0.000000 48.000 zlo zhi
13
wat = new WatMW [12].move(0, 0, 4.0)
17
cyclododecane = new Cyclododecane [4].move(0, 0, 12.0)
21
# (Move them by (6.0,6.0,6.0) to avoid overlap with the water.)
22
cyclododecane[*][*][*].move(6.0,6.0,6.0)
24
write_once("In Init") {
25
# -- Tell LAMMPS we want to use two different pair styles
26
# -- (This overrides earlier settings.)
27
pair_style hybrid sw lj/charmm/coul/charmm 9.0 11.0 9.0 11.0
32
write_once("In Settings") {
33
# -- Now indicate which atom type(s) are simulated using the "sw" pair style
34
# -- In this case only one of the atom types is used (the mW water "atom").
36
pair_coeff * * sw system.in.sw mW NULL NULL NULL
38
# -- Unfortunately LAMMPS itself does not understand molemlate syntax, so
39
# -- the atoms are identified by order in the list, not by name. (The "mW"
40
# -- refers to to an identifier in the system.in.sw file, not watmw.lt.)
41
# -- This command says that the first atom type corresponds to the "mW"
42
# -- atom in system.in.sw, and to ignore the remaining three atom types
43
# -- (correspond to the CH2, CH3, CH4 atom types defined in trappe1998.lt.
44
# -- We don't want to use the "sw" force field for interactions involving
45
# -- these atom types, so we put "NULL" there.)
47
# For this to work, the first atom type (assigned to "1")
48
# must refer to the "mW" atom type (defined in watmw.lt).
49
# (This is why we included "watmw.lt" first, to insure that the
50
# atom counters in WatMW are assinged first, starting with 1.)
51
# Alternately we can further insure that this happens, it's
52
# a good idea to run moltemplate.sh using the "-a" argument:
53
# moltemplate.sh -a "@atom:/WatMW/mW 1" system.lt
54
# This assigns the atom type named @atom:/WatMW/mW to 1
60
# -- Somewhere we must eventually define interactions
61
# -- between atoms from different molecule types
62
# -- Now define interactions between DIFFERENT molecules
63
# Note: In the SPC/E model, the epsilon,sigma parameters for water is 0.1553
64
# 3.166. As a crude guess, I chose the LJ parameters for the interaction
65
# between water & the CH2,CH3,CH4 atoms using Lorentz-Berthelot mixing rules
67
write_once("In Settings") {
68
pair_coeff @atom:WatMW/mW @atom:TraPPE/CH2 lj/charmm/coul/charmm 0.11914784667210733 3.558
69
pair_coeff @atom:WatMW/mW @atom:TraPPE/CH3 lj/charmm/coul/charmm 0.17390830404497651 3.458
70
pair_coeff @atom:WatMW/mW @atom:TraPPE/CH4 lj/charmm/coul/charmm 0.21371654257637612 3.448