Debian Codegraph @

examples/all_atom/force_field_OPLSAA/butane/moltemplate_files/ch3.lt

raw
1 # This file contains a definition for the "CH3" molecular subunit.
2
3 import "oplsaa2024.lt"
4
5 # The "oplsaa2024.lt" file defines these atom types:
6 # @atom:54 "C - CT | n-CH3 C: alkane"
7 # @atom:57 "C - CT | CH2 C: alkanes"
8 # @atom:60 "H - HC | H: alkanes"
9 # The "oplsaa2024.lt" file is at:
10 # https://github.com/jewettaij/moltemplate/tree/master/moltemplate/force_fields/
11 # (If you want to customize this file, download it and copy it to this folder.)
12
13
14
15 CH3 inherits OPLSAA {
16
17 # atom-id mol-id atom-type charge x y z
18
19 write("Data Atoms") {
20 $atom:c $mol:... @atom:54 0.0 0.000000 0.000000 0.000000
21 $atom:h1 $mol:... @atom:60 0.0 0.000000 0.631044 0.892431
22 $atom:h2 $mol:... @atom:60 0.0 0.000000 0.631044 -0.892431
23 $atom:h3 $mol:... @atom:60 0.0 -0.892431 -0.631044 0.000000
24 }
25
26 write('Data Bond List') {
27 $bond:ch1 $atom:c $atom:h1
28 $bond:ch2 $atom:c $atom:h2
29 $bond:ch3 $atom:c $atom:h3
30 }
31
32 } # CH3
33
34
35
36
37 # Optional: Shift all the coordinates in the +Y direction by 0.4431163.
38 # This way, the carbon atom is no longer located at 0,0,0, but the
39 # axis of an alkane chain containing this monomer is at 0,0,0.
40 # (This makes it more convenient to construct a polymer later.
41 # If this is confusing, then simply add 0.4431163 to the Y
42 # coordinates in the "Data Atoms" section above.)
43
44 CH3.move(0,0.4431163,0)
45
46
47
48
49 # ---- NOTES: ----
50 #
51 # In this example, atomic charges are generated by atom type (according to the
52 # rules in oplsaa2024.lt), and can be omitted. Just leave them as "0.00" for now.
53 #
54 # The "..." in "$mol:..." tells moltemplate that this molecule may be part
55 # of a larger molecule, and (if so) to use the larger parent object's
56 # molecule id number as it's own.
57 #
58 ######### (scratchwork calculations for the atomic coordinates) #########
59 #
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.4431163
66 # DeltaZh = Lch*sin(theta/2) # = 0.892431
67 # DeltaYh = Lch*cos(theta/2) # = 0.631044