Debian Codegraph @

examples/coarse_grained/simple_examples/2bead_heteropolymer/moltemplate_files/forcefield.lt

raw
1 # Define a "ForceField" object.
2 # A force field in moltemplate is any object containing mostly pair_coeff,
3 # bond_coeff, angle_coeff, dihedral_coeff, "Bonds By Type", "Angles By Type",
4 # "Dihedrals By Type", "Impropers By Type", "Data Masses" (and "In Charges")
5 # information. Later, when we define molecules (such as "H" and "P"), we can
6 # borrow these atom types, bond-rules and force field parameters. This way,
7 # bonds and angular interactions are generated automatically according to
8 # atom (and bond) type.
9 # (You can also assign charge by atom type. However in this example I assigned
10 # charge to each atom manually (not by type). The OPLSAA examples in the
11 # "all_atoms" directory demonstrate how to assign charge by atom type.)
12
13
14
15 HPForceField {
16
17 # LAMMPS supports a large number of "styles" (ie. equations for calculating
18 # forces between particles). At some point, we must eventually select the
19 # formulas we want to use. This can be done anywhere, but we might as
20 # well specify that now. Later on we will specify the parameters
21 # which go into these equations.
22
23 write_once("In Init") {
24 units real
25 atom_style full
26 bond_style harmonic
27 angle_style harmonic
28 dihedral_style charmm
29 pair_style lj/cut 11.0
30
31 # If charges are needed, (assuming biopolymers), try one of:
32 #dielectric 80.0
33 #pair_style lj/cut/coul/debye 0.1 11.0
34 # or (for short distances, below a couple nm)
35 #pair_style lj/charmm/coul/charmm/implicit 9.0 11.0
36
37 pair_modify mix arithmetic
38 special_bonds lj 0.0 0.0 0.0
39 }
40
41
42 # There are 3 atom types:
43
44 write_once("Data Masses") {
45 @atom:CA 13.0
46 @atom:HR 50.0
47 @atom:PR 50.0
48 }
49
50 # 2-body (non-bonded) interactions:
51 #
52 # Uij(r) = 4*eps_ij * ( (sig_ij/r)^12 - (sig_ij/r)^6 )
53 # (for details see http://lammps.sandia.gov/doc/pair_lj.html)
54 #
55 # Hydrophobic side-chain (R) atoms are attractive (large epsilon parameter).
56 # Polar side-chains and backbone atoms are not attractive (small epsilon).
57 #
58 # i j eps sig
59 #
60 write_once("In Settings") {
61 pair_coeff @atom:CA @atom:CA 0.10 2.0
62 pair_coeff @atom:HR @atom:HR 2.50 3.6
63 pair_coeff @atom:PR @atom:PR 0.10 3.6
64 }
65
66 # (By default, interactions between different AtomTypes use "arithmetic"rules:
67 # eps_ij=sqrt(eps_ii*eps_ij) and sig_ij=0.5*(sig_ii+sig_jj)
68 # Look for the line containing "pair_modify mix arithmetic" below...)
69
70 # Optional: Assign bond types @bond:Backbone or @bond:Sidechain
71 # according to atom type. (This can be overridden.)
72
73 write_once("Data Bonds By Type") {
74 @bond:Backbone @atom:CA @atom:CA
75 @bond:Sidechain @atom:CA @atom:HR
76 @bond:Sidechain @atom:CA @atom:PR
77 }
78
79 # 2-body (bonded) interactions:
80 #
81 # Ubond(r) = (k/2)*(r-0)^2
82 # (for details see http://lammps.sandia.gov/doc/bond_harmonic.html)
83 #
84 # The corresponding command is:
85 #
86 # bond_coeff bondType k r0
87 #
88
89 write_once("In Settings") {
90 bond_coeff @bond:Sidechain 30.0 3.4
91 bond_coeff @bond:Backbone 30.0 3.7
92 }
93
94
95 # Rules for determining 3 and 4-body bonded interactions by type
96
97 # angle-type atomType1 atomType2 atomType3
98
99 write_once("Data Angles By Type") {
100 @angle:Backbone @atom:CA @atom:CA @atom:CA
101 @angle:Sidechain @atom:CA @atom:CA @atom:*R # Note: "*R" <--> "HR" or "PR"
102 }
103
104 # dihedral-type AtomType1 AtomType2 AtomType3 AtomType4
105
106 write_once("Data Dihedrals By Type") {
107 @dihedral:CCCC @atom:CA @atom:CA @atom:CA @atom:CA
108 @dihedral:RCCR @atom:*R @atom:CA @atom:CA @atom:*R #"*R" <--> "HR" or "PR"
109 }
110
111 # 3-body interactions in this example are listed by atomType and bondType
112 # The atomIDs involved are determined automatically. The forumula used is:
113 #
114 # Uangle(theta) = (k/2)*(theta-theta0)^2
115 # (k in kcal/mol/rad^2, theta0 in degrees)
116 # (for details see http://lammps.sandia.gov/doc/angle_harmonic.html)
117 #
118 # The corresponding command is:
119 #
120 # angle_coeff angleType k theta0
121
122 write_once("In Settings") {
123 angle_coeff @angle:Backbone 30.00 114
124 angle_coeff @angle:Sidechain 30.00 123
125 }
126
127
128 # 4-body interactions in this example are listed by atomType and bondType
129 # The atomIDs involved are determined automatically. The forumula used is:
130 #
131 # Udihedral(phi) = K * (1 + cos(n*phi - d))
132 #
133 # The d parameter is in degrees, K is in kcal/mol/rad^2.
134 # (for details, see http://lammps.sandia.gov/doc/dihedral_charmm.html)
135 #
136 # The corresponding command is
137 # dihedral_coeff dihedralType K n d w (ignore "w")
138
139 write_once("In Settings") {
140 dihedral_coeff @dihedral:CCCC -0.5 1 -180 0.0
141 dihedral_coeff @dihedral:RCCR -1.5 1 -180 0.0
142 } # write_once("In Settings")
143
144
145 } # HPForceField
146