git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13900 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2015-08-19 14:33:40 +00:00
parent 83c1ac662d
commit 7be9bc38a2
618 changed files with 0 additions and 136681 deletions

View File

@ -1,28 +0,0 @@
Author: Andrew Jewett, Shea Group, http://www.chem.ucsb.edu/~sheagroup/
Copyright (c) 2014, Regents of the University of California
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the University of California, Santa Barbara nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,61 +0,0 @@
-- Description: --
Moltemplate is a cross-platform text-based molecule builder for LAMMPS.
-- Typical usage: --
moltemplate.sh [-atomstyle style] [-pdb/-xyz coord_file] [-vmd] system.lt
-- Web page: --
Documentation, examples, and supporting code can be downloaded at:
http://www.moltemplate.org
The most up-to-date version of moltemplate can be downloaded here.
(After download, you can unpack the archive using:
tar xzf moltemplate_2012-3-31.tar.gz
The date will vary from version to version.)
----------------------------------------------------
---------- INSTALLATION INSTRUCTIONS: ------------
----------------------------------------------------
This directory should contain two folders:
src/ <-- location of all python and bash scripts
common/ <-- location of shared force fields and molecules
The ``moltemplate.sh'' script and the python scripts that it invokes are
located in the ``src/'' subdirectory. You should update your PATH environment
variable to include this directory.
If you do not know what a PATH environment variable is, read:
http://www.linfo.org/path_env_var.html
(I receive this question often.)
It is also a good idea to set your MOLTEMPLATE_PATH environment variable to
point to the ``common/'' subdirectory.
(Force fields and commonly used molecules will eventually be located here.)
-- Installation example ---
Suppose the directory with this README.TXT file is located at ~/moltemplate.
If you use the bash shell, typically you would edit your
~/.profile, ~/.bash_profile or ~/.bashrc files to contain the following lines:
export PATH="$PATH:$HOME/moltemplate/src"
export MOLTEMPLATE_PATH="$HOME/moltemplate/common"
If you use the tcsh shell, typically you would edit your
~/.login, ~/.cshrc, or ~/.tcshrc files to contain the following lines:
setenv PATH "$PATH:$HOME/moltemplate/src"
setenv MOLTEMPLATE_PATH "$HOME/moltemplate/common"
-- Requirements: --
Moltemplate requires the Bourne-shell, and a recent version of python
(2.7, 3.0 or higher), and can run on OS X, linux, or windows (if a
suitable shell environment has been installed).
-- License: --
Moltemplate is available under the terms of the open-source 3-clause BSD
license. (See LICENSE.TXT.)

View File

@ -1,74 +0,0 @@
This directory contains scripts used for converting AMBER parameter files
into moltemplate (.LT) format. When a newer version of the AMBER parameters
is eventually published, you can use these scripts to convert the new files
again. (Some tinkering may be necessary.)
The main bash script is a wrapper which simply splits up the parameter (".dat")
file into fragments which (it thinks) correspond to the mass, pair, bond,
angle, dihedral, and improper section of the original .dat file.
(However sometimes it gets this wrong and you have to split it up manually!)
Then this bash script invokes the relevant python script to convert
each section into .LT format:
amberparm_to_mass.py
amberparm_to_pair.py
amberparm_to_bond.py
amberparm_to_angle.py
amberparm_to_dihedral.py
amberparm_to_improper.py
In case this goes wrong, you may have to run these scripts manaully.
Find out how to run this bash script by invoking it without any arguments:
./amberparm2lt.sh
------------ IMPORTANT ------------
BEFORE YOU RUN THIS SCRIPT, BE SURE TO CHANGE THE ORDER OF THE IMPROPER DIHEDRAL
PARAMETERS SO THAT THE "SPECIFIC" IMPROPER DIHEDRALS APPEAR LAST, AND THE
"GENERIC" IMPROPER DIHEDRALS APPEAR FIRST.
For example replace these two lines:
X -o -c -o 1.1 180. 2. JCC,7,(1986),230
X -X -c -o 10.5 180. 2. JCC,7,(1986),230
with these two lines:
X -X -c -o 10.5 180. 2. JCC,7,(1986),230
X -o -c -o 1.1 180. 2. JCC,7,(1986),230
Why:
This is the order that moltemplate expects: generic first. specific last.
So far only the improper dihedral parameters in the gaff.dat file seem
to violate this order. The bonds, angles and dihedrals seem to obey this,
but check to make sure.
There is a discussion of these parameters here:
http://structbio.vanderbilt.edu/archives/amber-archive/2005/3444.php
excerpt:
> > In the parm99 file (for example), sometimes the wild-card is used, as it
> > is done in the following example:
> >
> > X -X -C -O 10.5 180. 2. JCC,7,(1986),230
> >
> > The first example is the specific case while the second one is the generic
> > case. In page # 257 of the AMBER Manual, it is talking about Dihedral
> > Angle, and how these dihedral parameters are used to calculate the
> > energies. I am wondering what the difference between generic and specific
> > case is for improper torsions.
>
> "specific" torsions are search for first, and used if a match is found. If
> no match is found, then a search is made to see if a "generic" (aka wild-card)
> torsion with match.
> ...good luck...dac
Good luck
-Andrew
2014-4-19

View File

@ -1,203 +0,0 @@
#!/bin/sh
SYNTAX_MSG=$(cat <<EOF
Typical Usage:
amberparm2lt.sh gaff.dat GAFF > gaff.lt
You can also try:
amberparm2lt.sh parm94.dat "AMBERFF94 inherits GAFF" > amberff94.lt
(However, this later usage may not work.
You may need to manually split the .dat file and run these scripts instead:
amberparm_pair_to_lt.py, amberparm_bond_to_lt.py, amberparm_angle_to_lt.py...)
Be sure that all of these .py files are in your PATH as well.)
EOF
)
if [ "$#" != "2" ]; then
echo "${SYNTAX_MSG}" >&2
echo "" >&2
echo "Error: This script requires two arguments," >&2
echo " 1) the name of the amber parm file to be converted (eg \"gaff.dat\")" >&2
echo " 2) the name of the moltemplate object to be created (eg \"GAFF\")" >&2
echo " (This may include the \"inherits\" keyword and parent classes.)" >&2
exit 1
fi
MOLTEMPLATE_USAGE_MSG=$(cat <<EOF
# Background information and usage explanation:
# This file contanis a list of atom types and rules for generating bonded
# interactions between these atoms (hopefully) according to AMBER conventions.
# By using the atom types shown below in your own molecules, bonds and angular
# interactions will be automatically generated.
# AMBER (GAFF) force-field parameters will also be assigned to each angle
# interaction (according to these atom types).
# One way to apply the GAFF force field to a particular type of molecule, is
# to use the "inherits" keyword when you define that molecule. For example:
# import("gaff.lt")
# MoleculeType inherits GAFF {
# write_once("Data Atoms") {
# \$atom:C1 \$mol:... @atom:cx 0.0 4.183 3.194 13.285
# \$atom:C2 \$mol:... @atom:cx 0.0 4.291 4.618 13.382
# : : :
# }
# }
#(See "Inheritance" and "short names vs. full names" in the moltemplate manual.)
EOF
)
# (Note that the full name of the atom type in this example is "@atom:/GAFF/cx"
# You can always refer to atom types this way as well. Using "inherits GAFF"
# allows you to use more conventient "@atom:cx" shorthand notation instead.)
echo "####################################################################"
echo "# To use this, LAMMPS currently must be compiled with the USER-MISC package."
echo "# (Type \"make yes-user-misc\" into the shell before compiling LAMMPS.)"
echo "####################################################################"
echo "# This moltemplate (LT) file was generated automatically using"
echo "# amberparm2lt.sh $1 $2"
echo "####################################################################"
echo "$MOLTEMPLATE_USAGE_MSG"
echo "####################################################################"
echo "# Moltemplate can not assign atom charge. You must assign atomic"
echo "# charges yourself. (Moltemplate is only a simple text manipulation tool.)"
echo "####################################################################"
echo ""
echo ""
if ! which ./amberparm_mass_to_lt.py > /dev/null; then
echo "\nError: \"amberparm_mass_to_lt.py\" not found.\n" >&2
echo " (Try running this script from the directory containing amberparm2lt.sh)" >&2
exit 2
fi
if ! which ./amberparm_pair_to_lt.py > /dev/null; then
echo "\nError: \"amberparm_pair_to_lt.py\" not found.\n" >&2
echo " (Try running this script from the directory containing amberparm2lt.sh)" >&2
exit 2
fi
if ! which ./amberparm_bond_to_lt.py > /dev/null; then
echo "\nError: \"amberparm_bond_to_lt.py\" not found.\n" >&2
echo " (Try running this script from the directory containing amberparm2lt.sh)" >&2
exit 2
fi
if ! which ./amberparm_angle_to_lt.py > /dev/null; then
echo "\nError: \"amberparm_angle_to_lt.py\" not found.\n" >&2
echo " (Try running this script from the directory containing amberparm2lt.sh)" >&2
exit 2
fi
if ! which ./amberparm_dihedral_to_lt.py > /dev/null; then
echo "\nError: \"amberparm_dihedral_to_lt.py\" not found.\n" >&2
echo " (Try running this script from the directory containing amberparm2lt.sh)" >&2
exit 2
fi
if ! which ./amberparm_improper_to_lt.py > /dev/null; then
echo "\nError: \"amberparm_improper_to_lt.py\" not found. (Update your PATH?)\n" >&2
echo " (Try running this script from the directory containing amberparm2lt.sh)" >&2
exit 2
fi
#PARM_FILE='gaff.dat'
PARM_FILE=$1
# sections are separated by blank lines
# some sections have comment lines at the beginning
# The 1st section is the mass (note: skip the first line)
tail -n +2 < "$PARM_FILE" | \
awk -v n=1 '{if (NF==0) nblanks++; else {if (nblanks+1==n) print $0}}' \
> "${PARM_FILE}.mass"
# The 2nd section has the list of 2-body bond force-field params
awk -v n=2 '{if (NF==0) nblanks++; else {if (nblanks+1==n) print $0}}' \
< "$PARM_FILE" \
| tail -n +2 \
> "${PARM_FILE}.bond"
# The 3rd section has the list of 3-body angle force-field params
awk -v n=3 '{if (NF==0) nblanks++; else {if (nblanks+1==n) print $0}}' \
< "$PARM_FILE" \
> "${PARM_FILE}.angle"
# The 4th section has the list of 4-body dihedral force-field params
awk -v n=4 '{if (NF==0) nblanks++; else {if (nblanks+1==n) print $0}}' \
< "$PARM_FILE" \
> "${PARM_FILE}.dihedral"
# The 5th section has the list of 4-body improper force-field params
awk -v n=5 '{if (NF==0) nblanks++; else {if (nblanks+1==n) print $0}}' \
< "$PARM_FILE" \
> "${PARM_FILE}.improper"
# The 6th section has the hbond-parameters (no-longer used. ignore)
awk -v n=6 '{if (NF==0) nblanks++; else {if (nblanks+1==n) print $0}}' \
< "$PARM_FILE" \
> "${PARM_FILE}.hbond"
# The 7th "section" is just a blank line. (skip that)
# The 8th section has the list of non-bonded ("pair") force-field parameters
awk -v n=8 '{if (NF==0) nblanks++; else {if (nblanks+1==n) print $0}}' \
< "$PARM_FILE" \
| tail -n +2 \
> "${PARM_FILE}.pair"
./amberparm_mass_to_lt.py < "${PARM_FILE}.mass" > "${PARM_FILE}.mass.lt"
./amberparm_pair_to_lt.py < "${PARM_FILE}.pair" > "${PARM_FILE}.pair.lt"
./amberparm_bond_to_lt.py < "${PARM_FILE}.bond" > "${PARM_FILE}.bond.lt"
./amberparm_angle_to_lt.py < "${PARM_FILE}.angle" > "${PARM_FILE}.angle.lt"
./amberparm_dihedral_to_lt.py \
< "${PARM_FILE}.dihedral" > "${PARM_FILE}.dihedral.lt"
./amberparm_improper_to_lt.py \
< "${PARM_FILE}.improper" > "${PARM_FILE}.improper.lt"
echo "$2 {"
echo ""
echo " # ----------------------------------------------------------------------"
#echo " # This file was automatically generated by \"common/amber/amberparm2lt.sh\""
echo " # The basic atom nomenclature and conventions are explained here:"
echo " # http://ambermd.org/antechamber/gaff.pdf"
echo " # For reference, the original gaff.dat file and format documenation are here:"
echo " # http://ambermd.org/AmberTools-get.html"
echo " # http://ambermd.org/formats.html#parm.dat"
echo " # ----------------------------------------------------------------------"
echo ""
cat "$PARM_FILE.mass.lt" \
"$PARM_FILE.pair.lt" \
"$PARM_FILE.bond.lt" \
"$PARM_FILE.angle.lt" \
"$PARM_FILE.dihedral.lt" \
"$PARM_FILE.improper.lt"
AMBER_STYLES_INIT=$(cat <<EOF
write_once("In Init") {
# Default styles and settings for AMBER based force-fields:
units real
atom_style full
bond_style hybrid harmonic
angle_style hybrid harmonic
dihedral_style hybrid fourier
improper_style hybrid cvff
pair_style hybrid lj/charmm/coul/long 9.0 10.0 10.0
kspace_style pppm 0.0001
# NOTE: If you do not want to use long-range coulombic forces,
# comment out the two lines above and uncomment this line:
# pair_style hybrid lj/charmm/coul/charmm 9.0 10.0
pair_modify mix arithmetic
special_bonds amber
}
EOF
)
echo "$AMBER_STYLES_INIT"
echo ""
echo "}"
echo ""
echo ""

View File

@ -1,50 +0,0 @@
#!/usr/bin/env python
import sys
lines_gaff = sys.stdin.readlines()
angle_style_name = 'harmonic'
sys.stdout.write(' write_once("In Settings") {\n')
for i in range(0, len(lines_gaff)):
line = lines_gaff[i]
atypes = line[:8].split('-')
atype1 = atypes[0].strip()
atype2 = atypes[1].strip()
atype3 = atypes[2].strip()
at1 = atype1.replace('X','*')
at2 = atype2.replace('X','*')
at3 = atype3.replace('X','*')
angletype = '@angle:'+atype1+'-'+atype2+'-'+atype3
tokens= line[8:].split()
keq = tokens[0]
req = tokens[1]
comments=' '.join(tokens[2:])
sys.stdout.write(' angle_coeff '+angletype+' '+angle_style_name+' '+keq+' '+req+' # '+comments+'\n')
sys.stdout.write(' } # (end of angle_coeffs)\n')
sys.stdout.write('\n')
sys.stdout.write(' write_once("Data Angles By Type") {\n')
for i in range(0, len(lines_gaff)):
line = lines_gaff[i]
atypes = line[:8].split('-')
atype1 = atypes[0].strip()
atype2 = atypes[1].strip()
atype3 = atypes[2].strip()
at1 = atype1.replace('X','*')
at2 = atype2.replace('X','*')
at3 = atype3.replace('X','*')
angletype = '@angle:'+atype1+'-'+atype2+'-'+atype3
#tokens= line[8:].split()
#keq = tokens[0]
#req = tokens[1]
#comments=' '.join(tokens[2:])
sys.stdout.write(' '+angletype+' @atom:'+at1+' @atom:'+at2+' @atom:'+at3+'\n')
sys.stdout.write(' } # (end of Angles By Type)\n')
sys.stdout.write('\n')

View File

@ -1,47 +0,0 @@
#!/usr/bin/env python
import sys
lines_gaff = sys.stdin.readlines()
bond_style_name = 'harmonic'
sys.stdout.write(' write_once("In Settings") {\n')
for i in range(0, len(lines_gaff)):
line = lines_gaff[i]
tokens= line.split()
atypes = line[:6].split('-')
atype1 = atypes[0].strip()
atype2 = atypes[1].strip()
at1 = atype1.replace('X','*')
at2 = atype2.replace('X','*')
bondtype = '@bond:'+atype1+'-'+atype2
tokens= line[5:].split()
keq = tokens[0]
req = tokens[1]
comments=' '.join(tokens[2:])
sys.stdout.write(' bond_coeff '+bondtype+' '+bond_style_name+' '+keq+' '+req+' # '+comments+'\n')
sys.stdout.write(' } # (end of bond_coeffs)\n')
sys.stdout.write('\n')
sys.stdout.write(' write_once("Data Bonds By Type") {\n')
for i in range(0, len(lines_gaff)):
line = lines_gaff[i]
atypes = line[:6].split('-')
atype1 = atypes[0].strip()
atype2 = atypes[1].strip()
at1 = atype1.replace('X','*')
at2 = atype2.replace('X','*')
bondtype = '@bond:'+atype1+'-'+atype2
#tokens= line[5:].split()
#keq = tokens[0]
#req = tokens[1]
#comments=' '.join(tokens[2:])
sys.stdout.write(' '+bondtype+' @atom:'+at1+' @atom:'+at2+'\n')
sys.stdout.write(' } # (end of Bonds By Type)\n')
sys.stdout.write('\n')

View File

@ -1,157 +0,0 @@
#!/usr/bin/env python
# SOME UGLY CODE HERE
import sys
lines_gaff = sys.stdin.readlines()
dihedral_style_name = 'fourier'
in_dihedral_coeffs = []
for i in range(0, len(lines_gaff)):
line = lines_gaff[i]
atypes = line[:11].split('-')
atype1 = atypes[0].strip()
atype2 = atypes[1].strip()
atype3 = atypes[2].strip()
atype4 = atypes[3].strip()
at1 = atype1.replace('X','*')
at2 = atype2.replace('X','*')
at3 = atype3.replace('X','*')
at4 = atype4.replace('X','*')
dihedraltype = '@dihedral:'+atype1+'-'+atype2+'-'+atype3+'-'+atype4
tokens= line[11:].split()
npth = float(tokens[0])
Kn = float(tokens[1])
Kn /= npth # The coeff for each fourier term is Kn/npth
# ...I THINK (?). (Very confusing. See documentation below...)
dn = float(tokens[2])
n = int(float(tokens[3]))
comments=' # '+(' '.join(tokens[4:]))
in_dihedral_coeffs.append([dihedraltype, Kn, n, dn, comments])
#print(Kn, n, dn)
#for entry in in_dihedral_coeffs:
# print(entry)
#exit()
# ---- processing dihedral fourier series ----
# ---- (negative "n" values means the
# ---- Fourier series is not yet complete.
i = 0
while i < len(in_dihedral_coeffs):
type_str = in_dihedral_coeffs[i][0]
Kn = in_dihedral_coeffs[i][1]
n = in_dihedral_coeffs[i][2]
dn = in_dihedral_coeffs[i][3]
#if (i>0):
# sys.stderr.write('prev_n='+str(in_dihedral_coeffs[i-1][-3])+'\n')
#sys.stderr.write('n='+str(n)+'\n')
if ((i>0) and (in_dihedral_coeffs[i-1][-3] < 0)):
#sys.stdout.write('interaction_before_append: '+str(in_dihedral_coeffs[i-1])+'\n')
assert(in_dihedral_coeffs[i-1][0] == in_dihedral_coeffs[i][0])
in_dihedral_coeffs[i-1][-3] = -in_dihedral_coeffs[i-1][-3]
comments = in_dihedral_coeffs[i-1][-1]
in_dihedral_coeffs[i-1][-1] = Kn
in_dihedral_coeffs[i-1].append(n)
in_dihedral_coeffs[i-1].append(dn)
in_dihedral_coeffs[i-1].append(comments)
#sys.stdout.write('interaction_after_append: '+str(in_dihedral_coeffs[i-1])+'\n')
del in_dihedral_coeffs[i]
#elif len(in_dihedral_coeffs) < 3:
# del in_dihedral_coeffs[i]
else:
i += 1
for i in range(0, len(in_dihedral_coeffs)):
type_str = in_dihedral_coeffs[i][0]
params = in_dihedral_coeffs[i][1:]
params = map(str, params)
num_fourier_terms = (len(params)-1)/3
dihedral_coeff_str = 'dihedral_coeff '+type_str+' '+\
dihedral_style_name+' '+ \
str(num_fourier_terms)+' '+ \
' '.join(params)
in_dihedral_coeffs[i] = dihedral_coeff_str
# ---- finished processing dihedral fourier series ----
sys.stdout.write(' write_once(\"In Settings\") {\n ')
sys.stdout.write('\n '.join(in_dihedral_coeffs)+'\n')
sys.stdout.write(' } # (end of dihedral_coeffs)\n')
sys.stdout.write('\n')
sys.stdout.write(' write_once("Data Dihedrals By Type") {\n')
for i in range(0, len(lines_gaff)):
line = lines_gaff[i]
atypes = line[:11].split('-')
atype1 = atypes[0].strip()
atype2 = atypes[1].strip()
atype3 = atypes[2].strip()
atype4 = atypes[3].strip()
at1 = atype1.replace('X','*')
at2 = atype2.replace('X','*')
at3 = atype3.replace('X','*')
at4 = atype4.replace('X','*')
dihedraltype = '@dihedral:'+atype1+'-'+atype2+'-'+atype3+'-'+atype4
sys.stdout.write(' '+dihedraltype+' @atom:'+at1+' @atom:'+at2+' @atom:'+at3+' @atom:'+at4+'\n')
sys.stdout.write(' } # (end of Dihedrals By Type)\n')
sys.stdout.write('\n')
"""
- 6 - ***** INPUT FOR DIHEDRAL PARAMETERS *****
IPT , JPT , KPT , LPT , IDIVF , PK , PHASE , PN
FORMAT(A2,1X,A2,1X,A2,1X,A2,I4,3F15.2)
IPT, ... The atom symbols for the atoms forming a dihedral
angle. If IPT .eq. 'X ' .and. LPT .eq. 'X ' then
any dihedrals in the system involving the atoms "JPT" and
and "KPT" are assigned the same parameters. This is
called the general dihedral type and is of the form
"X "-"JPT"-"KPT"-"X ".
IDIVF The factor by which the torsional barrier is divided.
Consult Weiner, et al., JACS 106:765 (1984) p. 769 for
details. Basically, the actual torsional potential is
(PK/IDIVF) * (1 + cos(PN*phi - PHASE))
PK The barrier height divided by a factor of 2.
PHASE The phase shift angle in the torsional function.
The unit is degrees.
PN The periodicity of the torsional barrier.
NOTE: If PN .lt. 0.0 then the torsional potential
is assumed to have more than one term, and the
values of the rest of the terms are read from the
next cards until a positive PN is encountered. The
negative value of pn is used only for identifying
the existence of the next term and only the
absolute value of PN is kept.
The input is terminated by a blank card.
"""

View File

