Skip to content

Commit

Permalink
updated the "build_your_own_force_field" example for compatibility wi…
Browse files Browse the repository at this point in the history
…th OPLSAA2023
  • Loading branch information
jewettaij committed Dec 8, 2024
1 parent 87122bc commit 528dfae
Show file tree
Hide file tree
Showing 8 changed files with 145 additions and 162 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import "oplsaa.lt"




CH2 inherits OPLSAA {

# atom-id mol-id atom-type charge x y z
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import "oplsaa.lt"
# (If you want to customize this file files, download it and copy it to this folder.)



CH3 inherits OPLSAA {

# atom-id mol-id atom-type charge x y z
Expand Down
240 changes: 114 additions & 126 deletions moltemplate/force_fields/build_your_own_force_field/oplsaa_simple.lt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# it to change the length of the alkane chain.


import "ch2group.lt" # load the definition of the "CH2" object
import "ch3group.lt" # load the definition of the "CH3" object
import "ch2.lt" # load the definition of the "CH2" object
import "ch3.lt" # load the definition of the "CH3" object



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ CH2 inherits OPLSAA {
# atom-id mol-id atom-type charge x y z

write("Data Atoms") {
$atom:C $mol:... @atom:CT2 0.0 0.000000 0.000000 0.000000
$atom:H1 $mol:... @atom:HCal 0.0 0.000000 0.631044 0.892431
$atom:H2 $mol:... @atom:HCal 0.0 0.000000 0.631044 -0.892431
$atom:C $mol:... @atom:CT2H 0.0 0.000000 0.000000 0.000000
$atom:H1 $mol:... @atom:HCan 0.0 0.000000 0.631044 0.892431
$atom:H2 $mol:... @atom:HCan 0.0 0.000000 0.631044 -0.892431
}

write('Data Bond List') {
$bond:CH1 $atom:C $atom:H1
$bond:CH2 $atom:C $atom:H2
}

# Atom type numbers (@atom:80L,@atom:85LCH3) are defined in "loplsaa.lt":
# @atom:80L "Alkane CH3- (LOPLS CT_CH3)"
# @atom:81L "Alkane -CH2- (LOPLS CT_CH2)"
# @atom:85LCH3 "Alkane H-C CH3 (LOPLS HC_CH3)"
# @atom:85LCH2 "Alkane H-C CH2 (LOPLS HC_CH2)"
# Atom type numbers (@atom:CT2H,@atom:HCan) are defined in "oplsaa_simple.lt":
# @atom:CT3H "C - CT | -CH3 C: alkane"
# @atom:CT2H "C - CT | -CH2- C: alkanes"
# @atom:HCan "H - HC | H: alkanes"
# In this example, atomic charges are generated by atom type (according to the
# rules in loplsaa.lt), and can be omitted. Just leave them as "0.00" for now.
# rules in oplsaa_simple.lt), and can be omitted. Just leave them as "0.00".
#
# The "..." in "$mol:..." tells moltemplate that this molecule may be part
# of a larger molecule, and (if so) to use the larger parent object's
# molecule id number as it's own.
Expand All @@ -43,14 +43,6 @@ CH2 inherits OPLSAA {











# Optional: Shift all the coordinates in the +Y direction by 0.4431163.
# This way, the carbon atom is no longer located at 0,0,0, but the
# axis of an alkane chain containing this monomer is at 0,0,0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ CH3 inherits OPLSAA {
# atom-id mol-id atom-type charge x y z

write("Data Atoms") {
$atom:C $mol:... @atom:CT3 0.0 0.000000 0.000000 0.000000
$atom:H1 $mol:... @atom:HCal 0.0 0.000000 0.631044 0.892431
$atom:H2 $mol:... @atom:HCal 0.0 0.000000 0.631044 -0.892431
$atom:H3 $mol:... @atom:HCal 0.0 -0.892431 -0.631044 0.000000
$atom:C $mol:... @atom:CT3H 0.0 0.000000 0.000000 0.000000
$atom:H1 $mol:... @atom:HCan 0.0 0.000000 0.631044 0.892431
$atom:H2 $mol:... @atom:HCan 0.0 0.000000 0.631044 -0.892431
$atom:H3 $mol:... @atom:HCan 0.0 -0.892431 -0.631044 0.000000
}

write('Data Bond List') {
Expand All @@ -26,15 +26,18 @@ CH3 inherits OPLSAA {
$bond:CH3 $atom:C $atom:H3
}

} # CH3







# Atom type numbers (@atom:CT3H,@atom:HCan) are defined in "oplsaa_simple.lt":
# @atom:CT3H "C - CT | -CH3 C: alkane"
# @atom:CT2H "C - CT | -CH2- C: alkanes"
# @atom:HCan "H - HC | H: alkanes"
# In this example, atomic charges are generated by atom type (according to the
# rules in oplsaa_simple.lt), and can be omitted. Just leave them as "0.00".
#
# The "..." in "$mol:..." tells moltemplate that this molecule may be part
# of a larger molecule, and (if so) to use the larger parent object's
# molecule id number as it's own.

} # CH3



Expand Down
4 changes: 2 additions & 2 deletions moltemplate/scripts/moltemplate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# Copyright (c) 2013

G_PROGRAM_NAME="moltemplate.sh"
G_VERSION="2.21.2"
G_DATE="2024-12-04"
G_VERSION="2.22.0"
G_DATE="2024-12-07"

echo "${G_PROGRAM_NAME} v${G_VERSION} ${G_DATE}" >&2
echo "" >&2
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@

url='https://github.com/jewettaij/moltemplate',

download_url='https://github.com/jewettaij/moltemplate/archive/v2.21.2.zip',
download_url='https://github.com/jewettaij/moltemplate/archive/v2.22.0.zip',

version='2.21.2',
version='2.22.0',

keywords=['simulation', 'LAMMPS', 'molecule editor', 'molecule builder',
'ESPResSo'],
Expand Down

0 comments on commit 528dfae

Please sign in to comment.