Skip to content

Commit

Permalink
several cosmetic changes including corrections to documentation as we…
Browse files Browse the repository at this point in the history
…ll as corrections to comments that appear in the new OPLSAA examples
  • Loading branch information
jewettaij committed Dec 4, 2024
1 parent 5f67691 commit e10f1f2
Show file tree
Hide file tree
Showing 193 changed files with 36 additions and 40 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Moltemplate was intended for building custom coarse-grained molecular models,
but it can be used to prepare realistic all-atom simulations as well.
It currently supports the
[**OPLSAA**(2023)](./examples/all_atom/force_field_OPLSAA),
[**OPLSUA**](./examples/all_atom/force_field_OPLSUA_united_atom),
[**OPLSUA**(2008)](./examples/all_atom/legacy_force_field_examples/force_field_OPLSUA_united_atom),
[**LOPLS**(2015)](./examples/all_atom/force_field_OPLSAA/hexadecane),
[**AMBER**(GAFF,GAFF2)](./examples/all_atom/force_field_AMBER),
[**DREIDING**](./examples/all_atom/force_field_DREIDING),
Expand Down
17 changes: 8 additions & 9 deletions examples/all_atom/force_field_OPLSAA/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@ This directory contains some examples of all-atom simulations using the OPLSAA f

### WARNING

There is no gaurantee that simulations prepared using moltemplate will reproduce the behavior of other MD codes. If you notice a problem with these examples, please report it. Peer-review is the only way to improve this software (or any software). (jewett.aij @ gmail.com)
There is no guarantee that simulations prepared using moltemplate will reproduce the behavior of other MD codes. If you notice a problem with these examples, please report it. Peer-review is the only way to improve this software (or any software). (jewett.aij @ gmail.com)


### Duplicate dihedrals, angles, and bonds

Sometimes OPLSAA has multiple plausible choices for the dihedral forces
between atoms in your molecules.
(This also sometimes occurs for angles and bonds.)
When this happens, a "warning_duplicate_dihedrals.txt" file will be
generated. *You can ignore these files*. But if you want to maximize
the accuracy of your simulation, you should read the warning messages
in those files and modify your .lt files accordingly.
- The new (2023) version of OPLSAA gives you many additional choices for your dihedral, angle, and bond interactions. This makes it possible for you to improve your simulation accuracy, but it also requires more effort on your part. To see the list of choices, you must now run moltemplate with the "-report-duplicates bytype __" arguments. For example:
```
moltemplate.sh system.lt -report-duplicates bytype __
```
- If you see a file named "warning_duplicate_dihedrals.txt", "warning_duplicate_angles.txt", "warning_duplicate_bonds.txt", or "warning_duplicate_impropers.txt" after running moltemplate, then it is a good idea to read the first few warning messages
in those files and modify your .lt files accordingly (for example, by adding a custom "Data Dihedrals" section).