@ -1,90 +0,0 @@
#!/usr/bin/env python
import sys
lines_gaff = sys.stdin.readlines()
improper_style_name = 'cvff'
sys.stdout.write(' write_once("In Settings") {\n')
for i in range(0, len(lines_gaff)):
line = lines_gaff[i]
atypes = line[:11].split('-')
atype1 = atypes[0].strip()
atype2 = atypes[1].strip()
atype3 = atypes[2].strip()
atype4 = atypes[3].strip()
at1 = atype1.replace('X','*')
at2 = atype2.replace('X','*')
at3 = atype3.replace('X','*')
at4 = atype4.replace('X','*')
impropertype = '@improper:'+atype1+'-'+atype2+'-'+atype3+'-'+atype4
#sys.stdout.write(' '+impropertype+' @atom:'+at1+' @atom:'+at2+' @atom:'+at3+' @atom:'+at4+'\n')
# Oops. This is incorrect.
# In moltemplate, the central atom is the first atom,
# In "gaff.dat", the central atom is the third atom
# http://archive.ambermd.org/201307/0519.html
#impropertype = '@improper:'+atype3+'-'+atype1+'-'+atype2+'-'+atype4
tokens= line[11:].split()
Kn = float(tokens[0])
dn = float(tokens[1])
n = int(float(tokens[2]))
comments=' '.join(tokens[3:])
if (dn < 0.001):
sys.stdout.write(' improper_coeff '+impropertype+' '+improper_style_name+' '+str(Kn)+' 1 '+str(n)+' # '+comments+'\n')
elif (179.999 < abs(dn) < 180.001):
sys.stdout.write(' improper_coeff '+impropertype+' '+improper_style_name+' '+str(Kn)+' -1 '+str(n)+' # '+comments+'\n')
else:
sys.stderr.write('Error: Illegal bondImproper parameters:\n'
' As of 2013-8-03, LAMMPS doens hot have an improper style\n'
' which can handle impropers with gamma != 0 or 180\n')
exit(-1)
sys.stdout.write(' } # (end of improper_coeffs)\n')
sys.stdout.write('\n')
sys.stdout.write(' write_once("Data Impropers By Type (gaff_imp.py)") {\n')
for i in range(0, len(lines_gaff)):
line = lines_gaff[i]
atypes = line[:11].split('-')
atype1 = atypes[0].strip()
atype2 = atypes[1].strip()
atype3 = atypes[2].strip()
atype4 = atypes[3].strip()
at1 = atype1.replace('X','*')
at2 = atype2.replace('X','*')
at3 = atype3.replace('X','*')
at4 = atype4.replace('X','*')
impropertype = '@improper:'+atype1+'-'+atype2+'-'+atype3+'-'+atype4
sys.stdout.write(' '+impropertype+' @atom:'+at1+' @atom:'+at2+' @atom:'+at3+' @atom:'+at4+'\n')
# The improper-angle is the angle between the planes
# defined by at1,at2,at3, and at2,at3,at3
# and we list the atoms in this order.
# NOTE: In "gaff.dat", the central atom is the third atom (at3)
# so we have to take this into account when matching atom order.
# http://archive.ambermd.org/201307/0519.html
sys.stdout.write(' } # (end of Impropers By Type)\n')
sys.stdout.write('\n')
# NOTE: AMBER documentation is not clear how the improper angle is defined.
# It's not clear if we should be using the dihedral angle between
# planes I-J-K and J-K-L. As of 2014-4, improper_style cvff does this.
# Even if we create improper interactions with the angle defined between
# the wrong planes, at least the minima should be the same
# (0 degrees or 180 degrees).
# So I'm not too worried we are getting this detail wrong long as
# we generate new impropers realizing that the 3rd atom (K) is the
# central atom (according to AMBER conventions).
#
# http://structbio.vanderbilt.edu/archives/amber-archive/2007/0408.php
#
# Currently, we only apply improper torsional angles for atoms
# in a planar conformations. Is it clear?
# Junmei

View File

@ -1,19 +0,0 @@
#!/usr/bin/env python
import sys
lines_gaff = sys.stdin.readlines()
sys.stdout.write(' write_once(\"Data Masses\") {\n')
for i in range(0, len(lines_gaff)):
line = lines_gaff[i]
tokens= line.split()
atype = tokens[0]
mass=tokens[1]
# what is the next number? (the one in tokens[2]?)
comments=' '.join(tokens[3:])
sys.stdout.write(' @atom:'+atype+' '+mass+' # '+comments+'\n')
sys.stdout.write(' } # (end of masses)\n')
sys.stdout.write('\n')

View File

@ -1,57 +0,0 @@
#!/usr/bin/env python
import sys
lines_gaff = sys.stdin.readlines()
#pair_style = 'lj/charmm/coul/long'
# NOTE: Long-range coulombic forces were disabled intentionally. (See below)
# If you want to use long-range electrostatics, uncomment these lines:
# Instead I use hybrid lj/charmm/coul/charmm by default, because
# LAMMPS complains if you attempt to use lj/charmm/coul/long on a
# system if it does not contain any charged particles.
# Currently, moltemplate does not assign atomic charge,
# so this problem occurs frequently.
#pair_style = 'lj/charmm/coul/charmm'
pair_style = 'lj/charmm/coul/long'
sys.stdout.write(' write_once(\"In Settings\") {\n')
for i in range(0, len(lines_gaff)):
line = lines_gaff[i]
tokens= line.split()
atype = tokens[0]
# UGGHHH
# OLD CODE:
#sig=tokens[1]
# CORRECTION #1
# It looks the number in this part of the file is an atom radii, not a
# diameter. In other words, this number is 0.5*sigma instead of sigma.
# So we multiply it by 2.0.
#sig=str(2.0*float(tokens[1]))
#
# CORRECTION #2
# It also appears as though they are using this convention for LennardJones
# U(r)=epsilon*((s/r)^12-2*(s/r)^6) instead of 4*eps*((s/r)^12-(s/r)^6)
# ...where "s" is shorthand for "sigma"..
# This means we must ALSO multiply sigma in gaff.dat by 2**(-1.0/6)
# (This change makes the two U(r) formulas equivalent.)
# I had to figure this out by iterations of trial and error.
# The official AMBER documentation is quite vague about the LJ parameters.
# My apologies to everyone effected by this bug! -Andrew 2014-5-19
# http://ambermd.org/formats.html#parm.dat
# http://structbio.vanderbilt.edu/archives/amber-archive/2009/5072.php)
sig=str(float(tokens[1])*2.0*pow(2.0, (-1.0/6.0)))
eps=tokens[2]
comments=' '.join(tokens[3:])
sys.stdout.write(' pair_coeff @atom:'+atype+' @atom:'+atype+' '+pair_style+' '+eps+' '+sig+' # '+comments+'\n')
sys.stdout.write(' } # (end of pair_coeffs)\n')
sys.stdout.write('\n')

File diff suppressed because it is too large Load Diff

View File

@ -1,55 +0,0 @@
# The minimal unit cell for graphine contains only 2 atoms:
# (which I arbitrarily named "C1" and "C2")
Graphene {
# atomID molID atomType charge x y z
write("Data Atoms") {
$atom:C1 $mol:... @atom:C 0.0 -0.61487803668695 -0.355 0.0000
$atom:C2 $mol:... @atom:C 0.0 0.61487803668695 0.355 0.0000
}
# Now define the "C" atom type
write_once("Data Masses") {
@atom:C 12.0
}
write_once("In Settings") {
# i j epsilon sigma
pair_coeff @atom:C @atom:C lj/cut/coul/long 0.068443 3.407
# These Lennard-Jones parameters come from
# R. Saito, R. Matsuo, T. Kimura, G. Dresselhaus, M.S. Dresselhaus,
# Chem Phys Lett, 348:187 (2001)
# Define a group consisting of only carbon atoms in graphene molecules
group Cgraphene type @atom:C
}
write_once("In Init") {
# -- Default styles (used in this file for graphene carbon) --
units real
atom_style full #(full enables you to to add other molecules later)
pair_style hybrid lj/cut/coul/long 10.0
}
} # Graphene
# This is a 2-dimensional hexagonal unit cell. The unit vectors are:
#
# (2.4595121467478, 0, 0)
# (1.2297560733739, 2.13, 0)
#
# You can create a sheet of single-layer graphene this way:
#
# small_crystal = new Graphene [3].move(2.45951214, 0, 0)
# [3].move(1.229756, 2.13, 0)
#
# For thicker sheets, follow the instructions in the "graphite.lt" file.
#
# Note: The length of each carbon-carbon bond is currently 1.42 Angstroms.
# To increase it to 1.422 Angstroms, uncomment the following line:
#
# Graphene.scale(1.0014084507042254) # 1.0014084507042254 = 1.422 / 1.42
#
# You will have to change the unit cell lattice vectors (see above) accordingly

View File

@ -1,61 +0,0 @@
import "graphene.lt" # defines "Graphene"
# ------------ Graphite -----------
#
# Note: For graphite: sheets stacked in the Z direction are separated by a
# distance of 3.35 Angstroms, and shifted in an alternating +/-Y direction
# by a distance of d (1.42 Angstroms). To add additional graphene layers
# you could use:
# sheet2 = new Graphene [10].move(2.4595121467478,0,0)
# [10].move(1.2297560733739,2.13,0)
# sheet2[*][*].move(0, 1.42, 3.35)
# sheet3 = new Graphene [10].move(2.4595121467478,0,0)
# [10].move(1.2297560733739,2.13,0)
# sheet3[*][*].move(0, -1.42, 6.70)
# etc...
#
# This should work fine.
# However, to build a thick sheet of graphite, it may be less trouble
# to use a 4-atom unit cell which includes two graphene layers.
# Here is one way to do that:
Graphite inherits Graphene {
# This allows us to access access the "@atom:C" carbon atom type
# whose properties are defined in the "Graphene" object (see "graphene.lt").
# That atom is NOT globally defined. It belongs to the "Graphene" object.
# This is one way to access it. Alternately, you could redefine it here
# atomID molID atomType charge x y z
write("Data Atoms") {
$atom:C1 $mol:... @atom:C 0.0 -0.61487803668695 -0.355 0.0
$atom:C2 $mol:... @atom:C 0.0 0.61487803668695 0.355 0.0
$atom:C3 $mol:... @atom:C 0.0 -0.61487803668695 1.065 3.35
$atom:C4 $mol:... @atom:C 0.0 0.61487803668695 1.775 3.35
}
# Note: The first two lines in the "Data Atoms" section override the positions
# of the $atom:C1 and $atom:C2 atoms previously defined in "Graphene"
# (which this object inherits). This is okay.
} # Graphite
# This is a 3-dimensional hexagonal unit cell. The unit vectors are:
#
# (2.4595121467478, 0, 0 )
# (1.2297560733739, 2.13, 0 )
# ( 0, 0, 6.70)
# Then you could create a thick sheet of graphite this way:
#
# graphite = new Graphite [10].move(2.4595121467478,0,0)
# [10].move(1.2297560733739,2.13,0)
# [5].move(0,0,6.70)
#
# (Your graphite slab will contain an even number of graphene sheets.)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -1,3 +0,0 @@
OPLSAA force-field conversion tools provided by Jason Lambert.

View File

@ -1,125 +0,0 @@
NOTE: THE "oplsaa_moltemplate.py" SCRIPT HAS MOVED TO THE "../src/" DIRECTORY.
(In the past, it was located in this directory.)
-----------------------------
Description:
Unfortunately, moltemplate does not come with a file containing OPLSAA
paramters which is ready to use. You must build it yourself.
This directory has tools and instructions to explain how to do this.
-----------------------------
When you want to run a new simulation, you must download the full
"oplsaa.prm" force-field file (from the TINKER web site) and manually
delete all the atom types which you do not need. (See below.)
Then you must use the "oplsaa_moltemplate.py" script to create
"oplsaa.lt" file which moltemplate.sh needs. Then you must run moltemplate.sh.
You must do this for each new simulation you plan to run which uses OPLSAA.
---- Details: ----
Download the original "oplsaa.prm" file here:
http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
or here:
http://dasher.wustl.edu/ffe/distribution/params/oplsaa.prm
and save this file as "oplsaa_subset.prm". Then you must EDIT THIS FILE
so that it only contains atom types you plan to have in your simulation
(see below). Finally, you must run the opls_moltemplate.py script this way:
python oplsaa_moltemplate.py oplsaa_subset.prm
This will create a file named "oplsaa.lt"
Look over the newly created "oplsaa.lt" file.
Then, if necessary, move this file to wherever you plan to run moltemplate.
There is a directory containing an example how to use this code located here:
examples/all_atom_examples/OPLSAA_force_field_examples/ethylene/moltemplate_files/oplsaa_lt_generator/README.TXT
----- DETAILS: Editing the "oplsaa_subset.prm" file -------
Again, before you run "oplsaa_moltemplate.py", you must edit the "oplsaa.prm"
file (or "oplsaa_subset.prm file) and eliminate atom types which do not
correspond to any of the atoms in your simulation. This means you must
look for lines near the beginning of this file which begin with the word "atom"
and refer to atom types which appear in the simulation you plan to run. All
other lines (beginning with the word "atom") must be deleted or commented out.
(Leave the rest of the file alone.)
For example:
If you were working with ethylene and benzene you would delete every line
beginning with the word "atom", except for these four lines:
# for ethylene:
atom 88 47 CM "Alkene H2-C=" 6 12.011 3
atom 89 46 HC "Alkene H-C=" 1 1.008 1
# for benzene:
atom 90 48 CA "Aromatic C" 6 12.011 3
atom 91 49 HA "Aromatic H-C" 1 1.008 1
Then you are ready to run oplsaa_moltemplate.py on this file.
(Note: Atom type numbers, like "88", "89", "47", etc... may vary depending on
when you downloaded "oplsaa.prm".)
----- Using the "oplsaa.lt" file -----
Once you have created the "oplsaa.lt" file, you can create files (like
ethylene.lt) which define molecules that refer to these atom types.
Here is an excerpt from "ethyelene.lt":
Ethylene inherits OPLSAA {
write('Data Atoms') {
list of atoms goes here ...
}
write('Data Bond List') {
list of bonds goes here ...
}
}
And then run moltemplate.
----------- CHARGE: -----------
By default, the OPLSAA force-field assigns atom charge according to atom type.
When you run moltemplate, it will create a file named "system.in.charges",
containing commands like:
set type 2 charge -0.42
set type 3 charge 0.21
(This assumes your main moltemplate file is named "system.lt". If it was
named something else, eg "polymer.lt", then the file created by moltemplate
will be named "polymer.in.charges".)
Include these commands somewhere in your LAMMPS input script
(or use the LAMMPS "include" command to load the commands in system.in.charges)
Note that the atom numbers (eg "2", "3") in this file will not match the
OPLS atom numbers. (Check the output_ttree/ttree_assignments.txt file,
created by moltemplate, to see a table of "@atom" type numbers translated
from OPLSAA into LAMMPS.)
----------- CREDIT -----------
If you use these tools and you publish a paper using OPLSAA, please also cite
the TINKER program. (Because the original "oplsaa.prm" file which we depend on
is distributed with TINKER.) I think these are the relevant citations:
1) Ponder, J. W., & Richards, F. M. (1987). "An efficient newtonlike method for molecular mechanics energy minimization of large molecules. Journal of Computational Chemistry", 8(7), 1016-1024.
2) Ponder, J. W, (2004) "TINKER: Software tools for molecular design", http://dasher.wustl.edu/tinker/
-------------------------------
Jason Lambert and Andrew Jewett
April, 2014
Please email bugs to jewett.aij@gmail.com and jlamber9@gmail.com

View File

@ -1,52 +0,0 @@
# file "spce.lt"
#
# H1 H2
# \ /
# O
SPCE {
write("Data Atoms") {
$atom:O $mol:. @atom:O -0.8476 0.0000000 0.00000 0.000000
$atom:H1 $mol:. @atom:H 0.4238 0.8164904 0.00000 0.5773590
$atom:H2 $mol:. @atom:H 0.4238 -0.8164904 0.00000 0.5773590
}
write_once("Data Masses") {
@atom:O 15.9994
@atom:H 1.008
}
write("Data Bonds") {
$bond:OH1 @bond:OH $atom:O $atom:H1
$bond:OH2 @bond:OH $atom:O $atom:H2
}
write("Data Angles") {
$angle:HOH @angle:HOH $atom:H1 $atom:O $atom:H2
}
write_once("In Settings") {
bond_coeff @bond:OH harmonic 600.0 1.0
angle_coeff @angle:HOH harmonic 75.0 109.47
pair_coeff @atom:O @atom:O lj/charmm/coul/long 0.1553 3.166
pair_coeff @atom:H @atom:H lj/charmm/coul/long 0.0 0.0
group spce type @atom:O @atom:H
fix fShakeSPCE spce shake 0.0001 10 100 b @bond:OH a @angle:HOH
# (Remember to "unfix" fShakeSPCE during minimization.)
}
write_once("In Init") {
# -- Default styles (for solo "SPCE" water) --
units real
atom_style full
# (Hybrid force fields were not necessary but are used for portability.)
pair_style hybrid lj/charmm/coul/long 9.0 10.0 10.0
bond_style hybrid harmonic
angle_style hybrid harmonic
kspace_style pppm 0.0001
#pair_modify mix arithmetic # LEAVE THIS UNSPECIFIED!
}
} # end of definition of "SPCE" water molecule type

View File

@ -1,81 +0,0 @@
# This ice (1h) unit cell is rectangular and contains 16 water molecules.
# (Coordinates and cell dimensions converted were from a PDB file.)
# The dimensions of the unit cell (in Angstroms) are: 9.043 7.832 7.361
import "spce.lt" # <-- define the "SPCE" molecule
SpceIceRect16 {
# Create a 3-dimensional array of 16 water molecules
wat = new SPCE[4][2][2]
# Array indices will be correlated with position [xindex][yindex][zindex]
# You can overwrite coordinates of atoms after they were created this way:
# (Order is not important)
# atom-ID molecule-ID atomType charge newX newY newZ
write("Data Atoms") {
$atom:wat[0][0][0]/O $mol:wat[0][0][0] @atom:SPCE/O -0.8476 1.131 2.611 2.300
$atom:wat[0][0][0]/H1 $mol:wat[0][0][0] @atom:SPCE/H 0.4238 0.322 2.144 1.970
$atom:wat[0][0][0]/H2 $mol:wat[0][0][0] @atom:SPCE/H 0.4238 1.131 3.545 1.970
$atom:wat[1][0][0]/O $mol:wat[1][0][0] @atom:SPCE/O -0.8476 3.391 1.305 1.381
$atom:wat[1][0][0]/H1 $mol:wat[1][0][0] @atom:SPCE/H 0.4238 2.582 1.772 1.711
$atom:wat[1][0][0]/H2 $mol:wat[1][0][0] @atom:SPCE/H 0.4238 3.391 0.371 1.711
$atom:wat[2][0][0]/O $mol:wat[2][0][0] @atom:SPCE/O -0.8476 5.652 2.611 2.300
$atom:wat[2][0][0]/H1 $mol:wat[2][0][0] @atom:SPCE/H 0.4238 4.843 2.144 1.970
$atom:wat[2][0][0]/H2 $mol:wat[2][0][0] @atom:SPCE/H 0.4238 5.652 2.611 3.291
$atom:wat[3][0][0]/O $mol:wat[3][0][0] @atom:SPCE/O -0.8476 7.912 1.305 1.381
$atom:wat[3][0][0]/H1 $mol:wat[3][0][0] @atom:SPCE/H 0.4238 7.103 1.772 1.711
$atom:wat[3][0][0]/H2 $mol:wat[3][0][0] @atom:SPCE/H 0.4238 7.912 1.305 0.390
$atom:wat[0][1][0]/O $mol:wat[0][1][0] @atom:SPCE/O -0.8476 1.131 5.221 1.381
$atom:wat[0][1][0]/H1 $mol:wat[0][1][0] @atom:SPCE/H 0.4238 1.940 5.688 1.711
$atom:wat[0][1][0]/H2 $mol:wat[0][1][0] @atom:SPCE/H 0.4238 1.131 5.221 0.390
$atom:wat[1][1][0]/O $mol:wat[1][1][0] @atom:SPCE/O -0.8476 3.391 6.526 2.300
$atom:wat[1][1][0]/H1 $mol:wat[1][1][0] @atom:SPCE/H 0.4238 4.200 6.059 1.970
$atom:wat[1][1][0]/H2 $mol:wat[1][1][0] @atom:SPCE/H 0.4238 3.391 6.526 3.291
$atom:wat[2][1][0]/O $mol:wat[2][1][0] @atom:SPCE/O -0.8476 5.652 5.221 1.381
$atom:wat[2][1][0]/H1 $mol:wat[2][1][0] @atom:SPCE/H 0.4238 6.461 5.688 1.711
$atom:wat[2][1][0]/H2 $mol:wat[2][1][0] @atom:SPCE/H 0.4238 5.652 4.287 1.711
$atom:wat[3][1][0]/O $mol:wat[3][1][0] @atom:SPCE/O -0.8476 7.912 6.526 2.300
$atom:wat[3][1][0]/H1 $mol:wat[3][1][0] @atom:SPCE/H 0.4238 8.721 6.059 1.970
$atom:wat[3][1][0]/H2 $mol:wat[3][1][0] @atom:SPCE/H 0.4238 7.912 7.460 1.970
$atom:wat[0][0][1]/O $mol:wat[0][0][1] @atom:SPCE/O -0.8476 1.131 2.611 5.061
$atom:wat[0][0][1]/H1 $mol:wat[0][0][1] @atom:SPCE/H 0.4238 1.940 2.144 5.391
$atom:wat[0][0][1]/H2 $mol:wat[0][0][1] @atom:SPCE/H 0.4238 1.131 2.611 4.070
$atom:wat[1][0][1]/O $mol:wat[1][0][1] @atom:SPCE/O -0.8476 3.391 1.305 5.981
$atom:wat[1][0][1]/H1 $mol:wat[1][0][1] @atom:SPCE/H 0.4238 4.200 1.772 5.651
$atom:wat[1][0][1]/H2 $mol:wat[1][0][1] @atom:SPCE/H 0.4238 3.391 1.305 6.972
$atom:wat[2][0][1]/O $mol:wat[2][0][1] @atom:SPCE/O -0.8476 5.652 2.611 5.061
$atom:wat[2][0][1]/H1 $mol:wat[2][0][1] @atom:SPCE/H 0.4238 6.461 2.144 5.391
$atom:wat[2][0][1]/H2 $mol:wat[2][0][1] @atom:SPCE/H 0.4238 5.652 3.545 5.391
$atom:wat[3][0][1]/O $mol:wat[3][0][1] @atom:SPCE/O -0.8476 7.912 1.305 5.981
$atom:wat[3][0][1]/H1 $mol:wat[3][0][1] @atom:SPCE/H 0.4238 8.721 1.772 5.651
$atom:wat[3][0][1]/H2 $mol:wat[3][0][1] @atom:SPCE/H 0.4238 7.912 0.371 5.651
$atom:wat[0][1][1]/O $mol:wat[0][1][1] @atom:SPCE/O -0.8476 1.131 5.221 5.981
$atom:wat[0][1][1]/H1 $mol:wat[0][1][1] @atom:SPCE/H 0.4238 0.322 5.688 5.651
$atom:wat[0][1][1]/H2 $mol:wat[0][1][1] @atom:SPCE/H 0.4238 1.131 4.287 5.651
$atom:wat[1][1][1]/O $mol:wat[1][1][1] @atom:SPCE/O -0.8476 3.391 6.526 5.061
$atom:wat[1][1][1]/H1 $mol:wat[1][1][1] @atom:SPCE/H 0.4238 2.582 6.059 5.391
$atom:wat[1][1][1]/H2 $mol:wat[1][1][1] @atom:SPCE/H 0.4238 3.391 7.460 5.391
$atom:wat[2][1][1]/O $mol:wat[2][1][1] @atom:SPCE/O -0.8476 5.652 5.221 5.981
$atom:wat[2][1][1]/H1 $mol:wat[2][1][1] @atom:SPCE/H 0.4238 4.843 5.688 5.651
$atom:wat[2][1][1]/H2 $mol:wat[2][1][1] @atom:SPCE/H 0.4238 5.652 5.221 6.972
$atom:wat[3][1][1]/O $mol:wat[3][1][1] @atom:SPCE/O -0.8476 7.912 6.526 5.061
$atom:wat[3][1][1]/H1 $mol:wat[3][1][1] @atom:SPCE/H 0.4238 7.103 6.059 5.391
$atom:wat[3][1][1]/H2 $mol:wat[3][1][1] @atom:SPCE/H 0.4238 7.912 6.526 4.070
}
} # SpceIceRect16
# Credit goes to Martin Chaplin.
# These coordinates were orignally downloaded from Martin Chaplin's
# website: http://www.btinternet.com/~martin.chaplin/ice1h.html
# ... and then they were stretched independently in the xy and z
# directions in order to match the lattice parameters measured by
# Rottger et al.,
# "Lattice constants and thermal expansion of H2O and D2O ice Ih"
# between 10 and 265K", Acta Crystallogr. B, 50 (1994) 644-648
# I am using the lattice constants measured at temperature 265K
# (and pressure=100Torr).

View File

