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

« back to all changes in this revision

Viewing changes to tools/moltemplate/examples/all_atom_examples/force_field_OPLSAA/hexadecane/moltemplate_files/ch2group.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
 
 
2
import "oplsaa.lt"    # <-- defines the "OPLSAA" force field
 
3
 
 
4
 
 
5
CH2 inherits OPLSAA {
 
6
 
 
7
  # atom-id  mol-id atom-type  charge    x        y                z
 
8
 
 
9
  write("Data Atoms") {
 
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
 
13
  }
 
14
 
 
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.
 
24
 
 
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
 
29
  }
 
30
 
 
31
} # CH2
 
32
 
 
33
 
 
34
 
 
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.)
 
41
 
 
42
CH2.move(0,0.4431163,0)
 
43
 
 
44
 
 
45
 
 
46
 
 
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