Debian Codegraph @

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

raw
1 import "monomer_H.lt" # defines the "H" molecular subunit
2 import "monomer_P.lt" # defines the "P" molecular subunit
3
4
5
6 Polymer {
7
8 create_var {$mol} # optional:force all monomers to share the same molecule-ID
9 # (The "Data Atoms" in H and P must use "$mol:..." notation.)
10
11 # This causes mon1,mon2,mon3,...,mon14 to share the same molecule counter
12 # because in the forcefield.lt file, the "..." in "$mol:..." preferentially
13 # looks for a counter of that type in a parent molecule or earlier ancestor.
14
15
16 # A polymer of alternating "H" and "P" monomers:
17
18 mon1 = new P
19 mon2 = new P.rot(180.0, 1,0,0).move(3.2,0,0)
20 mon3 = new H.rot( 0.0, 1,0,0).move(6.4,0,0)
21 mon4 = new H.rot(180.0, 1,0,0).move(9.6,0,0)
22 mon5 = new H.rot( 0.0, 1,0,0).move(12.8,0,0)
23 mon6 = new H.rot(180.0, 1,0,0).move(16.0,0,0)
24 mon7 = new P.rot( 0.0, 1,0,0).move(19.2,0,0)
25 mon8 = new P.rot(180.0, 1,0,0).move(22.4,0,0)
26 mon9 = new P.rot( 0.0, 1,0,0).move(25.6,0,0)
27 mon10 = new H.rot(180.0, 1,0,0).move(28.8,0,0)
28 mon11 = new H.rot( 0.0, 1,0,0).move(32.0,0,0)
29 mon12 = new H.rot(180.0, 1,0,0).move(35.2,0,0)
30 mon13 = new P.rot( 0.0, 1,0,0).move(38.4,0,0)
31 mon14 = new P.rot(180.0, 1,0,0).move(41.6,0,0)
32
33
34 # Now, link the monomers together this way:
35 write("Data Bond List") {
36 $bond:backbone1 $atom:mon1/ca $atom:mon2/ca
37 $bond:backbone2 $atom:mon2/ca $atom:mon3/ca
38 $bond:backbone3 $atom:mon3/ca $atom:mon4/ca
39 $bond:backbone4 $atom:mon4/ca $atom:mon5/ca
40 $bond:backbone5 $atom:mon5/ca $atom:mon6/ca
41 $bond:backbone6 $atom:mon6/ca $atom:mon7/ca
42 $bond:backbone7 $atom:mon7/ca $atom:mon8/ca
43 $bond:backbone8 $atom:mon8/ca $atom:mon9/ca
44 $bond:backbone9 $atom:mon9/ca $atom:mon10/ca
45 $bond:backbone10 $atom:mon10/ca $atom:mon11/ca
46 $bond:backbone11 $atom:mon11/ca $atom:mon12/ca
47 $bond:backbone12 $atom:mon12/ca $atom:mon13/ca
48 $bond:backbone13 $atom:mon13/ca $atom:mon14/ca
49 }
50
51
52 # Use "Data Bonds" instead if you prefer to assign the bond types manually:
53 # write("Data Bonds") {
54 # $bond:backbone1 @bond:Backbone $atom:mon1/ca $atom:mon2/ca
55 # $bond:backbone2 @bond:Backbone $atom:mon2/ca $atom:mon3/ca
56 # : : : :
57 # }
58
59 } # Polymer
60
61
62
63 # Angle, dihedral and improper interactions between monomers will be generated
64 # automatically according to the instructions in the "forcefield.lt" file.