@ -1,129 +0,0 @@
# This ice (1h) unit cell is rectangular and contains 32 water molecules.
# (Coordinates and cell dimensions converted were from a PDB file.)
# The dimensions of the unit cell (in Angstroms) are: 9.043 15.663 7.361
import "spce.lt" # <-- define the "SPCE" molecule
SpceIceRect32 {
# Create a 3-dimensional array of 32 water molecules
wat = new SPCE[4][4][2]
# Array indices will be correlated with position [xindex][yindex][zindex]
# You can overwrite coordinates of atoms after they were created this way:
# (Order is not important)
# atom-ID molecule-ID atomType charge newX newY newZ
write("Data Atoms") {
$atom:wat[0][0][0]/O $mol:wat[0][0][0] @atom:SPCE/O -0.8476 1.131 2.611 2.300
$atom:wat[0][0][0]/H1 $mol:wat[0][0][0] @atom:SPCE/H 0.4238 0.322 2.144 1.970
$atom:wat[0][0][0]/H2 $mol:wat[0][0][0] @atom:SPCE/H 0.4238 1.131 2.611 3.291
$atom:wat[1][0][0]/O $mol:wat[1][0][0] @atom:SPCE/O -0.8476 3.391 1.305 1.381
$atom:wat[1][0][0]/H1 $mol:wat[1][0][0] @atom:SPCE/H 0.4238 2.582 1.772 1.711
$atom:wat[1][0][0]/H2 $mol:wat[1][0][0] @atom:SPCE/H 0.4238 3.391 1.305 0.390
$atom:wat[2][0][0]/O $mol:wat[2][0][0] @atom:SPCE/O -0.8476 5.652 2.611 2.300
$atom:wat[2][0][0]/H1 $mol:wat[2][0][0] @atom:SPCE/H 0.4238 4.843 2.144 1.970
$atom:wat[2][0][0]/H2 $mol:wat[2][0][0] @atom:SPCE/H 0.4238 5.652 3.545 1.970
$atom:wat[3][0][0]/O $mol:wat[3][0][0] @atom:SPCE/O -0.8476 7.912 1.305 1.381
$atom:wat[3][0][0]/H1 $mol:wat[3][0][0] @atom:SPCE/H 0.4238 7.103 1.772 1.711
$atom:wat[3][0][0]/H2 $mol:wat[3][0][0] @atom:SPCE/H 0.4238 7.912 0.371 1.711
$atom:wat[0][1][0]/O $mol:wat[0][1][0] @atom:SPCE/O -0.8476 1.131 5.221 1.381
$atom:wat[0][1][0]/H1 $mol:wat[0][1][0] @atom:SPCE/H 0.4238 1.940 5.688 1.711
$atom:wat[0][1][0]/H2 $mol:wat[0][1][0] @atom:SPCE/H 0.4238 1.131 4.287 1.711
$atom:wat[1][1][0]/O $mol:wat[1][1][0] @atom:SPCE/O -0.8476 3.391 6.526 2.300
$atom:wat[1][1][0]/H1 $mol:wat[1][1][0] @atom:SPCE/H 0.4238 4.200 6.059 1.970
$atom:wat[1][1][0]/H2 $mol:wat[1][1][0] @atom:SPCE/H 0.4238 3.391 6.526 3.291
$atom:wat[2][1][0]/O $mol:wat[2][1][0] @atom:SPCE/O -0.8476 5.652 5.221 1.381
$atom:wat[2][1][0]/H1 $mol:wat[2][1][0] @atom:SPCE/H 0.4238 6.461 5.688 1.711
$atom:wat[2][1][0]/H2 $mol:wat[2][1][0] @atom:SPCE/H 0.4238 5.652 5.221 0.390
$atom:wat[3][1][0]/O $mol:wat[3][1][0] @atom:SPCE/O -0.8476 7.912 6.526 2.300
$atom:wat[3][1][0]/H1 $mol:wat[3][1][0] @atom:SPCE/H 0.4238 8.721 6.059 1.970
$atom:wat[3][1][0]/H2 $mol:wat[3][1][0] @atom:SPCE/H 0.4238 7.912 7.460 1.970
$atom:wat[0][2][0]/O $mol:wat[0][2][0] @atom:SPCE/O -0.8476 1.131 10.443 2.300
$atom:wat[0][2][0]/H1 $mol:wat[0][2][0] @atom:SPCE/H 0.4238 0.322 9.976 1.970
$atom:wat[0][2][0]/H2 $mol:wat[0][2][0] @atom:SPCE/H 0.4238 1.131 11.377 1.970
$atom:wat[1][2][0]/O $mol:wat[1][2][0] @atom:SPCE/O -0.8476 3.391 9.137 1.381
$atom:wat[1][2][0]/H1 $mol:wat[1][2][0] @atom:SPCE/H 0.4238 2.582 9.604 1.711
$atom:wat[1][2][0]/H2 $mol:wat[1][2][0] @atom:SPCE/H 0.4238 3.391 8.203 1.711
$atom:wat[2][2][0]/O $mol:wat[2][2][0] @atom:SPCE/O -0.8476 5.652 10.443 2.300
$atom:wat[2][2][0]/H1 $mol:wat[2][2][0] @atom:SPCE/H 0.4238 4.843 9.976 1.970
$atom:wat[2][2][0]/H2 $mol:wat[2][2][0] @atom:SPCE/H 0.4238 5.652 10.443 3.291
$atom:wat[3][2][0]/O $mol:wat[3][2][0] @atom:SPCE/O -0.8476 7.912 9.137 1.381
$atom:wat[3][2][0]/H1 $mol:wat[3][2][0] @atom:SPCE/H 0.4238 7.103 9.604 1.711
$atom:wat[3][2][0]/H2 $mol:wat[3][2][0] @atom:SPCE/H 0.4238 7.912 9.137 0.390
$atom:wat[0][3][0]/O $mol:wat[0][3][0] @atom:SPCE/O -0.8476 1.131 13.053 1.381
$atom:wat[0][3][0]/H1 $mol:wat[0][3][0] @atom:SPCE/H 0.4238 1.940 13.520 1.711
$atom:wat[0][3][0]/H2 $mol:wat[0][3][0] @atom:SPCE/H 0.4238 1.131 13.053 0.390
$atom:wat[1][3][0]/O $mol:wat[1][3][0] @atom:SPCE/O -0.8476 3.391 14.358 2.300
$atom:wat[1][3][0]/H1 $mol:wat[1][3][0] @atom:SPCE/H 0.4238 4.200 13.891 1.970
$atom:wat[1][3][0]/H2 $mol:wat[1][3][0] @atom:SPCE/H 0.4238 3.391 15.292 1.970
$atom:wat[2][3][0]/O $mol:wat[2][3][0] @atom:SPCE/O -0.8476 5.652 13.053 1.381
$atom:wat[2][3][0]/H1 $mol:wat[2][3][0] @atom:SPCE/H 0.4238 6.461 13.520 1.711
$atom:wat[2][3][0]/H2 $mol:wat[2][3][0] @atom:SPCE/H 0.4238 5.652 12.119 1.711
$atom:wat[3][3][0]/O $mol:wat[3][3][0] @atom:SPCE/O -0.8476 7.912 14.358 2.300
$atom:wat[3][3][0]/H1 $mol:wat[3][3][0] @atom:SPCE/H 0.4238 8.721 13.891 1.970
$atom:wat[3][3][0]/H2 $mol:wat[3][3][0] @atom:SPCE/H 0.4238 7.912 14.358 3.291
$atom:wat[0][0][1]/O $mol:wat[0][0][1] @atom:SPCE/O -0.8476 1.131 2.611 5.061
$atom:wat[0][0][1]/H1 $mol:wat[0][0][1] @atom:SPCE/H 0.4238 1.940 2.144 5.391
$atom:wat[0][0][1]/H2 $mol:wat[0][0][1] @atom:SPCE/H 0.4238 1.131 3.545 5.391
$atom:wat[1][0][1]/O $mol:wat[1][0][1] @atom:SPCE/O -0.8476 3.391 1.305 5.981
$atom:wat[1][0][1]/H1 $mol:wat[1][0][1] @atom:SPCE/H 0.4238 4.200 1.772 5.651
$atom:wat[1][0][1]/H2 $mol:wat[1][0][1] @atom:SPCE/H 0.4238 3.391 0.371 5.651
$atom:wat[2][0][1]/O $mol:wat[2][0][1] @atom:SPCE/O -0.8476 5.652 2.611 5.061
$atom:wat[2][0][1]/H1 $mol:wat[2][0][1] @atom:SPCE/H 0.4238 6.461 2.144 5.391
$atom:wat[2][0][1]/H2 $mol:wat[2][0][1] @atom:SPCE/H 0.4238 5.652 2.611 4.070
$atom:wat[3][0][1]/O $mol:wat[3][0][1] @atom:SPCE/O -0.8476 7.912 1.305 5.981
$atom:wat[3][0][1]/H1 $mol:wat[3][0][1] @atom:SPCE/H 0.4238 8.721 1.772 5.651
$atom:wat[3][0][1]/H2 $mol:wat[3][0][1] @atom:SPCE/H 0.4238 7.912 1.305 6.972
$atom:wat[0][1][1]/O $mol:wat[0][1][1] @atom:SPCE/O -0.8476 1.131 5.221 5.981
$atom:wat[0][1][1]/H1 $mol:wat[0][1][1] @atom:SPCE/H 0.4238 0.322 5.688 5.651
$atom:wat[0][1][1]/H2 $mol:wat[0][1][1] @atom:SPCE/H 0.4238 1.131 5.221 6.972
$atom:wat[1][1][1]/O $mol:wat[1][1][1] @atom:SPCE/O -0.8476 3.391 6.526 5.061
$atom:wat[1][1][1]/H1 $mol:wat[1][1][1] @atom:SPCE/H 0.4238 2.582 6.059 5.391
$atom:wat[1][1][1]/H2 $mol:wat[1][1][1] @atom:SPCE/H 0.4238 3.391 7.460 5.391
$atom:wat[2][1][1]/O $mol:wat[2][1][1] @atom:SPCE/O -0.8476 5.652 5.221 5.981
$atom:wat[2][1][1]/H1 $mol:wat[2][1][1] @atom:SPCE/H 0.4238 4.843 5.688 5.651
$atom:wat[2][1][1]/H2 $mol:wat[2][1][1] @atom:SPCE/H 0.4238 5.652 4.287 5.651
$atom:wat[3][1][1]/O $mol:wat[3][1][1] @atom:SPCE/O -0.8476 7.912 6.526 5.061
$atom:wat[3][1][1]/H1 $mol:wat[3][1][1] @atom:SPCE/H 0.4238 7.103 6.059 5.391
$atom:wat[3][1][1]/H2 $mol:wat[3][1][1] @atom:SPCE/H 0.4238 7.912 6.526 4.070
$atom:wat[0][2][1]/O $mol:wat[0][2][1] @atom:SPCE/O -0.8476 1.131 10.443 5.061
$atom:wat[0][2][1]/H1 $mol:wat[0][2][1] @atom:SPCE/H 0.4238 1.940 9.976 5.391
$atom:wat[0][2][1]/H2 $mol:wat[0][2][1] @atom:SPCE/H 0.4238 1.131 10.443 4.070
$atom:wat[1][2][1]/O $mol:wat[1][2][1] @atom:SPCE/O -0.8476 3.391 9.137 5.981
$atom:wat[1][2][1]/H1 $mol:wat[1][2][1] @atom:SPCE/H 0.4238 4.200 9.604 5.651
$atom:wat[1][2][1]/H2 $mol:wat[1][2][1] @atom:SPCE/H 0.4238 3.391 9.137 6.972
$atom:wat[2][2][1]/O $mol:wat[2][2][1] @atom:SPCE/O -0.8476 5.652 10.443 5.061
$atom:wat[2][2][1]/H1 $mol:wat[2][2][1] @atom:SPCE/H 0.4238 6.461 9.976 5.391
$atom:wat[2][2][1]/H2 $mol:wat[2][2][1] @atom:SPCE/H 0.4238 5.652 11.377 5.391
$atom:wat[3][2][1]/O $mol:wat[3][2][1] @atom:SPCE/O -0.8476 7.912 9.137 5.981
$atom:wat[3][2][1]/H1 $mol:wat[3][2][1] @atom:SPCE/H 0.4238 8.721 9.604 5.651
$atom:wat[3][2][1]/H2 $mol:wat[3][2][1] @atom:SPCE/H 0.4238 7.912 8.203 5.651
$atom:wat[0][3][1]/O $mol:wat[0][3][1] @atom:SPCE/O -0.8476 1.131 13.053 5.981
$atom:wat[0][3][1]/H1 $mol:wat[0][3][1] @atom:SPCE/H 0.4238 0.322 13.520 5.651
$atom:wat[0][3][1]/H2 $mol:wat[0][3][1] @atom:SPCE/H 0.4238 1.131 12.119 5.651
$atom:wat[1][3][1]/O $mol:wat[1][3][1] @atom:SPCE/O -0.8476 3.391 14.358 5.061
$atom:wat[1][3][1]/H1 $mol:wat[1][3][1] @atom:SPCE/H 0.4238 2.582 13.891 5.391
$atom:wat[1][3][1]/H2 $mol:wat[1][3][1] @atom:SPCE/H 0.4238 3.391 14.358 4.070
$atom:wat[2][3][1]/O $mol:wat[2][3][1] @atom:SPCE/O -0.8476 5.652 13.053 5.981
$atom:wat[2][3][1]/H1 $mol:wat[2][3][1] @atom:SPCE/H 0.4238 4.843 13.520 5.651
$atom:wat[2][3][1]/H2 $mol:wat[2][3][1] @atom:SPCE/H 0.4238 5.652 13.053 6.972
$atom:wat[3][3][1]/O $mol:wat[3][3][1] @atom:SPCE/O -0.8476 7.912 14.358 5.061
$atom:wat[3][3][1]/H1 $mol:wat[3][3][1] @atom:SPCE/H 0.4238 7.103 13.891 5.391
$atom:wat[3][3][1]/H2 $mol:wat[3][3][1] @atom:SPCE/H 0.4238 7.912 15.292 5.391
}
} # SpceIceRect32
# Credit goes to Martin Chaplin.
# These coordinates were orignally downloaded from Martin Chaplin's
# website: http://www.btinternet.com/~martin.chaplin/ice1h.html
# ... and then they were stretched independently in the xy and z
# directions in order to match the lattice parameters measured by
# Rottger et al.,
# "Lattice constants and thermal expansion of H2O and D2O ice Ih"
# between 10 and 265K", Acta Crystallogr. B, 50 (1994) 644-648
# I am using the lattice constants measured at temperature 265K
# (and pressure=100Torr).

View File

@ -1,57 +0,0 @@
# This ice (1h) unit cell is rectangular and contains 8 water molecules.
# (Coordinates and cell dimensions converted were from a PDB file.)
# The dimensions of the unit cell (in Angstroms) are: 4.521 7.832 7.362
import "spce.lt" # <-- define the "SPCE" molecule
SpceIceRect8 {
# Create a 3-dimensional array of 8 water molecules
wat = new SPCE[2][2][2]
# Array indices will be correlated with position [xindex][yindex][zindex]
# You can overwrite coordinates of atoms after they were created this way:
# (Order is not important)
# atom-ID molecule-ID atomType charge newX newY newZ
write("Data Atoms") {
$atom:wat[1][0][0]/O $mol:wat[1][0][0] @atom:SPCE/O -0.8476 3.391 1.305 1.381
$atom:wat[1][0][0]/H1 $mol:wat[1][0][0] @atom:SPCE/H 0.4238 3.391 0.370 1.710
$atom:wat[1][0][0]/H2 $mol:wat[1][0][0] @atom:SPCE/H 0.4238 2.582 1.772 1.710
$atom:wat[1][0][1]/O $mol:wat[1][0][1] @atom:SPCE/O -0.8476 3.391 1.305 5.981
$atom:wat[1][0][1]/H1 $mol:wat[1][0][1] @atom:SPCE/H 0.4238 3.391 1.305 6.970
$atom:wat[1][0][1]/H2 $mol:wat[1][0][1] @atom:SPCE/H 0.4238 4.200 1.772 5.652
$atom:wat[0][0][0]/O $mol:wat[0][0][0] @atom:SPCE/O -0.8476 1.131 2.611 2.300
$atom:wat[0][0][0]/H1 $mol:wat[0][0][0] @atom:SPCE/H 0.4238 1.131 2.611 3.289
$atom:wat[0][0][0]/H2 $mol:wat[0][0][0] @atom:SPCE/H 0.4238 0.320 2.143 1.971
$atom:wat[0][0][1]/O $mol:wat[0][0][1] @atom:SPCE/O -0.8476 1.131 2.611 5.061
$atom:wat[0][0][1]/H1 $mol:wat[0][0][1] @atom:SPCE/H 0.4238 1.940 2.143 5.391
$atom:wat[0][0][1]/H2 $mol:wat[0][0][1] @atom:SPCE/H 0.4238 1.131 3.546 5.391
$atom:wat[0][1][0]/O $mol:wat[0][1][0] @atom:SPCE/O -0.8476 1.131 5.221 1.381
$atom:wat[0][1][0]/H1 $mol:wat[0][1][0] @atom:SPCE/H 0.4238 1.131 4.286 1.710
$atom:wat[0][1][0]/H2 $mol:wat[0][1][0] @atom:SPCE/H 0.4238 0.320 5.688 1.710
$atom:wat[0][1][1]/O $mol:wat[0][1][1] @atom:SPCE/O -0.8476 1.131 5.221 5.981
$atom:wat[0][1][1]/H1 $mol:wat[0][1][1] @atom:SPCE/H 0.4238 1.131 5.221 6.970
$atom:wat[0][1][1]/H2 $mol:wat[0][1][1] @atom:SPCE/H 0.4238 1.940 5.688 5.652
$atom:wat[1][1][0]/O $mol:wat[1][1][0] @atom:SPCE/O -0.8476 3.391 6.526 2.300
$atom:wat[1][1][0]/H1 $mol:wat[1][1][0] @atom:SPCE/H 0.4238 3.391 6.526 3.289
$atom:wat[1][1][0]/H2 $mol:wat[1][1][0] @atom:SPCE/H 0.4238 2.582 6.058 1.971
$atom:wat[1][1][1]/O $mol:wat[1][1][1] @atom:SPCE/O -0.8476 3.391 6.526 5.061
$atom:wat[1][1][1]/H1 $mol:wat[1][1][1] @atom:SPCE/H 0.4238 4.200 6.058 5.391
$atom:wat[1][1][1]/H2 $mol:wat[1][1][1] @atom:SPCE/H 0.4238 3.391 7.462 5.391
}
} # IceRect8
# Credit goes to Martin Chaplin.
# These coordinates were orignally downloaded from Martin Chaplin's
# website: http://www.btinternet.com/~martin.chaplin/ice1h.html
# ... and then they were stretched independently in the xy and z
# directions in order to match the lattice parameters measured by
# Rottger et al.,
# "Lattice constants and thermal expansion of H2O and D2O ice Ih"
# between 10 and 265K", Acta Crystallogr. B, 50 (1994) 644-648
# I am using the lattice constants measured at temperature 265K
# (and pressure=100Torr).

View File

@ -1,119 +0,0 @@
#############################################################
# WARNING: THIS FILE HAS NOT BEEN TESTED!
# (If you use this file in a simulation, please email me to let me know
# if it worked. -Andrew 2014-5, (jewett dot aij at gmail dot com))
#########################################################
# There are two different versions of TIP3P:
#
# tip3p_1983.lt # The implementation of TIP3P used by CHARMM (I think).
# tip3p_2004.lt # The newer Price & Brooks, J. Chem Phys 2004 model
# # which uses long-range coulombics
#########################################################
# file "tip3p_1983.lt"
#
# H1 H2
# \ /
# O
#
# I think this is the TIP3P water model used by CHARMM (and AMBER?). See:
# Jorgensen, Chandrasekhar, Madura, Impey, Klein, J Chem Phys, 79, 926 (1983)
TIP3P_1983 {
write("Data Atoms") {
$atom:O $mol:. @atom:O -0.834 0.0000000 0.00000 0.000000
$atom:H1 $mol:. @atom:H 0.417 0.756950327 0.00000 0.5858822766
$atom:H2 $mol:. @atom:H 0.417 -0.756950327 0.00000 0.5858822766
}
write_once("Data Masses") {
@atom:O 15.9994
@atom:H 1.008
}
write("Data Bonds") {
$bond:OH1 @bond:OH $atom:O $atom:H1
$bond:OH2 @bond:OH $atom:O $atom:H2
}
write("Data Angles") {
$angle:HOH @angle:HOH $atom:H1 $atom:O $atom:H2
}
write_once("In Settings") {
bond_coeff @bond:OH harmonic 450.0 0.9572
angle_coeff @angle:HOH harmonic 55.0 104.52
#########################################################################
#### There are two choices for for the O-O interactions
#########################################################################
#### O-O nonbonded interactions
# For the 1983 Jorgensen version of TIP3P use:
pair_coeff @atom:O @atom:O lj/charmm/coul/charmm 0.1521 3.1507
# For the 2004 Price & Brooks version of TIP3P use:
#pair_coeff @atom:O @atom:O lj/charmm/coul/long 0.102 3.188
#########################################################################
#### There are three choices for for the O-H and H-H interactions
#########################################################################
#### 1) The original Jorgensen 1983 and 2004 Price & Brooks models have no
# mixed OH or HH interactions. For this behavior, uncomment these lines:
pair_coeff @atom:H @atom:H lj/charmm/coul/charmm 0.00 0.4000
pair_coeff @atom:O @atom:H lj/charmm/coul/charmm 0.00 1.7753
#########################################################################
#### 2) CHARMM uses an arithmetic mixing-rule for the O-H sigma parameter
#pair_coeff @atom:H @atom:H lj/charmm/coul/charmm 0.0460 0.4000
#pair_coeff @atom:O @atom:H lj/charmm/coul/charmm 0.0836 1.7753#arithmetic
#########################################################################
#### 3) OPLS-AA uses geometric a mixing-fule for the O-H sigma parameter,
#### If you want to use this, uncomment the following two lines:
#pair_coeff @atom:H @atom:H lj/charmm/coul/charmm 0.0460 0.4000
#pair_coeff @atom:O @atom:H lj/charmm/coul/charmm 0.0836 1.1226 #geometric
#########################################################################
# Define a group for the tip3p water molecules:
group tip3p type @atom:O @atom:H
# Optional: Constrain the angles and distances.
# (Most implementations use this, but it is optional.)
fix fShakeTIP3P tip3p shake 0.0001 10 100 b @bond:OH a @angle:HOH
# (Remember to "unfix" fShakeTIP3P during minimization.)
}
write_once("In Init") {
# -- Default styles (for solo "TIP3P_1983" water) --
units real
atom_style full
# I'm not sure exactly which cutoffs distances are traditionally used in
# in the 1983 "TIP3P" model by Jorgensen model, (used by CHARMM).
# (See the Price JCP 2004 paper for a review.)
# My first guess was this:
pair_style hybrid lj/charmm/coul/charmm 7.5 8.0 10.0 10.5
# However, in the LAMMPS "peptide" example, they use these parameters:
# pair_style hybrid lj/charmm/coul/long 8.0 10.0 10.0
bond_style hybrid harmonic
angle_style hybrid harmonic
#pair_modify mix arithmetic # LEAVE THIS UNSPECIFIED!
}
} # "TIP3P_1983" water molecule type
# (note to self:)
# In the LAMMPS "peptide" example, these (nearly identical) parameters were used
# and they left the O-H parameters to be determined by the default mixing rules
#pair_style lj/charmm/coul/long 8.0 10.0 10.0
#pair_coeff @atom:H @atom:H 0.046 0.400014 0.046 0.400014
#pair_coeff @atom:O @atom:O 0.1521 3.15057 0.1521 3.15057
#angle_style charmm
#angle_coeff @angle:HOH 55.0 104.52 0.0 0.0

View File

