~ubuntu-branches/debian/sid/lammps/sid

« back to all changes in this revision

Viewing changes to tools/moltemplate/examples/coarse_grained_examples/3bodyWater+hydrocarbons_MW+TraPPE/moltemplate_files/version_more_comments/system.lt

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2015-04-29 23:44:49 UTC
  • mfrom: (5.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20150429234449-mbhy9utku6hp6oq8
Tags: 0~20150313.gitfa668e1-1
Upload into unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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.
 
3
 
 
4
import "watmw.lt"
 
5
import "cyclododecane.lt"
 
6
 
 
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
 
11
}
 
12
 
 
13
wat = new WatMW [12].move(0, 0, 4.0)
 
14
                [12].move(0, 4.0, 0) 
 
15
                [12].move(4.0, 0, 0)
 
16
 
 
17
cyclododecane = new Cyclododecane [4].move(0, 0, 12.0)
 
18
                                  [4].move(0, 12.0, 0)
 
19
                                  [4].move(12.0, 0, 0)
 
20
 
 
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)
 
23
 
 
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
 
28
}
 
29
 
 
30
 
 
31
 
 
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").
 
35
 
 
36
  pair_coeff    * * sw system.in.sw mW NULL NULL NULL
 
37
 
 
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.)
 
46
  #
 
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
 
55
}
 
56
 
 
57
 
 
58
 
 
59
 
 
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
 
66
 
 
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
 
71
}
 
72
 
 
73
 
 
74
 
 
75
 
 
76
 
 
77
 
 
78
 
 
79
 
 
80