Debian Codegraph @

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

raw
1 # This file contains a definition for the "CH2" molecular subunit.
2 # First, load the COMPASS force field parameters we will need:
3
4 import "compass_published.lt" # <-- defines the "COMPASS" force field
5
6 # (The "compass_published.lt" file is located in the "force_fields"
7 # subdirectory distributed with moltemplate.)
8 # Then define "CH2":
9
10
11
12
13 CH2 inherits COMPASS {
14
15 # atom-id mol-id atom-type charge x y z
16
17 write("Data Atoms") {
18 $atom:c $mol:... @atom:c4 0.0 0.000000 0.000000 0.000000
19 $atom:h1 $mol:... @atom:h1 0.0 0.000000 0.631044 0.892431
20 $atom:h2 $mol:... @atom:h1 0.0 0.000000 0.631044 -0.892431
21 }
22
23 write('Data Bond List') {
24 $bond:ch1 $atom:c $atom:h1
25 $bond:ch2 $atom:c $atom:h2
26 }
27
28 } # CH2
29
30
31
32
33 # COMMENTS:
34 # 1) Atom type names (eg. "c4", "h1") are defined in "compass_published.lt".
35 # 2) In this example, the atomic charge of an atom is calculated by summing
36 # partial charge contributions from neighboring atoms bonded to this atom.
37 # (according to the rules in "compass_published.lt"). For this reason,
38 # we can ignore the "charge" column in the "Data Atoms" section. Just
39 # leave theses charges as "0.0" for now. Moltemplate will recalculate them.
40 # 3) The "..." in "$mol:..." tells moltemplate that this molecule may be part
41 # of a larger molecule, and (if so) to use the larger parent object's
42 # molecule id number as it's own.
43
44
45
46
47
48 # Optional: Shift all the coordinates in the +Y direction by 0.4431163.
49 # This way, the carbon atom is no longer located at 0,0,0, but the
50 # axis of an alkane chain containing this monomer is at 0,0,0.
51 # (This makes it more convenient to construct a polymer later.
52 # If this is confusing, then simply add 0.4431163 to the Y
53 # coordinates in the "Data Atoms" section above.)
54
55 CH2.move(0,0.4431163,0)
56
57
58
59
60
61 ######### (scratchwork calculations for the atomic coordinates) #########
62 #
63 # Lcc = 1.5350 # length of the C-C bond (Sp3)
64 # Lch = 1.0930 # length of the C-H bond
65 # theta=2*atan(sqrt(2)) # ~= 109.5 degrees = tetrahedronal angle (C-C-C angle)
66 # DeltaXc = Lcc*sin(theta/2) # = 1.2533222517240594
67 # DeltaYc = Lcc*cos(theta/2) # = 0.8862326632060754
68 # # 0.5*DeltaYc = 0.4431163
69 # DeltaZh = Lch*sin(theta/2) # = 0.892431
70 # DeltaYh = Lch*cos(theta/2) # = 0.631044