@ -1,119 +0,0 @@
#############################################################
# WARNING: THIS FILE HAS NOT BEEN TESTED!
# (If you use this file in a simulation, please email me to let me know
# if it worked. -Andrew 2014-5, (jewett dot aij at gmail dot com))
#########################################################
# There are two different versions of TIP3P:
#
# tip3p_1983.lt # The implementation of TIP3P used by CHARMM (I think).
# tip3p_2004.lt # The newer Price & Brooks, J. Chem Phys 2004 model
# # which uses long-range coulombics
#########################################################
# file "tip3p_1983_charmm.lt"
#
# H1 H2
# \ /
# O
#
# I think this is the TIP3P water model used by CHARMM (and AMBER?). See:
# Jorgensen, Chandrasekhar, Madura, Impey, Klein, J Chem Phys, 79, 926 (1983)
TIP3P_1983_CHARMM {
write("Data Atoms") {
$atom:O $mol:. @atom:O -0.834 0.0000000 0.00000 0.000000
$atom:H1 $mol:. @atom:H 0.417 0.756950327 0.00000 0.5858822766
$atom:H2 $mol:. @atom:H 0.417 -0.756950327 0.00000 0.5858822766
}
write_once("Data Masses") {
@atom:O 15.9994
@atom:H 1.008
}
write("Data Bonds") {
$bond:OH1 @bond:OH $atom:O $atom:H1
$bond:OH2 @bond:OH $atom:O $atom:H2
}
write("Data Angles") {
$angle:HOH @angle:HOH $atom:H1 $atom:O $atom:H2
}
write_once("In Settings") {
bond_coeff @bond:OH harmonic 450.0 0.9572
angle_coeff @angle:HOH harmonic 55.0 104.52
#########################################################################
#### There are two choices for for the O-O interactions
#########################################################################
#### O-O nonbonded interactions
# For the 1983 Jorgensen version of TIP3P use:
pair_coeff @atom:O @atom:O lj/charmm/coul/charmm 0.1521 3.1507
# For the 2004 Price & Brooks version of TIP3P use:
#pair_coeff @atom:O @atom:O lj/charmm/coul/long 0.102 3.188
#########################################################################
#### There are three choices for for the O-H and H-H interactions
#########################################################################
#### 1) The original Jorgensen 1983 and 2004 Price & Brooks models have no
# mixed OH or HH interactions. For this behavior, uncomment these lines:
#pair_coeff @atom:H @atom:H lj/charmm/coul/charmm 0.00 0.4000
#pair_coeff @atom:O @atom:H lj/charmm/coul/charmm 0.00 1.7753
#########################################################################
#### 2) CHARMM uses an arithmetic mixing-rule for the O-H sigma parameter
pair_coeff @atom:H @atom:H lj/charmm/coul/charmm 0.0460 0.4000
pair_coeff @atom:O @atom:H lj/charmm/coul/charmm 0.0836 1.7753 #arithmetic
#########################################################################
#### 3) OPLS-AA uses geometric a mixing-fule for the O-H sigma parameter,
#### If you want to use this, uncomment the following two lines:
#pair_coeff @atom:H @atom:H lj/charmm/coul/charmm 0.0460 0.4000
#pair_coeff @atom:O @atom:H lj/charmm/coul/charmm 0.0836 1.1226 #geometric
#########################################################################
# Define a group for the tip3p water molecules:
group tip3p type @atom:O @atom:H
# Optional: Constrain the angles and distances.
# (Most implementations use this, but it is optional.)
fix fShakeTIP3P tip3p shake 0.0001 10 100 b @bond:OH a @angle:HOH
# (Remember to "unfix" fShakeTIP3P during minimization.)
}
write_once("In Init") {
# -- Default styles (for solo "TIP3P_1983_CHARMM" water) --
units real
atom_style full
# I'm not sure exactly which cutoffs distances are traditionally used in
# in the 1983 "TIP3P" model by Jorgensen model, (used by CHARMM).
# (See the Price JCP 2004 paper for a review.)
# My first guess was this:
pair_style hybrid lj/charmm/coul/charmm 7.5 8.0 10.0 10.5
# However, in the LAMMPS "peptide" example, they use these parameters:
# pair_style hybrid lj/charmm/coul/long 8.0 10.0 10.0
bond_style hybrid harmonic
angle_style hybrid harmonic
#pair_modify mix arithmetic # LEAVE THIS UNSPECIFIED!
}
} # "TIP3P_1983_CHARMM" water molecule type
# (note to self:)
# In the LAMMPS "peptide" example, these (nearly identical) parameters were used
# and they left the O-H parameters to be determined by the default mixing rules
#pair_style lj/charmm/coul/long 8.0 10.0 10.0
#pair_coeff @atom:H @atom:H 0.046 0.400014 0.046 0.400014
#pair_coeff @atom:O @atom:O 0.1521 3.15057 0.1521 3.15057
#angle_style charmm
#angle_coeff @angle:HOH 55.0 104.52 0.0 0.0

View File

@ -1,107 +0,0 @@
#########################################################
# WARNING: THIS FILE HAS NOT BEEN TESTED!
# (If you use this file in a simulation, please email me to let me know
# if it worked. -Andrew 2014-5, (jewett dot aij at gmail dot com))
#########################################################
# There are two different versions of TIP3P:
#
# tip3p_1983.lt # The implementation of TIP3P used by CHARMM (I think).
# tip3p_2004.lt # The newer Price & Brooks, J. Chem Phys 2004 model
# # which uses long-range coulombics
#########################################################
# file "tip3p_2004.lt"
#
# H1 H2
# \ /
# O
#
# I think this is the TIP3P water described in the paper by
# Daniel J. Price and Charles L. Brooks III
# J. Chem. Phys., 121(20): 10096 (2004)
# Specifically I think it refers to the "Model B" version of long-range TIP3P
# described in the 3rd-to-last column of "Table I", on p.10099.
TIP3P_2004 {
write("Data Atoms") {
$atom:O $mol:. @atom:O -0.830 0.0000000 0.00000 0.000000
$atom:H1 $mol:. @atom:H 0.415 0.756950327 0.00000 0.5858822766
$atom:H2 $mol:. @atom:H 0.415 -0.756950327 0.00000 0.5858822766
}
write_once("Data Masses") {
@atom:O 15.9994
@atom:H 1.008
}
write("Data Bonds") {
$bond:OH1 @bond:OH $atom:O $atom:H1
$bond:OH2 @bond:OH $atom:O $atom:H2
}
write("Data Angles") {
$angle:HOH @angle:HOH $atom:H1 $atom:O $atom:H2
}
write_once("In Settings") {
bond_coeff @bond:OH harmonic 450.0 0.9572
angle_coeff @angle:HOH harmonic 55.0 104.52
#########################################################################
#### There are two choices for for the O-O interactions
#########################################################################
#### O-O nonbonded interactions
# For the 1983 Jorgensen version of TIP3P use:
#pair_coeff @atom:O @atom:O lj/charmm/coul/charmm 0.1521 3.1507
# For the 2004 Price & Brooks version of TIP3P use:
pair_coeff @atom:O @atom:O lj/charmm/coul/long 0.102 3.188
#########################################################################
#### There are three choices for for the O-H and H-H interactions
#########################################################################
#### 1) The original Jorgensen 1983 and 2004 Price & Brooks models have no
# mixed OH or HH interactions. For this behavior, uncomment these lines:
pair_coeff @atom:H @atom:H lj/charmm/coul/long 0.00 0.4000
pair_coeff @atom:O @atom:H lj/charmm/coul/long 0.00 1.7753
#########################################################################
#### 2) CHARMM uses an arithmetic mixing-rule for the O-H sigma parameter
#pair_coeff @atom:H @atom:H lj/charmm/coul/long 0.0460 0.4000
#pair_coeff @atom:O @atom:H lj/charmm/coul/long 0.0836 1.7753 #arithmetic
#########################################################################
#### 3) OPLS-AA uses geometric a mixing-fule for the O-H sigma parameter,
#### If you want to use this, uncomment the following two lines:
#pair_coeff @atom:H @atom:H lj/charmm/coul/long 0.0460 0.4000
#pair_coeff @atom:O @atom:H lj/charmm/coul/long 0.0836 1.1226 #geometric
#########################################################################
# Define a group for the tip3p water molecules:
group tip3p type @atom:O @atom:H
# Optional: Constrain the angles and distances.
# (Most implementations use this, but it is optional.)
fix fShakeTIP3P tip3p shake 0.0001 10 100 b @bond:OH a @angle:HOH
# (Remember to "unfix" fShakeTIP3P during minimization.)
}
write_once("In Init") {
# -- Default styles (for solo "TIP3P_2004" water) --
units real
atom_style full
pair_style hybrid lj/charmm/coul/long 10.0 10.5 10.5
# Note: in the LAMMPS "peptide" example, they use these parameters:
# pair_style hybrid lj/charmm/coul/long 8.0 10.0 10.0
bond_style hybrid harmonic
angle_style hybrid harmonic
kspace_style pppm 0.0001
#pair_modify mix arithmetic # LEAVE THIS UNSPECIFIED!
}
} # "TIP3P_2004" water molecule type

View File

@ -1,53 +0,0 @@
# This file stores complete LAMMPS data for the TraPPE model of saturated
# hydrocarbon chains. In this "united-atom" model, each methyl group is
# represented by a single atom. Forces between "atoms" are taken from the
# TraPPE force-field. (J Phys Chem B, 1998, volume 102, pp.2569-2577)
TraPPE {
write_once("Data Masses") {
@atom:CH2 14.1707
@atom:CH3 15.2507
@atom:CH4 16.3307
}
write_once("Data Angles By Type") {
@angle:backbone @atom:CH? @atom:CH? @atom:CH? @bond:saturated @bond:saturated
}
write_once("Data Dihedrals By Type") {
@dihedral:backbone @atom:CH? @atom:CH? @atom:CH? @atom:CH? @bond:saturated @bond:saturated @bond:saturated
}
write_once("In Settings") {
pair_coeff @atom:CH2 @atom:CH2 lj/charmm/coul/charmm 0.091411522 3.95
pair_coeff @atom:CH3 @atom:CH3 lj/charmm/coul/charmm 0.194746286 3.75
pair_coeff @atom:CH4 @atom:CH4 lj/charmm/coul/charmm 0.294106636 3.73
bond_coeff @bond:saturated harmonic 120.0 1.54
angle_coeff @angle:backbone harmonic 62.0022 114
dihedral_coeff @dihedral:backbone opls 1.411036 -0.271016 3.145034 0.0
}
# Optional: Create a group corresponding to atoms used by the TraPPE force-
# field. (This is useful if you mix force-fields together.)
write_once("In Settings") {
group TraPPE type @atom:CH2 @atom:CH3 @atom:CH4
}
write_once("In Init") {
# -- Default styles for "TraPPE" --
units real
atom_style full
# (Hybrid force field styles were used for portability.)
bond_style hybrid harmonic
angle_style hybrid harmonic
dihedral_style hybrid opls
improper_style none
pair_style hybrid lj/charmm/coul/charmm 9.0 11.0 9.0 11.0
pair_modify mix arithmetic
special_bonds lj 0.0 0.0 0.0
}
} # class TraPPE

View File

@ -1,77 +0,0 @@
# This file stores LAMMPS data for the "mW" water model.
# (Molinero, V. and Moore, E.B., J. Phys. Chem. B 2009, 113, 4008-4016)
#
# In this model, each water molecule is represented by a single "mW" particle.
# These particles interact with their neighbors via 3-body Stillinger-Weber
# forces whose parameters are tuned to mimic directional hydrogen-bonding
# in liquid water (as well as hexagonal ice, type II ice, and
# low-density super-cooled liquid/amorphous water phases).
####
#
# NOTE: THIS FILE IS INTENDED FOR SIMULATIONS OF PURE WATER ONLY.
# IF YOU HAVE OTHER ATOMS IN YOUR SYSTEM (BESIDES WATER),
# YOU MUST REPLACE THIS LINE:
#
# pair_coeff * * sw system.in.sw mW
#
# WITH THIS LINE:
#
# pair_coeff * * sw system.in.sw mW NULL NULL NULL
#
# ...IN THE FILE BELOW.
#
# (Note:The number of "NULL" entries in the list should match the
# number of other atom types defined somewhere in your simulation.
# In the "3bodyWater+hydrocarbons_MW+TraPPE" example, there are 3
# types of carbon defined in "trappe1998.lt", so "NULL" appears 3 times.
####
WatMW {
write("Data Atoms") {
$atom:mW $mol:. @atom:mW 0.0 0.0 0.0 0.0
}
write_once("Data Masses") {
@atom:mW 18.02
}
write_once("system.in.sw") {
mW mW mW 6.189 2.3925 1.8 23.15 1.2 -0.333333333 7.049556277 0.602224558 4 0 0
}
write_once("In Init") {
# -- Default styles for "WatMW" --
units real
pair_style sw
}
write_once("In Settings") {
# --Now indicate which atom type(s) are simulated using the "sw" pair style
# -- In this case only one of the atom types is used (the mW water "atom").
pair_coeff * * sw system.in.sw mW # SEE COMMENT ABOVE
# -- Unfortunately LAMMPS itself does not understand molemlate syntax, so
# -- the atoms are identified by order in the list, not by name. (The "mW"
# -- refers to to an identifier in the system.in.sw file, not watmw.lt.)
# -- This command says that the first atom type corresponds to the "mW"
# -- atom in system.in.sw, and to ignore the remaining three atom types
# -- (correspond to the CH2, CH3, CH4 atom types defined in trappe1998.lt.
# -- We don't want to use the "sw" force field for interactions involving
# -- these atom types, so we put "NULL" there.)
# -- Note: For this to work, you should probably run moltemplate this way:
# -- moltemplate.sh -a "@atom:WatMW/mW 1" system.lt
# -- This assigns the atom type named @atom:WatMW/mW to 1 (the first atom)
}
# -- optional --
write_once("In Settings") {
group WatMW type @atom:mW #(Atoms of this type belong to the "WatMW" group)
}
} # WatMW

View File

@ -1,24 +0,0 @@
These are examples for the "moltemplate" molecule builder for LAMMPS.
http://www.moltemplate.org
Each directory contains one or more examples.
Each example directory contains:
images/ This folder has pictures of the molecules in the system
moltemplate_files/ This folder contains LT files and other auxiliary files
README_setup.sh Instructions for how to use moltemplate (executable)
README_visualize.txt Instructions for viewing in DATA/DUMP files in VMD
...and one or more LAMMPS input scripts with names like
run.in.min
run.in.npt
run.in.nvt
You can run these scripts using
lmp_linux -i run.in.npt
(The name of your lammps binary, "lmp_linux" in this example, may vary.
Sometimes, these scripts must be run in a certain order. For example
it may be necessary to run run.in.min to minimize the system before you can use run.in.npt, and later run.in.nvt. The README_run.sh file in each subdirectory
specifies indicates the order. These files have not been optimized.)

View File

@ -1,54 +0,0 @@
# -------- WARNING: --------
This directory contains some examples of all-atom simulations using the GAFF
force field, prepared using moltemplate.
This software is experimental, and the force-fields and equilbration protocols
have not been tested carefully by me. There is no gaurantee that simulations
prepared using moltemplate will reproduce the behavior of AmberTools/AMBER.
# -------- REQUEST FOR HELP: --------
If you notice a problem with these examples, please report it.
Peer-review is the only way to improve this software (or any software).
Other suggestions are also welcome!
(Contact jewett.aij@gmail.com, 2013-12-01)
--- Charge ---
Some force-fields (such as OPLSAA) can assign charge based on atom type.
But AMBER simulations, charge is usually assigned using AmberTools which
typically estimates partial charges using quantum chemistry.
You must assign partial charges to each atom or LAMMPS will crash
when it discovers your system has no charged particles.
(To disable this, change the pair_style to lj/cut or something similar.)
You have to assign charge manually, just as you would for an ordinary molecule.
(For example, charges are explicitly assigned to each atom in these files:
waterTIP3P+isobutane/moltemplate_files/isobutane.lt
hexadecane/moltemplate_files/ch2group.lt
hexadecane/moltemplate_files/ch3group.lt)
(How you do this is up to you. In these examples, I obtained
partial charges from the OPLSAA parameter file located here:
http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm)
--- Improper angles ---
I am also uncertain whether the improper angle interactions generated by
moltemplate are equivalent to those generated by AmberTools. (I think they are,
but I am worried that I might have listed the atom types in the wrong order.)
--- Bloated lammps input scripts ---
LAMMPS input scripts prepared using moltemplate contain the entire contents
of the GAFF force-field, even when simulating small systems with just a few
atom types.
This is harmless, but if you want to get rid of this extra information,
follow the README instructions in the "optional_cleanup" directories.

View File

@ -1,24 +0,0 @@
This is an example of how to use the OPLSAA force-field in LAMMPS
(using moltemplate.sh and Jason Lambert's oplsaa_moltemplate.py conversion tool)
This example also shows how to use moltemplate in combination with PACKMOL.
(PACKMOL is a useful program for generating atomic coordinates. In this example,
moltemplate.sh is only used to create the topology, force-field and charges,
and PACKMOL generates the coordinates, which moltemplate reads (in "step 1").
Moltemplate can also be used for generating atomic coordinates, especially
for mixing many small molecules together, as we do in this example. However
I wanted to demonstrate how to combine PACKMOL with moltemplate.sh.
In some other scenarios, such as protein solvation, PACKMOL does a much
better job than moltemplate.)
As of 2014-4-06, this code has not been tested for accuracy.
(See the WARNING.TXT file.)
step 1)
To build the files which LAMMPS needs, follow the instructions in:
README_setup.sh
step 2)
To run LAMMPS with these files, follow these instructions:
README_run.sh

View File

@ -1,39 +0,0 @@
# --- Running LAMMPS ---
# -------- REQUIREMENTS: ---------
# 1) This example requires building LAMMPS with the "USER-MISC" package.
# (because it makes use of "gaff.lt" which uses dihedral_style fourier)
# To do this, type "make yes-user-misc" before compiling LAMMPS.
# http://lammps.sandia.gov/doc/Section_start.html#start_3
# -------- PREREQUISITES: --------
# The 2 files "run.in.npt", and "run.in.nvt" are LAMMPS
# input scripts which link to the input scripts and data files
# you hopefully have created earlier with moltemplate.sh:
# system.in.init, system.in.settings, system.data
# If not, carry out the instructions in "README_setup.sh".
#
# -- Instructions: --
# If "lmp_mpi" is the name of the command you use to invoke lammps,
# then you would run lammps on these files this way:
lmp_mpi -i run.in.npt # minimization and simulation at constant pressure
lmp_mpi -i run.in.nvt # minimization and simulation at constant volume
#(Note: The constant volume simulation lacks pressure equilibration. These are
# completely separate simulations. The results of the constant pressure
# simulation might be ignored when beginning the simulation at constant
# volume. (This is because restart files in LAMMPS don't always work,
# and I was spending a lot of time trying to convince people it was a
# LAMMPS bug, instead of a moltemplate bug, so I disabled restart files.)
# Read the "run.in.nvt" file to find out how to use the "read_restart"
# command to load the results of the pressure-equilibration simulation,
# before beginning a constant-volume run.
# If you have compiled the MPI version of lammps, you can run lammps in parallel
#mpirun -np 4 lmp_mpi -i run.in.npt
#mpirun -np 4 lmp_mpi -i run.in.nvt
# (assuming you have 4 processors available)

View File

@ -1,32 +0,0 @@
# -------- REQUIREMENTS: ---------
# You must define your MOLTEMPLATE_PATH environment variable
# and set it to the "common" subdirectory of your moltemplate distribution.
# (See the "Installation" section in the moltemplate manual.)
# Create LAMMPS input files this way:
cd moltemplate_files
# run moltemplate
moltemplate.sh system.lt
# This will generate various files with names ending in *.in* and *.data.
# Move them to the directory where you plan to run LAMMPS (in this case "../")
mv -f system.data system.in* ../
# Optional:
# The "./output_ttree/" directory is full of temporary files generated by
# moltemplate. They can be useful for debugging, but are usually thrown away.
#rm -rf output_ttree/
cd ../
# Optional:
# Note: The system.data and system.in.settings files contain extra information
# for atoms defined in GAFF which you are not using in this simulation. This
# is harmless, but if you to delete this information from your
# system.in.settings and system.in.data files, follow the instructions in
# this script: "optional_cleanup/README_remove_irrelevant_info.sh"

View File

@ -1,87 +0,0 @@
------- To view a lammps trajectory in VMD --------
1) Build a PSF file for use in viewing with VMD.
This step works with VMD 1.9 and topotools 1.2.
(Older versions, like VMD 1.8.6, don't support this.)
a) Start VMD
b) Menu Extensions->Tk Console
c) Enter:
(I assume that the the DATA file is called "system.data")
topo readlammpsdata system.data full
animate write psf system.psf
2)
Later, to Load a trajectory in VMD:
Start VMD
Select menu: File->New Molecule
-Browse to select the PSF file you created above, and load it.
(Don't close the window yet.)
-Browse to select the trajectory file.
If necessary, for "file type" select: "LAMMPS Trajectory"
Load it.
---- A note on trajectory format: -----
If the trajectory is a DUMP file, then make sure the it contains the
information you need for pbctools (see below. I've been using this
command in my LAMMPS scripts to create the trajectories:
dump 1 all custom 5000 DUMP_FILE.lammpstrj id mol type x y z ix iy iz
It's a good idea to use an atom_style which supports molecule-ID numbers
so that you can assign a molecule-ID number to each atom. (I think this
is needed to wrap atom coordinates without breaking molecules in half.)
Of course, you don't have to save your trajectories in DUMP format,
(other formats like DCD work fine) I just mention dump files
because these are the files I'm familiar with.
3) ----- Wrap the coordinates to the unit cell
(without cutting the molecules in half)
a) Start VMD
b) Load the trajectory in VMD (see above)
c) Menu Extensions->Tk Console
d) Try entering these commands:
pbc wrap -compound res -all
pbc box
----- Optional ----
Sometimes the solvent or membrane obscures the view of the solute.
It can help to shift the location of the periodic boundary box
To shift the box in the y direction (for example) do this:
pbc wrap -compound res -all -shiftcenterrel {0.0 0.15 0.0}
pbc box -shiftcenterrel {0.0 0.15 0.0}
Distances are measured in units of box-length fractions, not Angstroms.
Alternately if you have a solute whose atoms are all of type 1,
then you can also try this to center the box around it:
pbc wrap -sel type=1 -all -centersel type=2 -center com
4)
You should check if your periodic boundary conditions are too small.
To do that:
select Graphics->Representations menu option
click on the "Periodic" tab, and
click on the "+x", "-x", "+y", "-y", "+z", "-z" checkboxes.
5) Optional: If you like, change the atom types in the PSF file so
that VMD recognizes the atom types, use something like:
sed -e 's/ 1 1 / C C /g' < system.psf > temp1.psf
sed -e 's/ 2 2 / H H /g' < temp1.psf > temp2.psf
sed -e 's/ 3 3 / P P /g' < temp2.psf > system.psf
(If you do this, it might effect step 2 above.)

View File

@ -1,49 +0,0 @@
import "gaff.lt"
# From "gaff.lt":
# @atom:ca # Sp2 C in pure aromatic systems
# @atom:ha # H bonded to aromatic carbon
#
# I looked up the charge of each atom using the OPLSAA parameters
# from the "oplsaa.prm" file distributed with TINKER
# http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
# ---------------------------------------------------------------
# This is NOT how AmberTools assigns charge, and it will NOT
# reproduce the behavior of AMBER force-fields.
Benzene inherits GAFF {
# atomID molID atomType charge X Y Z
write('Data Atoms') {
$atom:C1 $mol @atom:ca -0.115 5.274 1.999 -8.568
$atom:C2 $mol @atom:ca -0.115 6.627 2.018 -8.209
$atom:C3 $mol @atom:ca -0.115 7.366 0.829 -8.202
$atom:C4 $mol @atom:ca -0.115 6.752 -0.379 -8.554
$atom:C5 $mol @atom:ca -0.115 5.399 -0.398 -8.912
$atom:C6 $mol @atom:ca -0.115 4.660 0.791 -8.919
$atom:H11 $mol @atom:ha 0.115 4.704 2.916 -8.573
$atom:H21 $mol @atom:ha 0.115 7.101 2.950 -7.938
$atom:H31 $mol @atom:ha 0.115 8.410 0.844 -7.926
$atom:H41 $mol @atom:ha 0.115 7.322 -1.296 -8.548
$atom:H51 $mol @atom:ha 0.115 4.925 -1.330 -9.183
$atom:H61 $mol @atom:ha 0.115 3.616 0.776 -9.196
}
write('Data Bond List') {
$bond:C12 $atom:C1 $atom:C2
$bond:C23 $atom:C2 $atom:C3
$bond:C34 $atom:C3 $atom:C4
$bond:C45 $atom:C4 $atom:C5
$bond:C56 $atom:C5 $atom:C6
$bond:C61 $atom:C6 $atom:C1
$bond:C1H1 $atom:C1 $atom:H11
$bond:C2H2 $atom:C2 $atom:H21
$bond:C3H3 $atom:C3 $atom:H31
$bond:C4H4 $atom:C4 $atom:H41
$bond:C5H5 $atom:C5 $atom:H51
$bond:C6H6 $atom:C6 $atom:H61
}
} # Benzene

View File

@ -1,14 +0,0 @@
import "benzene.lt" # <- defines the "Benzene" molecule type.
# Periodic boundary conditions:
write_once("Data Boundary") {
0.0 64.00 xlo xhi
0.0 64.00 ylo yhi
0.0 64.00 zlo zhi
}
benzenes = new Benzene [8].move(8,0,0)
[8].move(0,8,0)
[8].move(0,0,8)

View File

