Debian Codegraph @

examples/all_atom/force_field_AMBER/hexadecane/moltemplate_files/ch2.lt

raw
1
2 import "gaff2.lt" # <-- defines the "GAFF2" force field
3
4
5 # The "gaff2.lt" file is usually located in $MOLTEMPLATE_PATH (and is
6 # distributed with moltemplate. See the "Installation" section in the manual.)
7 # It contains definitions of the "@atom:c3", "@atom:hc", atoms as well as the
8 # force-field parameters for bonded and non-bonded interactions between them
9 # (and many other atoms).
10
11 # WARNING: CHARGES ARE INCORRECT
12 # For this example, I manually looked up the charge of each atom using the
13 # OPLSAA parameters from the "oplsaa.prm" file distributed with TINKER:
14 # http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
15 # -----> DO NOT DO THIS! <-----
16 # Normally simulations in AMBER are assigned charges using the
17 # "HF/6-31G* RESP2" or "AM1-BCC3" methods using AmberTools.
18 # Using the OPLSAA charges instead will NOT reproduce the behavior of AMBER.
19 # For more details how to calculate charges correctly, see:
20 # https://github.com/jewettaij/moltemplate/blob/master/examples/all_atom/force_field_AMBER/README.md
21
22
23 CH2 inherits GAFF2 {
24
25 # atom-id mol-id atom-type charge x y z
26
27 write("Data Atoms") {
28 $atom:c $mol:... @atom:c3 -0.120 0.000 0.000 0.000
29 $atom:h1 $mol:... @atom:hc 0.060 0.000 0.63104384422426 0.892430762954
30 $atom:h2 $mol:... @atom:hc 0.060 0.000 0.63104384422426 -0.892430762954
31 }
32
33 # Note: The "..." in "$mol:..." tells moltemplate that this molecule may
34 # be a part of a larger molecule, and (if so) to use the larger
35 # parent object's molecule id number as it's own.
36 # The CH2 group is part of the Hexadecane molecule.
37
38 # Now specify which pairs of atoms are bonded:
39 write('Data Bond List') {
40 $bond:ch1 $atom:c $atom:h1
41 $bond:ch2 $atom:c $atom:h2
42 }
43
44 } # CH2
45
46
47 # Optional: Shift all the coordinates in the +Y direction by 0.4431163.
48 # This way, the carbon atom is no longer located at 0,0,0, but the
49 # axis of an alkane chain containing this monomer is at 0,0,0.
50 # (This makes it more convenient to construct a polymer later.
51 # If this is confusing, then simply add 0.4431163 to the Y
52 # coordinates in the "Data Atoms" section above.)
53
54 CH2.move(0,0.4431163,0)
55
56
57
58
59 ######### (scratchwork calculations for the atomic coordinates) #########
60 # Lcc = 1.5350 # length of the C-C bond (Sp3)
61 # Lch = 1.0930 # length of the C-H bond
62 # theta=2*atan(sqrt(2)) # ~= 109.5 degrees = tetrahedronal angle (C-C-C angle)
63 # DeltaXc = Lcc*sin(theta/2) # = 1.2533222517240594
64 # DeltaYc = Lcc*cos(theta/2) # = 0.8862326632060754
65 # # 0.5*DeltaYc = 0.4431163316030377
66 # DeltaZh = Lch*sin(theta/2) # = 0.8924307629540046
67 # DeltaYh = Lch*cos(theta/2) # = 0.6310438442242609