| 1 |
|
| 2 |
import "gaff2.lt" |
| 3 |
|
| 4 |
# The "gaff2.lt" file is usually located in "force_fields" subdirectory |
| 5 |
# of the moltemplate distribution. |
| 6 |
# It contains definitions of the atoms "c2", "hc", as well as the bonded |
| 7 |
# and non-bonded interactions between them (and many other atoms). |
| 8 |
# |
| 9 |
# WARNING: CHARGES ARE INCORRECT |
| 10 |
# For this example, I manually looked up the charge of each atom using the |
| 11 |
# OPLSAA parameters from the "oplsaa.prm" file distributed with TINKER: |
| 12 |
# http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm |
| 13 |
# -----> DO NOT DO THIS! <----- |
| 14 |
# Normally simulations in AMBER are assigned charges using the |
| 15 |
# "HF/6-31G* RESP2" or "AM1-BCC3" methods using AmberTools. |
| 16 |
# Using the OPLSAA charges instead will NOT reproduce the behavior of AMBER. |
| 17 |
# For more details how to calculate charges correctly, see: |
| 18 |
# https://github.com/jewettaij/moltemplate/blob/master/examples/all_atom/force_field_AMBER/README.md |
| 19 |
|
| 20 |
|
| 21 |
Ethylene inherits GAFF2 { |
| 22 |
|
| 23 |
# atom-id mol-id atom-type charge X Y Z |
| 24 |
|
| 25 |
write('Data Atoms') { |
| 26 |
$atom:c1 $mol @atom:c2 -0.23 -0.6695 0.000000 0.000000 |
| 27 |
$atom:c2 $mol @atom:c2 -0.23 0.6695 0.000000 0.000000 |
| 28 |
$atom:h11 $mol @atom:hc 0.115 -1.234217 -0.854458 0.000000 |
| 29 |
$atom:h12 $mol @atom:hc 0.115 -1.234217 0.854458 0.000000 |
| 30 |
$atom:h21 $mol @atom:hc 0.115 1.234217 -0.854458 0.000000 |
| 31 |
$atom:h22 $mol @atom:hc 0.115 1.234217 0.854458 0.000000 |
| 32 |
} |
| 33 |
|
| 34 |
write('Data Bond List') { |
| 35 |
$bond:c12 $atom:c1 $atom:c2 |
| 36 |
$bond:c1h1 $atom:c1 $atom:h11 |
| 37 |
$bond:c1h2 $atom:c1 $atom:h12 |
| 38 |
$bond:c2h1 $atom:c2 $atom:h21 |
| 39 |
$bond:c2h2 $atom:c2 $atom:h22 |
| 40 |
} |
| 41 |
|
| 42 |
} # Ethylene |
| 43 |
|