@ -1,63 +0,0 @@
# MOST USERS CAN IGNORE THIS FILE
#
# Unfortunately, as of 2014-4-19, the system.data and system.in.settings file
# which are created by moltemplate.sh contain a lot of irrelevant information,
# such as definition of parameters for atom types not present in the current
# system. This extra information takes up about 1 MB.
#
# This appears to be harmless.
# (Loading this extra information does not seem to slow down LAMMPS.)
#
# --------- OPTIONAL STEPS FOR STRIPPING OUT JUNK ---------
#
# However if you want to eliminate this junk from these files
# For now, we can strip this out using ltemplify.py to build a new .lt file.
#
# NOTE: If you decide to use this script, it was meant to be run it from
# the parent directory (../) (If you run it from somewhere else, be sure to
# modify the "PATH_TO_DATA_FILE" and "PATH_TO_OUTPUT_TTREE" variables below.)
#
# I suggest you do this in a temporary_directory
PATH_TO_DATA_FILE="."
pushd "$PATH_TO_DATA_FILE"
mkdir new_lt_file
cd new_lt_file/
# now run ltemplify.py
ltemplify.py ../system.in.init ../system.in.settings ../system.data > system.lt
# This creates a new .LT file named "system.lt" in the local directory.
# The ltemplify.py script also does not copy the boundary dimensions.
# We must do this manually.
# If you did NOT throw away the "Data Boundary" file usually located in
# "moltemplate_files/output_ttree/Data Boundary"
# then you can copy that information from this file into system.lt
PATH_TO_OUTPUT_TTREE="../moltemplate_files/output_ttree"
echo "write_once(\"Data Boundary\") {" >> system.lt
cat "$PATH_TO_OUTPUT_TTREE/Data Boundary" >> system.lt
echo "}" >> system.lt
echo "" >> system.lt
# Now, run moltemplate on this new .LT file.
moltemplate.sh system.lt
# This will create: "system.data" "system.in.init" "system.in.settings."
# That's it. The new "system.data" and system.in.* files should
# be ready to run in LAMMPS.
# Now copy the system.data and system.in.* files to the place where
# you plan to run LAMMPS
mv -f system.data system.in.* ../
cd ../
# Now delete all of the temporary files we generated
rm -rf new_lt_file/
popd

View File

@ -1,72 +0,0 @@
# PREREQUISITES:
#
# You must use moltemplate.sh to create 3 files:
# system.data system.in.init system.in.settings
# (Follow the instructions in README_setup.sh,
# or run the file as a script using ./README_setup.sh)
# ------------------------------- Initialization Section --------------------
include "system.in.init"
# ------------------------------- Atom Definition Section -------------------
read_data "system.data"
# ------------------------------- Settings Section --------------------------
include "system.in.settings"
# ------------------------------- Run Section -------------------------------
# -- minimization protocol --
minimize 1.0e-4 1.0e-6 100000 400000
# -- simulation protocol --
timestep 1.0
thermo 100
dump 1 all custom 5000 traj_npt.lammpstrj id mol type x y z ix iy iz
print "---------------------------------------------------------------------------"
print "First, use Langevin dynamics to randomize the initial shape of the molecules"
print "---------------------------------------------------------------------------"
fix 1 all momentum 100 linear 0 0 0
fix fxlan all langevin 1000.0 1000.0 5000.0 123456 # temp: 1000 K
fix fxnve all nve
run 20000
unfix fxlan
unfix fxnve
print "---------------------------------------------------------------------------"
print "Optional: use short high pressure run to get rid of small bubbles."
print " (In case there are any. I'm not certain there are."
print " Later we will restore ordinary pressure.)"
print "---------------------------------------------------------------------------"
fix fxlan all langevin 298.0 298.0 5000 123456 # temp: 298 K
fix fxnph all nph iso 500.0 500.0 1000.0 # pressure: 500 barr
run 80000
unfix fxlan
unfix fxnph
print "---------------------------------------------------------------------------"
print "--- Now continue the simulation using a Nose-Hoover Thermostat/Barostat ---"
print "---------------------------------------------------------------------------"
# temperature: 298 K, pressure: 1 barr
fix fxnpt all npt temp 298.0 298.0 100.0 iso 1.0 1.0 1000.0 drag 1.0
#thermo_modify flush yes
run 5000000
write_data system_after_npt.data

View File

@ -1,51 +0,0 @@
# PREREQUISITES:
#
# 1) You must use moltemplate.sh to create 3 files:
# system.data system.in.init system.in.settings
# (Follow the instructions in README_setup.sh,
# or run the file as a script using ./README_setup.sh)
# 2) You must equilibrate the system beforehand using "run.in.npt".
# This will create the file "system_after_npt.data" which this file reads.
# (Note: I have not verified that this equilibration protocol works well.)
# ------------------------------- Initialization Section --------------------
include "system.in.init"
# ------------------------------- Atom Definition Section -------------------
# Read the coordinates generated by an earlier NPT simulation
read_data "system_after_npt.data"
# OPLSAA atom charges are stored in a separate file.
# Load that file now:
include "system.in.charges"
# ------------------------------- Settings Section --------------------------
include "system.in.settings"
# (The "write_restart" and "read_restart" commands were buggy in 2012,
# but they should work also. I prefer "write_data" and "read_data".)
# ------------------------------- Settings Section --------------------------
include system.in.settings
# ------------------------------- Run Section -------------------------------
# -- simulation protocol --
timestep 1.0
dump 1 all custom 5000 traj_nvt.lammpstrj id mol type x y z ix iy iz
fix fxnvt all nvt temp 300.0 300.0 500.0 tchain 1
thermo 500
#thermo_modify flush yes
run 200000
write_restart system_after_nvt.data

View File

@ -1,24 +0,0 @@
This is an example of how to use the OPLSAA force-field in LAMMPS
(using moltemplate.sh and Jason Lambert's oplsaa_moltemplate.py conversion tool)
This example also shows how to use moltemplate in combination with PACKMOL.
(PACKMOL is a useful program for generating atomic coordinates. In this example,
moltemplate.sh is only used to create the topology, force-field and charges,
and PACKMOL generates the coordinates, which moltemplate reads (in "step 1").
Moltemplate can also be used for generating atomic coordinates, especially
for mixing many small molecules together, as we do in this example. However
I wanted to demonstrate how to combine PACKMOL with moltemplate.sh.
In some other scenarios, such as protein solvation, PACKMOL does a much
better job than moltemplate.)
As of 2014-4-06, this code has not been tested for accuracy.
(See the WARNING.TXT file.)
step 1)
To build the files which LAMMPS needs, follow the instructions in:
README_setup.sh
step 2)
To run LAMMPS with these files, follow these instructions:
README_run.sh

View File

@ -1,39 +0,0 @@
# --- Running LAMMPS ---
# -------- REQUIREMENTS: ---------
# 1) This example requires building LAMMPS with the "USER-MISC" package.
# (because it makes use of "gaff.lt" which uses dihedral_style fourier)
# To do this, type "make yes-user-misc" before compiling LAMMPS.
# http://lammps.sandia.gov/doc/Section_start.html#start_3
# -------- PREREQUISITES: --------
# The 2 files "run.in.npt", and "run.in.nvt" are LAMMPS
# input scripts which link to the input scripts and data files
# you hopefully have created earlier with moltemplate.sh:
# system.in.init, system.in.settings, system.data
# If not, carry out the instructions in "README_setup.sh".
#
# -- Instructions: --
# If "lmp_mpi" is the name of the command you use to invoke lammps,
# then you would run lammps on these files this way:
lmp_mpi -i run.in.npt # minimization and simulation at constant pressure
lmp_mpi -i run.in.nvt # minimization and simulation at constant volume
#(Note: The constant volume simulation lacks pressure equilibration. These are
# completely separate simulations. The results of the constant pressure
# simulation might be ignored when beginning the simulation at constant
# volume. (This is because restart files in LAMMPS don't always work,
# and I was spending a lot of time trying to convince people it was a
# LAMMPS bug, instead of a moltemplate bug, so I disabled restart files.)
# Read the "run.in.nvt" file to find out how to use the "read_restart"
# command to load the results of the pressure-equilibration simulation,
# before beginning a constant-volume run.
# If you have compiled the MPI version of lammps, you can run lammps in parallel
#mpirun -np 4 lmp_mpi -i run.in.npt
#mpirun -np 4 lmp_mpi -i run.in.nvt
# (assuming you have 4 processors available)

View File

@ -1,32 +0,0 @@
# -------- REQUIREMENTS: ---------
# You must define your MOLTEMPLATE_PATH environment variable
# and set it to the "common" subdirectory of your moltemplate distribution.
# (See the "Installation" section in the moltemplate manual.)
# Create LAMMPS input files this way:
cd moltemplate_files
# run moltemplate
moltemplate.sh system.lt
# This will generate various files with names ending in *.in* and *.data.
# Move them to the directory where you plan to run LAMMPS (in this case "../")
mv -f system.data system.in* ../
# Optional:
# The "./output_ttree/" directory is full of temporary files generated by
# moltemplate. They can be useful for debugging, but are usually thrown away.
#rm -rf output_ttree/
cd ../
# Optional:
# Note: The system.data and system.in.settings files contain extra information
# for atoms defined in GAFF which you are not using in this simulation. This
# is harmless, but if you to delete this information from your
# system.in.settings and system.in.data files, follow the instructions in
# this script: "optional_cleanup/README_remove_irrelevant_info.sh"

View File

@ -1,87 +0,0 @@
------- To view a lammps trajectory in VMD --------
1) Build a PSF file for use in viewing with VMD.
This step works with VMD 1.9 and topotools 1.2.
(Older versions, like VMD 1.8.6, don't support this.)
a) Start VMD
b) Menu Extensions->Tk Console
c) Enter:
(I assume that the the DATA file is called "system.data")
topo readlammpsdata system.data full
animate write psf system.psf
2)
Later, to Load a trajectory in VMD:
Start VMD
Select menu: File->New Molecule
-Browse to select the PSF file you created above, and load it.
(Don't close the window yet.)
-Browse to select the trajectory file.
If necessary, for "file type" select: "LAMMPS Trajectory"
Load it.
---- A note on trajectory format: -----
If the trajectory is a DUMP file, then make sure the it contains the
information you need for pbctools (see below. I've been using this
command in my LAMMPS scripts to create the trajectories:
dump 1 all custom 5000 DUMP_FILE.lammpstrj id mol type x y z ix iy iz
It's a good idea to use an atom_style which supports molecule-ID numbers
so that you can assign a molecule-ID number to each atom. (I think this
is needed to wrap atom coordinates without breaking molecules in half.)
Of course, you don't have to save your trajectories in DUMP format,
(other formats like DCD work fine) I just mention dump files
because these are the files I'm familiar with.
3) ----- Wrap the coordinates to the unit cell
(without cutting the molecules in half)
a) Start VMD
b) Load the trajectory in VMD (see above)
c) Menu Extensions->Tk Console
d) Try entering these commands:
pbc wrap -compound res -all
pbc box
----- Optional ----
Sometimes the solvent or membrane obscures the view of the solute.
It can help to shift the location of the periodic boundary box
To shift the box in the y direction (for example) do this:
pbc wrap -compound res -all -shiftcenterrel {0.0 0.15 0.0}
pbc box -shiftcenterrel {0.0 0.15 0.0}
Distances are measured in units of box-length fractions, not Angstroms.
Alternately if you have a solute whose atoms are all of type 1,
then you can also try this to center the box around it:
pbc wrap -sel type=1 -all -centersel type=2 -center com
4)
You should check if your periodic boundary conditions are too small.
To do that:
select Graphics->Representations menu option
click on the "Periodic" tab, and
click on the "+x", "-x", "+y", "-y", "+z", "-z" checkboxes.
5) Optional: If you like, change the atom types in the PSF file so
that VMD recognizes the atom types, use something like:
sed -e 's/ 1 1 / C C /g' < system.psf > temp1.psf
sed -e 's/ 2 2 / H H /g' < temp1.psf > temp2.psf
sed -e 's/ 3 3 / P P /g' < temp2.psf > system.psf
(If you do this, it might effect step 2 above.)

View File

@ -1,47 +0,0 @@
import "gaff.lt"
# The "gaff.lt" file is usually located in $MOLTEMPLATE_PATH (and is
# distributed with moltemplate. See the "Installation" section in the manual.)
# It contains definitions of the atoms "ca", "ha", as well as the bonded
# and non-bonded interactions between them (and many other atoms).
#
# Moltemplate is only a simple text manipulation tool. It cannot
# calculate atomic charge using quantom chemistry methods.
# Atom charges for this example were taken from the OPLSAA force field file:
# http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
# However, normally simulations in AMBER are assigned charges using the
# "HF/6-31G* RESP2" or "AM1-BCC3" methods using AmberTools.
Benzene inherits GAFF {
write('Data Atoms') {
$atom:C1 $mol @atom:ca 0.115 5.274 1.999 -8.568
$atom:C2 $mol @atom:ca 0.115 6.627 2.018 -8.209
$atom:C3 $mol @atom:ca 0.115 7.366 0.829 -8.202
$atom:C4 $mol @atom:ca 0.115 6.752 -0.379 -8.554
$atom:C5 $mol @atom:ca 0.115 5.399 -0.398 -8.912
$atom:C6 $mol @atom:ca 0.115 4.660 0.791 -8.919
$atom:H11 $mol @atom:ha -0.115 4.704 2.916 -8.573
$atom:H21 $mol @atom:ha -0.115 7.101 2.950 -7.938
$atom:H31 $mol @atom:ha -0.115 8.410 0.844 -7.926
$atom:H41 $mol @atom:ha -0.115 7.322 -1.296 -8.548
$atom:H51 $mol @atom:ha -0.115 4.925 -1.330 -9.183
$atom:H61 $mol @atom:ha -0.115 3.616 0.776 -9.196
}
write('Data Bond List') {
$bond:C12 $atom:C1 $atom:C2
$bond:C23 $atom:C2 $atom:C3
$bond:C34 $atom:C3 $atom:C4
$bond:C45 $atom:C4 $atom:C5
$bond:C56 $atom:C5 $atom:C6
$bond:C61 $atom:C6 $atom:C1
$bond:C1H1 $atom:C1 $atom:H11
$bond:C2H2 $atom:C2 $atom:H21
$bond:C3H3 $atom:C3 $atom:H31
$bond:C4H4 $atom:C4 $atom:H41
$bond:C5H5 $atom:C5 $atom:H51
$bond:C6H6 $atom:C6 $atom:H61
}
} # Benzene

View File

@ -1,94 +0,0 @@
# This is a modified version of the file "oplsaa.prm" distributed with TINKER
# http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
# In this version, all of the lines beginning with "atom" have been deleted
# except for the atom types we will be using in this simulation
#
# If you use this file, please also cite the software this file comes from:
#
# Ponder, J. W., and Richards, F. M. J. Comput. Chem. (1987) 8(7), 1016-1024
# "An efficient newtonlike method for molecular mechanics energy
# minimization of large molecules."
#
# Ponder, J. W, (2004)
# "TINKER: Software tools for molecular design"
# http://dasher.wustl.edu/tinker/
##############################
## ##
## Force Field Definition ##
## ##
##############################
forcefield OPLS-AA
vdwindex TYPE
vdwtype LENNARD-JONES
radiusrule GEOMETRIC
radiustype SIGMA
radiussize DIAMETER
epsilonrule GEOMETRIC
vdw-14-scale 2.0
chg-14-scale 2.0
electric 332.06
dielectric 1.0
#############################
## ##
## Literature References ##
## ##
#############################
The parameters supplied with TINKER are from "OPLS All-Atom Parameters
for Organic Molecules, Ions, Peptides & Nucleic Acids, July 2008" as
provided by W. L. Jorgensen, Yale University during June 2009. These
parameters are taken from those distributed with BOSS Version 4.8.
Note that "atom type" numbers and not "atom class" numbers are used
to index van der Waals parameters, see the "vdwindex" keyword above
The atom types with (UA) in the description are "united atom" values,
ie, OPLS-UA, where any nonpolar hydrogen atoms are combined onto their
attached atoms. All other parameters are "all-atom", OPLS-AA, including
explicit hydrogen atoms.
#############################
## ##
## Atom Type Definitions ##
## ##
#############################
atom 88 47 CM "Alkene H2-C=" 6 12.011 3
atom 89 46 HC "Alkene H-C=" 1 1.008 1
atom 90 48 CA "Aromatic C" 6 12.011 3
atom 91 49 HA "Aromatic H-C" 1 1.008 1
################################
## ##
## Van der Waals Parameters ##
## ##
################################
vdw 88 3.5500 0.0760
vdw 89 2.4200 0.0300
vdw 90 3.5500 0.0700
vdw 91 2.4200 0.0300
########################################
## ##
## Atomic Partial Charge Parameters ##
## ##
########################################
charge 88 -0.2300
charge 89 0.1150
charge 90 -0.1150
charge 91 0.1150

View File

@ -1,38 +0,0 @@
import "gaff.lt"
# The "gaff.lt" file is usually located in $MOLTEMPLATE_PATH (and is
# distributed with moltemplate. See the "Installation" section in the manual.)
# It contains definitions of the atoms "c2", "hc", as well as the bonded
# and non-bonded interactions between them (and many other atoms).
#
# Moltemplate is only a simple text manipulation tool. It cannot
# calculate atomic charge using quantom chemistry methods.
# Atom charges for this example were taken from the OPLSAA force field file:
# http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
# However, normally simulations in AMBER are assigned charges using the
# "HF/6-31G* RESP2" or "AM1-BCC3" methods using AmberTools.
Ethylene inherits GAFF {
# atom-id mol-id atom-type charge X Y Z
write('Data Atoms') {
$atom:C1 $mol @atom:c2 -0.23 -0.6695 0.000000 0.000000
$atom:C2 $mol @atom:c2 -0.23 0.6695 0.000000 0.000000
$atom:H11 $mol @atom:hc 0.115 -1.234217 -0.854458 0.000000
$atom:H12 $mol @atom:hc 0.115 -1.234217 0.854458 0.000000
$atom:H21 $mol @atom:hc 0.115 1.234217 -0.854458 0.000000
$atom:H22 $mol @atom:hc 0.115 1.234217 0.854458 0.000000
}
write('Data Bond List') {
$bond:C12 $atom:C1 $atom:C2
$bond:C1H1 $atom:C1 $atom:H11
$bond:C1H2 $atom:C1 $atom:H12
$bond:C2H1 $atom:C2 $atom:H21
$bond:C2H2 $atom:C2 $atom:H22
}
} # Ethylene

View File

@ -1,29 +0,0 @@
import "ethylene.lt" # <- defines the "Ethylene" molecule type.
import "benzene.lt" # <- defines the "Benzene" molecule type.
# Periodic boundary conditions:
write_once("Data Boundary") {
0.0 80.00 xlo xhi
0.0 80.00 ylo yhi
0.0 80.00 zlo zhi
}
# Create 1000 ethylenes and 500 benzenes
ethylenes = new Ethylene[10].move(8.0, 0, 0)
[10].move(0, 8.0, 0)
[10].move(0, 0, 8.0)
benzenes = new Benzene[10].move(8.0, 0, 0)
[10].move(0, 8.0, 0)
[5].move(0, 0, 16.0)
# Now shift the positions of all of the benzene molecules,
# to reduce the chance that they overlap with the ethylene molecules.
benzenes[*][*][*].move(4.0, 4.0, 4.0)
# Note: There is also an example in the OPLSAA directory which shows how to
# generate the coordinates using PACKMOL. That allows us to omit all of
# the coordinates and .move() commands. (This works with AMBER/GAFF too.)

View File

@ -1,63 +0,0 @@
# MOST USERS CAN IGNORE THIS FILE
#
# Unfortunately, as of 2014-4-19, the system.data and system.in.settings file
# which are created by moltemplate.sh contain a lot of irrelevant information,
# such as definition of parameters for atom types not present in the current
# system. This extra information takes up about 1 MB.
#
# This appears to be harmless.
# (Loading this extra information does not seem to slow down LAMMPS.)
#
# --------- OPTIONAL STEPS FOR STRIPPING OUT JUNK ---------
#
# However if you want to eliminate this junk from these files
# For now, we can strip this out using ltemplify.py to build a new .lt file.
#
# NOTE: If you decide to use this script, it was meant to be run it from
# the parent directory (../) (If you run it from somewhere else, be sure to
# modify the "PATH_TO_DATA_FILE" and "PATH_TO_OUTPUT_TTREE" variables below.)
#
# I suggest you do this in a temporary_directory
PATH_TO_DATA_FILE="."
pushd "$PATH_TO_DATA_FILE"
mkdir new_lt_file
cd new_lt_file/
# now run ltemplify.py
ltemplify.py ../system.in.init ../system.in.settings ../system.data > system.lt
# This creates a new .LT file named "system.lt" in the local directory.
# The ltemplify.py script also does not copy the boundary dimensions.
# We must do this manually.
# If you did NOT throw away the "Data Boundary" file usually located in
# "moltemplate_files/output_ttree/Data Boundary"
# then you can copy that information from this file into system.lt
PATH_TO_OUTPUT_TTREE="../moltemplate_files/output_ttree"
echo "write_once(\"Data Boundary\") {" >> system.lt
cat "$PATH_TO_OUTPUT_TTREE/Data Boundary" >> system.lt
echo "}" >> system.lt
echo "" >> system.lt
# Now, run moltemplate on this new .LT file.
moltemplate.sh system.lt
# This will create: "system.data" "system.in.init" "system.in.settings."
# That's it. The new "system.data" and system.in.* files should
# be ready to run in LAMMPS.
# Now copy the system.data and system.in.* files to the place where
# you plan to run LAMMPS
mv -f system.data system.in.* ../
cd ../
# Now delete all of the temporary files we generated
rm -rf new_lt_file/
popd

View File

@ -1,53 +0,0 @@
# PREREQUISITES:
#
# You must use moltemplate.sh to create 3 files:
# system.data system.in.init system.in.settings
# (Follow the instructions in README_setup.sh,
# or run the file as a script using ./README_setup.sh)
# ------------------------------- Initialization Section --------------------
include "system.in.init"
# ------------------------------- Atom Definition Section -------------------
read_data "system.data"
# ------------------------------- Settings Section --------------------------
include "system.in.settings"
# ------------------------------- Run Section -------------------------------
# -- minimization protocol --
minimize 1.0e-4 1.0e-6 100000 400000
# -- simulation protocol --
timestep 1.0
print "---------------------------------------------------------------------------"
print "First, use Langevin dynamics to randomize the initial shape of the molecules"
print "(This is not really necessary, but it seems to speed up equilibration.)"
print "---------------------------------------------------------------------------"
fix fxlan all langevin 300.0 300.0 120 123456 # temp: 300 K
fix fxnph all nph iso 50.0 50.0 1000.0 # pressure: 50 barr
run 2000
unfix fxlan
unfix fxnph
print "---------------------------------------------------------------------------"
print "--- Now continue the simulation using a Nose-Hoover Thermostat/Barostat ---"
print "---------------------------------------------------------------------------"
dump 1 all custom 1000 traj_npt.lammpstrj id mol type x y z ix iy iz
# temperature: 300 K, pressure: 50 barr
fix fxnpt all npt temp 300.0 300.0 100.0 iso 50.0 50.0 1000.0 drag 1.0
thermo 100
#thermo_modify flush yes
run 100000
write_data system_after_npt.data

View File

@ -1,46 +0,0 @@
# PREREQUISITES:
#
# 1) You must use moltemplate.sh to create 3 files:
# system.data system.in.init system.in.settings
# (Follow the instructions in README_setup.sh,
# or run the file as a script using ./README_setup.sh)
# 2) You must equilibrate the system beforehand using "run.in.npt".
# This will create the file "system_after_npt.data" which this file reads.
# (Note: I have not verified that this equilibration protocol works well.)
# ------------------------------- Initialization Section --------------------
include "system.in.init"
# ------------------------------- Atom Definition Section -------------------
# Read the coordinates generated by an earlier NPT simulation
read_data "system_after_npt.data"
# ------------------------------- Settings Section --------------------------
include "system.in.settings"
# (The "write_restart" and "read_restart" commands were buggy in 2012,
# but they should work also. I prefer "write_data" and "read_data".)
# ------------------------------- Settings Section --------------------------
include system.in.settings
# ------------------------------- Run Section -------------------------------
# -- simulation protocol --
timestep 1.0
dump 1 all custom 5000 traj_nvt.lammpstrj id mol type x y z ix iy iz
fix fxnvt all nvt temp 300.0 300.0 500.0 tchain 1
thermo 500
#thermo_modify flush yes
run 200000
write_data system_after_nvt.data

View File