Several example .lt files demonstrate how to do that:
Several example .lt files demonstrate how to do that, including:
- butane/moltemplate_files/butane.lt
- benzene+benzoic_acid/moltemplate_files/benzoic_acid.lt

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
Ethylene, Benzene mixture
Benzene, Benzoic Acid mixture
==============
A mixture of two small organic molecules using the *OPLSAA* force field. In this example, the ethylene molecules were initially arranged in a rectangular lattice. The benzene molecules were also arranged in a lattice, and were shifted to avoid overlap with the ethylene molecules. *(Alternatively, you can create a single lattice and specify the number of ethelene and benzene molecules you want in it using moltemplate's "new random([],[])" command, which is explained in [the manual](https://moltemplate.org/doc/moltemplate_manual.pdf#subsubsection.8.9.1). This gives you more control over the concentration of each ingredient. You can also use PACKMOL to create random mixtures of molecules.)*
A mixture of two small organic molecules using the *OPLSAA* force field. In this example, the benzene molecules were initially arranged in a rectangular lattice. The benzoic acid molecules were also arranged in a lattice, and were shifted to avoid overlap with the benzoic acid molecules. *(Alternatively, you can create a single lattice and specify the number of ethelene and benzene molecules you want in it using moltemplate's "new random([],[])" command, which is explained in [the manual](https://moltemplate.org/doc/moltemplate_manual.pdf#subsubsection.8.9.1). This gives you more control over the concentration of each ingredient. You can also use PACKMOL to create random mixtures of molecules.)*

#### Images

<img src="images/ethylene.jpg" width=110> <img src="images/plus.svg" height=80> <img src="images/benzene.jpg" width=110> <img src="images/rightarrow.svg" height=80> <img src="images/ethylene+benzene_t=0_LR.jpg" width=150> <img src="images/rightarrow.svg" height=80> <img src="images/ethylene+benzene_50bar_t=100000_LR.jpg" width=150>

The number of molecules, positions, and simulation box size can be controlled by editing the [system.lt file](moltemplate_files/system.lt). The simulation contitions can be controlled by editing the [run.in.npt file](run.in.npt).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,36 @@ import "oplsaa.lt"
# For this simple molecule, most of the atom types from OPLSAA were easy to guess:
#
# See the "oplsaa.lt" file for explanation of atom types. Excerpt:
# Atom type @atom:145 corresponds to "C | Benzene C"
# Atom type @atom:146 corresponds to "H | Benzene H"
# Atom type @atom:165 corresponds to "C | Cipso in styrene"
# Atom type @atom:267 corresponds to "C | Co in CCOOH carboxylic acid" (generic)
# Atom type @atom:470 corresponds to "C | Co in benzoic acid" (use this instead)
# Atom type @atom:268 corresponds to "O | Oh in CCOOH R in RCOOH is"
# Atom type @atom:269 corresponds to "O | Oc in CCOOH neutral; use 135-140"
# Atom type @atom:270 corresponds to "H | H in CCOOH"
# Atom type @atom:145 corresponds to "C - CA | Benzene C"
# Atom type @atom:146 corresponds to "H - HA | Benzene H"
# Atom type @atom:165 corresponds to "C - CA | Cipso in styrene"
# Atom type @atom:267 corresponds to "C - C~ | Co in CCOOH carboxylic acid" (generic)
# Atom type @atom:470 corresponds to "C - C~ | Co in benzoic acid" (use this instead)
# Atom type @atom:268 corresponds to "O - OH | Oh in CCOOH R in RCOOH is"
# Atom type @atom:269 corresponds to "O - O~ | Oc in CCOOH neutral; use 135-140"
# Atom type @atom:270 corresponds to "H - HO | H in CCOOH"


BenzoicAcid inherits OPLSAA {

# atom-id mol-id atom-type charge X Y Z # comment

write("Data Atoms") {
$atom:co $mol @atom:470 0.0 1.647 -0.077 0.001 # C | Co in benzoic acid
$atom:o1 $mol @atom:269 0.0 2.221 -1.147 0.001 # O | Oc in CCOOH neutral
$atom:o2 $mol @atom:268 0.0 2.357 1.068 -0.004 # O⋄ | Oh in CCOOH R in RCOOH
$atom:ho2 $mol @atom:270 0.0 3.321 0.987 -0.007 # H⋄ | H in CCOOH
$atom:c1 $mol @atom:165 0.0 0.171 -0.030 0.000 # C⋄ | Cipso in styrene"
$atom:c2 $mol @atom:145 0.0 -0.569 -1.214 -0.000 # C⋄ | Benzene C
$atom:c3 $mol @atom:145 0.0 -1.947 -1.163 -0.001 # C⋄ | Benzene C
$atom:c4 $mol @atom:145 0.0 -2.597 0.058 -0.002 # C⋄ | Benzene C
$atom:c5 $mol @atom:145 0.0 -1.871 1.236 -0.002 # C⋄ | Benzene C
$atom:c6 $mol @atom:145 0.0 -0.492 1.199 0.006 # C⋄ | Benzene C
$atom:h2 $mol @atom:146 0.0 -0.062 -2.168 -0.000 # H⋄ | Benzene H
$atom:h3 $mol @atom:146 0.0 -2.520 -2.078 -0.001 # H⋄ | Benzene H
$atom:h4 $mol @atom:146 0.0 -3.677 0.093 -0.003 # H⋄ | Benzene H
$atom:h5 $mol @atom:146 0.0 -2.385 2.186 -0.002 # H⋄ | Benzene H
$atom:h6 $mol @atom:146 0.0 0.074 2.119 0.011 # H⋄ | Benzene H
$atom:co $mol @atom:470 0.0 1.647 -0.077 0.001 # C~ | Co in benzoic acid
$atom:o1 $mol @atom:269 0.0 2.221 -1.147 0.001 # O~ | Oc in CCOOH neutral
$atom:o2 $mol @atom:268 0.0 2.357 1.068 -0.004 # OH | Oh in CCOOH R in RCOOH
$atom:ho2 $mol @atom:270 0.0 3.321 0.987 -0.007 # HO | H in CCOOH
$atom:c1 $mol @atom:165 0.0 0.171 -0.030 0.000 # CA | Cipso in styrene"
$atom:c2 $mol @atom:145 0.0 -0.569 -1.214 -0.000 # CA | Benzene C
$atom:c3 $mol @atom:145 0.0 -1.947 -1.163 -0.001 # CA | Benzene C
$atom:c4 $mol @atom:145 0.0 -2.597 0.058 -0.002 # CA | Benzene C
$atom:c5 $mol @atom:145 0.0 -1.871 1.236 -0.002 # CA | Benzene C
$atom:c6 $mol @atom:145 0.0 -0.492 1.199 0.006 # CA | Benzene C
$atom:h2 $mol @atom:146 0.0 -0.062 -2.168 -0.000 # HA | Benzene H
$atom:h3 $mol @atom:146 0.0 -2.520 -2.078 -0.001 # HA | Benzene H
$atom:h4 $mol @atom:146 0.0 -3.677 0.093 -0.003 # HA | Benzene H
$atom:h5 $mol @atom:146 0.0 -2.385 2.186 -0.002 # HA | Benzene H
$atom:h6 $mol @atom:146 0.0 0.074 2.119 0.011 # HA | Benzene H
}

# Note1: LAMMPS expects an integer in the 2nd column (the Molecule-ID number).
Expand Down
4 changes: 2 additions & 2 deletions moltemplate/force_fields/loplsaa2008.lt
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,12 @@ OPLSAA {
# a couple papers describing the LOPLS force field.

write_once("log.cite.loplsaa") {
If you use any atom types from the "loplsaa.lt" file whose description (in
If you use any atom types from the "loplsaa2008.lt" file whose description (in
the "In Charges" section) contains "LOPLS,2012", here is the relevant paper:
Sui, Pluhackova, Böckmann, J.Chem.Theory.Comp (2012), 8(4),1459
https://doi.org/10.1021/ct200908r

If you use any atom types from the "loplsaa.lt" file whose description (in
If you use any atom types from the "loplsaa2008.lt" file whose description (in
the "In Charges" section) contains "LOPLS,2015", here is the relevant paper:
Pluhackova,...,Böckmann, J.Phys.Chem.B (2015), 119(49), 15287
https://doi.org/10.1021/acs.jpcb.5b08569
Expand Down

0 comments on commit e10f1f2

Please sign in to comment.