2
import "oplsaa.lt" # <-- defines the "OPLSAA" force field
7
# atom-id mol-id atom-type charge x y z
10
$atom:C $mol:... @atom:81 0.00 0.000 0.000 0.000
11
$atom:H1 $mol:... @atom:85 0.00 0.000 0.63104384422426 0.892430762954
12
$atom:H2 $mol:... @atom:85 0.00 0.000 0.63104384422426 -0.892430762954
15
# Atom type numbers (@atom:80,@atom:85) are defined in "oplsaa.lt". Excerpt:
16
# @atom:80 12.011 #CT "Alkane CH3-" 6 partial charge=-0.18
17
# @atom:81 12.011 #CT "Alkane -CH2-" 6 partial charge=-0.12
18
# @atom:85 1.008 #HC "Alkane H-C" 1 partial charge=0.06
19
# In this example, atomic charges are generated by atom type (according to
20
# rules in oplsaa.lt), and can be omitted. Just leave them as "0.00" for now.
21
# The "..." in "$mol:..." tells moltemplate that this molecule may be part
22
# of a larger molecule, and (if so) to use the larger parent object's
23
# molecule id number as it's own.
25
# Now specify which pairs of atoms are bonded:
26
write('Data Bond List') {
27
$bond:CH1 $atom:C $atom:H1
28
$bond:CH2 $atom:C $atom:H2
35
# Optional: Shift all the coordinates in the +Y direction by 0.4431163.
36
# This way, the carbon atom is no longer located at 0,0,0, but the
37
# axis of an alkane chain containing this monomer is at 0,0,0.
38
# (This makes it more convenient to construct a polymer later.
39
# If this is confusing, then simply add 0.4431163 to the Y
40
# coordinates in the "Data Atoms" section above.)
42
CH2.move(0,0.4431163,0)
47
######### (scratchwork calculations for the atomic coordinates) #########
48
# Lcc = 1.5350 # length of the C-C bond (Sp3)
49
# Lch = 1.0930 # length of the C-H bond
50
# theta=2*atan(sqrt(2)) # ~= 109.5 degrees = tetrahedronal angle (C-C-C angle)
51
# DeltaXc = Lcc*sin(theta/2) # = 1.2533222517240594
52
# DeltaYc = Lcc*cos(theta/2) # = 0.8862326632060754
53
# # 0.5*DeltaYc = 0.4431163316030377
54
# DeltaZh = Lch*sin(theta/2) # = 0.8924307629540046
55
# DeltaYh = Lch*cos(theta/2) # = 0.6310438442242609