@ -1,44 +0,0 @@
This example is a simple simulation of 288 hexadecane molecules in a box at
room temperature and atmospheric pressure. Please read the WARNING.TXT file.
-------- REQUIREMENTS: ---------
This example requires building LAMMPS with the "USER-MISC" package.
(because it uses dihedral_style fourier)
To do this, type "make yes-user-misc" before compiling LAMMPS.
http://lammps.sandia.gov/doc/Section_start.html#start_3
More detailed instructions on how to build LAMMPS input files and
run a short simulation are provided in other README files:
step 1) to setup the LAMMPS input files, run this file:
README_setup.sh
(Currently there is a bug which makes this step slow.
I'll fix it later -Andrew 2013-10-15.)
step 2) to run LAMMPS, follow the instructions in this file:
README_run.sh
------------ NOTE: There are two versions of this example. ----------------
Both examples use the same force-field parameters.
1)
In this version, the force-field parameters are loaded from the "gaff.lt" file
(located in the "common" subdirectory).
This frees the user from the drudgery of manually specifying all of these
force-field details for every molecule. (However, the user must be careful
to choose @atom-type names which match AMBER GAFF conventions,
such as the "c3" and "h1" atoms, in this example.)
2)
Alternately, there is another "hexadecane" example in the "all_atom_examples"
directory. In that example, force-field parameters are loaded from a file
named "alkanes.lt" (instead of "gaff.lt"). The "alkanes.lt" file contains
only the excerpts from "gaff.lt" which are relevant to the hydrocarbon
molcules used in that example. ("gaff.lt" contains parameters for most
small organic molecules, not just hydrocarbons.)
In this way, by editing "alkanes.lt", the user can manually control all of the
force-field details in the simulation. (Without feeling as though they are
relying on some kind of mysterious "black box" to do it for them.)

View File

@ -1,39 +0,0 @@
# --- Running LAMMPS ---
# -------- REQUIREMENTS: ---------
# 1) This example requires building LAMMPS with the "USER-MISC" package.
# (because it makes use of "gaff.lt" which uses dihedral_style fourier)
# To do this, type "make yes-user-misc" before compiling LAMMPS.
# http://lammps.sandia.gov/doc/Section_start.html#start_3
# -------- PREREQUISITES: --------
# The 2 files "run.in.npt", and "run.in.nvt" are LAMMPS
# input scripts which link to the input scripts and data files
# you hopefully have created earlier with moltemplate.sh:
# system.in.init, system.in.settings, system.data
# If not, carry out the instructions in "README_setup.sh".
#
# -- Instructions: --
# If "lmp_mpi" is the name of the command you use to invoke lammps,
# then you would run lammps on these files this way:
lmp_mpi -i run.in.npt # minimization and simulation at constant pressure
lmp_mpi -i run.in.nvt # minimization and simulation at constant volume
#(Note: The constant volume simulation lacks pressure equilibration. These are
# completely separate simulations. The results of the constant pressure
# simulation might be ignored when beginning the simulation at constant
# volume. (This is because restart files in LAMMPS don't always work,
# and I was spending a lot of time trying to convince people it was a
# LAMMPS bug, instead of a moltemplate bug, so I disabled restart files.)
# Read the "run.in.nvt" file to find out how to use the "read_restart"
# command to load the results of the pressure-equilibration simulation,
# before beginning a constant-volume run.
# If you have compiled the MPI version of lammps, you can run lammps in parallel
#mpirun -np 4 lmp_mpi -i run.in.npt
#mpirun -np 4 lmp_mpi -i run.in.nvt
# (assuming you have 4 processors available)

View File

@ -1,32 +0,0 @@
# -------- REQUIREMENTS: ---------
# You must define your MOLTEMPLATE_PATH environment variable
# and set it to the "common" subdirectory of your moltemplate distribution.
# (See the "Installation" section in the moltemplate manual.)
# Create LAMMPS input files this way:
cd moltemplate_files
# run moltemplate
moltemplate.sh system.lt
# This will generate various files with names ending in *.in* and *.data.
# Move them to the directory where you plan to run LAMMPS (in this case "../")
mv -f system.data system.in* ../
# Optional:
# The "./output_ttree/" directory is full of temporary files generated by
# moltemplate. They can be useful for debugging, but are usually thrown away.
#rm -rf output_ttree/
cd ../
# Optional:
# Note: The system.data and system.in.settings files contain extra information
# for atoms defined in GAFF which you are not using in this simulation. This
# is harmless, but if you to delete this information from your
# system.in.settings and system.in.data files, follow the instructions in
# this script: "optional_cleanup/README_remove_irrelevant_info.sh"

View File

@ -1,87 +0,0 @@
------- To view a lammps trajectory in VMD --------
1) Build a PSF file for use in viewing with VMD.
This step works with VMD 1.9 and topotools 1.2.
(Older versions, like VMD 1.8.6, don't support this.)
a) Start VMD
b) Menu Extensions->Tk Console
c) Enter:
(I assume that the the DATA file is called "system.data")
topo readlammpsdata system.data full
animate write psf system.psf
2)
Later, to Load a trajectory in VMD:
Start VMD
Select menu: File->New Molecule
-Browse to select the PSF file you created above, and load it.
(Don't close the window yet.)
-Browse to select the trajectory file.
If necessary, for "file type" select: "LAMMPS Trajectory"
Load it.
---- A note on trajectory format: -----
If the trajectory is a DUMP file, then make sure the it contains the
information you need for pbctools (see below. I've been using this
command in my LAMMPS scripts to create the trajectories:
dump 1 all custom 5000 DUMP_FILE.lammpstrj id mol type x y z ix iy iz
It's a good idea to use an atom_style which supports molecule-ID numbers
so that you can assign a molecule-ID number to each atom. (I think this
is needed to wrap atom coordinates without breaking molecules in half.)
Of course, you don't have to save your trajectories in DUMP format,
(other formats like DCD work fine) I just mention dump files
because these are the files I'm familiar with.
3) ----- Wrap the coordinates to the unit cell
(without cutting the molecules in half)
a) Start VMD
b) Load the trajectory in VMD (see above)
c) Menu Extensions->Tk Console
d) Try entering these commands:
pbc wrap -compound res -all
pbc box
----- Optional ----
Sometimes the solvent or membrane obscures the view of the solute.
It can help to shift the location of the periodic boundary box
To shift the box in the y direction (for example) do this:
pbc wrap -compound res -all -shiftcenterrel {0.0 0.15 0.0}
pbc box -shiftcenterrel {0.0 0.15 0.0}
Distances are measured in units of box-length fractions, not Angstroms.
Alternately if you have a solute whose atoms are all of type 1,
then you can also try this to center the box around it:
pbc wrap -sel type=1 -all -centersel type=2 -center com
4)
You should check if your periodic boundary conditions are too small.
To do that:
select Graphics->Representations menu option
click on the "Periodic" tab, and
click on the "+x", "-x", "+y", "-y", "+z", "-z" checkboxes.
5) Optional: If you like, change the atom types in the PSF file so
that VMD recognizes the atom types, use something like:
sed -e 's/ 1 1 / C C /g' < system.psf > temp1.psf
sed -e 's/ 2 2 / H H /g' < temp1.psf > temp2.psf
sed -e 's/ 3 3 / P P /g' < temp2.psf > system.psf
(If you do this, it might effect step 2 above.)

View File

@ -1,16 +0,0 @@
# -------- WARNING: --------
This software is experimental, and the force-fields and equilbration protocols
have not been tested carefully by me. There is no gaurantee that the simulation
will reproduce the behavior of real hexadecane molecules,
(or even of hexadecane molecules simulated using AMBER, which should
be using the same force-field).
# -------- REQUEST FOR HELP: --------
However, if you notice a problem with this example, please report it.
I confess I do not have a lot of experience running all-atom simulations.
Peer-review is the only way to improve this software (or any software).
Other suggestions are also welcome!
(Contact jewett.aij@gmail.com, 2013-10-16)

View File

@ -1,59 +0,0 @@
import "gaff.lt" # <-- defines the "GAFF" force field
# The "gaff.lt" file is usually located in $MOLTEMPLATE_PATH (and is
# distributed with moltemplate. See the "Installation" section in the manual.)
# It contains definitions of the atoms "c3", "hc", as well as the force-field
# parameters for bonded and non-bonded interactions between them
# (and many other atoms).
# Atom charges were taken from the OPLSAA force field file:
# http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
CH2 inherits GAFF {
# atom-id mol-id atom-type charge x y z
write("Data Atoms") {
$atom:C $mol:... @atom:c3 -0.120 0.000 0.000 0.000
$atom:H1 $mol:... @atom:hc 0.060 0.000 0.63104384422426 0.892430762954
$atom:H2 $mol:... @atom:hc 0.060 0.000 0.63104384422426 -0.892430762954
}
# Note: The "..." in "$mol:..." tells moltemplate that this molecule may
# be a part of a larger molecule, and (if so) to use the larger
# parent object's molecule id number as it's own.
# The CH2 group is part of the Hexadecane molecule.
# Now specify which pairs of atoms are bonded:
write('Data Bond List') {
$bond:CH1 $atom:C $atom:H1
$bond:CH2 $atom:C $atom:H2
}
} # CH2
# 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.
# (This makes it more convenient to construct a polymer later.
# If this is confusing, then simply add 0.4431163 to the Y
# coordinates in the "Data Atoms" section above.)
CH2.move(0,0.4431163,0)
######### (scratchwork calculations for the atomic coordinates) #########
# Lcc = 1.5350 # length of the C-C bond (Sp3)
# Lch = 1.0930 # length of the C-H bond
# theta=2*atan(sqrt(2)) # ~= 109.5 degrees = tetrahedronal angle (C-C-C angle)
# DeltaXc = Lcc*sin(theta/2) # = 1.2533222517240594
# DeltaYc = Lcc*cos(theta/2) # = 0.8862326632060754
# # 0.5*DeltaYc = 0.4431163316030377
# DeltaZh = Lch*sin(theta/2) # = 0.8924307629540046
# DeltaYh = Lch*cos(theta/2) # = 0.6310438442242609

View File

@ -1,65 +0,0 @@
import "gaff.lt" # <-- defines the "GAFF" force field
# The "gaff.lt" file is usually located in $MOLTEMPLATE_PATH (and is
# distributed with moltemplate. See the "Installation" section in the manual.)
# It contains definitions of the atoms "c3", "hc", as well as the force-field
# parameters for bonded and non-bonded interactions between them
# (and many other atoms).
#
# Moltemplate is only a simple text manipulation tool. It cannot
# calculate atomic charge using quantom chemistry methods.
# Atom charges for this example were taken from the OPLSAA force field file:
# http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
# However, normally simulations in AMBER are assigned charges using the
# "HF/6-31G* RESP2" or "AM1-BCC3" methods using AmberTools.
CH3 inherits GAFF {
# atom-id mol-id atom-type charge x y z
write("Data Atoms") {
$atom:C $mol:... @atom:c3 -0.180 0.000000 0.000000 0.000000
$atom:H1 $mol:... @atom:hc 0.060 0.000000 0.6310438442242609 0.8924307629540046
$atom:H2 $mol:... @atom:hc 0.060 0.000000 0.6310438442242609 -0.8924307629540046
$atom:H3 $mol:... @atom:hc 0.060 -0.8924307629540046 -0.6310438442242609 0.000000
}
# Note: The "..." in "$mol:..." tells moltemplate that this molecule may
# be a part of a larger molecule, and (if so) to use the larger
# parent object's molecule id number as it's own.
# The CH3 group is part of the Hexadecane molecule.
# Now specify which pairs of atoms are bonded:
write('Data Bond List') {
$bond:CH1 $atom:C $atom:H1
$bond:CH2 $atom:C $atom:H2
$bond:CH3 $atom:C $atom:H3
}
} # CH3
# 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.
# (This makes it more convenient to construct a polymer later.
# If this is confusing, then simply add 0.4431163 to the Y
# coordinates in the "Data Atoms" section above.)
CH3.move(0,0.4431163,0)
######### (scratchwork calculations for the atomic coordinates) #########
# Lcc = 1.5350 # length of the C-C bond (Sp3)
# Lch = 1.0930 # length of the C-H bond
# theta=2*atan(sqrt(2)) # ~= 109.5 degrees = tetrahedronal angle (C-C-C angle)
# DeltaXc = Lcc*sin(theta/2) # = 1.2533222517240594
# DeltaYc = Lcc*cos(theta/2) # = 0.8862326632060754
# # 0.5*DeltaYc = 0.4431163316030377
# DeltaZh = Lch*sin(theta/2) # = 0.8924307629540046
# DeltaYh = Lch*cos(theta/2) # = 0.6310438442242609

View File

@ -1,89 +0,0 @@
# This example looks complicated because I split the
# hexadecane molecule into individual CH2 and CH3 monomers.
#
# I defined it this way so that you can easily modify
# it to change the length of the alkane chain.
import "gaff.lt" # load the "GAFF" force-field information
import "ch2group.lt" # load the definition of the "CH2" object
import "ch3group.lt" # load the definition of the "CH3" object
Hexadecane inherits GAFF {
create_var {$mol} # optional:force all monomers to share the same molecule-ID
# Now create an array of 16 "CH2" objects distributed along the X axis
monomers = new CH2 [16].rot(180,1,0,0).move(1.2533223,0,0)
# Each monomer is rotated 180 degrees with respect to the previous
# monomer, and then moved 1.2533223 Angstroms down the X axis.
# ---- Now, modify the ends: ---
# Delete the CH2 groups at the beginning and end, and replace them with CH3.
# (Note: Alternately, instead of deleting the CH2 groups at each end, you
# could modify them by adding an extra hydrogen atom to those carbons.)
delete monomers[0]
delete monomers[15]
monomers[0] = new CH3
monomers[15] = new CH3
# Move the CH3 groups to the correct location at either end of the chain:
monomers[15].rot(180.0,0,0,1).move(18.7998345,0,0)
# Note: 18.7998345 = (16-1) * 1.2533223
# Now add a list of bonds connecting the carbon atoms together:
write('Data Bond List') {
$bond:b1 $atom:monomers[0]/C $atom:monomers[1]/C
$bond:b2 $atom:monomers[1]/C $atom:monomers[2]/C
$bond:b3 $atom:monomers[2]/C $atom:monomers[3]/C
$bond:b4 $atom:monomers[3]/C $atom:monomers[4]/C
$bond:b5 $atom:monomers[4]/C $atom:monomers[5]/C
$bond:b6 $atom:monomers[5]/C $atom:monomers[6]/C
$bond:b7 $atom:monomers[6]/C $atom:monomers[7]/C
$bond:b8 $atom:monomers[7]/C $atom:monomers[8]/C
$bond:b9 $atom:monomers[8]/C $atom:monomers[9]/C
$bond:b10 $atom:monomers[9]/C $atom:monomers[10]/C
$bond:b11 $atom:monomers[10]/C $atom:monomers[11]/C
$bond:b12 $atom:monomers[11]/C $atom:monomers[12]/C
$bond:b13 $atom:monomers[12]/C $atom:monomers[13]/C
$bond:b14 $atom:monomers[13]/C $atom:monomers[14]/C
$bond:b15 $atom:monomers[14]/C $atom:monomers[15]/C
}
} # Hexadecane
######### (scratchwork calculations for the atomic coordinates) #########
#
# 1.2533223 = DeltaXc = how far each CH2 group is shifted along
# the X axis (in Angstoms).
# 0.4431163 = DeltaYc/2 = lateral displacement of carbons away
# from the central axis. (See below.)
#
# Lcc = 1.5350 # length of the C-C bond (Sp3)
# Lch = 1.0930 # length of the C-H bond
# theta=2*atan(sqrt(2)) # ~= 109.5 degrees = tetrahedronal angle (C-C-C angle)
# DeltaXc = Lcc*sin(theta/2) # = 1.2533222517240594
# DeltaYc = Lcc*cos(theta/2) # = 0.8862326632060754
# # 0.5*DeltaYc = 0.4431163316030377
# DeltaZh = Lch*sin(theta/2) # = 0.8924307629540046
# DeltaYh = Lch*cos(theta/2) # = 0.6310438442242609

View File

@ -1,18 +0,0 @@
import "hexadecane.lt" # <- defines the "Hexadecane" molecule type.
# Periodic boundary conditions:
write_once("Data Boundary") {
0.0 62.4 xlo xhi
0.0 62.4 ylo yhi
0.0 62.4 zlo zhi
}
molecules = new Hexadecane [12].move(0, 0, 5.2)
[12].move(0, 5.2, 0)
[2].move(31.2, 0, 0)
# NOTE: The spacing between molecules is large. There should be extra room to
# move during the initial stages of equilibration. However, you will have to
# run the simulation at NPT conditions later to compress the system to a
# more realistic density.

View File

@ -1,63 +0,0 @@
# MOST USERS CAN IGNORE THIS FILE
#
# Unfortunately, as of 2014-4-19, the system.data and system.in.settings file
# which are created by moltemplate.sh contain a lot of irrelevant information,
# such as definition of parameters for atom types not present in the current
# system. This extra information takes up about 1 MB.
#
# This appears to be harmless.
# (Loading this extra information does not seem to slow down LAMMPS.)
#
# --------- OPTIONAL STEPS FOR STRIPPING OUT JUNK ---------
#
# However if you want to eliminate this junk from these files
# For now, we can strip this out using ltemplify.py to build a new .lt file.
#
# NOTE: If you decide to use this script, it was meant to be run it from
# the parent directory (../) (If you run it from somewhere else, be sure to
# modify the "PATH_TO_DATA_FILE" and "PATH_TO_OUTPUT_TTREE" variables below.)
#
# I suggest you do this in a temporary_directory
PATH_TO_DATA_FILE="."
pushd "$PATH_TO_DATA_FILE"
mkdir new_lt_file
cd new_lt_file/
# now run ltemplify.py
ltemplify.py ../system.in.init ../system.in.settings ../system.data > system.lt
# This creates a new .LT file named "system.lt" in the local directory.
# The ltemplify.py script also does not copy the boundary dimensions.
# We must do this manually.
# If you did NOT throw away the "Data Boundary" file usually located in
# "moltemplate_files/output_ttree/Data Boundary"
# then you can copy that information from this file into system.lt
PATH_TO_OUTPUT_TTREE="../moltemplate_files/output_ttree"
echo "write_once(\"Data Boundary\") {" >> system.lt
cat "$PATH_TO_OUTPUT_TTREE/Data Boundary" >> system.lt
echo "}" >> system.lt
echo "" >> system.lt
# Now, run moltemplate on this new .LT file.
moltemplate.sh system.lt
# This will create: "system.data" "system.in.init" "system.in.settings."
# That's it. The new "system.data" and system.in.* files should
# be ready to run in LAMMPS.
# Now copy the system.data and system.in.* files to the place where
# you plan to run LAMMPS
mv -f system.data system.in.* ../
cd ../
# Now delete all of the temporary files we generated
rm -rf new_lt_file/
popd

View File

@ -1,86 +0,0 @@
# PREREQUISITES:
#
# You must use moltemplate.sh to create 3 files:
# system.data system.in.init system.in.settings
# (Follow the instructions in README_setup.sh,
# or run the file as a script using ./README_setup.sh)
# ------------------------------- Initialization Section --------------------
include system.in.init
# ------------------------------- Atom Definition Section -------------------
read_data system.data
# ------------------------------- Settings Section --------------------------
include system.in.settings
# ------------------------------- Run Section -------------------------------
# To avvoid explosions, I have a 4-step equilibraion process (expand, minimize,
# reorient, compress). The system (as defined in the "system.data" file)
# is already expanded. That means there are 3 steps left:
dump dumpeq1 all custom 50 traj_eq1_min.lammpstrj id mol type x y z ix iy iz
thermo 50
# -- Equilibration: part 1: initial minimization --
# Note: In general, it's always a good idea to minimize the system at first.
minimize 1.0e-5 1.0e-7 100000 400000
undump dumpeq1
write_data system_after_eq1_min.data
# -- Equilibration part 2: reorienting the molecules (NVT) --
timestep 1.0
dump dumpeq2 all custom 200 traj_eq2_reorient.lammpstrj id mol type x y z ix iy iz
# Run the system at high temperature (at constant volume) to reorient the
# the molecules (which would otherwise be pointing in the same direction).
# To speed it up, I randomize the atomic positions for a few thousand steps
# using fix langevin (and fix nve). Then I switch to fix nvt (Nose-Hoover).
# (If I start with fix nvt (Nose-Hoover), it seems to get "stuck" for a while.)
fix fxlan all langevin 900.0 900.0 120 48279
fix fxnve all nve
run 4000
unfix fxlan
unfix fxnve
# Now continue the simulation at high temperature using fix nvt (Nose-Hoover).
fix fxnvt all nvt temp 900.0 900.0 100.0
run 50000
undump dumpeq2
write_data system_after_eq2_reorient.data
unfix fxnvt
# -- equilibration part 3: Equilibrating the density (NPT) --
# Originally, the simulation box (in "system.data" and "system.lt") was
# unrealistically large. The spacing between the molecules was large also.
# I did this to enable the molecules to move freely and reorient themselves.
# After doing that, we should run the simulation under NPT conditions to
# allow the simulation box to contract to it's natural size. We do that here:
# We begin the simulation at 100 barr (a relatively low pressure), and
# slowly decrease it to 1 barr, maintianing the temperature at 300K.
dump dumpeq3 all custom 200 traj_eq3_npt.lammpstrj id mol type x y z ix iy iz
fix fxnpt all npt temp 900.0 300.0 100.0 iso 100.0 1.0 1000.0 drag 2.0
timestep 1.0
run 100000
write_data system_after_eq3_npt.data

View File

@ -1,43 +0,0 @@
# PREREQUISITES:
#
# 1) You must use moltemplate.sh to create 3 files:
# system.data system.in.init system.in.settings
# (Follow the instructions in README_setup.sh,
# or run the file as a script using ./README_setup.sh)
# 2) You must equilibrate the system beforehand using "run.in.npt".
# This will create the file "system_after_npt.data" which this file reads.
# (Note: I have not verified that this equilibration protocol works well.)
# ------------------------------- Initialization Section --------------------
include system.in.init
# ------------------------------- Atom Definition Section -------------------
# Read the coordinates generated by an earlier NPT simulation
read_data system_after_eq3_npt.data
# (The "write_restart" and "read_restart" commands were buggy in 2012,
# but they should work also. I prefer "write_data" and "read_data".)
# ------------------------------- Settings Section --------------------------
include system.in.settings
# ------------------------------- Run Section -------------------------------
# -- simulation protocol --
timestep 1.0
dump 1 all custom 500 traj_nvt.lammpstrj id mol type x y z ix iy iz
fix fxnvt all nvt temp 350.0 350.0 500.0 tchain 1
thermo 100
#thermo_modify flush yes
run 50000
write_data system_after_nvt.data

View File

@ -1,51 +0,0 @@
This is an example of how to use "canned" force-fields in like GAFF in LAMMPS.
In this example, we specify only the atom names, bond connectivity,
(and coordinates and charge), and use moltemplate to
load the GAFF parameters from an external file (gaff.lt)
(...instead of specifying them explicitly in the molecule definition).
The simulation consists of a mixture of isobutane and water.
Over time (less than 1 ns), the two molecules phase-separate.
The GAFF parameters are applied only to the isobutane molecule.
(The water molecule paramters are defined explicitly in common/tip3p_2004.lt)
For this to work, make sure you have defined the MOLTEMPLATE_PATH
environment variable and set it to "common". See manual for more details.)
WARNING: THIS IS A PRELIMINARY EXAMPLE WHICH USES AMBER'S GAFF FORCE FIELD.
AS OF 2014-4-19, these features have not been tested.
THE ABILITY TO DETECT AND ASSIGN GAFF FORCE FIELD PARAMETERS
MOLECULES ACCORDING TO ATOM TYPE IS AN EXPERIMENTAL FEATURE
AND CURRENTLY PROBABLY HAS BUGS (IN THE DIHEDRALS AND IMPROPERS).
PLEASE REPORT BUGS AND/OR SEND CORRECTIONS. -A 2014-4-19
----------------- CHARGE ----------------------
NOTE: The GAFF force-field DOES NOT ASSIGN ATOM CHARGE.
In this example, atom charges were taken from the OPLSAA force field file:
http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
This is not the charge in AMBER simunlations is typically assigned.
(As of 2014, it is assigned using the "HF/6-31G* RESP2" or "AM1-BCC3"
methods using AmberTools (which are not available in moltemplate).
http://ambermd.org/doc6/html/AMBER-sh-19.4.html
http://ambermd.org/tutorials/basic/tutorial4b/)
-------- REQUIREMENTS: ---------
1) This example requires building LAMMPS with the "USER-MISC" package.
(because it makes use of "gaff.lt" which uses dihedral_style fourier)
To do this, type "make yes-user-misc" before compiling LAMMPS.
http://lammps.sandia.gov/doc/Section_start.html#start_3
2) You must define your MOLTEMPLATE_PATH environment variable
and set it to the "common" subdirectory of your moltemplate distribution.
(See the "Installation" section in the moltemplate manual.)
More detailed instructions on how to build LAMMPS input files and
run a short simulation are provided in other README files.
step 1)
README_setup.sh
step 2)
README_run.sh

View File

@ -1,39 +0,0 @@
# --- Running LAMMPS ---
# -------- REQUIREMENTS: ---------
# 1) This example requires building LAMMPS with the "USER-MISC" package.
# (because it makes use of "gaff.lt" which uses dihedral_style fourier)
# To do this, type "make yes-user-misc" before compiling LAMMPS.
# http://lammps.sandia.gov/doc/Section_start.html#start_3
# -------- PREREQUISITES: --------
# The 2 files "run.in.npt", and "run.in.nvt" are LAMMPS
# input scripts which link to the input scripts and data files
# you hopefully have created earlier with moltemplate.sh:
# system.in.init, system.in.settings, system.data
# If not, carry out the instructions in "README_setup.sh".
#
# -- Instructions: --
# If "lmp_mpi" is the name of the command you use to invoke lammps,
# then you would run lammps on these files this way:
lmp_mpi -i run.in.npt # minimization and simulation at constant pressure
lmp_mpi -i run.in.nvt # minimization and simulation at constant volume
#(Note: The constant volume simulation lacks pressure equilibration. These are
# completely separate simulations. The results of the constant pressure
# simulation might be ignored when beginning the simulation at constant
# volume. (This is because restart files in LAMMPS don't always work,
# and I was spending a lot of time trying to convince people it was a
# LAMMPS bug, instead of a moltemplate bug, so I disabled restart files.)
# Read the "run.in.nvt" file to find out how to use the "read_restart"
# command to load the results of the pressure-equilibration simulation,
# before beginning a constant-volume run.
# If you have compiled the MPI version of lammps, you can run lammps in parallel
#mpirun -np 4 lmp_mpi -i run.in.npt
#mpirun -np 4 lmp_mpi -i run.in.nvt
# (assuming you have 4 processors available)

View File

@ -1,32 +0,0 @@
# -------- REQUIREMENTS: ---------
# You must define your MOLTEMPLATE_PATH environment variable
# and set it to the "common" subdirectory of your moltemplate distribution.
# (See the "Installation" section in the moltemplate manual.)
# Create LAMMPS input files this way:
cd moltemplate_files
# run moltemplate
moltemplate.sh system.lt
# This will generate various files with names ending in *.in* and *.data.
# Move them to the directory where you plan to run LAMMPS (in this case "../")
mv -f system.data system.in* ../
# Optional:
# The "./output_ttree/" directory is full of temporary files generated by
# moltemplate. They can be useful for debugging, but are usually thrown away.
#rm -rf output_ttree/
cd ../
# Optional:
# Note: The system.data and system.in.settings files contain extra information
# for atoms defined in GAFF which you are not using in this simulation. This
# is harmless, but if you to delete this information from your
# system.in.settings and system.in.data files, follow the instructions in
# this script: "optional_cleanup/README_remove_irrelevant_info.sh"

View File

@ -1,87 +0,0 @@
------- To view a lammps trajectory in VMD --------
1) Build a PSF file for use in viewing with VMD.
This step works with VMD 1.9 and topotools 1.2.
(Older versions, like VMD 1.8.6, don't support this.)
a) Start VMD
b) Menu Extensions->Tk Console
c) Enter:
(I assume that the the DATA file is called "system.data")
topo readlammpsdata system.data full
animate write psf system.psf
2)
Later, to Load a trajectory in VMD:
Start VMD
Select menu: File->New Molecule
-Browse to select the PSF file you created above, and load it.
(Don't close the window yet.)
-Browse to select the trajectory file.
If necessary, for "file type" select: "LAMMPS Trajectory"
Load it.
---- A note on trajectory format: -----
If the trajectory is a DUMP file, then make sure the it contains the
information you need for pbctools (see below. I've been using this
command in my LAMMPS scripts to create the trajectories:
dump 1 all custom 5000 DUMP_FILE.lammpstrj id mol type x y z ix iy iz
It's a good idea to use an atom_style which supports molecule-ID numbers
so that you can assign a molecule-ID number to each atom. (I think this
is needed to wrap atom coordinates without breaking molecules in half.)
Of course, you don't have to save your trajectories in DUMP format,
(other formats like DCD work fine) I just mention dump files
because these are the files I'm familiar with.
3) ----- Wrap the coordinates to the unit cell
(without cutting the molecules in half)
a) Start VMD
b) Load the trajectory in VMD (see above)
c) Menu Extensions->Tk Console
d) Try entering these commands:
pbc wrap -compound res -all
pbc box
----- Optional ----
Sometimes the solvent or membrane obscures the view of the solute.
It can help to shift the location of the periodic boundary box
To shift the box in the y direction (for example) do this:
pbc wrap -compound res -all -shiftcenterrel {0.0 0.15 0.0}
pbc box -shiftcenterrel {0.0 0.15 0.0}
Distances are measured in units of box-length fractions, not Angstroms.
Alternately if you have a solute whose atoms are all of type 1,
then you can also try this to center the box around it:
pbc wrap -sel type=1 -all -centersel type=2 -center com
4)
You should check if your periodic boundary conditions are too small.
To do that:
select Graphics->Representations menu option
click on the "Periodic" tab, and
click on the "+x", "-x", "+y", "-y", "+z", "-z" checkboxes.
5) Optional: If you like, change the atom types in the PSF file so
that VMD recognizes the atom types, use something like:
sed -e 's/ 1 1 / C C /g' < system.psf > temp1.psf
sed -e 's/ 2 2 / H H /g' < temp1.psf > temp2.psf
sed -e 's/ 3 3 / P P /g' < temp2.psf > system.psf
(If you do this, it might effect step 2 above.)

View File

@ -1,56 +0,0 @@
import "gaff.lt"
# The "gaff.lt" file is usually located in $MOLTEMPLATE_PATH (and is
# distributed with moltemplate. See the "Installation" section in the manual.)
# It contains definitions of the atoms "c3", "h1", as well as the bonded
# and non-bonded interactions between them (and many other atoms).
#
# Moltemplate is only a simple text manipulation tool. It cannot
# calculate atomic charge using quantom chemistry methods.
# Atom charges for this example were taken from the OPLSAA force field file:
# http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
# However, normally simulations in AMBER are assigned charges using the
# "HF/6-31G* RESP2" or "AM1-BCC3" methods using AmberTools.
Isobutane inherits GAFF {
# atomID molID atomTyle charge X Y Z
write('Data Atoms') {
$atom:C0 $mol:. @atom:c3 -0.0600 -0.001 -0.001 -0.439
$atom:C1 $mol:. @atom:c3 -0.1800 -1.257 -0.726 0.078
$atom:C2 $mol:. @atom:c3 -0.1800 1.258 -0.726 0.072
$atom:C3 $mol:. @atom:c3 -0.1800 -0.001 1.453 0.069
$atom:H0 $mol:. @atom:hc 0.0600 -0.003 -0.004 -1.439
$atom:H11 $mol:. @atom:hc 0.0600 -2.075 -0.255 -0.254
$atom:H12 $mol:. @atom:hc 0.0600 -1.256 -0.724 1.078
$atom:H13 $mol:. @atom:hc 0.0600 -1.259 -1.669 -0.253
$atom:H21 $mol:. @atom:hc 0.0600 2.074 -0.255 -0.264
$atom:H22 $mol:. @atom:hc 0.0600 1.258 -1.669 -0.259
$atom:H23 $mol:. @atom:hc 0.0600 1.261 -0.724 1.072
$atom:H31 $mol:. @atom:hc 0.0600 -0.817 1.923 -0.263
$atom:H32 $mol:. @atom:hc 0.0600 0.816 1.923 -0.268
$atom:H33 $mol:. @atom:hc 0.0600 0.003 1.456 1.070
}
# The "." in "$mol:." refers to this molecule object's molecule ID
# (It means we do not expect this molecule to be a group or a subunit
# of a larger molecule. Otherwise we would use "$mol:..." instead.)
write('Data Bond List') {
$bond:C01 $atom:C0 $atom:C1
$bond:C02 $atom:C0 $atom:C2
$bond:C03 $atom:C0 $atom:C3
$bond:C0H $atom:C0 $atom:H0
$bond:C1H1 $atom:C1 $atom:H11
$bond:C1H2 $atom:C1 $atom:H12
$bond:C1H3 $atom:C1 $atom:H13
$bond:C2H1 $atom:C2 $atom:H21
$bond:C2H2 $atom:C2 $atom:H22
$bond:C2H3 $atom:C2 $atom:H23
$bond:C3H1 $atom:C3 $atom:H31
$bond:C3H2 $atom:C3 $atom:H32
$bond:C3H3 $atom:C3 $atom:H33
}
} # Isobutane

View File

@ -1,32 +0,0 @@
import "tip3p_2004.lt"
# <- This defines the TIP3P water molecule. This file is
# located in the "common" directory. You can either copy it
# here, or (preferably), you can define a MOLTEMPLATE_PATH
# environment variable and point it to "common".
# (as explained in the installation section of the manual).
import "isobutane.lt" # <- defines the "Isobutane" molecule type.
# Periodic boundary conditions:
write_once("Data Boundary") {
0.0 41.50 xlo xhi
0.0 41.50 ylo yhi
0.0 41.50 zlo zhi
}
# The next command generates a (rather dense) cubic lattice with
# spacing 3.45 Angstroms. (The pressure must be equilibrated later.)
wat = new TIP3P_2004 [12].move(0.00, 0.00, 3.45)
[12].move(0.00, 3.45, 0.00)
[12].move(3.45, 0.00, 0.00)
isobutane = new Isobutane [4].move(0, 0, 10.35)
[4].move(0, 10.35, 0)
[4].move(10.35, 0, 0)
# move the isobutane molecules slightly to reduce overlap with the water
isobutane[*][*][*].move(1.725, 1.725, 1.725)

View File

@ -1,63 +0,0 @@
# MOST USERS CAN IGNORE THIS FILE
#
# Unfortunately, as of 2014-4-19, the system.data and system.in.settings file
# which are created by moltemplate.sh contain a lot of irrelevant information,
# such as definition of parameters for atom types not present in the current
# system. This extra information takes up about 1 MB.
#
# This appears to be harmless.
# (Loading this extra information does not seem to slow down LAMMPS.)
#
# --------- OPTIONAL STEPS FOR STRIPPING OUT JUNK ---------
#
# However if you want to eliminate this junk from these files
# For now, we can strip this out using ltemplify.py to build a new .lt file.
#
# NOTE: If you decide to use this script, it was meant to be run it from
# the parent directory (../) (If you run it from somewhere else, be sure to
# modify the "PATH_TO_DATA_FILE" and "PATH_TO_OUTPUT_TTREE" variables below.)
#
# I suggest you do this in a temporary_directory
PATH_TO_DATA_FILE="."
pushd "$PATH_TO_DATA_FILE"
mkdir new_lt_file
cd new_lt_file/
# now run ltemplify.py
ltemplify.py ../system.in.init ../system.in.settings ../system.data > system.lt
# This creates a new .LT file named "system.lt" in the local directory.
# The ltemplify.py script also does not copy the boundary dimensions.
# We must do this manually.
# If you did NOT throw away the "Data Boundary" file usually located in
# "moltemplate_files/output_ttree/Data Boundary"
# then you can copy that information from this file into system.lt
PATH_TO_OUTPUT_TTREE="../moltemplate_files/output_ttree"
echo "write_once(\"Data Boundary\") {" >> system.lt
cat "$PATH_TO_OUTPUT_TTREE/Data Boundary" >> system.lt
echo "}" >> system.lt
echo "" >> system.lt
# Now, run moltemplate on this new .LT file.
moltemplate.sh system.lt
# This will create: "system.data" "system.in.init" "system.in.settings."
# That's it. The new "system.data" and system.in.* files should
# be ready to run in LAMMPS.
# Now copy the system.data and system.in.* files to the place where
# you plan to run LAMMPS
mv -f system.data system.in.* ../
cd ../
# Now delete all of the temporary files we generated
rm -rf new_lt_file/
popd

View File

@ -1,44 +0,0 @@
# PREREQUISITES:
#
# You must use moltemplate.sh to create 3 files:
# system.data system.in.init system.in.settings
# (Follow the instructions in README_setup.sh,
# or run the file as a script using ./README_setup.sh)
#
# ------------------------------- Initialization Section --------------------
include system.in.init
# ------------------------------- Atom Definition Section -------------------
read_data system.data
# ------------------------------- Settings Section --------------------------
include system.in.settings
# ------------------------------- Run Section -------------------------------
# -- minimization protocol --
# Note: The minimization step is not necessary in this example. However
# in general, it's always a good idea to minimize the system beforehand.
# fShakeTIP3P was defined in system.in.settings. It is incompatible with "minimize".
unfix fShakeTIP3P
minimize 1.0e-4 1.0e-6 100000 400000
# Now read "system.in.settings" in order to redefine fShakeTIP3P again:
include system.in.settings
# -- simulation protocol --
timestep 1.0
dump 1 all custom 500 traj_npt.lammpstrj id mol type x y z ix iy iz
fix fxnpt all npt temp 300.0 300.0 100.0 iso 1.0 1.0 1000.0 drag 1.0
thermo 100
#thermo_modify flush yes
run 40000
write_data system_after_npt.data

View File

@ -1,52 +0,0 @@
# PREREQUISITES:
#
# 1) You must use moltemplate.sh to create 3 files:
# system.data system.in.init system.in.settings
# (Follow the instructions in README_setup.sh,
# or run the file as a script using ./README_setup.sh)
# 2) You must equilibrate the system beforehand using "run.in.npt".
# This will create the file "system_after_npt.data" which this file reads.
# (Note: I have not verified that this equilibration protocol works well.)
# ------------------------------- Initialization Section --------------------
include system.in.init
# ------------------------------- Atom Definition Section -------------------
# Read the coordinates generated by an earlier NPT simulation
read_data system_after_npt.data
# (The "write_restart" and "read_restart" commands were buggy in 2012,
# but they should work also. I prefer "write_data" and "read_data".)
# ------------------------------- Settings Section --------------------------
include system.in.settings
# ------------------------------- Run Section -------------------------------
# COMMENTING OUT MINIMIZATION STEPS:
# If you are reading the coordinates generated by the NPT run
# then you should not need to minimize the system beforehand.
# -- minimization protocol --
## ("fix shake" is incompatible with "minimize".)
#unfix fShakeTIP3P
#minimize 1.0e-4 1.0e-6 100000 400000
## Now read "system.in.settings" in order to redefine fShakeTIP3P again:
#include system.in.settings
# -- simulation protocol --
timestep 1.0
dump 1 all custom 500 traj_nvt.lammpstrj id mol type x y z ix iy iz
fix fxnvt all nvt temp 300.0 300.0 500.0 tchain 1
thermo 500
#thermo_modify flush yes
run 50000
write_data system_after_nvt.data

View File

@ -1,29 +0,0 @@
# -------- WARNING: --------
This directory contains some examples of all-atom simulations using the OPLSAA
force field, prepared using Jason Lambert's oplsaa_moltemplate.py conversion
tool, and moltemplate.
This software is experimental, and the force-fields and equilbration protocols
have not been tested carefully by me. There is no gaurantee that simulations
prepared using moltemplate will reproduce the behavior of other MD codes.
# -------- REQUEST FOR HELP: --------
If you notice a problem with these examples, please report it.
Peer-review is the only way to improve this software (or any software).
Other suggestions are also welcome!
(Contact jewett.aij@gmail.com, 2014-4-19)
--- Improper angles ---
I am also uncertain whether the improper angle interactions generated by
moltemplate are equivalent to those generated by BOSS or other molecule
builders. (I think they are, but I am worried that we might have listed
the atom types in the wrong order. Let us know if you see discrepancies
between what moltemplate and other molecule builders generates.)
-----------
For more details how to use the OPLSAA force-field, read the "README.TXT"
file located in "ethylene/moltemplate_files/oplsaa_lt_generator/README.TXT"

View File

@ -1,78 +0,0 @@
This example is a simple simulation of a long alkane chain,
in a vacuum at room temperature using the OPLSAA force field.
NOTE: This particular file contains instructions for how to build molecules
using the OPLSAA force-field. However, moltemplate is not limited to
OPLSAA. Moltemplate allows users to access any of the force-field
styles available in LAMMPS (including custom, user-defined force-fields).
-------- INSTRUCTIONS FOR USING OPLSAA WITH YOUR OWN MOLECULES: --------
1) Download the "oplsaa.prm" file containing the OPLSAA force field
parameters. I do not have permission to distribute this file,
but you can download the latest version from one of these URLS:
http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
http://dasher.wustl.edu/ffe/distribution/params/oplsaa.prm
2) Create the "oplsaa_subset.prm" file by making a copy of the "oplsaa.prm"
file, renaming it to "oplsaa_subset.prm", and deleting the atoms you don't need.
For example, if you are building a simple alkane chain, you would delete every
line beginning with the word "atom", except for these three lines:
atom 80 13 CT "Alkane CH3-" 6 12.011 4
atom 81 13 CT "Alkane -CH2-" 6 12.011 4
atom 85 46 HC "Alkane H-C" 1 1.008 1
(Leave the rest of the file unmodified.)
3) Create the "oplsaa.lt" file using this command:
oplsaa_moltemplate.py oplsaa_subset.prm
(Credit to Jasen Lambert for contributing this useful script.)
4) Create the "system.data", "system.in.init", and "system.in.settings"
files which LAMMPS will read by running:
moltemplate.sh system.lt
5)
To run LAMMPS, you must make sure LAMMPS was built with the "USER-MISC" package.
(because oplsaa_moltemplate.py uses dihedral_style fourier)
To do this, type "make yes-user-misc" before compiling LAMMPS.
http://lammps.sandia.gov/doc/Section_start.html#start_3
6) Run LAMMPS in this order:
lmp_g++ -i run.in.min # minimize the energy (to avoid atom overlap) before...
lmp_g++ -i run.in.nvt # running the simulation at constant temperature
(Replace "lmp_g++" with the name of the LAMMPS executable you are using.)
---- Details ----
The "Alkane50" molecule, as well as the "CH2", and "CH3" monomers it contains
use the OPLSAA force-field. This means that when we define these molecules,
we only specify the atom names, bond list, and coordinates.
We do not have to list the atom charges, angles, dihedrals, or impropers.
The rules for creating atomic charge and angle topology are contained in
the "oplsaa.lt" file created by step 3) above. The "ch2group.lt",
"ch3group.lt", and "alkane50.lt" files all refer to "oplsaa.lt",
(as well as the "OPLSAA" force-field object which it defines). Excerpt:
import "oplsaa.lt"
CH2 inherits OPLSAA { ...
CH3 inherits OPLSAA { ...
Alkane50 inherits OPLSAA { ...
Alternatively, you can manually define a list of angles, dihedrals, and
improper interactions in these files, instead of asking the force-field
to generate them for you. You can also specify some of the angles and
dihedrals explicitly, and let the force-field handle the rest.
(Many of the molecule examples which come with moltemplate do this.)

View File

@ -1,39 +0,0 @@
# --- Running LAMMPS ---
# -------- REQUIREMENTS: ---------
# 1) This example requires building LAMMPS with the "USER-MISC" package.
# (because it makes use of "gaff.lt" which uses dihedral_style fourier)
# To do this, type "make yes-user-misc" before compiling LAMMPS.
# http://lammps.sandia.gov/doc/Section_start.html#start_3
# -------- PREREQUISITES: --------
# The 2 files "run.in.npt", and "run.in.nvt" are LAMMPS
# input scripts which link to the input scripts and data files
# you hopefully have created earlier with moltemplate.sh:
# system.in.init, system.in.settings, system.data
# If not, carry out the instructions in "README_setup.sh".
#
# -- Instructions: --
# If "lmp_mpi" is the name of the command you use to invoke lammps,
# then you would run lammps on these files this way:
lmp_mpi -i run.in.npt # minimization and simulation at constant pressure
lmp_mpi -i run.in.nvt # minimization and simulation at constant volume
#(Note: The constant volume simulation lacks pressure equilibration. These are
# completely separate simulations. The results of the constant pressure
# simulation might be ignored when beginning the simulation at constant
# volume. (This is because restart files in LAMMPS don't always work,
# and I was spending a lot of time trying to convince people it was a
# LAMMPS bug, instead of a moltemplate bug, so I disabled restart files.)
# Read the "run.in.nvt" file to find out how to use the "read_restart"
# command to load the results of the pressure-equilibration simulation,
# before beginning a constant-volume run.
# If you have compiled the MPI version of lammps, you can run lammps in parallel
#mpirun -np 4 lmp_mpi -i run.in.npt
#mpirun -np 4 lmp_mpi -i run.in.nvt
# (assuming you have 4 processors available)

View File

@ -1,36 +0,0 @@
# -------- REQUIREMENTS: ---------
# You must define your MOLTEMPLATE_PATH environment variable
# and set it to the "common" subdirectory of your moltemplate distribution.
# (See the "Installation" section in the moltemplate manual.)
# Create LAMMPS input files this way:
cd moltemplate_files
# Create the "oplsaa.lt" file which moltemplate will need
cd oplsaa_lt_generator/
oplsaa_moltemplate.py oplsaa_subset.prm
mv -f oplsaa.lt ..
cd ..
# run moltemplate
moltemplate.sh system.lt
# This will generate various files with names ending in *.in* and *.data.
# Move them to the directory where you plan to run LAMMPS (in this case "../")
mv -f system.data system.in* ../
# Optional:
# The "./output_ttree/" directory is full of temporary files generated by
# moltemplate. They can be useful for debugging, but are usually thrown away.
rm -rf output_ttree/
# Optional:
# Delete the "oplsaa.lt" file:
rm -f oplsaa.lt
cd ../

View File

@ -1,87 +0,0 @@
------- To view a lammps trajectory in VMD --------
1) Build a PSF file for use in viewing with VMD.
This step works with VMD 1.9 and topotools 1.2.
(Older versions, like VMD 1.8.6, don't support this.)
a) Start VMD
b) Menu Extensions->Tk Console
c) Enter:
(I assume that the the DATA file is called "system.data")
topo readlammpsdata system.data full
animate write psf system.psf
2)
Later, to Load a trajectory in VMD:
Start VMD
Select menu: File->New Molecule
-Browse to select the PSF file you created above, and load it.
(Don't close the window yet.)
-Browse to select the trajectory file.
If necessary, for "file type" select: "LAMMPS Trajectory"
Load it.
---- A note on trajectory format: -----
If the trajectory is a DUMP file, then make sure the it contains the
information you need for pbctools (see below. I've been using this
command in my LAMMPS scripts to create the trajectories:
dump 1 all custom 5000 DUMP_FILE.lammpstrj id mol type x y z ix iy iz
It's a good idea to use an atom_style which supports molecule-ID numbers
so that you can assign a molecule-ID number to each atom. (I think this
is needed to wrap atom coordinates without breaking molecules in half.)
Of course, you don't have to save your trajectories in DUMP format,
(other formats like DCD work fine) I just mention dump files
because these are the files I'm familiar with.
3) ----- Wrap the coordinates to the unit cell
(without cutting the molecules in half)
a) Start VMD
b) Load the trajectory in VMD (see above)
c) Menu Extensions->Tk Console
d) Try entering these commands:
pbc wrap -compound res -all
pbc box
----- Optional ----
Sometimes the solvent or membrane obscures the view of the solute.
It can help to shift the location of the periodic boundary box
To shift the box in the y direction (for example) do this:
pbc wrap -compound res -all -shiftcenterrel {0.0 0.15 0.0}
pbc box -shiftcenterrel {0.0 0.15 0.0}
Distances are measured in units of box-length fractions, not Angstroms.
Alternately if you have a solute whose atoms are all of type 1,
then you can also try this to center the box around it:
pbc wrap -sel type=1 -all -centersel type=2 -center com
4)
You should check if your periodic boundary conditions are too small.
To do that:
select Graphics->Representations menu option
click on the "Periodic" tab, and
click on the "+x", "-x", "+y", "-y", "+z", "-z" checkboxes.
5) Optional: If you like, change the atom types in the PSF file so
that VMD recognizes the atom types, use something like:
sed -e 's/ 1 1 / C C /g' < system.psf > temp1.psf
sed -e 's/ 2 2 / H H /g' < temp1.psf > temp2.psf
sed -e 's/ 3 3 / P P /g' < temp2.psf > system.psf
(If you do this, it might effect step 2 above.)

View File

@ -1,138 +0,0 @@
# This is a simple example showing how to build a long polymer
# (in this case, an alkane chain). I split the
# hexadecane molecule into individual CH2 and CH3 monomers.
# I defined it this way so that you can easily modify
# it to change the length of the alkane chain.
import "oplsaa.lt" # load the "OPLSAA" force-field information
import "ch2group.lt" # load the definition of the "CH2" object
import "ch3group.lt" # load the definition of the "CH3" object
Alkane50 inherits OPLSAA {
create_var {$mol} # optional:force all monomers to share the same molecule-ID
# This is a long polymer consisting of 48 CH2 groups and 2 CH3 end-caps.
# Rather than create them one-by-one, I decided to create them all
# using a single "new" command. Later, I can modify this array.
# Create an array of 50 "CH2" objects distributed along the X axis
monomers = new CH2 [50].rot(180,1,0,0).move(1.2533223,0,0)
# NOTE: the ".rot(180,1,0,0).move(1.2533223,0,0)" means that each
# successive monomer is rotated 180 degrees (with respect to the previous
# monomer), and then moved 1.2533223 Angstroms down the X axis.
# Alternately, if you are reading the coordinates from a file, you don't have
# to indicate the position & orientation of each monomer. In that case, use:
# monomers = new CH2 [50]
# ---- Now, modify the ends: ---
# Delete the CH2 groups at the beginning and end, and replace them with CH3.
delete monomers[0]
delete monomers[49]
monomers[0] = new CH3
monomers[49] = new CH3
# Move the CH3 groups to the correct location at either end of the chain:
#monomers[0].move(0,0,0) # <--(this monomer is already in the correct place)
monomers[49].rot(180.0,0,0,1).move(61.4127927,0,0) #61.4127927=49*1.2533223
## NOTE: Alternately, you can define the polymer without deleting the ends:
# monomers[0] = new CH3
# monomers[1-48] = new CH2[48].rot(180,1,0,0).move(1.2533223,0,0)
## Note: monomers[0] and monomers[1] overlap, so we move 1-48 to make room:
# monomers[1-48].rot(180,1,0,0).move(1.2533223,0,0) # move many monomers
## Now add the final monomer at the end:
# monomers[49] = new CH3.rot(180.0,0,0,1).move(61.4127927,0,0)
#
## NOTE: Alternately, you can read the coordinates from a file.
## In that case, you can use simpler commands:
# monomers[0] = new CH3
# monomers[1-48] = new CH2[48]
# monomers[49] = new CH3
# Now add a list of bonds connecting the carbon atoms together:
# (Angles, dihedrals, impropers will be automatically added later.)
write('Data Bond List') {
$bond:b1 $atom:monomers[0]/C $atom:monomers[1]/C
$bond:b2 $atom:monomers[1]/C $atom:monomers[2]/C
$bond:b3 $atom:monomers[2]/C $atom:monomers[3]/C
$bond:b4 $atom:monomers[3]/C $atom:monomers[4]/C
$bond:b5 $atom:monomers[4]/C $atom:monomers[5]/C
$bond:b6 $atom:monomers[5]/C $atom:monomers[6]/C
$bond:b7 $atom:monomers[6]/C $atom:monomers[7]/C
$bond:b8 $atom:monomers[7]/C $atom:monomers[8]/C
$bond:b9 $atom:monomers[8]/C $atom:monomers[9]/C
$bond:b10 $atom:monomers[9]/C $atom:monomers[10]/C
$bond:b11 $atom:monomers[10]/C $atom:monomers[11]/C
$bond:b12 $atom:monomers[11]/C $atom:monomers[12]/C
$bond:b13 $atom:monomers[12]/C $atom:monomers[13]/C
$bond:b14 $atom:monomers[13]/C $atom:monomers[14]/C
$bond:b15 $atom:monomers[14]/C $atom:monomers[15]/C
$bond:b16 $atom:monomers[15]/C $atom:monomers[16]/C
$bond:b17 $atom:monomers[16]/C $atom:monomers[17]/C
$bond:b18 $atom:monomers[17]/C $atom:monomers[18]/C
$bond:b19 $atom:monomers[18]/C $atom:monomers[19]/C
$bond:b20 $atom:monomers[19]/C $atom:monomers[20]/C
$bond:b21 $atom:monomers[20]/C $atom:monomers[21]/C
$bond:b22 $atom:monomers[21]/C $atom:monomers[22]/C
$bond:b23 $atom:monomers[22]/C $atom:monomers[23]/C
$bond:b24 $atom:monomers[23]/C $atom:monomers[24]/C
$bond:b25 $atom:monomers[24]/C $atom:monomers[25]/C
$bond:b26 $atom:monomers[25]/C $atom:monomers[26]/C
$bond:b27 $atom:monomers[26]/C $atom:monomers[27]/C
$bond:b28 $atom:monomers[27]/C $atom:monomers[28]/C
$bond:b29 $atom:monomers[28]/C $atom:monomers[29]/C
$bond:b30 $atom:monomers[29]/C $atom:monomers[30]/C
$bond:b31 $atom:monomers[30]/C $atom:monomers[31]/C
$bond:b32 $atom:monomers[31]/C $atom:monomers[32]/C
$bond:b33 $atom:monomers[32]/C $atom:monomers[33]/C
$bond:b34 $atom:monomers[33]/C $atom:monomers[34]/C
$bond:b35 $atom:monomers[34]/C $atom:monomers[35]/C
$bond:b36 $atom:monomers[35]/C $atom:monomers[36]/C
$bond:b37 $atom:monomers[36]/C $atom:monomers[37]/C
$bond:b38 $atom:monomers[37]/C $atom:monomers[38]/C
$bond:b39 $atom:monomers[38]/C $atom:monomers[39]/C
$bond:b40 $atom:monomers[39]/C $atom:monomers[40]/C
$bond:b41 $atom:monomers[40]/C $atom:monomers[41]/C
$bond:b42 $atom:monomers[41]/C $atom:monomers[42]/C
$bond:b43 $atom:monomers[42]/C $atom:monomers[43]/C
$bond:b44 $atom:monomers[43]/C $atom:monomers[44]/C
$bond:b45 $atom:monomers[44]/C $atom:monomers[45]/C
$bond:b46 $atom:monomers[45]/C $atom:monomers[46]/C
$bond:b47 $atom:monomers[46]/C $atom:monomers[47]/C
$bond:b48 $atom:monomers[47]/C $atom:monomers[48]/C
$bond:b49 $atom:monomers[48]/C $atom:monomers[49]/C
}
} # Alkane50
######### (scratchwork calculations for the atomic coordinates) #########
# Lcc = 1.5350 # length of the C-C bond (Sp3)
# Lch = 1.0930 # length of the C-H bond
# theta=2*atan(sqrt(2)) # ~= 109.5 degrees = tetrahedronal angle (C-C-C angle)
# DeltaXc = Lcc*sin(theta/2) # = 1.2533222517240594
# DeltaYc = Lcc*cos(theta/2) # = 0.8862326632060754
# # 0.5*DeltaYc = 0.4431163316030377
# DeltaZh = Lch*sin(theta/2) # = 0.8924307629540046
# DeltaYh = Lch*cos(theta/2) # = 0.6310438442242609

View File

@ -1,55 +0,0 @@
import "oplsaa.lt" # <-- defines the "OPLSAA" force field
CH2 inherits OPLSAA {
# atom-id mol-id atom-type charge x y z
write("Data Atoms") {
$atom:C $mol:... @atom:81 0.00 0.000 0.000 0.000
$atom:H1 $mol:... @atom:85 0.00 0.000 0.63104384422426 0.892430762954
$atom:H2 $mol:... @atom:85 0.00 0.000 0.63104384422426 -0.892430762954
}
# Atom type numbers (@atom:80,@atom:85) are defined in "oplsaa.lt". Excerpt:
# @atom:80 12.011 #CT "Alkane CH3-" 6 partial charge=-0.18
# @atom:81 12.011 #CT "Alkane -CH2-" 6 partial charge=-0.12
# @atom:85 1.008 #HC "Alkane H-C" 1 partial charge=0.06
# In this example, atomic charges are generated by atom type (according to
# rules in oplsaa.lt), and can be omitted. Just leave them as "0.00" for now.
# 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.
# Now specify which pairs of atoms are bonded:
write('Data Bond List') {
$bond:CH1 $atom:C $atom:H1
$bond:CH2 $atom:C $atom:H2
}
} # CH2
# 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.
# (This makes it more convenient to construct a polymer later.
# If this is confusing, then simply add 0.4431163 to the Y
# coordinates in the "Data Atoms" section above.)
CH2.move(0,0.4431163,0)
######### (scratchwork calculations for the atomic coordinates) #########
# Lcc = 1.5350 # length of the C-C bond (Sp3)
# Lch = 1.0930 # length of the C-H bond
# theta=2*atan(sqrt(2)) # ~= 109.5 degrees = tetrahedronal angle (C-C-C angle)
# DeltaXc = Lcc*sin(theta/2) # = 1.2533222517240594
# DeltaYc = Lcc*cos(theta/2) # = 0.8862326632060754
# # 0.5*DeltaYc = 0.4431163316030377
# DeltaZh = Lch*sin(theta/2) # = 0.8924307629540046
# DeltaYh = Lch*cos(theta/2) # = 0.6310438442242609

View File

@ -1,58 +0,0 @@
import "oplsaa.lt" # <-- defines the "OPLSAA" force field
CH3 inherits OPLSAA {
# atom-id mol-id atom-type charge x y z
write("Data Atoms") {
$atom:C $mol:... @atom:80 0.00 0.000000 0.000000 0.000000
$atom:H1 $mol:... @atom:85 0.00 0.000000 0.6310438442242609 0.8924307629540046
$atom:H2 $mol:... @atom:85 0.00 0.000000 0.6310438442242609 -0.8924307629540046
$atom:H3 $mol:... @atom:85 0.00 -0.8924307629540046 -0.6310438442242609 0.000000
}
# Atom type numbers (@atom:80,@atom:85) are defined in "oplsaa.lt". Excerpt:
# @atom:80 12.011 #CT "Alkane CH3-" 6 partial charge=-0.18
# @atom:81 12.011 #CT "Alkane -CH2-" 6 partial charge=-0.12
# @atom:85 1.008 #HC "Alkane H-C" 1 partial charge=0.06
# In this example, atomic charges are generated by atom type (according to
# rules in oplsaa.lt), and can be omitted. Just leave them as "0.00" for now.
# 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.
# Now specify which pairs of atoms are bonded:
write('Data Bond List') {
$bond:CH1 $atom:C $atom:H1
$bond:CH2 $atom:C $atom:H2
$bond:CH3 $atom:C $atom:H3
}
} # CH3
# 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.
# (This makes it more convenient to construct a polymer later.
# If this is confusing, then simply add 0.4431163 to the Y
# coordinates in the "Data Atoms" section above.)
CH3.move(0,0.4431163,0)
######### (scratchwork calculations for the atomic coordinates) #########
# Lcc = 1.5350 # length of the C-C bond (Sp3)
# Lch = 1.0930 # length of the C-H bond
# theta=2*atan(sqrt(2)) # ~= 109.5 degrees = tetrahedronal angle (C-C-C angle)
# DeltaXc = Lcc*sin(theta/2) # = 1.2533222517240594
# DeltaYc = Lcc*cos(theta/2) # = 0.8862326632060754
# # 0.5*DeltaYc = 0.4431163316030377
# DeltaZh = Lch*sin(theta/2) # = 0.8924307629540046
# DeltaYh = Lch*cos(theta/2) # = 0.6310438442242609

View File

@ -1,3 +0,0 @@
OPLSAA force-field conversion tools provided by Jason Lambert.

View File

@ -1,109 +0,0 @@
This directory contains instructions for creating a a moltemplate file
("oplsaa.lt") containing force-field definitions relevant to the "Alkane50"
molecule. (However, these instructions should work for other molecules too.)
--- Instructions ---
First, check and see if there is an "oplsaa_subset.prm" file present.
If not, then download this file:
http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
This file is also available here:
http://dasher.wustl.edu/ffe/distribution/params/oplsaa.prm
and save this file as "oplsaa_subset.prm". Then you must EDIT THIS FILE
so that it only contains atom types you plan to have in your simulation
(see below for details). Then run the opls_moltemplate.py script this way:
oplsaa_moltemplate.py oplsaa_subset.prm
This will create a file named "oplsaa.lt"
Look over the newly created "oplsaa.lt" file.
Then move this file to wherever you plan to run moltemplate. For example:
mv -f oplsaa.lt ..
----- DETAILS: Editing the "oplsaa_subset.prm" file -------
Again, before you run "oplsaa_moltemplate.py", you must edit the "oplsaa.prm"
file (or "oplsaa_subset.prm file) and eliminate atom types which do not
correspond to any of the atoms in your simulation. This means you must
look for lines near the beginning of this file which begin with the word "atom"
and refer to atom types which appear in the simulation you plan to run. All
other lines (beginning with the word "atom") must be deleted or commented out.
(Leave the rest of the file unmodified!)
For example:
If you were working with a simple alkane chain, you would delete every line
beginning with the word "atom", except for these three lines:
atom 80 13 CT "Alkane CH3-" 6 12.011 4
atom 81 13 CT "Alkane -CH2-" 6 12.011 4
atom 85 46 HC "Alkane H-C" 1 1.008 1
Then you are ready to run oplsaa_moltemplate.py on this file.
(Note: The atom type numbers, like "89", "81", "85", "13", "46", etc... may vary
depending on when you downloaded the "oplsaa.prm" file. Be sure to check
the descriptions of each atom type after you download it: "Alkane CH3-")
----- Using the "oplsaa.lt" file -----
Once you have created the "oplsaa.lt" file, you can create files (like
ethylene.lt) which define molecules that refer to these atom types.
Here is an excerpt from "methane.lt":
import "oplsaa.lt"
Methane inherits OPLSAA {
write('Data Atoms') {
list of atoms goes here ...
}
write('Data Bond List') {
list of bonds goes here ...
}
}
And then run moltemplate.
----------- CHARGE: -----------
By default, the OPLSAA force-field assigns atom charge according to atom type.
When you run moltemplate, it will create a file named "system.in.charges",
containing commands like:
set type 2 charge -0.42
set type 3 charge 0.21
(This assumes your main moltemplate file is named "system.lt". If it was
named something else, eg "polymer.lt", then the file created by moltemplate
will be named "polymer.in.charges".)
Include these commands somewhere in your LAMMPS input script
(or use the LAMMPS "include" command to load the commands in system.in.charges)
Note that the atom numbers (eg "2", "3") in this file will not match the
OPLS atom numbers. (Check the output_ttree/ttree_assignments.txt file,
created by moltemplate, to see a table of "@atom" type numbers translated
from OPLSAA into LAMMPS.)
----------- CREDIT -----------
If you use these tools and you publish a paper using OPLSAA, please also cite
the TINKER program. (Because these examples use the "oplsaa.prm" file which
is distributed with TINKER.) I think these are the relevant citations:
1) Ponder, J. W., & Richards, F. M. (1987). "An efficient newtonlike method for molecular mechanics energy minimization of large molecules. Journal of Computational Chemistry", 8(7), 1016-1024.
2) Ponder, J. W, (2004) "TINKER: Software tools for molecular design", http://dasher.wustl.edu/tinker/
-------------------------------
Andrew Jewett and Jason Lambert
May, 2014
Please email bugs to jewett.aij@gmail.com and jlamber9@gmail.com

View File

@ -1,151 +0,0 @@
# This file is a heavily redacted version of the "oplsaa.prm" file distributed
# with TINKER (Downloaded April, 2014). This version only contains information
# relevant to alkane chains. The complete version of that file works with most
# small organic molecules and you can use that file with moltemplate too.
# Unfortunately, I do not own or have permission to distribute that file.
# You can download the latest complete version of that file here:
#
# http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
#
# When building your own molecules, you should download this file, and delete
# only the lines from the "atoms" section which you don't need. (But leave the
# rest of that file alone. I deleted other sections of this file here in order
# to reduce the file size, but this is not necessary.)
#
# Rename the resulting file "oplsaa_subset.prm"
#
# Then you can create an oplsaa.lt file (which moltemplate.sh needs) this way:
# oplsaa_moltemplate.py oplsaa_subset.prm
#
# Then copy the newly created "oplsa.lt" file to the directory where you
# plan to run moltemplate, and run moltemplate:
# moltemplate system.lt
##############################
## ##
## Force Field Definition ##
## ##
##############################
forcefield OPLS-AA
vdwindex TYPE
vdwtype LENNARD-JONES
radiusrule GEOMETRIC
radiustype SIGMA
radiussize DIAMETER
epsilonrule GEOMETRIC
torsionunit 0.5
imptorunit 0.5
vdw-14-scale 2.0
chg-14-scale 2.0
electric 332.06
dielectric 1.0
#############################
## ##
## Literature References ##
## ##
#############################
The parameters supplied with TINKER are from "OPLS All-Atom Parameters
for Organic Molecules, Ions, Peptides & Nucleic Acids, July 2008" as
provided by W. L. Jorgensen, Yale University during June 2009. These
parameters are taken from those distributed with BOSS Version 4.8.
Note that "atom type" numbers and not "atom class" numbers are used
to index van der Waals parameters, see the "vdwindex" keyword above
The atom types with (UA) in the description are "united atom" values,
ie, OPLS-UA, where any nonpolar hydrogen atoms are combined onto their
attached atoms. All other parameters are "all-atom", OPLS-AA, including
explicit hydrogen atoms.
#############################
## ##
## Atom Type Definitions ##
## ##
#############################
atom 80 13 CT "Alkane CH3-" 6 12.011 4
atom 81 13 CT "Alkane -CH2-" 6 12.011 4
atom 85 46 HC "Alkane H-C" 1 1.008 1
################################
## ##
## Van der Waals Parameters ##
## ##
################################
vdw 80 3.5000 0.0660
vdw 81 3.5000 0.0660
vdw 85 2.5000 0.0300
bond 13 13 268.00 1.5290
bond 13 46 340.00 1.0900
################################
## ##
## Angle Bending Parameters ##
## ##
################################
angle 13 13 13 58.35 112.70
angle 46 13 46 33.00 107.80
angle 13 13 46 37.50 110.70
############################
## ##
## Torsional Parameters ##
## ##
############################
###################################################################
## ##
## Alternative Torsional Parameter Values for Use with OPLS-AA ##
## ##
## For some torsions, OPLS-AA has multiple possible parameter ##
## values; the list below shows functional groups for which ##
## these alternate (commented) values should be preferred; the ##
## values are in the same order as in the full parameter list ##
## ##
## 13 13 13 13 hydrocarbon (default) ##
## 13 13 13 13 perfluoroalkane ##
## ##
###################################################################
torsion 0 13 13 13 1.711 0.0 1 -0.500 180.0 2 0.663 0.0 3
#torsion 0 13 13 13 -1.336 0.0 1 0.000 180.0 2 0.000 0.0 3
torsion 13 13 13 13 1.300 0.0 1 -0.050 180.0 2 0.200 0.0 3
#torsion 13 13 13 13 6.622 0. 1 0.948 180. 2 -1.388 0. 3 -2.118 180. 4
torsion 13 13 13 46 0.000 0.0 1 0.000 180.0 2 0.300 0.0 3
torsion 46 13 13 46 0.000 0.0 1 0.000 180.0 2 0.300 0.0 3
########################################
## ##
## Atomic Partial Charge Parameters ##
## ##
########################################
charge 80 -0.1800
charge 81 -0.1200
charge 85 0.0600

View File

@ -1,31 +0,0 @@
import "alkane50.lt" # Defines the "Alkane50" molecule
polymer = new Alkane50
# Specify the size of the world the polymer lives in:
write_once("Data Boundary") {
0.0 72.0 xlo xhi
0.0 72.0 ylo yhi
0.0 72.0 zlo zhi
}
###############################################################################
# Note: If you want to create multiple polymers, and/or mix them with other
# molecules, just add more "new" commands, for example:
# polymer1 = new Alkane50.move(0,0,10)
# polymer2 = new Alkane50.move(0,0,20)
# :
# ...or use array notation, for example:
# polymers = new Alkane50[20].move(0,0,10)
#
# Note: Multidimensional arrays can be used to fill a planar region or a volume
# polymers = new Alkane50 [4].move(0, 0, 30.0)
# [4].move(0, 30.0, 0)
# [2].move(70.0, 0, 0)

View File

@ -1,37 +0,0 @@
# PREREQUISITES:
#
# You must use moltemplate.sh to create 3 files:
# system.data system.in.init system.in.settings
#
# ------------------------------- Initialization Section --------------------
include "system.in.init"
# ------------------------------- Atom Definition Section -------------------
read_data "system.data"
# ------------------------------- Settings Section --------------------------
include "system.in.settings"
include "system.in.charges"
# ------------------------------- Run Section -------------------------------
# -- minimization protocol --
# Note: The minimization step is not necessary in this example. However
# in general, it's always a good idea to minimize the system beforehand.
thermo 50
dump 1 all custom 50 traj_min.lammpstrj id mol type x y z ix iy iz
minimize 1.0e-4 1.0e-6 100000 400000
# (The "write_restart" and "read_restart" commands were buggy in 2012,
# but they should work also. I prefer "write_data" and "read_data".)
write_data system_after_min.data

View File

@ -1,38 +0,0 @@
# PREREQUISITES:
#
# 1) You must use moltemplate.sh to create 3 files:
# system.data system.in.init system.in.settings
# (Follow the instructions in README_setup.sh,
# or run the file as a script using ./README_setup.sh)
# 2) You must minimize the system beforehand by using "run.in.min".
# This will create the file "system_after_min.data" which this file reads.
# ------------------------------- Initialization Section --------------------
include "system.in.init"
# ------------------------------- Atom Definition Section -------------------
# Read the coordinates generated by an earlier simulation
read_data "system_after_min.data"
# ------------------------------- Settings Section --------------------------
include "system.in.settings"
include "system.in.charges"
# ------------------------------- Run Section -------------------------------
# -- simulation protocol --
timestep 1.0
dump 1 all custom 1000 traj_nvt.lammpstrj id mol type x y z ix iy iz
fix fxnvt all nvt temp 300.0 300.0 500.0 tchain 1
thermo 500
#thermo_modify flush yes
run 1000000
write_data system_after_nvt.data

View File

@ -1,13 +0,0 @@
This is an example of how to use the OPLSAA force-field in LAMMPS
(using moltemplate.sh and Jason Lambert's oplsaa_moltemplate.py conversion tool)
As of 2014-12-19, this code has not been tested for accuracy.
(See the WARNING.TXT file.)
step 1)
To build the files which LAMMPS needs, follow the instructions in:
README_setup.sh
step 2)
To run LAMMPS with these files, follow these instructions:
README_run.sh

View File

@ -1,39 +0,0 @@
# --- Running LAMMPS ---
# -------- REQUIREMENTS: ---------
# 1) This example requires building LAMMPS with the "USER-MISC" package.
# (because it makes use of "gaff.lt" which uses dihedral_style fourier)
# To do this, type "make yes-user-misc" before compiling LAMMPS.
# http://lammps.sandia.gov/doc/Section_start.html#start_3
# -------- PREREQUISITES: --------
# The 2 files "run.in.npt", and "run.in.nvt" are LAMMPS
# input scripts which link to the input scripts and data files
# you hopefully have created earlier with moltemplate.sh:
# system.in.init, system.in.settings, system.data
# If not, carry out the instructions in "README_setup.sh".
#
# -- Instructions: --
# If "lmp_mpi" is the name of the command you use to invoke lammps,
# then you would run lammps on these files this way:
lmp_mpi -i run.in.npt # minimization and simulation at constant pressure
lmp_mpi -i run.in.nvt # minimization and simulation at constant volume
#(Note: The constant volume simulation lacks pressure equilibration. These are
# completely separate simulations. The results of the constant pressure
# simulation might be ignored when beginning the simulation at constant
# volume. (This is because restart files in LAMMPS don't always work,
# and I was spending a lot of time trying to convince people it was a
# LAMMPS bug, instead of a moltemplate bug, so I disabled restart files.)
# Read the "run.in.nvt" file to find out how to use the "read_restart"
# command to load the results of the pressure-equilibration simulation,
# before beginning a constant-volume run.
# If you have compiled the MPI version of lammps, you can run lammps in parallel
#mpirun -np 4 lmp_mpi -i run.in.npt
#mpirun -np 4 lmp_mpi -i run.in.nvt
# (assuming you have 4 processors available)

Some files were not shown because too many files have changed in this diff Show More