git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11898 f3b2605a-c512-4ea7-a41b-209d697bcdaa
@ -0,0 +1,54 @@
|
||||
# -------- 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.
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
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.)
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
# --- 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_linux" is the name of the command you use to invoke lammps,
|
||||
# then you would run lammps on these files this way:
|
||||
|
||||
|
||||
lmp_linux -i run.in.npt # minimization and simulation at constant pressure
|
||||
lmp_linux -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_linux -i run.in.npt
|
||||
#mpirun -np 4 lmp_linux -i run.in.nvt
|
||||
# (assuming you have 4 processors available)
|
||||
@ -0,0 +1,36 @@
|
||||
# -------- 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.
|
||||
# These files are the input files directly read by LAMMPS. Move them to
|
||||
# the parent directory (or wherever you plan to run the simulation).
|
||||
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"
|
||||
|
||||
@ -0,0 +1,87 @@
|
||||
|
||||
------- 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.)
|
||||
@ -0,0 +1,16 @@
|
||||
# -------- 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)
|
||||
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
@ -0,0 +1,49 @@
|
||||
|
||||
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", "h1", 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:h1 0.060 0.000 0.63104384422426 0.892430762954
|
||||
$atom:H2 $mol:... @atom:h1 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
|
||||
|
||||
|
||||
|
||||
|
||||
######### (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
|
||||
@ -0,0 +1,55 @@
|
||||
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", "h1", 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:h1 0.060 0.000000 0.6310438442242609 0.8924307629540046
|
||||
$atom:H2 $mol:... @atom:h1 0.060 0.000000 0.6310438442242609 -0.8924307629540046
|
||||
$atom:H3 $mol:... @atom:h1 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
|
||||
|
||||
|
||||
|
||||
|
||||
######### (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
|
||||
|
||||
@ -0,0 +1,93 @@
|
||||
# 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 an array of 16 "CH2" objects distributed along the X axis
|
||||
|
||||
monomers = new CH2.move(0,0.4431163,0) [16].rot(180,1,0,0).move(1.2533223,0,0)
|
||||
|
||||
# Each CH2 monomer is initial moved in the +Y direction by 0.43116
|
||||
# angstroms. Then it is rotated 180 degrees with respect to the
|
||||
# previous monomer, and 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]
|
||||
endcap1 = new CH3
|
||||
endcap2 = new CH3
|
||||
|
||||
# Move the CH3 groups to the correct location at either end of the chain:
|
||||
|
||||
endcap1.move(0,0.4431163,0)
|
||||
endcap2.move(0,0.4431163,0).rot(180,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:endcap1/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:endcap2/C
|
||||
}
|
||||
|
||||
# OPTIONAL:
|
||||
create_var { $mol } # Create a molecule ID number. This number will
|
||||
# be shared by all of the atoms in this polymer.
|
||||
# In ch2group.lt, "$mol:..." refers to this number.
|
||||
|
||||
} # 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
|
||||
@ -0,0 +1,18 @@
|
||||
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.
|
||||
@ -0,0 +1,52 @@
|
||||
# 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.
|
||||
#
|
||||
# I suggest you do this in a temporary_directory
|
||||
|
||||
mkdir new_lt_file
|
||||
cd new_lt_file/
|
||||
|
||||
# now run ltemplify.py
|
||||
|
||||
ltemplify.py ../system.in.init ../system.in.settings ../system.data > system.lt
|
||||
rm -rf ../system.data ../system.in* # these old lammps files no longer needed
|
||||
|
||||
# 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
|
||||
|
||||
echo "write_once(\"Data Boundary\") {" >> system.lt
|
||||
cat "../moltemplate_files/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 moltemplate
|
||||
mv -f system.data system.in.* ../
|
||||
cd ../
|
||||
|
||||
# Now delete all of the temporary files we generated
|
||||
rm -rf new_lt_file/
|
||||
|
||||
@ -0,0 +1,85 @@
|
||||
# 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 it using ./README_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 2000
|
||||
|
||||
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 5000
|
||||
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 300.0 300.0 100.0 iso 100.0 1.0 1000.0 drag 2.0
|
||||
|
||||
timestep 1.0
|
||||
run 60000
|
||||
|
||||
write_data system_after_eq3_npt.data
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
# 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 it using ./README_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
|
||||
@ -0,0 +1,51 @@
|
||||
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
|
||||
@ -0,0 +1,39 @@
|
||||
# --- 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_linux" is the name of the command you use to invoke lammps,
|
||||
# then you would run lammps on these files this way:
|
||||
|
||||
|
||||
lmp_linux -i run.in.npt # minimization and simulation at constant pressure
|
||||
lmp_linux -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_linux -i run.in.npt
|
||||
#mpirun -np 4 lmp_linux -i run.in.nvt
|
||||
# (assuming you have 4 processors available)
|
||||
@ -0,0 +1,35 @@
|
||||
# -------- 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.
|
||||
# These files are the input files directly read by LAMMPS. Move them to
|
||||
# the parent directory (or wherever you plan to run the simulation).
|
||||
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"
|
||||
@ -0,0 +1,87 @@
|
||||
|
||||
------- 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.)
|
||||
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 9.8 KiB |
@ -0,0 +1,56 @@
|
||||
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:h1 0.0600 -0.003 -0.004 -1.439
|
||||
$atom:H11 $mol:. @atom:h1 0.0600 -2.075 -0.255 -0.254
|
||||
$atom:H12 $mol:. @atom:h1 0.0600 -1.256 -0.724 1.078
|
||||
$atom:H13 $mol:. @atom:h1 0.0600 -1.259 -1.669 -0.253
|
||||
$atom:H21 $mol:. @atom:h1 0.0600 2.074 -0.255 -0.264
|
||||
$atom:H22 $mol:. @atom:h1 0.0600 1.258 -1.669 -0.259
|
||||
$atom:H23 $mol:. @atom:h1 0.0600 1.261 -0.724 1.072
|
||||
$atom:H31 $mol:. @atom:h1 0.0600 -0.817 1.923 -0.263
|
||||
$atom:H32 $mol:. @atom:h1 0.0600 0.816 1.923 -0.268
|
||||
$atom:H33 $mol:. @atom:h1 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
|
||||
@ -0,0 +1,32 @@
|
||||
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)
|
||||
|
||||
@ -0,0 +1,69 @@
|
||||
# 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.
|
||||
#
|
||||
# I suggest you do this in a temporary_directory
|
||||
|
||||
mkdir new_lt_file
|
||||
cd new_lt_file/
|
||||
|
||||
# now run ltemplify.py
|
||||
|
||||
ltemplify.py ../system.in.init ../system.in.settings ../system.data > system.lt
|
||||
rm -rf ../system.data ../system.in* # these old lammps files no longer needed
|
||||
|
||||
# This creates a new .LT file named "system.lt" in the local directory.
|
||||
# Unfortunately, it may be missing some information because ltemplify.py
|
||||
# does not understand all the commands present in a LAMMPS input script.
|
||||
# If you define groups or use constraints, you must define them again. In this
|
||||
# case, we must add the SHAKE constraint for the "TIP3P_2004" water molecule.
|
||||
# So we have to remember the original name of the bond types and angle types.
|
||||
# (For this example, SHAKE is applied to the water molecule, which is defined
|
||||
# in "tip3p_2004.lt" file in the "common/" directory. Check this file.)
|
||||
|
||||
ATOMTYPENUM_ow=`awk '{if ($1 == "@/atom:TIP3P_2004/ow") print $2}' < ../moltemplate_files/output_ttree/ttree_assignments.txt`
|
||||
ATOMTYPENUM_hw=`awk '{if ($1 == "@/atom:TIP3P_2004/hw") print $2}' < ../moltemplate_files/output_ttree/ttree_assignments.txt`
|
||||
BONDTYPENUM=`awk '{if ($1 == "@/bond:TIP3P_2004/OH") print $2}' < ../moltemplate_files/output_ttree/ttree_assignments.txt`
|
||||
ANGLETYPENUM=`awk '{if ($1 == "@/angle:TIP3P_2004/HOH") print $2}' < ../moltemplate_files/output_ttree/ttree_assignments.txt`
|
||||
echo "" >> system.lt
|
||||
echo "write_once(\"In Settings\") {" >> system.lt
|
||||
echo " group tip3p type @atom:type$ATOMTYPENUM_ow @atom:type$ATOMTYPENUM_hw" >> system.lt
|
||||
echo " fix fShakeTIP3P tip3p shake 0.0001 10 100 b @bond:type$BONDTYPENUM a @angle:type$ANGLETYPENUM" >> system.lt
|
||||
echo "}" >> system.lt
|
||||
echo "" >> system.lt
|
||||
|
||||
# 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
|
||||
echo "write_once(\"Data Boundary\") {" >> system.lt
|
||||
cat "../moltemplate_files/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 moltemplate
|
||||
mv -f system.data system.in.* ../
|
||||
cd ../
|
||||
|
||||
# Now delete all of the temporary files we generated
|
||||
rm -rf new_lt_file/
|
||||
@ -0,0 +1,44 @@
|
||||
# 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 it 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
|
||||
@ -0,0 +1,51 @@
|
||||
# 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 it using ./README_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_restart system_after_nvt.data
|
||||
@ -0,0 +1,29 @@
|
||||
# -------- 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"
|
||||
@ -0,0 +1,24 @@
|
||||
|
||||
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
|
||||
@ -0,0 +1,39 @@
|
||||
# --- 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_linux" is the name of the command you use to invoke lammps,
|
||||
# then you would run lammps on these files this way:
|
||||
|
||||
|
||||
lmp_linux -i run.in.npt # minimization and simulation at constant pressure
|
||||
lmp_linux -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_linux -i run.in.npt
|
||||
#mpirun -np 4 lmp_linux -i run.in.nvt
|
||||
# (assuming you have 4 processors available)
|
||||
@ -0,0 +1,44 @@
|
||||
# -------- 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 the coordinates of the atoms using PACKMOL
|
||||
cd packmol_files
|
||||
|
||||
packmol < mix_ethylene+benzene.inp
|
||||
mv -f system.xyz ../moltemplate_files/
|
||||
|
||||
cd ..
|
||||
|
||||
|
||||
|
||||
# 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 -xyz system.xyz 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 ../
|
||||
@ -0,0 +1,87 @@
|
||||
|
||||
------- 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.)
|
||||
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 127 KiB |
|
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,51 @@
|
||||
import "oplsaa.lt"
|
||||
|
||||
# The "oplsaa.lt" file contains force-field definitions and masses for the
|
||||
# atoms in your system. See oplsaa_lt_generator/README.TXT for details.
|
||||
|
||||
# Note:
|
||||
# Atom type @atom:90 corresponds to "Aromatic C"
|
||||
# Atom type @atom:91 corresponds to "Aromatic H-C"
|
||||
|
||||
Benzene inherits OPLSAA {
|
||||
|
||||
# We just need a list of atom types and bonds.
|
||||
#
|
||||
# You don't have to specify the charge in this example because we are
|
||||
# using the OPLSAA force-field assigns this by atom-type.
|
||||
#
|
||||
# You also don't have to specify the coordinates, because
|
||||
# you are using PACKMOL to generate them for you.
|
||||
# Just leave these numbers as 0.00 for now..
|
||||
|
||||
write('Data Atoms') {
|
||||
$atom:C1 $mol @atom:90 0.00 0.00 0.00 0.00 # "Aromatic C"
|
||||
$atom:C2 $mol @atom:90 0.00 0.00 0.00 0.00 # "Aromatic C"
|
||||
$atom:C3 $mol @atom:90 0.00 0.00 0.00 0.00 # "Aromatic C"
|
||||
$atom:C4 $mol @atom:90 0.00 0.00 0.00 0.00 # "Aromatic C"
|
||||
$atom:C5 $mol @atom:90 0.00 0.00 0.00 0.00 # "Aromatic C"
|
||||
$atom:C6 $mol @atom:90 0.00 0.00 0.00 0.00 # "Aromatic C"
|
||||
$atom:H11 $mol @atom:91 0.00 0.00 0.00 0.00 # "Aromatic H-C"
|
||||
$atom:H21 $mol @atom:91 0.00 0.00 0.00 0.00 # "Aromatic H-C"
|
||||
$atom:H31 $mol @atom:91 0.00 0.00 0.00 0.00 # "Aromatic H-C"
|
||||
$atom:H41 $mol @atom:91 0.00 0.00 0.00 0.00 # "Aromatic H-C"
|
||||
$atom:H51 $mol @atom:91 0.00 0.00 0.00 0.00 # "Aromatic H-C"
|
||||
$atom:H61 $mol @atom:91 0.00 0.00 0.00 0.00 # "Aromatic H-C"
|
||||
}
|
||||
|
||||
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
|
||||
@ -0,0 +1,40 @@
|
||||
import "oplsaa.lt"
|
||||
|
||||
# The "oplsaa.lt" file contains force-field definitions and masses for the
|
||||
# atoms in your system. See oplsaa_lt_generator/README.TXT for details.
|
||||
|
||||
# Note:
|
||||
# Atom type 88 corresponds to "Alkene H2-C="
|
||||
# Atom type 89 corresponds to "Alkene H-C="
|
||||
|
||||
|
||||
|
||||
Ethylene inherits OPLSAA {
|
||||
|
||||
# atom-id mol-id atom-type charge X Y Z
|
||||
|
||||
write('Data Atoms') {
|
||||
$atom:C1 $mol @atom:88 0.000 -0.6695 0.000000 0.000000
|
||||
$atom:C2 $mol @atom:88 0.000 0.6695 0.000000 0.000000
|
||||
$atom:H11 $mol @atom:89 0.000 -1.234217 -0.854458 0.000000
|
||||
$atom:H12 $mol @atom:89 0.000 -1.234217 0.854458 0.000000
|
||||
$atom:H21 $mol @atom:89 0.000 1.234217 -0.854458 0.000000
|
||||
$atom:H22 $mol @atom:89 0.000 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
|
||||
|
||||
|
||||
|
||||
# Note: You don't need to supply the partial partial charges of the atoms.
|
||||
# If you like, just fill the fourth column with zeros ("0.000").
|
||||
# Moltemplate and LAMMPS will automatically assign the charge later
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
|
||||
OPLSAA force-field conversion tools provided by Jason Lambert.
|
||||
|
||||
@ -0,0 +1,108 @@
|
||||
This directory contains instructions for creating a a moltemplate file
|
||||
("oplsaa.lt") containing force-field definitions relevant to the
|
||||
"ethylene+benzene" example. (However, these instructions should work
|
||||
for other molecules too.)
|
||||
|
||||
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:
|
||||
|
||||
|
||||
python 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 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.
|
||||
|
||||
(You can try to delete more irrelevant information, but be careful.
|
||||
It is not necessary, and it is easy to make mistakes.)
|
||||
|
||||
|
||||
----- 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 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 newton‐like 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
|
||||
@ -0,0 +1,16 @@
|
||||
MOST USERS SHOULD IGNORE THIS DIRECTORY.
|
||||
|
||||
This directory contains versions of the oplsaa_subset.prm file
|
||||
which nearly all of the OPLSAA force-field information removed.
|
||||
However for the "ethylene+benzene" example, all of the essential
|
||||
parameters are contained in these files. You can use oplsaa_moltemplate.py
|
||||
with either of these files and the physics should be the same.
|
||||
|
||||
However there is no reason to do this.
|
||||
When you download the "oplsaa.prm" file from:
|
||||
http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
|
||||
(also http://dasher.wustl.edu/ffe/distribution/params/oplsaa.prm)
|
||||
...just remove the lines beginning with "atom" for atoms you don't need.
|
||||
You don't have to delete all the other irrelevant interactions.
|
||||
(In fact, it is hard to do that without making a mistake.
|
||||
I recommend that you leave the rest of the oplsaa.prm file alone.)
|
||||
@ -0,0 +1,37 @@
|
||||
#############################
|
||||
## 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
|
||||
|
||||
vdw 88 3.5500 0.0760
|
||||
vdw 89 2.4200 0.0300
|
||||
vdw 90 3.5500 0.0700
|
||||
vdw 91 2.4200 0.0300
|
||||
|
||||
bond 46 47 340.00 1.0800
|
||||
bond 47 47 549.00 1.3400
|
||||
bond 48 48 469.00 1.4000
|
||||
bond 48 49 367.00 1.0800
|
||||
|
||||
angle 46 47 46 35.00 117.00
|
||||
angle 46 47 47 35.00 120.00
|
||||
angle 48 48 48 63.00 120.00
|
||||
angle 48 48 49 35.00 120.00
|
||||
|
||||
torsion 46 47 47 46 0.000 0.0 1 14.000 180.0 2 0.000 0.0 3
|
||||
torsion 48 48 48 48 0.000 0.0 1 7.250 180.0 2 0.000 0.0 3
|
||||
torsion 49 48 48 49 0.000 0.0 1 7.250 180.0 2 0.000 0.0 3
|
||||
torsion 48 48 48 49 0.000 0.0 1 7.250 180.0 2 0.000 0.0 3
|
||||
|
||||
imptors 0 0 47 0 30.000 180.0 2
|
||||
imptors 0 0 48 0 5.000 180.0 2
|
||||
|
||||
charge 88 -0.2300
|
||||
charge 89 0.1150
|
||||
charge 90 -0.1150
|
||||
charge 91 0.1150
|
||||
@ -0,0 +1,49 @@
|
||||
#############################
|
||||
## 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
|
||||
|
||||
vdw 88 3.5500 0.0760
|
||||
vdw 89 2.4200 0.0300
|
||||
vdw 90 3.5500 0.0700
|
||||
vdw 91 2.4200 0.0300
|
||||
|
||||
bond 46 47 340.00 1.0800
|
||||
bond 47 47 549.00 1.3400
|
||||
bond 47 48 427.00 1.4330
|
||||
bond 48 48 469.00 1.4000
|
||||
bond 48 49 367.00 1.0800
|
||||
|
||||
angle 46 47 46 35.00 117.00
|
||||
angle 46 47 47 35.00 120.00
|
||||
angle 46 47 48 35.00 123.30
|
||||
angle 47 47 48 85.00 117.00
|
||||
angle 48 48 48 63.00 120.00
|
||||
angle 47 48 48 70.00 124.00
|
||||
angle 48 48 49 35.00 120.00
|
||||
|
||||
imptors 0 0 47 0 30.000 180.0 2
|
||||
imptors 0 0 48 0 5.000 180.0 2
|
||||
|
||||
torsion 47 46 47 46 0.000 0.0 1 -8.000 180.0 2 0.000 0.0 3
|
||||
torsion 0 47 47 0 0.000 0.0 1 14.000 180.0 2 0.000 0.0 3
|
||||
torsion 46 47 47 46 0.000 0.0 1 14.000 180.0 2 0.000 0.0 3
|
||||
torsion 46 47 47 48 0.000 0.0 1 14.000 180.0 2 0.000 0.0 3
|
||||
torsion 46 47 48 48 0.000 0.0 1 0.000 180.0 2 -0.372 0.0 3
|
||||
torsion 47 47 48 48 1.241 0.0 1 3.353 180.0 2 -0.286 0.0 3
|
||||
torsion 0 48 48 0 0.000 0.0 1 7.250 180.0 2 0.000 0.0 3
|
||||
torsion 0 48 48 48 0.000 0.0 1 7.250 180.0 2 0.000 0.0 3
|
||||
torsion 0 48 48 49 0.000 0.0 1 7.250 180.0 2 0.000 0.0 3
|
||||
torsion 47 48 48 49 0.000 0.0 1 7.250 180.0 2 0.000 0.0 3
|
||||
torsion 48 48 48 48 0.000 0.0 1 7.250 180.0 2 0.000 0.0 3
|
||||
torsion 48 48 48 49 0.000 0.0 1 7.250 180.0 2 0.000 0.0 3
|
||||
torsion 49 48 48 49 0.000 0.0 1 7.250 180.0 2 0.000 0.0 3
|
||||
|
||||
charge 88 -0.2300
|
||||
charge 89 0.1150
|
||||
charge 90 -0.1150
|
||||
charge 91 0.1150
|
||||
@ -0,0 +1,386 @@
|
||||
#! /usr/bin/env python
|
||||
#The purpose of this script is to create a moltemplate lt file for the opls-aa forcefield.
|
||||
#This will assist researchers in building complex simulations using this OPLS-UA and the OPLS-AA forcefields.
|
||||
__author__="Jason Lambert"
|
||||
__version__="0.15"
|
||||
|
||||
import sys
|
||||
import os
|
||||
from operator import itemgetter
|
||||
|
||||
print("""
|
||||
|
||||
Warning:
|
||||
Run this program on a SUBSET of the OPLS atoms which are relevant
|
||||
to your problem. If not, this program (and moltemplate) may crash
|
||||
your computer and/or generate enormous files that you do not need.
|
||||
""")
|
||||
# To do that, first make a copy of the \"oplsaa.prm\" file
|
||||
# (which can be downloaded from the TINKER web site).
|
||||
# The lines in this file beginning with the word \"atoms\" should
|
||||
# define the atoms which you plan to put in your simulation. All other
|
||||
# lines beginning with the word \"atoms\" should be deleted.
|
||||
# (Leave the other sections of this file alone.)
|
||||
#""")
|
||||
|
||||
|
||||
|
||||
#input data from file containing opls aa force field parameters.
|
||||
try:
|
||||
f=open(sys.argv[1],"r")
|
||||
except:
|
||||
print("need to specify file name as an input argument:")
|
||||
print("python oplsaa_moltemplate.py <forcefield file name>")
|
||||
print("or file name is specified incorrectly")
|
||||
sys.exit()
|
||||
#output lt file
|
||||
g=open("oplsaa.lt","w")
|
||||
|
||||
|
||||
|
||||
lines = f.readlines()
|
||||
|
||||
|
||||
|
||||
# Ignore/Comment out lines before the "## Atom Type Definitions ##" section.
|
||||
|
||||
for i in range(0, len(lines)):
|
||||
if (lines[i].find("## Atom Type Definitions ##") != -1):
|
||||
break
|
||||
else:
|
||||
lines[i] = '# ' + lines[i]
|
||||
|
||||
|
||||
# As of 2014-4-19, there appear to be 906 atom types, but we don't assume this.
|
||||
# First try to infer out how many atom types there were in the original
|
||||
# oplsaa.prm file, or at least find an upper bound on the atom-type numbers.
|
||||
# (Keep track of the maximum value of the first column in the "atom" section.)
|
||||
max_atomType = 0
|
||||
for line in lines:
|
||||
# skip over text after a # comment character
|
||||
ic = line.find('#')
|
||||
if ic != -1:
|
||||
line = (line[:ic]).strip()
|
||||
else:
|
||||
line = line.strip()
|
||||
# now look for lines beginning with the word "atom"
|
||||
tokens = line.split()
|
||||
if ((len(tokens)>2) and
|
||||
(tokens[0] == "atom") and
|
||||
(int(tokens[1]) > max_atomType)):
|
||||
max_atomType = int(tokens[1])
|
||||
|
||||
|
||||
#temporary storage file
|
||||
h=open("temp.txt","w+")
|
||||
atom_lookup={} #this dictionary contains all the atom ffid's as a key and the number of atoms with that key
|
||||
#atom=[[10000,10000] for i in range(906)] <- don't assume there are 906 atoms
|
||||
atom=[[-10000,-10000] for i in range(0,max_atomType+1)]
|
||||
#charge_by_type={} # lookup charge by atom type
|
||||
#vdw_by_type={} # lookup epsilon & sigma paramters by atom type
|
||||
charge_by_type=[0.0 for i in range(0,max_atomType+1)] # lookup charge by atom
|
||||
vdw_by_type=[(0.0,0.0) for i in range(0,max_atomType+1)] # lookup epsilon & sigma
|
||||
|
||||
|
||||
|
||||
#atom is declared this way so for sorting purposes.
|
||||
#atom contains the following data upon allocation
|
||||
#atom[][0]=atom_id( Important for partial charges and non_bonded interactions)
|
||||
#atom[][1]=atom_ffid( Important for stretches, bending, torsions and impropers)
|
||||
#atom[][2]=atom_mass
|
||||
#atom[][3]=partial charge
|
||||
#atom[][4]=non_bonding sigma
|
||||
#atom[][5]=non_bonding epsilon
|
||||
#atom[][6]=atom comment
|
||||
bond=[]
|
||||
#bond contains the following data
|
||||
#bond[0]=atom 1 ffid
|
||||
#bond[1]=atom 2 ffid
|
||||
#bond[2]=bond spring constant(OPLS-aa compatible)
|
||||
#bond[3]=equilibrium bond distance(Angstrom)
|
||||
angle=[]
|
||||
#angle contains the following data
|
||||
#angle[0]=atom 1 ffid
|
||||
#angle[1]=atom 2 ffid
|
||||
#angle[2]=atom 3 ffid
|
||||
#angle[3]=spring constant
|
||||
#angle[4]=equilibrium angle (degrees)
|
||||
dihedral=[]
|
||||
#dihedral contains the following data
|
||||
#dihedral[0]=atom 1 ffid
|
||||
#dihedral[1]=atom 2 ffid
|
||||
#dihedral[2]=atom 3 ffid
|
||||
#dihedral[3]=atom 4 ffid
|
||||
#dihedral[4]=v1
|
||||
#dihedral[5]=v2
|
||||
#dihedral[6]=v3
|
||||
#dihedral[7]=v4
|
||||
improper=[]
|
||||
#improper[0]=atom 1 ffid
|
||||
#improper[1]=atom 2 ffid(central atom)
|
||||
#improper[2]=atom 3 ffid
|
||||
#improper[3]=atom 4 ffid
|
||||
#improper[4]=spring coefficient
|
||||
#improper[5]=equilibrium angle
|
||||
|
||||
|
||||
#This section gets all the parameters from the force field file
|
||||
for line in lines:
|
||||
|
||||
# skip over text after a # comment character
|
||||
ic = line.find('#')
|
||||
if ic != -1:
|
||||
line = (line[:ic]).strip()
|
||||
else:
|
||||
line = line.strip()
|
||||
|
||||
if line.find("atom") == 0:
|
||||
line=line.split()
|
||||
atom[int(line[1])-1]=[int(line[1]),int(line[2]),float(line[-2]),
|
||||
0.0,0.0,0.0," ".join(line[3:-2])]
|
||||
elif line.find("vdw") == 0:
|
||||
line=line.split()
|
||||
#vdw_temp.append([float(line[1]),float(line[2]),float(line[3])])
|
||||
if (int(line[1]) <= max_atomType):
|
||||
vdw_by_type[int(line[1])] = (float(line[2]),float(line[3]))
|
||||
elif line.find("bond") == 0:
|
||||
line=line.split()
|
||||
bond.append([int(line[1]),int(line[2]),float(line[3]),float(line[4])])
|
||||
elif line.find("angle") == 0:
|
||||
line=line.split()
|
||||
angle.append([int(line[1]),int(line[2]),int(line[3]),
|
||||
float(line[4]),float(line[5])])
|
||||
elif line.find("torsion") == 0:
|
||||
line=line.split()
|
||||
dihedral.append([int(line[1]),int(line[2]),int(line[3]),int(line[4]),
|
||||
float(line[5]),float(line[8]), float(line[11]), 0.0])
|
||||
elif line.find("charge") == 0:
|
||||
line=line.split()
|
||||
#charge_temp.append([int(line[1]),float(line[2])])
|
||||
if (int(line[1]) <= max_atomType):
|
||||
charge_by_type[int(line[1])] = float(line[2])
|
||||
elif line.find("imptors") == 0:
|
||||
line=line.split()
|
||||
improper.append([int(line[1]), int(line[2]),
|
||||
int(line[3]), int(line[4]), float(line[5]), float(line[6])])
|
||||
|
||||
if len(atom) > 600:
|
||||
sys.stderr.write("WARNING: The number of atom types in your file exceeds 600\n"
|
||||
" (You were supposed to edit out the atoms you don't need.\n"
|
||||
" Not doing this may crash your computer.)\n"
|
||||
"\n"
|
||||
" Proceed? (Y/N): ")
|
||||
reply = sys.stdin.readline()
|
||||
if find(reply.strip().lower(), 'y') != 0:
|
||||
exit(0)
|
||||
|
||||
#adding the charge and Lennard Jones parameters to
|
||||
#to each atom type.
|
||||
#----------------------------------------------#
|
||||
for i in range(0,len(atom)):
|
||||
atom_type_num = atom[i][0]
|
||||
#q = charge_by_type.get(atomTypeNum)
|
||||
#if q:
|
||||
# atom[i][3] = q
|
||||
if atom_type_num != -10000:
|
||||
q = charge_by_type[atom_type_num]
|
||||
atom[i][3] = q
|
||||
|
||||
for i in range(0,len(atom)):
|
||||
atom_type_num = atom[i][0]
|
||||
#vdw_params = vdw_by_type.get(atomTypeNum)
|
||||
#if vdw_params:
|
||||
# atom[i][4] = vdw_params[0]
|
||||
# atom[i][5] = vdw_params[1]
|
||||
if atom_type_num != -10000:
|
||||
vdw_params = vdw_by_type[atom_type_num]
|
||||
atom[i][4] = vdw_params[0]
|
||||
atom[i][5] = vdw_params[1]
|
||||
|
||||
del(charge_by_type)
|
||||
del(vdw_by_type)
|
||||
|
||||
#----------------------------------------------------------#
|
||||
#begin writing content to lt file
|
||||
g.write("OPLSAA {\n\n" )
|
||||
|
||||
#write out the atom masses
|
||||
#----------------------------------------------------------#
|
||||
g.write(" write_once(\"Data Masses\"){\n")#checked with gaff
|
||||
for i,x in enumerate(atom):
|
||||
if x[0] != -10000:
|
||||
g.write(" @atom:{} {} #{} partial charge={}\n".format(
|
||||
x[0],x[2],x[6],x[3]))
|
||||
g.write(" } #(end of atom masses)\n\n")
|
||||
#----------------------------------------------------------#
|
||||
|
||||
|
||||
#write out the pair coefficients
|
||||
#----------------------------------------------------------#
|
||||
g.write(" write_once(\"In Settings\"){\n")#checked with gaff
|
||||
for i,x in enumerate(atom):
|
||||
if x[0] != -10000:
|
||||
g.write(" pair_coeff @atom:{0} @atom:{0} lj/cut/coul/long {1} {2}\n".format(x[0],x[5],x[4]))
|
||||
g.write(" } #(end of pair coeffs)\n\n")
|
||||
|
||||
g.write(" write_once(\"In Charges\"){\n")#checked with gaff
|
||||
for i,x in enumerate(atom):
|
||||
if x[0] != -10000:
|
||||
g.write(" set type @atom:{0} charge {1}\n".format(x[0],x[3]))
|
||||
g.write(" } #(end of atom charges)\n\n")
|
||||
|
||||
#-----------------------------------------------------------#
|
||||
|
||||
# This part of the code creates a lookup dictionary
|
||||
# that allows you to find every type of atom by its
|
||||
# force field id. force field id is the id number
|
||||
# relevant to bonds, angles, dihedrals, and impropers.
|
||||
# This greatly increases the speed of angle, bond, dihedral
|
||||
# and improper assignment.
|
||||
#------------------------------------------------------------#
|
||||
atom=sorted(atom,key=itemgetter(1))
|
||||
atom_ffid=0
|
||||
for x in atom:
|
||||
if x[1]==atom_ffid:
|
||||
atom_lookup[x[1]].append(x[0])
|
||||
elif x[1]>atom_ffid:
|
||||
atom_lookup[x[1]]=[x[0]]
|
||||
atom_ffid=x[1]
|
||||
atom_lookup[0]=["*"]
|
||||
#-------------------------------------------------------------#
|
||||
|
||||
|
||||
#writing out the bond coefficients and bond parameters#
|
||||
#-------------------------------------------------------------#
|
||||
g.write(" write_once(\"In Settings\") {\n")
|
||||
index1=0
|
||||
for x in bond:
|
||||
for y in atom_lookup.get(x[0],[]):
|
||||
for z in atom_lookup.get(x[1],[]):
|
||||
g.write(" bond_coeff @bond:{}-{} harmonic {} {}\n".format(y,z,x[2]/2,x[3]))
|
||||
h.write(" @bond:{0}-{1} @atom:{0} @atom:{1}\n".format(y,z))
|
||||
g.write(" } #(end of bond_coeffs)\n\n")
|
||||
h.seek(0,0)
|
||||
g.write(" write_once(\"Data Bonds By Type\") {\n")
|
||||
for line in h.readlines():
|
||||
g.write(line)
|
||||
g.write(" } #(end of bonds by type)\n\n")
|
||||
del(bond)
|
||||
h.close()
|
||||
#-----------------------------------------------------------#
|
||||
h=open("temp.txt","w+")
|
||||
|
||||
#writing out angle coefficients and angles by type.---------#
|
||||
#-----------------------------------------------------------#
|
||||
g.write(" write_once(\"Data Angles By Type\"){\n")
|
||||
for x in angle:
|
||||
for y in atom_lookup.get(x[0],[]):
|
||||
for z in atom_lookup.get(x[1],[]):
|
||||
for u in atom_lookup.get(x[2],[]):
|
||||
#print(y,z,u,x)
|
||||
h.write(" angle_coeff @angle:{}-{}-{} harmonic {} {}\n".format(y,z,u,
|
||||
x[3]/2.0,x[4]))
|
||||
g.write(" @angle:{0}-{1}-{2} @atom:{0} @atom:{1} @atom:{2}\n".format(
|
||||
y,z,u))
|
||||
|
||||
|
||||
g.write(" } #(end of angles by type)\n\n")
|
||||
h.seek(0,0)
|
||||
g.write(" write_once(\"In Settings\" ){\n")
|
||||
for line in h.readlines():
|
||||
g.write(line)
|
||||
g.write(" } #(end of angle_coeffs)\n\n")
|
||||
del(angle)
|
||||
h.close()
|
||||
#----------------------------------------------------------#
|
||||
|
||||
#writing dihedrals by type and dihedral coefficients-------#
|
||||
h=h=open("temp.txt","w+")
|
||||
g.write(" write_once(\"Data Dihedrals By Type\") {\n")
|
||||
#print(atom_lookup)
|
||||
for x in dihedral:
|
||||
for y in atom_lookup.get(x[0],[]):
|
||||
for z in atom_lookup.get(x[1],[]):
|
||||
for u in atom_lookup.get(x[2],[]):
|
||||
for v in atom_lookup.get(x[3],[]):
|
||||
if x[0]!=0 and x[3]!=0:
|
||||
g.write(" @dihedral:{0}-{1}-{2}-{3} @atom:{0} @atom:{1} @atom:{2} @atom:{3}\n".format(
|
||||
y,z,u,v))
|
||||
h.write(" dihedral_coeff @dihedral:{}-{}-{}-{} opls {} {} {} {}\n".format(
|
||||
y,z,u,v,x[4],x[5],x[6],x[7]))
|
||||
elif x[0]==0 and x[3]!=0:
|
||||
g.write(" @dihedral:0-{1}-{2}-{3} @atom:{0} @atom:{1} @atom:{2} @atom:{3}\n".format(
|
||||
y,z,u,v))
|
||||
h.write(" dihedral_coeff @dihedral:0-{}-{}-{} opls {} {} {} {}\n".format(
|
||||
z,u,v,x[4],x[5],x[6],x[7]))
|
||||
elif x[0]==0 and x[3]==0:
|
||||
g.write(" @dihedral:0-{1}-{2}-0 @atom:{0} @atom:{1} @atom:{2} @atom:{3}\n".format(
|
||||
y,z,u,v))
|
||||
#h.write(" dihedral_coeff @dihedral:0-{}-{}-0 harmonic {} {} {} {}\n".format(
|
||||
h.write(" dihedral_coeff @dihedral:0-{}-{}-0 opls {} {} {} {}\n".format(
|
||||
z,u,x[4],x[5],x[6],x[7]))
|
||||
|
||||
del(dihedral)
|
||||
g.write(" } #(end of Dihedrals by type)\n\n")
|
||||
h.seek(0,0)
|
||||
g.write(" write_once(\"In Settings\") {\n")
|
||||
for line in h.readlines():
|
||||
g.write(line)
|
||||
g.write(" } #(end of dihedral_coeffs)\n\n")
|
||||
h.close()
|
||||
#-----------------------------------------------------------------------#
|
||||
|
||||
#----writing out improper coefficients and impropers by type------------#
|
||||
h=open("temp.txt","w+")
|
||||
g.write(" write_once(\"Data Impropers By Type\") {\n")
|
||||
for x in improper:
|
||||
for y in atom_lookup.get(x[0],[]):
|
||||
for z in atom_lookup.get(x[1],[]):
|
||||
for u in atom_lookup.get(x[2],[]):
|
||||
for v in atom_lookup.get(x[3],[]):
|
||||
if x[0]==0 and x[1]==0 and x[3]==0:
|
||||
g.write(" @improper:{2}-0-0-0 @atom:{2} @atom:{0} @atom:{1} @atom:{3}\n".format(
|
||||
y,z,u,v))
|
||||
h.write(" improper_coeff @improper:{2}-0-0-0 harmonic {4} {5} \n".format(
|
||||
y,z,u,v,x[4]/2,0))
|
||||
else:
|
||||
g.write(" @improper:{2}-0-0-{3} @atom:{2} @atom:{0} @atom:{1} @atom:{3}\n".format(
|
||||
y,z,u,v))
|
||||
h.write(" improper_coeff @improper:{2}-0-0-{3} harmonic {4} {5} \n".format(
|
||||
y,z,u,v,x[4]/2,0))
|
||||
|
||||
|
||||
g.write(" } #(end of impropers by type)\n\n")
|
||||
h.seek(0,0)
|
||||
g.write(" write_once(\"In Settings\") {\n")
|
||||
for line in h.readlines():
|
||||
g.write(line)
|
||||
g.write(" } #(end of improp_coeffs)\n\n")
|
||||
#-----------------------------------------------------------------------#
|
||||
|
||||
#This section writes out the input parameters required for an opls-aa simulation
|
||||
# lammps.
|
||||
g.write(" write_once(\"In Init\") {\n")
|
||||
g.write(" units real\n")
|
||||
g.write(" atom_style full\n")
|
||||
g.write(" bond_style hybrid harmonic\n")
|
||||
g.write(" angle_style hybrid harmonic\n")
|
||||
g.write(" dihedral_style hybrid opls\n")
|
||||
g.write(" improper_style hybrid harmonic\n")
|
||||
#g.write(" pair_style hybrid lj/cut/coul/cut 10.0 10.0\n")
|
||||
g.write(" pair_style hybrid lj/cut/coul/long 10.0 10.0\n")
|
||||
g.write(" pair_modify mix arithmetic\n")
|
||||
g.write(" special_bonds lj 0.0 0.0 0.5\n")
|
||||
g.write(" kspace_style pppm 0.0001\n")
|
||||
g.write(" } #end of init parameters\n\n")
|
||||
g.write("} # OPLSAA\n")
|
||||
f.close()
|
||||
g.close()
|
||||
h.close()
|
||||
os.remove("temp.txt")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
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
|
||||
# List them in the same order they appear in the PACKMOL .inp file(s).
|
||||
|
||||
ethylenes = new Ethylene[1000]
|
||||
benzenes = new Benzene[500]
|
||||
|
||||
# Note: We can omit the .move() and .rot() commands which normally appear
|
||||
# after the "new" command because we will be using a separate program
|
||||
# (PACKMOL) to generate the coordinates of these molecules.
|
||||
@ -0,0 +1,5 @@
|
||||
You can use packmol to create a file containing the atomic coordinates
|
||||
for a system of ethylene mixed with benzene using this command:
|
||||
|
||||
packmol < mix_ethylene+benzene.inp
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
12
|
||||
Benzene
|
||||
C1 5.274 1.999 -8.568
|
||||
C2 6.627 2.018 -8.209
|
||||
C3 7.366 0.829 -8.202
|
||||
C4 6.752 -0.379 -8.554
|
||||
C5 5.399 -0.398 -8.912
|
||||
C6 4.660 0.791 -8.919
|
||||
H11 4.704 2.916 -8.573
|
||||
H21 7.101 2.950 -7.938
|
||||
H31 8.410 0.844 -7.926
|
||||
H41 7.322 -1.296 -8.548
|
||||
H51 4.925 -1.330 -9.183
|
||||
H61 3.616 0.776 -9.196
|
||||
@ -0,0 +1,8 @@
|
||||
6
|
||||
Ethylene
|
||||
C1 -0.6695 0.000000 0.000000
|
||||
C2 0.6695 0.000000 0.000000
|
||||
H11 -1.234217 -0.854458 0.000000
|
||||
H12 -1.234217 0.854458 0.000000
|
||||
H21 1.234217 -0.854458 0.000000
|
||||
H22 1.234217 0.854458 0.000000
|
||||
@ -0,0 +1,31 @@
|
||||
#
|
||||
# A mixture of ethylene and benzene
|
||||
#
|
||||
|
||||
# All the atoms from diferent molecules will be separated at least 2.0
|
||||
# Anstroms at the solution.
|
||||
|
||||
tolerance 2.0
|
||||
|
||||
# The file type of input and output files is PDB
|
||||
|
||||
filetype xyz
|
||||
|
||||
# The name of the output file
|
||||
|
||||
output system.xyz
|
||||
|
||||
# 1000 water molecules and 500 urea molecules will be put in a box
|
||||
# defined by the minimum coordinates x, y and z = 0. 0. 0. and maximum
|
||||
# coordinates 80. 80. 80. That is, they will be put in a cube of side
|
||||
# 80. (the keyword "inside cube 0. 0. 0. 80.") could be used as well.
|
||||
|
||||
structure ethylene.xyz
|
||||
number 1000
|
||||
inside box 0. 0. 0. 80. 80. 80.
|
||||
end structure
|
||||
|
||||
structure benzene.xyz
|
||||
number 500
|
||||
inside box 0. 0. 0. 80. 80. 80.
|
||||
end structure
|
||||
@ -0,0 +1,57 @@
|
||||
# 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 it using ./README_sh.)
|
||||
|
||||
# ------------------------------- Initialization Section --------------------
|
||||
|
||||
include "system.in.init"
|
||||
|
||||
# ------------------------------- Atom Definition Section -------------------
|
||||
|
||||
read_data "system.data"
|
||||
|
||||
# OPLSAA atom charges are stored in a separate file.
|
||||
# Load that file now:
|
||||
|
||||
include "system.in.charges"
|
||||
|
||||
# ------------------------------- 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
|
||||
@ -0,0 +1,50 @@
|
||||
# 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 it using ./README_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
|
||||
@ -0,0 +1,13 @@
|
||||
|
||||
This is an example of how to use the OPLSAA force-field in LAMMPS
|
||||
(using moltemplate.sh and the oplsaa_moltemplate.py conversion tool).
|
||||
As of 2014-3-31, it 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
|
||||
@ -0,0 +1,39 @@
|
||||
# --- 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_linux" is the name of the command you use to invoke lammps,
|
||||
# then you would run lammps on these files this way:
|
||||
|
||||
|
||||
lmp_linux -i run.in.npt # minimization and simulation at constant pressure
|
||||
lmp_linux -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_linux -i run.in.npt
|
||||
#mpirun -np 4 lmp_linux -i run.in.nvt
|
||||
# (assuming you have 4 processors available)
|
||||
@ -0,0 +1,36 @@
|
||||
# -------- 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 ../
|
||||
@ -0,0 +1,87 @@
|
||||
|
||||
------- 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.)
|
||||
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 85 KiB |
@ -0,0 +1,40 @@
|
||||
import "oplsaa.lt"
|
||||
|
||||
# The "oplsaa.lt" file contains force-field definitions and masses for the
|
||||
# atoms in your system. See oplsaa_lt_generator/README.TXT for details.
|
||||
|
||||
# Note:
|
||||
# Atom type 88 corresponds to "Alkene H2-C="
|
||||
# Atom type 89 corresponds to "Alkene H-C="
|
||||
|
||||
|
||||
|
||||
Ethylene inherits OPLSAA {
|
||||
|
||||
# atom-id mol-id atom-type charge X Y Z
|
||||
|
||||
write('Data Atoms') {
|
||||
$atom:C1 $mol @atom:88 0.000 -0.6695 0.000000 0.000000
|
||||
$atom:C2 $mol @atom:88 0.000 0.6695 0.000000 0.000000
|
||||
$atom:H11 $mol @atom:89 0.000 -1.234217 -0.854458 0.000000
|
||||
$atom:H12 $mol @atom:89 0.000 -1.234217 0.854458 0.000000
|
||||
$atom:H21 $mol @atom:89 0.000 1.234217 -0.854458 0.000000
|
||||
$atom:H22 $mol @atom:89 0.000 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
|
||||
|
||||
|
||||
|
||||
# Note: You don't need to supply the partial partial charges of the atoms.
|
||||
# If you like, just fill the fourth column with zeros ("0.000").
|
||||
# Moltemplate and LAMMPS will automatically assign the charge later
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
|
||||
OPLSAA force-field conversion tools provided by Jason Lambert.
|
||||
|
||||
@ -0,0 +1,106 @@
|
||||
This directory contains instructions for creating a a moltemplate file
|
||||
("oplsaa.lt") containing force-field definitions relevant to the
|
||||
"ethylene" example. (However, these instructions should work
|
||||
for other molecules too.)
|
||||
|
||||
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:
|
||||
|
||||
|
||||
python 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 alone.)
|
||||
|
||||
For example:
|
||||
If you were working with ethylene, you would delete every line
|
||||
beginning with the word "atom", except for these two lines:
|
||||
|
||||
|
||||
atom 88 47 CM "Alkene H2-C=" 6 12.011 3
|
||||
atom 89 46 HC "Alkene H-C=" 1 1.008 1
|
||||
|
||||
|
||||
Then you are ready to run oplsaa_moltemplate.py on this file.
|
||||
|
||||
(You can try to delete more irrelevant information, but be careful.
|
||||
It is not necessary, and it is easy to make mistakes.)
|
||||
|
||||
|
||||
----- 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 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 newton‐like 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
|
||||
@ -0,0 +1,16 @@
|
||||
MOST USERS SHOULD IGNORE THIS DIRECTORY.
|
||||
|
||||
This directory contains versions of the oplsaa_subset.prm file
|
||||
which nearly all of the OPLSAA force-field information removed.
|
||||
However for the "ethylene+benzene" example, all of the essential
|
||||
parameters are contained in these files. You can use oplsaa_moltemplate.py
|
||||
with either of these files and the physics should be the same.
|
||||
|
||||
However there is no reason to do this.
|
||||
When you download the "oplsaa.prm" file from:
|
||||
http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
|
||||
(also http://dasher.wustl.edu/ffe/distribution/params/oplsaa.prm)
|
||||
...just remove the lines beginning with "atom" for atoms you don't need.
|
||||
You don't have to delete all the other irrelevant interactions.
|
||||
(In fact, it is hard to do that without making a mistake.
|
||||
I recommend that you leave the rest of the oplsaa.prm file alone.)
|
||||
@ -0,0 +1,22 @@
|
||||
#############################
|
||||
## 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
|
||||
|
||||
vdw 88 3.5500 0.0760
|
||||
vdw 89 2.4200 0.0300
|
||||
|
||||
bond 46 47 340.00 1.0800
|
||||
bond 47 47 549.00 1.3400
|
||||
|
||||
angle 46 47 46 35.00 117.00
|
||||
angle 46 47 47 35.00 120.00
|
||||
|
||||
torsion 46 47 47 46 0.000 0.0 1 14.000 180.0 2 0.000 0.0 3
|
||||
|
||||
imptors 0 0 47 0 30.000 180.0 2
|
||||
|
||||
charge 88 -0.2300
|
||||
charge 89 0.1150
|
||||
@ -0,0 +1,25 @@
|
||||
#############################
|
||||
## 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
|
||||
|
||||
vdw 88 3.5500 0.0760
|
||||
vdw 89 2.4200 0.0300
|
||||
|
||||
bond 46 47 340.00 1.0800
|
||||
bond 47 47 549.00 1.3400
|
||||
|
||||
angle 46 47 46 35.00 117.00
|
||||
angle 46 47 47 35.00 120.00
|
||||
|
||||
torsion 47 46 47 46 0.000 0.0 1 -8.000 180.0 2 0.000 0.0 3
|
||||
torsion 0 47 47 0 0.000 0.0 1 14.000 180.0 2 0.000 0.0 3
|
||||
torsion 46 47 47 46 0.000 0.0 1 14.000 180.0 2 0.000 0.0 3
|
||||
|
||||
imptors 0 0 47 0 30.000 180.0 2
|
||||
|
||||
charge 88 -0.2300
|
||||
charge 89 0.1150
|
||||
|
||||
@ -0,0 +1,386 @@
|
||||
#! /usr/bin/env python
|
||||
#The purpose of this script is to create a moltemplate lt file for the opls-aa forcefield.
|
||||
#This will assist researchers in building complex simulations using this OPLS-UA and the OPLS-AA forcefields.
|
||||
__author__="Jason Lambert"
|
||||
__version__="0.15"
|
||||
|
||||
import sys
|
||||
import os
|
||||
from operator import itemgetter
|
||||
|
||||
print("""
|
||||
|
||||
Warning:
|
||||
Run this program on a SUBSET of the OPLS atoms which are relevant
|
||||
to your problem. If not, this program (and moltemplate) may crash
|
||||
your computer and/or generate enormous files that you do not need.
|
||||
""")
|
||||
# To do that, first make a copy of the \"oplsaa.prm\" file
|
||||
# (which can be downloaded from the TINKER web site).
|
||||
# The lines in this file beginning with the word \"atoms\" should
|
||||
# define the atoms which you plan to put in your simulation. All other
|
||||
# lines beginning with the word \"atoms\" should be deleted.
|
||||
# (Leave the other sections of this file alone.)
|
||||
#""")
|
||||
|
||||
|
||||
|
||||
#input data from file containing opls aa force field parameters.
|
||||
try:
|
||||
f=open(sys.argv[1],"r")
|
||||
except:
|
||||
print("need to specify file name as an input argument:")
|
||||
print("python oplsaa_moltemplate.py <forcefield file name>")
|
||||
print("or file name is specified incorrectly")
|
||||
sys.exit()
|
||||
#output lt file
|
||||
g=open("oplsaa.lt","w")
|
||||
|
||||
|
||||
|
||||
lines = f.readlines()
|
||||
|
||||
|
||||
|
||||
# Ignore/Comment out lines before the "## Atom Type Definitions ##" section.
|
||||
|
||||
for i in range(0, len(lines)):
|
||||
if (lines[i].find("## Atom Type Definitions ##") != -1):
|
||||
break
|
||||
else:
|
||||
lines[i] = '# ' + lines[i]
|
||||
|
||||
|
||||
# As of 2014-4-19, there appear to be 906 atom types, but we don't assume this.
|
||||
# First try to infer out how many atom types there were in the original
|
||||
# oplsaa.prm file, or at least find an upper bound on the atom-type numbers.
|
||||
# (Keep track of the maximum value of the first column in the "atom" section.)
|
||||
max_atomType = 0
|
||||
for line in lines:
|
||||
# skip over text after a # comment character
|
||||
ic = line.find('#')
|
||||
if ic != -1:
|
||||
line = (line[:ic]).strip()
|
||||
else:
|
||||
line = line.strip()
|
||||
# now look for lines beginning with the word "atom"
|
||||
tokens = line.split()
|
||||
if ((len(tokens)>2) and
|
||||
(tokens[0] == "atom") and
|
||||
(int(tokens[1]) > max_atomType)):
|
||||
max_atomType = int(tokens[1])
|
||||
|
||||
|
||||
#temporary storage file
|
||||
h=open("temp.txt","w+")
|
||||
atom_lookup={} #this dictionary contains all the atom ffid's as a key and the number of atoms with that key
|
||||
#atom=[[10000,10000] for i in range(906)] <- don't assume there are 906 atoms
|
||||
atom=[[-10000,-10000] for i in range(0,max_atomType+1)]
|
||||
#charge_by_type={} # lookup charge by atom type
|
||||
#vdw_by_type={} # lookup epsilon & sigma paramters by atom type
|
||||
charge_by_type=[0.0 for i in range(0,max_atomType+1)] # lookup charge by atom
|
||||
vdw_by_type=[(0.0,0.0) for i in range(0,max_atomType+1)] # lookup epsilon & sigma
|
||||
|
||||
|
||||
|
||||
#atom is declared this way so for sorting purposes.
|
||||
#atom contains the following data upon allocation
|
||||
#atom[][0]=atom_id( Important for partial charges and non_bonded interactions)
|
||||
#atom[][1]=atom_ffid( Important for stretches, bending, torsions and impropers)
|
||||
#atom[][2]=atom_mass
|
||||
#atom[][3]=partial charge
|
||||
#atom[][4]=non_bonding sigma
|
||||
#atom[][5]=non_bonding epsilon
|
||||
#atom[][6]=atom comment
|
||||
bond=[]
|
||||
#bond contains the following data
|
||||
#bond[0]=atom 1 ffid
|
||||
#bond[1]=atom 2 ffid
|
||||
#bond[2]=bond spring constant(OPLS-aa compatible)
|
||||
#bond[3]=equilibrium bond distance(Angstrom)
|
||||
angle=[]
|
||||
#angle contains the following data
|
||||
#angle[0]=atom 1 ffid
|
||||
#angle[1]=atom 2 ffid
|
||||
#angle[2]=atom 3 ffid
|
||||
#angle[3]=spring constant
|
||||
#angle[4]=equilibrium angle (degrees)
|
||||
dihedral=[]
|
||||
#dihedral contains the following data
|
||||
#dihedral[0]=atom 1 ffid
|
||||
#dihedral[1]=atom 2 ffid
|
||||
#dihedral[2]=atom 3 ffid
|
||||
#dihedral[3]=atom 4 ffid
|
||||
#dihedral[4]=v1
|
||||
#dihedral[5]=v2
|
||||
#dihedral[6]=v3
|
||||
#dihedral[7]=v4
|
||||
improper=[]
|
||||
#improper[0]=atom 1 ffid
|
||||
#improper[1]=atom 2 ffid(central atom)
|
||||
#improper[2]=atom 3 ffid
|
||||
#improper[3]=atom 4 ffid
|
||||
#improper[4]=spring coefficient
|
||||
#improper[5]=equilibrium angle
|
||||
|
||||
|
||||
#This section gets all the parameters from the force field file
|
||||
for line in lines:
|
||||
|
||||
# skip over text after a # comment character
|
||||
ic = line.find('#')
|
||||
if ic != -1:
|
||||
line = (line[:ic]).strip()
|
||||
else:
|
||||
line = line.strip()
|
||||
|
||||
if line.find("atom") == 0:
|
||||
line=line.split()
|
||||
atom[int(line[1])-1]=[int(line[1]),int(line[2]),float(line[-2]),
|
||||
0.0,0.0,0.0," ".join(line[3:-2])]
|
||||
elif line.find("vdw") == 0:
|
||||
line=line.split()
|
||||
#vdw_temp.append([float(line[1]),float(line[2]),float(line[3])])
|
||||
if (int(line[1]) <= max_atomType):
|
||||
vdw_by_type[int(line[1])] = (float(line[2]),float(line[3]))
|
||||
elif line.find("bond") == 0:
|
||||
line=line.split()
|
||||
bond.append([int(line[1]),int(line[2]),float(line[3]),float(line[4])])
|
||||
elif line.find("angle") == 0:
|
||||
line=line.split()
|
||||
angle.append([int(line[1]),int(line[2]),int(line[3]),
|
||||
float(line[4]),float(line[5])])
|
||||
elif line.find("torsion") == 0:
|
||||
line=line.split()
|
||||
dihedral.append([int(line[1]),int(line[2]),int(line[3]),int(line[4]),
|
||||
float(line[5]),float(line[8]), float(line[11]), 0.0])
|
||||
elif line.find("charge") == 0:
|
||||
line=line.split()
|
||||
#charge_temp.append([int(line[1]),float(line[2])])
|
||||
if (int(line[1]) <= max_atomType):
|
||||
charge_by_type[int(line[1])] = float(line[2])
|
||||
elif line.find("imptors") == 0:
|
||||
line=line.split()
|
||||
improper.append([int(line[1]), int(line[2]),
|
||||
int(line[3]), int(line[4]), float(line[5]), float(line[6])])
|
||||
|
||||
if len(atom) > 600:
|
||||
sys.stderr.write("WARNING: The number of atom types in your file exceeds 600\n"
|
||||
" (You were supposed to edit out the atoms you don't need.\n"
|
||||
" Not doing this may crash your computer.)\n"
|
||||
"\n"
|
||||
" Proceed? (Y/N): ")
|
||||
reply = sys.stdin.readline()
|
||||
if find(reply.strip().lower(), 'y') != 0:
|
||||
exit(0)
|
||||
|
||||
#adding the charge and Lennard Jones parameters to
|
||||
#to each atom type.
|
||||
#----------------------------------------------#
|
||||
for i in range(0,len(atom)):
|
||||
atom_type_num = atom[i][0]
|
||||
#q = charge_by_type.get(atomTypeNum)
|
||||
#if q:
|
||||
# atom[i][3] = q
|
||||
if atom_type_num != -10000:
|
||||
q = charge_by_type[atom_type_num]
|
||||
atom[i][3] = q
|
||||
|
||||
for i in range(0,len(atom)):
|
||||
atom_type_num = atom[i][0]
|
||||
#vdw_params = vdw_by_type.get(atomTypeNum)
|
||||
#if vdw_params:
|
||||
# atom[i][4] = vdw_params[0]
|
||||
# atom[i][5] = vdw_params[1]
|
||||
if atom_type_num != -10000:
|
||||
vdw_params = vdw_by_type[atom_type_num]
|
||||
atom[i][4] = vdw_params[0]
|
||||
atom[i][5] = vdw_params[1]
|
||||
|
||||
del(charge_by_type)
|
||||
del(vdw_by_type)
|
||||
|
||||
#----------------------------------------------------------#
|
||||
#begin writing content to lt file
|
||||
g.write("OPLSAA {\n\n" )
|
||||
|
||||
#write out the atom masses
|
||||
#----------------------------------------------------------#
|
||||
g.write(" write_once(\"Data Masses\"){\n")#checked with gaff
|
||||
for i,x in enumerate(atom):
|
||||
if x[0] != -10000:
|
||||
g.write(" @atom:{} {} #{} partial charge={}\n".format(
|
||||
x[0],x[2],x[6],x[3]))
|
||||
g.write(" } #(end of atom masses)\n\n")
|
||||
#----------------------------------------------------------#
|
||||
|
||||
|
||||
#write out the pair coefficients
|
||||
#----------------------------------------------------------#
|
||||
g.write(" write_once(\"In Settings\"){\n")#checked with gaff
|
||||
for i,x in enumerate(atom):
|
||||
if x[0] != -10000:
|
||||
g.write(" pair_coeff @atom:{0} @atom:{0} lj/cut/coul/long {1} {2}\n".format(x[0],x[5],x[4]))
|
||||
g.write(" } #(end of pair coeffs)\n\n")
|
||||
|
||||
g.write(" write_once(\"In Charges\"){\n")#checked with gaff
|
||||
for i,x in enumerate(atom):
|
||||
if x[0] != -10000:
|
||||
g.write(" set type @atom:{0} charge {1}\n".format(x[0],x[3]))
|
||||
g.write(" } #(end of atom charges)\n\n")
|
||||
|
||||
#-----------------------------------------------------------#
|
||||
|
||||
# This part of the code creates a lookup dictionary
|
||||
# that allows you to find every type of atom by its
|
||||
# force field id. force field id is the id number
|
||||
# relevant to bonds, angles, dihedrals, and impropers.
|
||||
# This greatly increases the speed of angle, bond, dihedral
|
||||
# and improper assignment.
|
||||
#------------------------------------------------------------#
|
||||
atom=sorted(atom,key=itemgetter(1))
|
||||
atom_ffid=0
|
||||
for x in atom:
|
||||
if x[1]==atom_ffid:
|
||||
atom_lookup[x[1]].append(x[0])
|
||||
elif x[1]>atom_ffid:
|
||||
atom_lookup[x[1]]=[x[0]]
|
||||
atom_ffid=x[1]
|
||||
atom_lookup[0]=["*"]
|
||||
#-------------------------------------------------------------#
|
||||
|
||||
|
||||
#writing out the bond coefficients and bond parameters#
|
||||
#-------------------------------------------------------------#
|
||||
g.write(" write_once(\"In Settings\") {\n")
|
||||
index1=0
|
||||
for x in bond:
|
||||
for y in atom_lookup.get(x[0],[]):
|
||||
for z in atom_lookup.get(x[1],[]):
|
||||
g.write(" bond_coeff @bond:{}-{} harmonic {} {}\n".format(y,z,x[2]/2,x[3]))
|
||||
h.write(" @bond:{0}-{1} @atom:{0} @atom:{1}\n".format(y,z))
|
||||
g.write(" } #(end of bond_coeffs)\n\n")
|
||||
h.seek(0,0)
|
||||
g.write(" write_once(\"Data Bonds By Type\") {\n")
|
||||
for line in h.readlines():
|
||||
g.write(line)
|
||||
g.write(" } #(end of bonds by type)\n\n")
|
||||
del(bond)
|
||||
h.close()
|
||||
#-----------------------------------------------------------#
|
||||
h=open("temp.txt","w+")
|
||||
|
||||
#writing out angle coefficients and angles by type.---------#
|
||||
#-----------------------------------------------------------#
|
||||
g.write(" write_once(\"Data Angles By Type\"){\n")
|
||||
for x in angle:
|
||||
for y in atom_lookup.get(x[0],[]):
|
||||
for z in atom_lookup.get(x[1],[]):
|
||||
for u in atom_lookup.get(x[2],[]):
|
||||
#print(y,z,u,x)
|
||||
h.write(" angle_coeff @angle:{}-{}-{} harmonic {} {}\n".format(y,z,u,
|
||||
x[3]/2.0,x[4]))
|
||||
g.write(" @angle:{0}-{1}-{2} @atom:{0} @atom:{1} @atom:{2}\n".format(
|
||||
y,z,u))
|
||||
|
||||
|
||||
g.write(" } #(end of angles by type)\n\n")
|
||||
h.seek(0,0)
|
||||
g.write(" write_once(\"In Settings\" ){\n")
|
||||
for line in h.readlines():
|
||||
g.write(line)
|
||||
g.write(" } #(end of angle_coeffs)\n\n")
|
||||
del(angle)
|
||||
h.close()
|
||||
#----------------------------------------------------------#
|
||||
|
||||
#writing dihedrals by type and dihedral coefficients-------#
|
||||
h=h=open("temp.txt","w+")
|
||||
g.write(" write_once(\"Data Dihedrals By Type\") {\n")
|
||||
#print(atom_lookup)
|
||||
for x in dihedral:
|
||||
for y in atom_lookup.get(x[0],[]):
|
||||
for z in atom_lookup.get(x[1],[]):
|
||||
for u in atom_lookup.get(x[2],[]):
|
||||
for v in atom_lookup.get(x[3],[]):
|
||||
if x[0]!=0 and x[3]!=0:
|
||||
g.write(" @dihedral:{0}-{1}-{2}-{3} @atom:{0} @atom:{1} @atom:{2} @atom:{3}\n".format(
|
||||
y,z,u,v))
|
||||
h.write(" dihedral_coeff @dihedral:{}-{}-{}-{} opls {} {} {} {}\n".format(
|
||||
y,z,u,v,x[4],x[5],x[6],x[7]))
|
||||
elif x[0]==0 and x[3]!=0:
|
||||
g.write(" @dihedral:0-{1}-{2}-{3} @atom:{0} @atom:{1} @atom:{2} @atom:{3}\n".format(
|
||||
y,z,u,v))
|
||||
h.write(" dihedral_coeff @dihedral:0-{}-{}-{} opls {} {} {} {}\n".format(
|
||||
z,u,v,x[4],x[5],x[6],x[7]))
|
||||
elif x[0]==0 and x[3]==0:
|
||||
g.write(" @dihedral:0-{1}-{2}-0 @atom:{0} @atom:{1} @atom:{2} @atom:{3}\n".format(
|
||||
y,z,u,v))
|
||||
#h.write(" dihedral_coeff @dihedral:0-{}-{}-0 harmonic {} {} {} {}\n".format(
|
||||
h.write(" dihedral_coeff @dihedral:0-{}-{}-0 opls {} {} {} {}\n".format(
|
||||
z,u,x[4],x[5],x[6],x[7]))
|
||||
|
||||
del(dihedral)
|
||||
g.write(" } #(end of Dihedrals by type)\n\n")
|
||||
h.seek(0,0)
|
||||
g.write(" write_once(\"In Settings\") {\n")
|
||||
for line in h.readlines():
|
||||
g.write(line)
|
||||
g.write(" } #(end of dihedral_coeffs)\n\n")
|
||||
h.close()
|
||||
#-----------------------------------------------------------------------#
|
||||
|
||||
#----writing out improper coefficients and impropers by type------------#
|
||||
h=open("temp.txt","w+")
|
||||
g.write(" write_once(\"Data Impropers By Type\") {\n")
|
||||
for x in improper:
|
||||
for y in atom_lookup.get(x[0],[]):
|
||||
for z in atom_lookup.get(x[1],[]):
|
||||
for u in atom_lookup.get(x[2],[]):
|
||||
for v in atom_lookup.get(x[3],[]):
|
||||
if x[0]==0 and x[1]==0 and x[3]==0:
|
||||
g.write(" @improper:{2}-0-0-0 @atom:{2} @atom:{0} @atom:{1} @atom:{3}\n".format(
|
||||
y,z,u,v))
|
||||
h.write(" improper_coeff @improper:{2}-0-0-0 harmonic {4} {5} \n".format(
|
||||
y,z,u,v,x[4]/2,0))
|
||||
else:
|
||||
g.write(" @improper:{2}-0-0-{3} @atom:{2} @atom:{0} @atom:{1} @atom:{3}\n".format(
|
||||
y,z,u,v))
|
||||
h.write(" improper_coeff @improper:{2}-0-0-{3} harmonic {4} {5} \n".format(
|
||||
y,z,u,v,x[4]/2,0))
|
||||
|
||||
|
||||
g.write(" } #(end of impropers by type)\n\n")
|
||||
h.seek(0,0)
|
||||
g.write(" write_once(\"In Settings\") {\n")
|
||||
for line in h.readlines():
|
||||
g.write(line)
|
||||
g.write(" } #(end of improp_coeffs)\n\n")
|
||||
#-----------------------------------------------------------------------#
|
||||
|
||||
#This section writes out the input parameters required for an opls-aa simulation
|
||||
# lammps.
|
||||
g.write(" write_once(\"In Init\") {\n")
|
||||
g.write(" units real\n")
|
||||
g.write(" atom_style full\n")
|
||||
g.write(" bond_style hybrid harmonic\n")
|
||||
g.write(" angle_style hybrid harmonic\n")
|
||||
g.write(" dihedral_style hybrid opls\n")
|
||||
g.write(" improper_style hybrid harmonic\n")
|
||||
#g.write(" pair_style hybrid lj/cut/coul/cut 10.0 10.0\n")
|
||||
g.write(" pair_style hybrid lj/cut/coul/long 10.0 10.0\n")
|
||||
g.write(" pair_modify mix arithmetic\n")
|
||||
g.write(" special_bonds lj 0.0 0.0 0.5\n")
|
||||
g.write(" kspace_style pppm 0.0001\n")
|
||||
g.write(" } #end of init parameters\n\n")
|
||||
g.write("} # OPLSAA\n")
|
||||
f.close()
|
||||
g.close()
|
||||
h.close()
|
||||
os.remove("temp.txt")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
import "ethylene.lt" # <- defines the "Ethylene" molecule type.
|
||||
|
||||
|
||||
# Periodic boundary conditions:
|
||||
write_once("Data Boundary") {
|
||||
0.0 70.00 xlo xhi
|
||||
0.0 70.00 ylo yhi
|
||||
0.0 70.00 zlo zhi
|
||||
}
|
||||
|
||||
|
||||
# The next command generates a cubic lattice with 10.0 Angstroms spacing.
|
||||
# This lattice spacing was not chosen carefully.
|
||||
# The pressure must be equilibrated later.
|
||||
|
||||
ethylenes = new Ethylene [7].move(0, 0, 10.0)
|
||||
[7].move(0, 10.0, 0)
|
||||
[7].move(10.0, 0, 0)
|
||||
|
||||
@ -0,0 +1,57 @@
|
||||
# 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 it using ./README_sh.)
|
||||
|
||||
# ------------------------------- Initialization Section --------------------
|
||||
|
||||
include "system.in.init"
|
||||
|
||||
# ------------------------------- Atom Definition Section -------------------
|
||||
|
||||
read_data "system.data"
|
||||
|
||||
# OPLSAA atom charges are stored in a separate file.
|
||||
# Load that file now:
|
||||
|
||||
include "system.in.charges"
|
||||
|
||||
# ------------------------------- 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 50000
|
||||
|
||||
write_data system_after_npt.data
|
||||
@ -0,0 +1,50 @@
|
||||
# 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 it using ./README_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
|
||||
@ -0,0 +1,54 @@
|
||||
NOTE: This example requires the "Al99.eam.alloy" file.
|
||||
(It was not included in this directory because if its large size.)
|
||||
As of 2012-11, I was able to obtain it here:
|
||||
http://www.ctcms.nist.gov/~cbecker/Download/Al-YM/Al99.eam.alloy
|
||||
Copy it to the directory containing this README file.
|
||||
------------------------------------------------------------------------
|
||||
This example shows an alternative way to setup the
|
||||
aluminum crystal loading simulation described here:
|
||||
http://icme.hpc.msstate.edu/mediawiki/index.php/Uniaxial_Compression
|
||||
by Mark Tschopp and Nathan R. Rhodes
|
||||
For additional backgroumd information, please consult that web page.
|
||||
|
||||
In this example, I use moltemplate to build a "DATA" file for this system.
|
||||
(I can't think of a compelling reason to do this for simple simulations like
|
||||
this. But this approach might be useful if you want to artificially create
|
||||
unusual structures out of aluminum crystals, or mix them with other molecules.
|
||||
I created this example in response to a user request.)
|
||||
|
||||
|
||||
--- To build the system ---
|
||||
|
||||
Carry out the instructions in README_setup.sh,
|
||||
to generate the LAMMPS DATA file and input scripts you need:
|
||||
system.data, system.in.init, system.in.settings.
|
||||
(The run.in script contains references to these files.)
|
||||
|
||||
|
||||
--- To run LAMMPS, try a command like: ---
|
||||
|
||||
lmp_linux -i run.in
|
||||
|
||||
or (if you have mpi installed)
|
||||
|
||||
mpirun -np 4 lmp_linux -i run.in
|
||||
|
||||
This will create an ordinary LAMMPS dump file you can visualize with VMD
|
||||
traj.lammpstrj (See README_visualize.txt)
|
||||
|
||||
It will also create a number of other files, such as:
|
||||
dump.comp_0.cfg
|
||||
dump.comp_500.cfg
|
||||
dump.comp_20000.cfg
|
||||
Al_comp_100.def1.txt
|
||||
|
||||
The dump.comp_*.cfg files can be visualized using
|
||||
AtomEye if you have AtomEye and ImageJ installed.
|
||||
The procedure for doing this is explained in the original tutorial at:
|
||||
http://icme.hpc.msstate.edu/mediawiki/index.php/Uniaxial_Compression
|
||||
|
||||
The "Al_comp_100.def1.txt" file is a four-column text file containing:
|
||||
column 1: v_strain = (lx - v_L0)/v_L0
|
||||
column 2: -pxx/10000 (diagonal components of the stress tensor)
|
||||
column 3: -pyy/10000
|
||||
column 4: -pzz/10000
|
||||
@ -0,0 +1,29 @@
|
||||
# Use these commands to generate the LAMMPS input script and data file
|
||||
# (and other auxilliary files):
|
||||
|
||||
|
||||
# Create LAMMPS input files this way:
|
||||
cd moltemplate_files
|
||||
|
||||
# run moltemplate
|
||||
|
||||
moltemplate.sh -atomstyle full system.lt
|
||||
|
||||
# This will generate various files with names ending in *.in* and *.data.
|
||||
# These files are the input files directly read by LAMMPS. Move them to
|
||||
# the parent directory (or wherever you plan to run the simulation).
|
||||
|
||||
mv -f system.in* system.data ../
|
||||
|
||||
# We will also need the "Al99.eam.alloy" file:
|
||||
#cp -f Al99.eam.alloy ../
|
||||
# This file was (can be) downloaded from:
|
||||
# http://www.ctcms.nist.gov/~cbecker/Download/Al-YM/Al99.eam.alloy
|
||||
|
||||
|
||||
# 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 ../
|
||||
@ -0,0 +1,87 @@
|
||||
|
||||
------- 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.)
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 29 KiB |
@ -0,0 +1,22 @@
|
||||
# This example shows an alternative way to setup the
|
||||
# aluminum crystal loading simulation described here:
|
||||
# http://icme.hpc.msstate.edu/mediawiki/index.php/Uniaxial_Compression
|
||||
# by Mark Tschopp and Nathan R. Rhodes
|
||||
# For additional backgroumd information, please consult that web page.
|
||||
#
|
||||
# In this example, I use moltemplate to build a "DATA" file for this system.
|
||||
# (I can't think of a compelling reason to do this for simple simulations like
|
||||
# this. But this approach might be useful if you want to artificially create
|
||||
# unusual structures out of aluminum crystals, or mix them with other molecules.
|
||||
# I created this example in response to a user request.)
|
||||
#
|
||||
# Use these commands to generate the LAMMPS input script and data file:
|
||||
|
||||
moltemplate.sh system.lt
|
||||
|
||||
# This will generate system.data, system.in.init, system.in.settings.
|
||||
# In addition to will need to download "Al99.eam.alloy" file.
|
||||
# (It was not included in this directory because if its large size.)
|
||||
# As of 2012-11, I was able to obtain it here:
|
||||
# http://www.ctcms.nist.gov/~cbecker/Download/Al-YM/Al99.eam.alloy
|
||||
|
||||
@ -0,0 +1,64 @@
|
||||
# "AlCell" defines the 4-atom FCC unit cell
|
||||
# of Aluminum (with a 4.05 angstrom spacing)
|
||||
|
||||
AlCell {
|
||||
|
||||
# AtomID MolID(IGNORE!) AtomType Charge X Y Z
|
||||
|
||||
write("Data Atoms") {
|
||||
$atom:AlC $mol:... @atom:Al 0.0 0.000 0.000 0.000
|
||||
$atom:AlX $mol:... @atom:Al 0.0 0.000 2.025 2.025
|
||||
$atom:AlY $mol:... @atom:Al 0.0 2.025 0.000 2.025
|
||||
$atom:AlZ $mol:... @atom:Al 0.0 2.025 2.025 0.000
|
||||
}
|
||||
|
||||
write_once("In Init") {
|
||||
units metal
|
||||
atom_style full # <- Requires each atom has a MolID and Charge.
|
||||
# This is not necessary. (Why use "full"?
|
||||
# The "full" atom style is useful if you want to
|
||||
# mix the aluminum with other molecules later.
|
||||
# Otherwise, just use "atom_style atomic", and
|
||||
# and remove the 2nd and 4th columns above.)
|
||||
pair_style eam/alloy
|
||||
}
|
||||
|
||||
write_once("In Settings") {
|
||||
pair_coeff * * Al99.eam.alloy Al
|
||||
}
|
||||
|
||||
write_once("Data Masses") {
|
||||
@atom:Al 27.0
|
||||
}
|
||||
|
||||
} # AlCell
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Here is an alternate way to define AlCell
|
||||
# using "scale(4.05)" to select the lattice spacing:
|
||||
#
|
||||
#FccCell {
|
||||
# write("Data Atoms") {
|
||||
# $atom:AlC $mol:... @atom:Al 0.0 0.0 0.0 0.0
|
||||
# $atom:AlX $mol:... @atom:Al 0.0 0.0 0.5 0.5
|
||||
# $atom:AlY $mol:... @atom:Al 0.0 0.5 0.0 0.5
|
||||
# $atom:AyZ $mol:... @atom:Al 0.0 0.5 0.5 0.0
|
||||
# }
|
||||
# write_once("Data Masses") {
|
||||
# @atom:Al 27.0
|
||||
# }
|
||||
# write_once("In Init") {
|
||||
# units metal
|
||||
# atom_style full
|
||||
# pair_style eam/alloy
|
||||
# }
|
||||
# write_once("In Settings") {
|
||||
# pair_coeff * * Al99.eam.alloy Al
|
||||
# }
|
||||
#}
|
||||
#
|
||||
#AlCell = FccCell.scale(4.05)
|
||||
#
|
||||
@ -0,0 +1,35 @@
|
||||
|
||||
import "al_cell.lt" # <- this defines the unit cell for aluminum
|
||||
|
||||
# Periodic boundary conditions:
|
||||
write_once("Data Boundary") {
|
||||
0.0 40.50 xlo xhi
|
||||
0.0 40.50 ylo yhi
|
||||
0.0 40.50 zlo zhi
|
||||
}
|
||||
|
||||
# The next command generates an array of 10x10x10 AlCell unit cells with
|
||||
# spacing 4.05 Angstroms.
|
||||
|
||||
unitcells = new AlCell [10].move(0.00, 0.00, 4.05)
|
||||
[10].move(0.00, 4.05, 0.00)
|
||||
[10].move(4.05, 0.00, 0.00)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
################################################################
|
||||
# The next command is not necessary:
|
||||
#
|
||||
create_var { $mol } # <-This forces all of the Al atoms in the crystal
|
||||
# # to share the same molecule ID number.
|
||||
# # Molecule ID numbers are not necessary. Ignore this.
|
||||
#
|
||||
@ -0,0 +1,76 @@
|
||||
# ------------------------------- Initialization Section --------------------
|
||||
|
||||
include system.in.init
|
||||
|
||||
# ------------------------------- Atom Definition Section -------------------
|
||||
|
||||
read_data system.data
|
||||
|
||||
# ------------------------------- Settings Section --------------------------
|
||||
|
||||
include system.in.settings
|
||||
|
||||
# ------------------------------- Run Section -------------------------------
|
||||
#
|
||||
# The run-settings below were stolen from:
|
||||
#
|
||||
# http://icme.hpc.msstate.edu/mediawiki/index.php/Uniaxial_Compression
|
||||
|
||||
|
||||
compute csym all centro/atom fcc
|
||||
compute peratom all pe/atom
|
||||
|
||||
# EQUILIBRATION
|
||||
reset_timestep 0
|
||||
timestep 0.001
|
||||
velocity all create 300 12345 mom yes rot no
|
||||
fix 1 all npt temp 300 300 1 iso 0 0 1 drag 1
|
||||
|
||||
# Set thermo output
|
||||
thermo 1000
|
||||
thermo_style custom step lx ly lz press pxx pyy pzz pe temp
|
||||
|
||||
# Run for at least 10 picosecond (assuming 1 fs timestep)
|
||||
run 20000
|
||||
unfix 1
|
||||
|
||||
# Store final cell length for strain calculations
|
||||
variable tmp equal "lx"
|
||||
variable L0 equal ${tmp}
|
||||
print "Initial Length, L0: ${L0}"
|
||||
|
||||
######################################
|
||||
# DEFORMATION
|
||||
reset_timestep 0
|
||||
|
||||
fix 1 all npt temp 300 300 1 y 0 0 1 z 0 0 1 drag 1
|
||||
variable srate equal 1.0e10
|
||||
variable srate1 equal "-v_srate / 1.0e12"
|
||||
fix 2 all deform 1 x erate ${srate1} units box remap x
|
||||
|
||||
# Output strain and stress info to file
|
||||
# for units metal, pressure is in [bars] = 100 [kPa] = 1/10000 [GPa]
|
||||
# p2, p3, p4 are in GPa
|
||||
variable strain equal "(lx - v_L0)/v_L0"
|
||||
variable p1 equal "v_strain"
|
||||
variable p2 equal "-pxx/10000"
|
||||
variable p3 equal "-pyy/10000"
|
||||
variable p4 equal "-pzz/10000"
|
||||
fix def1 all print 100 "${p1} ${p2} ${p3} ${p4}" file Al_comp_100.def1.txt screen no
|
||||
|
||||
# Use cfg for AtomEye
|
||||
dump dAtomEye all cfg 250 dump.comp_*.cfg id type xs ys zs c_csym c_peratom fx fy fz
|
||||
dump_modify dAtomEye element Al
|
||||
|
||||
# For users without AtomEye (like me), I decided to create a regular dump file:
|
||||
dump dCoords all custom 250 traj.lammpstrj id type x y z ix iy iz
|
||||
|
||||
# Display thermo
|
||||
thermo 1000
|
||||
thermo_style custom step v_strain temp v_p2 v_p3 v_p4 ke pe press
|
||||
|
||||
run 20000
|
||||
|
||||
######################################
|
||||
# SIMULATION DONE
|
||||
print "All done"
|
||||
@ -0,0 +1,83 @@
|
||||
###########################################################
|
||||
# Interaction of a carbon nanotube with a pair of "mystery
|
||||
# molecules" (extracted from the cnat-cnt.data/in files).
|
||||
###########################################################
|
||||
# Author: Aysun Itai and Andrew Jewett
|
||||
|
||||
This example uses "ltemplify.py" to create molecule templates out
|
||||
of two different molecules in a pre-existing LAMMPS IN/DATA file.
|
||||
Then I show how to use "moltemplate.sh" to make copies of these
|
||||
molecules and to move and rotate them (creating new LAMMPS IN/DATA files).
|
||||
|
||||
Disclaimer:
|
||||
The molecules in this example are not physically realistic.
|
||||
The purpose of this example is to demonstrate ltemplify usage.
|
||||
|
||||
REQUIRED INPUT FILES
|
||||
|
||||
cnad-cnt.data cnad-cnt.in system.lt
|
||||
|
||||
cnad-cnt.data
|
||||
This is a LAMMPS data file containing the coordinates and the topology
|
||||
for a system combining the two molecules together. ltemplify will extract
|
||||
molecules from this file, one at a time.
|
||||
|
||||
cnad-cnt.in
|
||||
This file contains force-field parameters and old run settings for the system.
|
||||
(We ignore the run settings in this file.) The force-field parameters in
|
||||
the "cnad-cnt.in" file are only necessary because we are going to build
|
||||
a completely new set of simulation input files. (We are not only going to
|
||||
rotate them and duplicate the molecules.) ltemplify.py will extract the
|
||||
force field parameters from this file. This approach allows us to combine
|
||||
these molecules with other types of molecules later on.)
|
||||
|
||||
system.lt
|
||||
The "system.lt" contains the instructions what we will do with these molecules
|
||||
after ltemplify.py has converted them into .LT format. In this example
|
||||
it contains instructions for rotating and copying the two molecules,
|
||||
(It also defines the periodic boundary conditions.)
|
||||
|
||||
OUTPUT FILES
|
||||
|
||||
cnad.lt
|
||||
cnt.lt
|
||||
|
||||
These files are referenced in system.lt.
|
||||
Running moltemplate.sh on system.lt (using "moltemplate.sh system.lt")
|
||||
creates new LAMMPS data and input files:
|
||||
system.data, system.in, system.in.init, system.in.settings
|
||||
(These files are referenced in run.in.nvt.)
|
||||
|
||||
You can run a simulation from the files created by moltemplate using
|
||||
|
||||
lmp_linux -i run.in.nvt
|
||||
|
||||
NOTE: BECAUSE ALL OF THE ORIGINAL FORCE FIELD PARAMETERS WERE INTENTIONALLY
|
||||
ALTERED, THE SYSTEM WILL MOVE IN A VERY UNREALISTIC WAY WHEN SIMULATED.
|
||||
(This was done to protect the original source of the files.)
|
||||
The goal of this example is only to demonstrate how to use
|
||||
"ltemplify.py" to convert lammps input and data files into
|
||||
LT format and back again.)
|
||||
|
||||
-----------
|
||||
|
||||
Instructions:
|
||||
Run the commands (follow the instructions) in these files:
|
||||
|
||||
step 1)
|
||||
README_step1_run_ltemplify.sh
|
||||
|
||||
and then
|
||||
|
||||
step 2)
|
||||
README_step2_run_moltemplate.sh
|
||||
|
||||
step 3) OPTIONAL
|
||||
|
||||
To run a short LAMMPS simulation, you can use the "in.nvt" file, for example:
|
||||
|
||||
$LAMMPS_BINARY -i run.in.nvt
|
||||
|
||||
where "$LAMMPS_BINARY" is the name of the command you use to invoke lammps
|
||||
(such as lmp_linux, lmp_g++, lmp_mac, lmp_ubuntu, lmp_cygwin, etc...).
|
||||
-----------
|
||||
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Aysun Itai's LAMMPS files contain two molecules:
|
||||
|
||||
# The CNAD molecule has molecule-id 1
|
||||
|
||||
ltemplify.py -name CNAD -molid "1" cnad-cnt.in cnad-cnt.data > cnad.lt
|
||||
|
||||
# The CNT (carbon nanotube) corresponds to molecule-id 2
|
||||
ltemplify.py -name CNT -molid "2" cnad-cnt.in cnad-cnt.data > cnt.lt
|
||||
|
||||
# This will extract both molecules and save them as separate .LT files.
|
||||
# (We can include these files later when preparing new simulations.)
|
||||
@ -0,0 +1,18 @@
|
||||
# --- Running Moltemplate ---
|
||||
# -- Prerequisites: --
|
||||
# The "system.lt" moltemplate file links to other ".lt" files
|
||||
# files you hopefully have created earlier when you ran "ltemplify.py:
|
||||
# cnad.lt and cnt.lt
|
||||
# If not, carry out the instructions in "README_run_ltemplify.sh".
|
||||
|
||||
moltemplate.sh system.lt
|
||||
|
||||
# This will generate various files with names ending in *.in* and *.data.
|
||||
# These files are the input files directly read by LAMMPS.
|
||||
|
||||
# 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/
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
# --- Running LAMMPS ---
|
||||
# -- Prerequisites: --
|
||||
# The "run.in.nvt" LAMMPS input script links 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_run_moltemplate.sh".
|
||||
#
|
||||
# -- Instructions: --
|
||||
# If "lmp_linux" is the name of the command you use to invoke lammps,
|
||||
# then you would run lammps this way:
|
||||
|
||||
lmp_linux -i run.in.nvt
|
||||
|
||||
# NOTE: BECAUSE ALL OF THE ORIGINAL FORCE FIELD PARAMETERS WERE INTENTIONALLY
|
||||
# REMOVED, THE SYSTEM WILL MOVE IN A VERY UNREALISTIC WAY.
|
||||
@ -0,0 +1,50 @@
|
||||
|
||||
------- To view the 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
|
||||
|
||||
|
||||
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
|
||||
|
||||
----- Wrap the coordinates to the unit cell
|
||||
|
||||
a) Start VMD
|
||||
b) Load the trajectory in VMD (see above)
|
||||
c) Menu Extensions->Tk Console
|
||||
d) Enter:
|
||||
|
||||
DISCLAIMER: I'M NOT SURE THESE COMMANDS ARE CORRECT.
|
||||
LOOKUP "pbctools" FOR DETAILS.
|
||||
|
||||
pbc wrap -compound res -all
|
||||
pbc box
|
||||
|
||||
3) 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.)
|
||||
@ -0,0 +1,49 @@
|
||||
#Created by Aysun Itai and modified by Andrew Jewett
|
||||
# NOTE: This file has been extensively modified.
|
||||
# Only the bond connectivity and atomic positions are accurate.
|
||||
|
||||
units real
|
||||
|
||||
neigh_modify delay 2 every 1
|
||||
|
||||
atom_style full
|
||||
bond_style harmonic
|
||||
angle_style charmm
|
||||
dihedral_style charmm
|
||||
pair_style lj/charmm/coul/charmm 8.0 10.0
|
||||
pair_modify mix arithmetic
|
||||
|
||||
read_data cnad-cnt.data
|
||||
|
||||
pair_coeff 1 1 0.02 4.0
|
||||
pair_coeff 2 2 0.02 1.0 # atoms will not interact sterically
|
||||
pair_coeff 3 3 0.02 2.0 # in this version of the file.
|
||||
pair_coeff 4 4 0.02 2.0 # (All pair forces and atom names removed)
|
||||
pair_coeff 5 5 0.02 2.0
|
||||
pair_coeff 6 6 0.02 3.0
|
||||
pair_coeff 7 7 0.02 3.0
|
||||
pair_coeff 8 8 0.02 3.0
|
||||
pair_coeff 9 9 0.02 4.0
|
||||
pair_coeff 10 10 0.02 4.0
|
||||
pair_coeff 11 11 0.02 4.0
|
||||
pair_coeff 12 12 0.02 4.0
|
||||
pair_coeff 13 13 0.02 3.0
|
||||
pair_coeff 14 14 0.02 3.0
|
||||
pair_coeff 15 15 0.02 3.0
|
||||
pair_coeff 16 16 0.02 3.0
|
||||
|
||||
group cnt type 1
|
||||
group cnad type 2-16
|
||||
|
||||
displace_atoms cnad move 0 -7 0 units box
|
||||
special_bonds charmm
|
||||
|
||||
velocity all create 0.0 54321 dist uniform
|
||||
|
||||
thermo 1
|
||||
thermo_style multi
|
||||
timestep 0.005
|
||||
|
||||
dump 1 all atom 10 cnad-cnt.dump
|
||||
|
||||
run 20000
|
||||
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 20 KiB |
@ -0,0 +1,598 @@
|
||||
PSF
|
||||
|
||||
1 !NTITLE
|
||||
REMARKS VMD generated structure x-plor psf file
|
||||
|
||||
130 !NATOM
|
||||
1 1 1 1 0.000000 10.0000 0
|
||||
2 1 1 1 0.000000 10.0000 0
|
||||
3 1 1 1 0.000000 10.0000 0
|
||||
4 1 1 1 0.000000 10.0000 0
|
||||
5 1 1 1 0.000000 10.0000 0
|
||||
6 1 1 1 0.000000 10.0000 0
|
||||
7 1 1 1 0.000000 10.0000 0
|
||||
8 1 1 1 0.000000 10.0000 0
|
||||
9 1 1 1 0.000000 10.0000 0
|
||||
10 1 1 1 0.000000 10.0000 0
|
||||
11 1 1 1 0.000000 10.0000 0
|
||||
12 1 1 1 0.000000 10.0000 0
|
||||
13 1 1 1 0.000000 10.0000 0
|
||||
14 1 1 1 0.000000 10.0000 0
|
||||
15 1 1 1 0.000000 10.0000 0
|
||||
16 1 1 1 0.000000 10.0000 0
|
||||
17 1 1 1 0.000000 10.0000 0
|
||||
18 1 1 1 0.000000 10.0000 0
|
||||
19 1 1 1 0.000000 10.0000 0
|
||||
20 1 1 1 0.000000 10.0000 0
|
||||
21 1 1 1 0.000000 10.0000 0
|
||||
22 1 1 1 0.000000 10.0000 0
|
||||
23 1 1 1 0.000000 10.0000 0
|
||||
24 1 1 1 0.000000 10.0000 0
|
||||
25 1 1 1 0.000000 10.0000 0
|
||||
26 1 1 1 0.000000 10.0000 0
|
||||
27 1 1 1 0.000000 10.0000 0
|
||||
28 1 1 1 0.000000 10.0000 0
|
||||
29 1 1 1 0.000000 10.0000 0
|
||||
30 1 1 1 0.000000 10.0000 0
|
||||
31 1 1 1 0.000000 10.0000 0
|
||||
32 1 1 1 0.000000 10.0000 0
|
||||
33 1 1 1 0.000000 10.0000 0
|
||||
34 1 1 1 0.000000 10.0000 0
|
||||
35 1 1 1 0.000000 10.0000 0
|
||||
36 1 1 1 0.000000 10.0000 0
|
||||
37 1 1 1 0.000000 10.0000 0
|
||||
38 1 1 1 0.000000 10.0000 0
|
||||
39 1 1 1 0.000000 10.0000 0
|
||||
40 1 1 1 0.000000 10.0000 0
|
||||
41 1 1 1 0.000000 10.0000 0
|
||||
42 1 1 1 0.000000 10.0000 0
|
||||
43 1 1 1 0.000000 10.0000 0
|
||||
44 1 1 1 0.000000 10.0000 0
|
||||
45 1 1 1 0.000000 10.0000 0
|
||||
46 1 1 1 0.000000 10.0000 0
|
||||
47 1 1 1 0.000000 10.0000 0
|
||||
48 1 1 1 0.000000 10.0000 0
|
||||
49 1 1 1 0.000000 10.0000 0
|
||||
50 1 1 1 0.000000 10.0000 0
|
||||
51 1 1 1 0.000000 10.0000 0
|
||||
52 1 1 1 0.000000 10.0000 0
|
||||
53 1 1 1 0.000000 10.0000 0
|
||||
54 1 1 1 0.000000 10.0000 0
|
||||
55 1 1 1 0.000000 10.0000 0
|
||||
56 1 1 1 0.000000 10.0000 0
|
||||
57 1 1 1 0.000000 10.0000 0
|
||||
58 1 1 1 0.000000 10.0000 0
|
||||
59 1 1 1 0.000000 10.0000 0
|
||||
60 1 1 1 0.000000 10.0000 0
|
||||
61 1 1 1 0.000000 10.0000 0
|
||||
62 1 1 1 0.000000 10.0000 0
|
||||
63 1 1 1 0.000000 10.0000 0
|
||||
64 1 1 1 0.000000 10.0000 0
|
||||
65 1 1 1 0.000000 10.0000 0
|
||||
66 1 1 1 0.000000 10.0000 0
|
||||
67 1 1 1 0.000000 10.0000 0
|
||||
68 1 1 1 0.000000 10.0000 0
|
||||
69 1 1 1 0.000000 10.0000 0
|
||||
70 1 1 1 0.000000 10.0000 0
|
||||
71 1 1 1 0.000000 10.0000 0
|
||||
72 1 1 1 0.000000 10.0000 0
|
||||
73 2 9 9 -0.180000 10.0000 0
|
||||
74 2 4 4 0.090000 10.0000 0
|
||||
75 2 4 4 0.090000 10.0000 0
|
||||
76 2 9 9 -0.090000 10.0000 0
|
||||
77 2 4 4 0.090000 10.0000 0
|
||||
78 2 10 10 -0.180000 10.0000 0
|
||||
79 2 5 5 0.090000 10.0000 0
|
||||
80 2 5 5 0.090000 10.0000 0
|
||||
81 2 11 11 -0.090000 10.0000 0
|
||||
82 2 4 4 0.090000 10.0000 0
|
||||
83 2 10 10 -0.180000 10.0000 0
|
||||
84 2 5 5 0.090000 10.0000 0
|
||||
85 2 5 5 0.090000 10.0000 0
|
||||
86 2 12 12 -0.090000 10.0000 0
|
||||
87 2 4 4 0.090000 10.0000 0
|
||||
88 2 8 8 0.280000 10.0000 0
|
||||
89 2 16 16 -0.710000 10.0000 0
|
||||
90 2 7 7 0.340000 10.0000 0
|
||||
91 2 3 3 0.120000 10.0000 0
|
||||
92 2 14 14 -0.050000 10.0000 0
|
||||
93 2 15 15 -0.740000 10.0000 0
|
||||
94 2 7 7 0.500000 10.0000 0
|
||||
95 2 3 3 0.130000 10.0000 0
|
||||
96 2 15 15 -0.750000 10.0000 0
|
||||
97 2 8 8 0.430000 10.0000 0
|
||||
98 2 6 6 0.460000 10.0000 0
|
||||
99 2 13 13 -0.770000 10.0000 0
|
||||
100 2 2 2 0.380000 10.0000 0
|
||||
101 2 2 2 0.380000 10.0000 0
|
||||
102 3 9 9 -0.180000 10.0000 0
|
||||
103 3 4 4 0.090000 10.0000 0
|
||||
104 3 4 4 0.090000 10.0000 0
|
||||
105 3 9 9 -0.090000 10.0000 0
|
||||
106 3 4 4 0.090000 10.0000 0
|
||||
107 3 10 10 -0.180000 10.0000 0
|
||||
108 3 5 5 0.090000 10.0000 0
|
||||
109 3 5 5 0.090000 10.0000 0
|
||||
110 3 11 11 -0.090000 10.0000 0
|
||||
111 3 4 4 0.090000 10.0000 0
|
||||
112 3 10 10 -0.180000 10.0000 0
|
||||
113 3 5 5 0.090000 10.0000 0
|
||||
114 3 5 5 0.090000 10.0000 0
|
||||
115 3 12 12 -0.090000 10.0000 0
|
||||
116 3 4 4 0.090000 10.0000 0
|
||||
117 3 8 8 0.280000 10.0000 0
|
||||
118 3 16 16 -0.710000 10.0000 0
|
||||
119 3 7 7 0.340000 10.0000 0
|
||||
120 3 3 3 0.120000 10.0000 0
|
||||
121 3 14 14 -0.050000 10.0000 0
|
||||
122 3 15 15 -0.740000 10.0000 0
|
||||
123 3 7 7 0.500000 10.0000 0
|
||||
124 3 3 3 0.130000 10.0000 0
|
||||
125 3 15 15 -0.750000 10.0000 0
|
||||
126 3 8 8 0.430000 10.0000 0
|
||||
127 3 6 6 0.460000 10.0000 0
|
||||
128 3 13 13 -0.770000 10.0000 0
|
||||
129 3 2 2 0.380000 10.0000 0
|
||||
130 3 2 2 0.380000 10.0000 0
|
||||
|
||||
166 !NBOND: bonds
|
||||
1 2 1 22 2 3 2 5
|
||||
3 24 3 4 4 7 4 29
|
||||
5 6 6 7 6 9 7 8
|
||||
8 33 8 11 9 10 10 13
|
||||
10 11 11 12 12 15 12 37
|
||||
13 14 14 17 14 15 15 16
|
||||
16 19 16 41 17 18 18 21
|
||||
18 19 19 20 20 23 20 45
|
||||
21 22 22 23 23 24 24 25
|
||||
25 26 25 46 26 27 26 29
|
||||
27 48 27 28 28 31 28 53
|
||||
29 30 30 31 30 33 31 32
|
||||
32 57 32 35 33 34 34 37
|
||||
34 35 35 36 36 39 36 61
|
||||
37 38 38 41 38 39 39 40
|
||||
40 43 40 65 41 42 42 45
|
||||
42 43 43 44 44 47 44 69
|
||||
45 46 46 47 47 48 48 49
|
||||
49 50 49 70 50 51 50 53
|
||||
51 72 51 52 52 55 53 54
|
||||
54 55 54 57 55 56 56 59
|
||||
57 58 58 61 58 59 59 60
|
||||
60 63 61 62 62 65 62 63
|
||||
63 64 64 67 65 66 66 69
|
||||
66 67 67 68 68 71 69 70
|
||||
70 71 71 72 73 81 73 74
|
||||
73 75 73 78 76 78 76 77
|
||||
76 92 76 86 78 79 78 80
|
||||
81 86 81 83 81 82 83 86
|
||||
83 84 83 85 86 87 88 89
|
||||
88 97 88 98 89 90 90 91
|
||||
90 92 92 97 93 98 93 94
|
||||
94 95 94 96 96 97 98 99
|
||||
99 100 99 101 102 110 102 103
|
||||
102 104 102 107 105 107 105 106
|
||||
105 121 105 115 107 108 107 109
|
||||
110 115 110 112 110 111 112 115
|
||||
112 113 112 114 115 116 117 118
|
||||
117 126 117 127 118 119 119 120
|
||||
119 121 121 126 122 127 122 123
|
||||
123 124 123 125 125 126 127 128
|
||||
128 129 128 130
|
||||
|
||||
312 !NTHETA: angles
|
||||
2 1 22 1 2 3 1 2 5
|
||||
3 2 5 2 3 24 2 3 4
|
||||
4 3 24 3 4 7 3 4 29
|
||||
7 4 29 2 5 6 5 6 7
|
||||
5 6 9 7 6 9 4 7 6
|
||||
4 7 8 6 7 8 7 8 33
|
||||
7 8 11 11 8 33 6 9 10
|
||||
9 10 13 9 10 11 11 10 13
|
||||
8 11 10 8 11 12 10 11 12
|
||||
11 12 15 11 12 37 15 12 37
|
||||
10 13 14 13 14 17 13 14 15
|
||||
15 14 17 12 15 14 12 15 16
|
||||
14 15 16 15 16 19 15 16 41
|
||||
19 16 41 14 17 18 17 18 21
|
||||
17 18 19 19 18 21 16 19 18
|
||||
16 19 20 18 19 20 19 20 23
|
||||
19 20 45 23 20 45 18 21 22
|
||||
1 22 21 1 22 23 21 22 23
|
||||
20 23 22 20 23 24 22 23 24
|
||||
3 24 23 3 24 25 23 24 25
|
||||
24 25 26 24 25 46 26 25 46
|
||||
25 26 27 25 26 29 27 26 29
|
||||
26 27 48 26 27 28 28 27 48
|
||||
27 28 31 27 28 53 31 28 53
|
||||
4 29 26 4 29 30 26 29 30
|
||||
29 30 31 29 30 33 31 30 33
|
||||
28 31 30 28 31 32 30 31 32
|
||||
31 32 57 31 32 35 35 32 57
|
||||
8 33 30 8 33 34 30 33 34
|
||||
33 34 37 33 34 35 35 34 37
|
||||
32 35 34 32 35 36 34 35 36
|
||||
35 36 39 35 36 61 39 36 61
|
||||
12 37 34 12 37 38 34 37 38
|
||||
37 38 41 37 38 39 39 38 41
|
||||
36 39 38 36 39 40 38 39 40
|
||||
39 40 43 39 40 65 43 40 65
|
||||
16 41 38 16 41 42 38 41 42
|
||||
41 42 45 41 42 43 43 42 45
|
||||
40 43 42 40 43 44 42 43 44
|
||||
43 44 47 43 44 69 47 44 69
|
||||
20 45 42 20 45 46 42 45 46
|
||||
25 46 45 25 46 47 45 46 47
|
||||
44 47 46 44 47 48 46 47 48
|
||||
27 48 47 27 48 49 47 48 49
|
||||
48 49 50 48 49 70 50 49 70
|
||||
49 50 51 49 50 53 51 50 53
|
||||
50 51 72 50 51 52 52 51 72
|
||||
51 52 55 28 53 50 28 53 54
|
||||
50 53 54 53 54 55 53 54 57
|
||||
55 54 57 52 55 54 52 55 56
|
||||
54 55 56 55 56 59 32 57 54
|
||||
32 57 58 54 57 58 57 58 61
|
||||
57 58 59 59 58 61 56 59 58
|
||||
56 59 60 58 59 60 59 60 63
|
||||
36 61 58 36 61 62 58 61 62
|
||||
61 62 65 61 62 63 63 62 65
|
||||
60 63 62 60 63 64 62 63 64
|
||||
63 64 67 40 65 62 40 65 66
|
||||
62 65 66 65 66 69 65 66 67
|
||||
67 66 69 64 67 66 64 67 68
|
||||
66 67 68 67 68 71 44 69 66
|
||||
44 69 70 66 69 70 49 70 69
|
||||
49 70 71 69 70 71 68 71 70
|
||||
68 71 72 70 71 72 51 72 71
|
||||
73 81 82 73 81 83 73 81 86
|
||||
73 78 80 73 78 79 74 73 75
|
||||
76 92 90 76 92 97 76 86 87
|
||||
76 86 83 76 86 81 76 78 80
|
||||
76 78 79 73 78 76 77 76 92
|
||||
78 76 92 77 76 78 75 73 78
|
||||
74 73 78 78 73 81 79 78 80
|
||||
81 86 87 81 86 83 81 83 85
|
||||
81 83 84 81 83 86 75 73 81
|
||||
74 73 81 83 86 87 82 81 83
|
||||
84 83 85 85 83 86 84 83 86
|
||||
82 81 86 83 81 86 86 76 92
|
||||
77 76 86 78 76 86 88 98 93
|
||||
88 89 90 89 88 97 89 90 91
|
||||
88 97 92 92 97 96 89 90 92
|
||||
91 90 92 93 94 96 93 94 95
|
||||
94 93 98 95 94 96 88 97 96
|
||||
94 96 97 90 92 97 98 99 101
|
||||
98 99 100 97 88 98 89 88 98
|
||||
93 98 99 88 98 99 100 99 101
|
||||
102 110 111 102 110 112 102 110 115
|
||||
102 107 109 102 107 108 103 102 104
|
||||
105 121 119 105 121 126 105 115 116
|
||||
105 115 112 105 115 110 105 107 109
|
||||
105 107 108 102 107 105 106 105 121
|
||||
107 105 121 106 105 107 104 102 107
|
||||
103 102 107 107 102 110 108 107 109
|
||||
110 115 116 110 115 112 110 112 114
|
||||
110 112 113 110 112 115 104 102 110
|
||||
103 102 110 112 115 116 111 110 112
|
||||
113 112 114 114 112 115 113 112 115
|
||||
111 110 115 112 110 115 115 105 121
|
||||
106 105 115 107 105 115 117 127 122
|
||||
117 118 119 118 117 126 118 119 120
|
||||
117 126 121 121 126 125 118 119 121
|
||||
120 119 121 122 123 125 122 123 124
|
||||
123 122 127 124 123 125 117 126 125
|
||||
123 125 126 119 121 126 127 128 130
|
||||
127 128 129 126 117 127 118 117 127
|
||||
122 127 128 117 127 128 129 128 130
|
||||
|
||||
554 !NPHI: dihedrals
|
||||
22 1 2 3 22 1 2 5
|
||||
2 1 22 21 2 1 22 23
|
||||
1 2 3 24 1 2 3 4
|
||||
5 2 3 24 5 2 3 4
|
||||
1 2 5 6 3 2 5 6
|
||||
2 3 24 23 2 3 24 25
|
||||
4 3 24 23 4 3 24 25
|
||||
2 3 4 7 2 3 4 29
|
||||
24 3 4 7 24 3 4 29
|
||||
3 4 7 6 3 4 7 8
|
||||
29 4 7 6 29 4 7 8
|
||||
3 4 29 26 3 4 29 30
|
||||
7 4 29 26 7 4 29 30
|
||||
2 5 6 7 2 5 6 9
|
||||
5 6 7 4 5 6 7 8
|
||||
9 6 7 4 9 6 7 8
|
||||
5 6 9 10 7 6 9 10
|
||||
4 7 8 33 4 7 8 11
|
||||
6 7 8 33 6 7 8 11
|
||||
7 8 33 30 7 8 33 34
|
||||
11 8 33 30 11 8 33 34
|
||||
7 8 11 10 7 8 11 12
|
||||
33 8 11 10 33 8 11 12
|
||||
6 9 10 13 6 9 10 11
|
||||
9 10 13 14 11 10 13 14
|
||||
9 10 11 8 9 10 11 12
|
||||
13 10 11 8 13 10 11 12
|
||||
8 11 12 15 8 11 12 37
|
||||
10 11 12 15 10 11 12 37
|
||||
11 12 15 14 11 12 15 16
|
||||
37 12 15 14 37 12 15 16
|
||||
11 12 37 34 11 12 37 38
|
||||
15 12 37 34 15 12 37 38
|
||||
10 13 14 17 10 13 14 15
|
||||
13 14 17 18 15 14 17 18
|
||||
13 14 15 12 13 14 15 16
|
||||
17 14 15 12 17 14 15 16
|
||||
12 15 16 19 12 15 16 41
|
||||
14 15 16 19 14 15 16 41
|
||||
15 16 19 18 15 16 19 20
|
||||
41 16 19 18 41 16 19 20
|
||||
15 16 41 38 15 16 41 42
|
||||
19 16 41 38 19 16 41 42
|
||||
14 17 18 21 14 17 18 19
|
||||
17 18 21 22 19 18 21 22
|
||||
17 18 19 16 17 18 19 20
|
||||
21 18 19 16 21 18 19 20
|
||||
16 19 20 23 16 19 20 45
|
||||
18 19 20 23 18 19 20 45
|
||||
19 20 23 22 19 20 23 24
|
||||
45 20 23 22 45 20 23 24
|
||||
19 20 45 42 19 20 45 46
|
||||
23 20 45 42 23 20 45 46
|
||||
18 21 22 1 18 21 22 23
|
||||
1 22 23 20 1 22 23 24
|
||||
21 22 23 20 21 22 23 24
|
||||
20 23 24 3 20 23 24 25
|
||||
22 23 24 3 22 23 24 25
|
||||
3 24 25 26 3 24 25 46
|
||||
23 24 25 26 23 24 25 46
|
||||
24 25 26 27 24 25 26 29
|
||||
46 25 26 27 46 25 26 29
|
||||
24 25 46 45 24 25 46 47
|
||||
26 25 46 45 26 25 46 47
|
||||
25 26 27 48 25 26 27 28
|
||||
29 26 27 48 29 26 27 28
|
||||
25 26 29 4 25 26 29 30
|
||||
27 26 29 4 27 26 29 30
|
||||
26 27 48 47 26 27 48 49
|
||||
28 27 48 47 28 27 48 49
|
||||
26 27 28 31 26 27 28 53
|
||||
48 27 28 31 48 27 28 53
|
||||
27 28 31 30 27 28 31 32
|
||||
53 28 31 30 53 28 31 32
|
||||
27 28 53 50 27 28 53 54
|
||||
31 28 53 50 31 28 53 54
|
||||
4 29 30 31 4 29 30 33
|
||||
26 29 30 31 26 29 30 33
|
||||
29 30 31 28 29 30 31 32
|
||||
33 30 31 28 33 30 31 32
|
||||
29 30 33 8 29 30 33 34
|
||||
31 30 33 8 31 30 33 34
|
||||
28 31 32 57 28 31 32 35
|
||||
30 31 32 57 30 31 32 35
|
||||
31 32 57 54 31 32 57 58
|
||||
35 32 57 54 35 32 57 58
|
||||
31 32 35 34 31 32 35 36
|
||||
57 32 35 34 57 32 35 36
|
||||
8 33 34 37 8 33 34 35
|
||||
30 33 34 37 30 33 34 35
|
||||
33 34 37 12 33 34 37 38
|
||||
35 34 37 12 35 34 37 38
|
||||
33 34 35 32 33 34 35 36
|
||||
37 34 35 32 37 34 35 36
|
||||
32 35 36 39 32 35 36 61
|
||||
34 35 36 39 34 35 36 61
|
||||
35 36 39 38 35 36 39 40
|
||||
61 36 39 38 61 36 39 40
|
||||
35 36 61 58 35 36 61 62
|
||||
39 36 61 58 39 36 61 62
|
||||
12 37 38 41 12 37 38 39
|
||||
34 37 38 41 34 37 38 39
|
||||
37 38 41 16 37 38 41 42
|
||||
39 38 41 16 39 38 41 42
|
||||
37 38 39 36 37 38 39 40
|
||||
41 38 39 36 41 38 39 40
|
||||
36 39 40 43 36 39 40 65
|
||||
38 39 40 43 38 39 40 65
|
||||
39 40 43 42 39 40 43 44
|
||||
65 40 43 42 65 40 43 44
|
||||
39 40 65 62 39 40 65 66
|
||||
43 40 65 62 43 40 65 66
|
||||
16 41 42 45 16 41 42 43
|
||||
38 41 42 45 38 41 42 43
|
||||
41 42 45 20 41 42 45 46
|
||||
43 42 45 20 43 42 45 46
|
||||
41 42 43 40 41 42 43 44
|
||||
45 42 43 40 45 42 43 44
|
||||
40 43 44 47 40 43 44 69
|
||||
42 43 44 47 42 43 44 69
|
||||
43 44 47 46 43 44 47 48
|
||||
69 44 47 46 69 44 47 48
|
||||
43 44 69 66 43 44 69 70
|
||||
47 44 69 66 47 44 69 70
|
||||
20 45 46 25 20 45 46 47
|
||||
42 45 46 25 42 45 46 47
|
||||
25 46 47 44 25 46 47 48
|
||||
45 46 47 44 45 46 47 48
|
||||
44 47 48 27 44 47 48 49
|
||||
46 47 48 27 46 47 48 49
|
||||
27 48 49 50 27 48 49 70
|
||||
47 48 49 50 47 48 49 70
|
||||
48 49 50 51 48 49 50 53
|
||||
70 49 50 51 70 49 50 53
|
||||
48 49 70 69 48 49 70 71
|
||||
50 49 70 69 50 49 70 71
|
||||
49 50 51 72 49 50 51 52
|
||||
53 50 51 72 53 50 51 52
|
||||
49 50 53 28 49 50 53 54
|
||||
51 50 53 28 51 50 53 54
|
||||
50 51 72 71 52 51 72 71
|
||||
50 51 52 55 72 51 52 55
|
||||
51 52 55 54 51 52 55 56
|
||||
28 53 54 55 28 53 54 57
|
||||
50 53 54 55 50 53 54 57
|
||||
53 54 55 52 53 54 55 56
|
||||
57 54 55 52 57 54 55 56
|
||||
53 54 57 32 53 54 57 58
|
||||
55 54 57 32 55 54 57 58
|
||||
52 55 56 59 54 55 56 59
|
||||
55 56 59 58 55 56 59 60
|
||||
32 57 58 61 32 57 58 59
|
||||
54 57 58 61 54 57 58 59
|
||||
57 58 61 36 57 58 61 62
|
||||
59 58 61 36 59 58 61 62
|
||||
57 58 59 56 57 58 59 60
|
||||
61 58 59 56 61 58 59 60
|
||||
56 59 60 63 58 59 60 63
|
||||
59 60 63 62 59 60 63 64
|
||||
36 61 62 65 36 61 62 63
|
||||
58 61 62 65 58 61 62 63
|
||||
61 62 65 40 61 62 65 66
|
||||
63 62 65 40 63 62 65 66
|
||||
61 62 63 60 61 62 63 64
|
||||
65 62 63 60 65 62 63 64
|
||||
60 63 64 67 62 63 64 67
|
||||
63 64 67 66 63 64 67 68
|
||||
40 65 66 69 40 65 66 67
|
||||
62 65 66 69 62 65 66 67
|
||||
65 66 69 44 65 66 69 70
|
||||
67 66 69 44 67 66 69 70
|
||||
65 66 67 64 65 66 67 68
|
||||
69 66 67 64 69 66 67 68
|
||||
64 67 68 71 66 67 68 71
|
||||
67 68 71 70 67 68 71 72
|
||||
44 69 70 49 44 69 70 71
|
||||
66 69 70 49 66 69 70 71
|
||||
49 70 71 68 49 70 71 72
|
||||
69 70 71 68 69 70 71 72
|
||||
68 71 72 51 70 71 72 51
|
||||
73 81 86 76 73 81 86 83
|
||||
73 81 86 87 73 81 83 86
|
||||
73 81 83 84 73 81 83 85
|
||||
86 76 78 73 77 76 78 73
|
||||
92 76 78 73 74 73 78 76
|
||||
74 73 78 79 74 73 78 80
|
||||
74 73 81 86 74 73 81 83
|
||||
74 73 81 82 75 73 78 76
|
||||
75 73 78 79 75 73 78 80
|
||||
75 73 81 86 75 73 81 83
|
||||
75 73 81 82 76 92 97 96
|
||||
76 92 97 88 91 90 92 76
|
||||
89 90 92 76 83 81 86 76
|
||||
82 81 86 76 81 83 86 76
|
||||
84 83 86 76 85 83 86 76
|
||||
81 73 78 76 77 76 86 81
|
||||
77 76 86 83 77 76 86 87
|
||||
77 76 78 79 77 76 78 80
|
||||
77 76 92 97 77 76 92 90
|
||||
78 76 86 81 78 76 86 83
|
||||
78 76 86 87 78 76 92 97
|
||||
78 76 92 90 78 73 81 86
|
||||
78 73 81 83 78 73 81 82
|
||||
86 76 78 79 92 76 78 79
|
||||
81 73 78 79 86 76 78 80
|
||||
92 76 78 80 81 73 78 80
|
||||
92 76 86 81 84 83 86 81
|
||||
85 83 86 81 81 83 86 87
|
||||
82 81 86 83 82 81 86 87
|
||||
82 81 83 86 82 81 83 84
|
||||
82 81 83 85 92 76 86 83
|
||||
83 81 86 87 86 81 83 84
|
||||
84 83 86 87 86 81 83 85
|
||||
85 83 86 87 86 76 92 97
|
||||
86 76 92 90 92 76 86 87
|
||||
88 98 99 100 88 98 99 101
|
||||
94 93 98 88 90 92 97 88
|
||||
94 96 97 88 88 89 90 92
|
||||
88 89 90 91 89 90 92 97
|
||||
89 88 98 99 89 88 98 93
|
||||
89 88 97 92 89 88 97 96
|
||||
90 92 97 96 98 88 89 90
|
||||
97 88 89 90 91 90 92 97
|
||||
94 96 97 92 98 88 97 92
|
||||
93 98 99 100 93 98 99 101
|
||||
97 88 98 93 93 94 96 97
|
||||
94 93 98 99 98 93 94 95
|
||||
95 94 96 97 98 88 97 96
|
||||
98 93 94 96 102 110 115 105
|
||||
102 110 115 112 102 110 115 116
|
||||
102 110 112 115 102 110 112 113
|
||||
102 110 112 114 115 105 107 102
|
||||
106 105 107 102 121 105 107 102
|
||||
103 102 107 105 103 102 107 108
|
||||
103 102 107 109 103 102 110 115
|
||||
103 102 110 112 103 102 110 111
|
||||
104 102 107 105 104 102 107 108
|
||||
104 102 107 109 104 102 110 115
|
||||
104 102 110 112 104 102 110 111
|
||||
105 121 126 125 105 121 126 117
|
||||
120 119 121 105 118 119 121 105
|
||||
112 110 115 105 111 110 115 105
|
||||
110 112 115 105 113 112 115 105
|
||||
114 112 115 105 110 102 107 105
|
||||
106 105 115 110 106 105 115 112
|
||||
106 105 115 116 106 105 107 108
|
||||
106 105 107 109 106 105 121 126
|
||||
106 105 121 119 107 105 115 110
|
||||
107 105 115 112 107 105 115 116
|
||||
107 105 121 126 107 105 121 119
|
||||
107 102 110 115 107 102 110 112
|
||||
107 102 110 111 115 105 107 108
|
||||
121 105 107 108 110 102 107 108
|
||||
115 105 107 109 121 105 107 109
|
||||
110 102 107 109 121 105 115 110
|
||||
113 112 115 110 114 112 115 110
|
||||
110 112 115 116 111 110 115 112
|
||||
111 110 115 116 111 110 112 115
|
||||
111 110 112 113 111 110 112 114
|
||||
121 105 115 112 112 110 115 116
|
||||
115 110 112 113 113 112 115 116
|
||||
115 110 112 114 114 112 115 116
|
||||
115 105 121 126 115 105 121 119
|
||||
121 105 115 116 117 127 128 129
|
||||
117 127 128 130 123 122 127 117
|
||||
119 121 126 117 123 125 126 117
|
||||
117 118 119 121 117 118 119 120
|
||||
118 119 121 126 118 117 127 128
|
||||
118 117 127 122 118 117 126 121
|
||||
118 117 126 125 119 121 126 125
|
||||
127 117 118 119 126 117 118 119
|
||||
120 119 121 126 123 125 126 121
|
||||
127 117 126 121 122 127 128 129
|
||||
122 127 128 130 126 117 127 122
|
||||
122 123 125 126 123 122 127 128
|
||||
127 122 123 124 124 123 125 126
|
||||
127 117 126 125 127 122 123 125
|
||||
|
||||
0 !NIMPHI: impropers
|
||||
|
||||
|
||||
0 !NDON: donors
|
||||
|
||||
|
||||
0 !NACC: acceptors
|
||||
|
||||
|
||||
0 !NNB
|
||||
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0
|
||||
|
||||
1 0 !NGRP
|
||||
0 0 0
|
||||
|
||||
@ -0,0 +1,489 @@
|
||||
PSF
|
||||
|
||||
1 !NTITLE
|
||||
REMARKS VMD generated structure x-plor psf file
|
||||
|
||||
101 !NATOM
|
||||
1 2 1 1 0.000000 10.0000 0
|
||||
2 2 1 1 0.000000 10.0000 0
|
||||
3 2 1 1 0.000000 10.0000 0
|
||||
4 2 1 1 0.000000 10.0000 0
|
||||
5 2 1 1 0.000000 10.0000 0
|
||||
6 2 1 1 0.000000 10.0000 0
|
||||
7 2 1 1 0.000000 10.0000 0
|
||||
8 2 1 1 0.000000 10.0000 0
|
||||
9 2 1 1 0.000000 10.0000 0
|
||||
10 2 1 1 0.000000 10.0000 0
|
||||
11 2 1 1 0.000000 10.0000 0
|
||||
12 2 1 1 0.000000 10.0000 0
|
||||
13 2 1 1 0.000000 10.0000 0
|
||||
14 2 1 1 0.000000 10.0000 0
|
||||
15 2 1 1 0.000000 10.0000 0
|
||||
16 2 1 1 0.000000 10.0000 0
|
||||
17 2 1 1 0.000000 10.0000 0
|
||||
18 2 1 1 0.000000 10.0000 0
|
||||
19 2 1 1 0.000000 10.0000 0
|
||||
20 2 1 1 0.000000 10.0000 0
|
||||
21 2 1 1 0.000000 10.0000 0
|
||||
22 2 1 1 0.000000 10.0000 0
|
||||
23 2 1 1 0.000000 10.0000 0
|
||||
24 2 1 1 0.000000 10.0000 0
|
||||
25 2 1 1 0.000000 10.0000 0
|
||||
26 2 1 1 0.000000 10.0000 0
|
||||
27 2 1 1 0.000000 10.0000 0
|
||||
28 2 1 1 0.000000 10.0000 0
|
||||
29 2 1 1 0.000000 10.0000 0
|
||||
30 2 1 1 0.000000 10.0000 0
|
||||
31 2 1 1 0.000000 10.0000 0
|
||||
32 2 1 1 0.000000 10.0000 0
|
||||
33 2 1 1 0.000000 10.0000 0
|
||||
34 2 1 1 0.000000 10.0000 0
|
||||
35 2 1 1 0.000000 10.0000 0
|
||||
36 2 1 1 0.000000 10.0000 0
|
||||
37 2 1 1 0.000000 10.0000 0
|
||||
38 2 1 1 0.000000 10.0000 0
|
||||
39 2 1 1 0.000000 10.0000 0
|
||||
40 2 1 1 0.000000 10.0000 0
|
||||
41 2 1 1 0.000000 10.0000 0
|
||||
42 2 1 1 0.000000 10.0000 0
|
||||
43 2 1 1 0.000000 10.0000 0
|
||||
44 2 1 1 0.000000 10.0000 0
|
||||
45 2 1 1 0.000000 10.0000 0
|
||||
46 2 1 1 0.000000 10.0000 0
|
||||
47 2 1 1 0.000000 10.0000 0
|
||||
48 2 1 1 0.000000 10.0000 0
|
||||
49 2 1 1 0.000000 10.0000 0
|
||||
50 2 1 1 0.000000 10.0000 0
|
||||
51 2 1 1 0.000000 10.0000 0
|
||||
52 2 1 1 0.000000 10.0000 0
|
||||
53 2 1 1 0.000000 10.0000 0
|
||||
54 2 1 1 0.000000 10.0000 0
|
||||
55 2 1 1 0.000000 10.0000 0
|
||||
56 2 1 1 0.000000 10.0000 0
|
||||
57 2 1 1 0.000000 10.0000 0
|
||||
58 2 1 1 0.000000 10.0000 0
|
||||
59 2 1 1 0.000000 10.0000 0
|
||||
60 2 1 1 0.000000 10.0000 0
|
||||
61 2 1 1 0.000000 10.0000 0
|
||||
62 2 1 1 0.000000 10.0000 0
|
||||
63 2 1 1 0.000000 10.0000 0
|
||||
64 2 1 1 0.000000 10.0000 0
|
||||
65 2 1 1 0.000000 10.0000 0
|
||||
66 2 1 1 0.000000 10.0000 0
|
||||
67 2 1 1 0.000000 10.0000 0
|
||||
68 2 1 1 0.000000 10.0000 0
|
||||
69 2 1 1 0.000000 10.0000 0
|
||||
70 2 1 1 0.000000 10.0000 0
|
||||
71 2 1 1 0.000000 10.0000 0
|
||||
72 2 1 1 0.000000 10.0000 0
|
||||
73 1 9 9 -0.180000 10.0000 0
|
||||
74 1 4 4 0.090000 10.0000 0
|
||||
75 1 4 4 0.090000 10.0000 0
|
||||
76 1 9 9 -0.090000 10.0000 0
|
||||
77 1 4 4 0.090000 10.0000 0
|
||||
78 1 10 10 -0.180000 10.0000 0
|
||||
79 1 5 5 0.090000 10.0000 0
|
||||
80 1 5 5 0.090000 10.0000 0
|
||||
81 1 11 11 -0.090000 10.0000 0
|
||||
82 1 4 4 0.090000 10.0000 0
|
||||
83 1 10 10 -0.180000 10.0000 0
|
||||
84 1 5 5 0.090000 10.0000 0
|
||||
85 1 5 5 0.090000 10.0000 0
|
||||
86 1 12 12 -0.090000 10.0000 0
|
||||
87 1 4 4 0.090000 10.0000 0
|
||||
88 1 8 8 0.280000 10.0000 0
|
||||
89 1 16 16 -0.710000 10.0000 0
|
||||
90 1 7 7 0.340000 10.0000 0
|
||||
91 1 3 3 0.120000 10.0000 0
|
||||
92 1 14 14 -0.050000 10.0000 0
|
||||
93 1 15 15 -0.740000 10.0000 0
|
||||
94 1 7 7 0.500000 10.0000 0
|
||||
95 1 3 3 0.130000 10.0000 0
|
||||
96 1 15 15 -0.750000 10.0000 0
|
||||
97 1 8 8 0.430000 10.0000 0
|
||||
98 1 6 6 0.460000 10.0000 0
|
||||
99 1 13 13 -0.770000 10.0000 0
|
||||
100 1 2 2 0.380000 10.0000 0
|
||||
101 1 2 2 0.380000 10.0000 0
|
||||
|
||||
134 !NBOND: bonds
|
||||
1 2 1 22 2 3 2 5
|
||||
3 24 3 4 4 7 4 29
|
||||
5 6 6 7 6 9 7 8
|
||||
8 33 8 11 9 10 10 13
|
||||
10 11 11 12 12 15 12 37
|
||||
13 14 14 17 14 15 15 16
|
||||
16 19 16 41 17 18 18 21
|
||||
18 19 19 20 20 23 20 45
|
||||
21 22 22 23 23 24 24 25
|
||||
25 26 25 46 26 27 26 29
|
||||
27 48 27 28 28 31 28 53
|
||||
29 30 30 31 30 33 31 32
|
||||
32 57 32 35 33 34 34 37
|
||||
34 35 35 36 36 39 36 61
|
||||
37 38 38 41 38 39 39 40
|
||||
40 43 40 65 41 42 42 45
|
||||
42 43 43 44 44 47 44 69
|
||||
45 46 46 47 47 48 48 49
|
||||
49 50 49 70 50 51 50 53
|
||||
51 72 51 52 52 55 53 54
|
||||
54 55 54 57 55 56 56 59
|
||||
57 58 58 61 58 59 59 60
|
||||
60 63 61 62 62 65 62 63
|
||||
63 64 64 67 65 66 66 69
|
||||
66 67 67 68 68 71 69 70
|
||||
70 71 71 72 73 81 73 74
|
||||
73 75 73 78 76 78 76 77
|
||||
76 92 76 86 78 79 78 80
|
||||
81 86 81 83 81 82 83 86
|
||||
83 84 83 85 86 87 88 89
|
||||
88 97 88 98 89 90 90 91
|
||||
90 92 92 97 93 98 93 94
|
||||
94 95 94 96 96 97 98 99
|
||||
99 100 99 101
|
||||
|
||||
252 !NTHETA: angles
|
||||
2 1 22 1 2 3 1 2 5
|
||||
3 2 5 2 3 24 2 3 4
|
||||
4 3 24 3 4 7 3 4 29
|
||||
7 4 29 2 5 6 5 6 7
|
||||
5 6 9 7 6 9 4 7 6
|
||||
4 7 8 6 7 8 7 8 33
|
||||
7 8 11 11 8 33 6 9 10
|
||||
9 10 13 9 10 11 11 10 13
|
||||
8 11 10 8 11 12 10 11 12
|
||||
11 12 15 11 12 37 15 12 37
|
||||
10 13 14 13 14 17 13 14 15
|
||||
15 14 17 12 15 14 12 15 16
|
||||
14 15 16 15 16 19 15 16 41
|
||||
19 16 41 14 17 18 17 18 21
|
||||
17 18 19 19 18 21 16 19 18
|
||||
16 19 20 18 19 20 19 20 23
|
||||
19 20 45 23 20 45 18 21 22
|
||||
1 22 21 1 22 23 21 22 23
|
||||
20 23 22 20 23 24 22 23 24
|
||||
3 24 23 3 24 25 23 24 25
|
||||
24 25 26 24 25 46 26 25 46
|
||||
25 26 27 25 26 29 27 26 29
|
||||
26 27 48 26 27 28 28 27 48
|
||||
27 28 31 27 28 53 31 28 53
|
||||
4 29 26 4 29 30 26 29 30
|
||||
29 30 31 29 30 33 31 30 33
|
||||
28 31 30 28 31 32 30 31 32
|
||||
31 32 57 31 32 35 35 32 57
|
||||
8 33 30 8 33 34 30 33 34
|
||||
33 34 37 33 34 35 35 34 37
|
||||
32 35 34 32 35 36 34 35 36
|
||||
35 36 39 35 36 61 39 36 61
|
||||
12 37 34 12 37 38 34 37 38
|
||||
37 38 41 37 38 39 39 38 41
|
||||
36 39 38 36 39 40 38 39 40
|
||||
39 40 43 39 40 65 43 40 65
|
||||
16 41 38 16 41 42 38 41 42
|
||||
41 42 45 41 42 43 43 42 45
|
||||
40 43 42 40 43 44 42 43 44
|
||||
43 44 47 43 44 69 47 44 69
|
||||
20 45 42 20 45 46 42 45 46
|
||||
25 46 45 25 46 47 45 46 47
|
||||
44 47 46 44 47 48 46 47 48
|
||||
27 48 47 27 48 49 47 48 49
|
||||
48 49 50 48 49 70 50 49 70
|
||||
49 50 51 49 50 53 51 50 53
|
||||
50 51 72 50 51 52 52 51 72
|
||||
51 52 55 28 53 50 28 53 54
|
||||
50 53 54 53 54 55 53 54 57
|
||||
55 54 57 52 55 54 52 55 56
|
||||
54 55 56 55 56 59 32 57 54
|
||||
32 57 58 54 57 58 57 58 61
|
||||
57 58 59 59 58 61 56 59 58
|
||||
56 59 60 58 59 60 59 60 63
|
||||
36 61 58 36 61 62 58 61 62
|
||||
61 62 65 61 62 63 63 62 65
|
||||
60 63 62 60 63 64 62 63 64
|
||||
63 64 67 40 65 62 40 65 66
|
||||
62 65 66 65 66 69 65 66 67
|
||||
67 66 69 64 67 66 64 67 68
|
||||
66 67 68 67 68 71 44 69 66
|
||||
44 69 70 66 69 70 49 70 69
|
||||
49 70 71 69 70 71 68 71 70
|
||||
68 71 72 70 71 72 51 72 71
|
||||
73 81 82 73 81 83 73 81 86
|
||||
73 78 80 73 78 79 74 73 75
|
||||
76 92 90 76 92 97 76 86 87
|
||||
76 86 83 76 86 81 76 78 80
|
||||
76 78 79 73 78 76 77 76 92
|
||||
78 76 92 77 76 78 75 73 78
|
||||
74 73 78 78 73 81 79 78 80
|
||||
81 86 87 81 86 83 81 83 85
|
||||
81 83 84 81 83 86 75 73 81
|
||||
74 73 81 83 86 87 82 81 83
|
||||
84 83 85 85 83 86 84 83 86
|
||||
82 81 86 83 81 86 86 76 92
|
||||
77 76 86 78 76 86 88 98 93
|
||||
88 89 90 89 88 97 89 90 91
|
||||
88 97 92 92 97 96 89 90 92
|
||||
91 90 92 93 94 96 93 94 95
|
||||
94 93 98 95 94 96 88 97 96
|
||||
94 96 97 90 92 97 98 99 101
|
||||
98 99 100 97 88 98 89 88 98
|
||||
93 98 99 88 98 99 100 99 101
|
||||
|
||||
457 !NPHI: dihedrals
|
||||
22 1 2 3 22 1 2 5
|
||||
2 1 22 21 2 1 22 23
|
||||
1 2 3 24 1 2 3 4
|
||||
5 2 3 24 5 2 3 4
|
||||
1 2 5 6 3 2 5 6
|
||||
2 3 24 23 2 3 24 25
|
||||
4 3 24 23 4 3 24 25
|
||||
2 3 4 7 2 3 4 29
|
||||
24 3 4 7 24 3 4 29
|
||||
3 4 7 6 3 4 7 8
|
||||
29 4 7 6 29 4 7 8
|
||||
3 4 29 26 3 4 29 30
|
||||
7 4 29 26 7 4 29 30
|
||||
2 5 6 7 2 5 6 9
|
||||
5 6 7 4 5 6 7 8
|
||||
9 6 7 4 9 6 7 8
|
||||
5 6 9 10 7 6 9 10
|
||||
4 7 8 33 4 7 8 11
|
||||
6 7 8 33 6 7 8 11
|
||||
7 8 33 30 7 8 33 34
|
||||
11 8 33 30 11 8 33 34
|
||||
7 8 11 10 7 8 11 12
|
||||
33 8 11 10 33 8 11 12
|
||||
6 9 10 13 6 9 10 11
|
||||
9 10 13 14 11 10 13 14
|
||||
9 10 11 8 9 10 11 12
|
||||
13 10 11 8 13 10 11 12
|
||||
8 11 12 15 8 11 12 37
|
||||
10 11 12 15 10 11 12 37
|
||||
11 12 15 14 11 12 15 16
|
||||
37 12 15 14 37 12 15 16
|
||||
11 12 37 34 11 12 37 38
|
||||
15 12 37 34 15 12 37 38
|
||||
10 13 14 17 10 13 14 15
|
||||
13 14 17 18 15 14 17 18
|
||||
13 14 15 12 13 14 15 16
|
||||
17 14 15 12 17 14 15 16
|
||||
12 15 16 19 12 15 16 41
|
||||
14 15 16 19 14 15 16 41
|
||||
15 16 19 18 15 16 19 20
|
||||
41 16 19 18 41 16 19 20
|
||||
15 16 41 38 15 16 41 42
|
||||
19 16 41 38 19 16 41 42
|
||||
14 17 18 21 14 17 18 19
|
||||
17 18 21 22 19 18 21 22
|
||||
17 18 19 16 17 18 19 20
|
||||
21 18 19 16 21 18 19 20
|
||||
16 19 20 23 16 19 20 45
|
||||
18 19 20 23 18 19 20 45
|
||||
19 20 23 22 19 20 23 24
|
||||
45 20 23 22 45 20 23 24
|
||||
19 20 45 42 19 20 45 46
|
||||
23 20 45 42 23 20 45 46
|
||||
18 21 22 1 18 21 22 23
|
||||
1 22 23 20 1 22 23 24
|
||||
21 22 23 20 21 22 23 24
|
||||
20 23 24 3 20 23 24 25
|
||||
22 23 24 3 22 23 24 25
|
||||
3 24 25 26 3 24 25 46
|
||||
23 24 25 26 23 24 25 46
|
||||
24 25 26 27 24 25 26 29
|
||||
46 25 26 27 46 25 26 29
|
||||
24 25 46 45 24 25 46 47
|
||||
26 25 46 45 26 25 46 47
|
||||
25 26 27 48 25 26 27 28
|
||||
29 26 27 48 29 26 27 28
|
||||
25 26 29 4 25 26 29 30
|
||||
27 26 29 4 27 26 29 30
|
||||
26 27 48 47 26 27 48 49
|
||||
28 27 48 47 28 27 48 49
|
||||
26 27 28 31 26 27 28 53
|
||||
48 27 28 31 48 27 28 53
|
||||
27 28 31 30 27 28 31 32
|
||||
53 28 31 30 53 28 31 32
|
||||
27 28 53 50 27 28 53 54
|
||||
31 28 53 50 31 28 53 54
|
||||
4 29 30 31 4 29 30 33
|
||||
26 29 30 31 26 29 30 33
|
||||
29 30 31 28 29 30 31 32
|
||||
33 30 31 28 33 30 31 32
|
||||
29 30 33 8 29 30 33 34
|
||||
31 30 33 8 31 30 33 34
|
||||
28 31 32 57 28 31 32 35
|
||||
30 31 32 57 30 31 32 35
|
||||
31 32 57 54 31 32 57 58
|
||||
35 32 57 54 35 32 57 58
|
||||
31 32 35 34 31 32 35 36
|
||||
57 32 35 34 57 32 35 36
|
||||
8 33 34 37 8 33 34 35
|
||||
30 33 34 37 30 33 34 35
|
||||
33 34 37 12 33 34 37 38
|
||||
35 34 37 12 35 34 37 38
|
||||
33 34 35 32 33 34 35 36
|
||||
37 34 35 32 37 34 35 36
|
||||
32 35 36 39 32 35 36 61
|
||||
34 35 36 39 34 35 36 61
|
||||
35 36 39 38 35 36 39 40
|
||||
61 36 39 38 61 36 39 40
|
||||
35 36 61 58 35 36 61 62
|
||||
39 36 61 58 39 36 61 62
|
||||
12 37 38 41 12 37 38 39
|
||||
34 37 38 41 34 37 38 39
|
||||
37 38 41 16 37 38 41 42
|
||||
39 38 41 16 39 38 41 42
|
||||
37 38 39 36 37 38 39 40
|
||||
41 38 39 36 41 38 39 40
|
||||
36 39 40 43 36 39 40 65
|
||||
38 39 40 43 38 39 40 65
|
||||
39 40 43 42 39 40 43 44
|
||||
65 40 43 42 65 40 43 44
|
||||
39 40 65 62 39 40 65 66
|
||||
43 40 65 62 43 40 65 66
|
||||
16 41 42 45 16 41 42 43
|
||||
38 41 42 45 38 41 42 43
|
||||
41 42 45 20 41 42 45 46
|
||||
43 42 45 20 43 42 45 46
|
||||
41 42 43 40 41 42 43 44
|
||||
45 42 43 40 45 42 43 44
|
||||
40 43 44 47 40 43 44 69
|
||||
42 43 44 47 42 43 44 69
|
||||
43 44 47 46 43 44 47 48
|
||||
69 44 47 46 69 44 47 48
|
||||
43 44 69 66 43 44 69 70
|
||||
47 44 69 66 47 44 69 70
|
||||
20 45 46 25 20 45 46 47
|
||||
42 45 46 25 42 45 46 47
|
||||
25 46 47 44 25 46 47 48
|
||||
45 46 47 44 45 46 47 48
|
||||
44 47 48 27 44 47 48 49
|
||||
46 47 48 27 46 47 48 49
|
||||
27 48 49 50 27 48 49 70
|
||||
47 48 49 50 47 48 49 70
|
||||
48 49 50 51 48 49 50 53
|
||||
70 49 50 51 70 49 50 53
|
||||
48 49 70 69 48 49 70 71
|
||||
50 49 70 69 50 49 70 71
|
||||
49 50 51 72 49 50 51 52
|
||||
53 50 51 72 53 50 51 52
|
||||
49 50 53 28 49 50 53 54
|
||||
51 50 53 28 51 50 53 54
|
||||
50 51 72 71 52 51 72 71
|
||||
50 51 52 55 72 51 52 55
|
||||
51 52 55 54 51 52 55 56
|
||||
28 53 54 55 28 53 54 57
|
||||
50 53 54 55 50 53 54 57
|
||||
53 54 55 52 53 54 55 56
|
||||
57 54 55 52 57 54 55 56
|
||||
53 54 57 32 53 54 57 58
|
||||
55 54 57 32 55 54 57 58
|
||||
52 55 56 59 54 55 56 59
|
||||
55 56 59 58 55 56 59 60
|
||||
32 57 58 61 32 57 58 59
|
||||
54 57 58 61 54 57 58 59
|
||||
57 58 61 36 57 58 61 62
|
||||
59 58 61 36 59 58 61 62
|
||||
57 58 59 56 57 58 59 60
|
||||
61 58 59 56 61 58 59 60
|
||||
56 59 60 63 58 59 60 63
|
||||
59 60 63 62 59 60 63 64
|
||||
36 61 62 65 36 61 62 63
|
||||
58 61 62 65 58 61 62 63
|
||||
61 62 65 40 61 62 65 66
|
||||
63 62 65 40 63 62 65 66
|
||||
61 62 63 60 61 62 63 64
|
||||
65 62 63 60 65 62 63 64
|
||||
60 63 64 67 62 63 64 67
|
||||
63 64 67 66 63 64 67 68
|
||||
40 65 66 69 40 65 66 67
|
||||
62 65 66 69 62 65 66 67
|
||||
65 66 69 44 65 66 69 70
|
||||
67 66 69 44 67 66 69 70
|
||||
65 66 67 64 65 66 67 68
|
||||
69 66 67 64 69 66 67 68
|
||||
64 67 68 71 66 67 68 71
|
||||
67 68 71 70 67 68 71 72
|
||||
44 69 70 49 44 69 70 71
|
||||
66 69 70 49 66 69 70 71
|
||||
49 70 71 68 49 70 71 72
|
||||
69 70 71 68 69 70 71 72
|
||||
68 71 72 51 70 71 72 51
|
||||
73 81 86 76 73 81 86 83
|
||||
73 81 86 87 73 81 83 86
|
||||
73 81 83 84 73 81 83 85
|
||||
86 76 78 73 77 76 78 73
|
||||
92 76 78 73 74 73 78 76
|
||||
74 73 78 79 74 73 78 80
|
||||
74 73 81 86 74 73 81 83
|
||||
74 73 81 82 75 73 78 76
|
||||
75 73 78 79 75 73 78 80
|
||||
75 73 81 86 75 73 81 83
|
||||
75 73 81 82 76 92 97 96
|
||||
76 92 97 88 91 90 92 76
|
||||
89 90 92 76 83 81 86 76
|
||||
82 81 86 76 81 83 86 76
|
||||
84 83 86 76 85 83 86 76
|
||||
81 73 78 76 77 76 86 81
|
||||
77 76 86 83 77 76 86 87
|
||||
77 76 78 79 77 76 78 80
|
||||
77 76 92 97 77 76 92 90
|
||||
78 76 86 81 78 76 86 83
|
||||
78 76 86 87 78 76 92 97
|
||||
78 76 92 90 78 73 81 86
|
||||
78 73 81 83 78 73 81 82
|
||||
86 76 78 79 92 76 78 79
|
||||
81 73 78 79 86 76 78 80
|
||||
92 76 78 80 81 73 78 80
|
||||
92 76 86 81 84 83 86 81
|
||||
85 83 86 81 81 83 86 87
|
||||
82 81 86 83 82 81 86 87
|
||||
82 81 83 86 82 81 83 84
|
||||
82 81 83 85 92 76 86 83
|
||||
83 81 86 87 86 81 83 84
|
||||
84 83 86 87 86 81 83 85
|
||||
85 83 86 87 86 76 92 97
|
||||
86 76 92 90 92 76 86 87
|
||||
88 98 99 100 88 98 99 101
|
||||
94 93 98 88 90 92 97 88
|
||||
94 96 97 88 88 89 90 92
|
||||
88 89 90 91 89 90 92 97
|
||||
89 88 98 99 89 88 98 93
|
||||
89 88 97 92 89 88 97 96
|
||||
90 92 97 96 98 88 89 90
|
||||
97 88 89 90 91 90 92 97
|
||||
94 96 97 92 98 88 97 92
|
||||
93 98 99 100 93 98 99 101
|
||||
97 88 98 93 93 94 96 97
|
||||
94 93 98 99 98 93 94 95
|
||||
95 94 96 97 98 88 97 96
|
||||
98 93 94 96
|
||||
|
||||
0 !NIMPHI: impropers
|
||||
|
||||
|
||||
0 !NDON: donors
|
||||
|
||||
|
||||
0 !NACC: acceptors
|
||||
|
||||
|
||||
0 !NNB
|
||||
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0
|
||||
|
||||
1 0 !NGRP
|
||||
0 0 0
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
###########################################################
|
||||
# Interaction of a carbon nanotube with a pair of mystery
|
||||
# molecules (extracted from the cnat-cnt.data/in files).
|
||||
###########################################################
|
||||
#
|
||||
# define the system being simulated:
|
||||
|
||||
# -- init section --
|
||||
include system.in.init
|
||||
|
||||
# -- atom definition section --
|
||||
|
||||
read_data system.data
|
||||
|
||||
# -- settings section --
|
||||
|
||||
include system.in.settings
|
||||
|
||||
# -- run section --
|
||||
|
||||
|
||||
timestep 0.05
|
||||
dump 1 all custom 2000 traj_nvt.lammpstrj id mol type x y z ix iy iz
|
||||
|
||||
# The Nose-Hoover thermostat used with "fix nvt" can produce very odd-looking
|
||||
# dynamics in dilute systems with few atoms (such as this one).
|
||||
# Commenting this next line out:
|
||||
|
||||
# fix fxnvt all nvt temp 300.0 300.0 500.0 tchain 1
|
||||
|
||||
# Alternately, I receive fewer questions if I use langevin/nve instead:
|
||||
fix fxlan all langevin 300.0 300.0 1000.0 48279 scale 3 1.5
|
||||
fix fxnve all nve
|
||||
|
||||
|
||||
thermo_style custom step temp pe etotal press vol epair ebond eangle edihed
|
||||
thermo 500 # time interval for printing out "thermo" data
|
||||
#thermo_modify flush yes
|
||||
|
||||
#restart 1000000 restart_nvt
|
||||
|
||||
run 500000
|
||||
|
||||
write_restart system_after_nvt.rst
|
||||
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
#Define the CNT and CNAD molecules, by including the files which define them
|
||||
import cnt.lt
|
||||
import cnad.lt
|
||||
|
||||
# The cnt's center was originally at position 10,10,10,
|
||||
# so I moved it back to the origin
|
||||
cnt = new CNT.move(-10,-10,-10)
|
||||
|
||||
# Rotation around the center of mass does not work (yet),
|
||||
# so instead you have to move the molecule to the origin,
|
||||
# rotate it, and move it back to where you want it.
|
||||
# That's why the next line contains move().rot().move()
|
||||
# I'll add center-of-mass rotation as a later feature.
|
||||
|
||||
cnad1 = new CNAD.move(0.611276,-0.0237931,-0.0487586).rot(90,0,1,0).move(-7,0,0)
|
||||
cnad2 = new CNAD.move(0.611276,-0.0237931,-0.0487586).rot(-90,0,1,0).move(7,0,0)
|
||||
|
||||
|
||||
# You can leave the periodic boundary conditions unspecified
|
||||
# and change them later, OR you can declare them
|
||||
# using the "write_once("Data Boundary") {}" command:
|
||||
|
||||
write_once("Data Boundary")
|
||||
{
|
||||
0 50.0 xlo xhi
|
||||
0 50.0 ylo yhi
|
||||
0 50.0 zlo zhi
|
||||
}
|
||||
|
||||
@ -0,0 +1,38 @@
|
||||
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
|
||||
|
||||
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 directory, all of the force-field parameters are listed explicitly
|
||||
in the "alkanes.lt" file (located in the "moltemplate_files" directory).
|
||||
This allows the user to manually control all of the force-field details.
|
||||
|
||||
2) However, there is an alternate version of this example in the
|
||||
"../AMBER_force_field_examples" directory.
|
||||
In that version, the force-fields are loaded from a much larger file named
|
||||
"gaff.lt" which contains all of the parameters in the AMBER GAFF force-field
|
||||
database. The "gaff.lt" is similar to the "alkanes.lt" file except that
|
||||
it is larger (because it contains information for nearly all small organic
|
||||
molecules). It is located in a different directory (in the "common" directory).
|
||||
|
||||
Relying on "gaff.lt" 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 "c3" and "h1", in this example.)
|
||||
39
tools/moltemplate/examples/all_atom_examples/hexadecane/README_run.sh
Executable file
@ -0,0 +1,39 @@
|
||||
# --- 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_linux" is the name of the command you use to invoke lammps,
|
||||
# then you would run lammps on these files this way:
|
||||
|
||||
|
||||
lmp_linux -i run.in.npt # minimization and simulation at constant pressure
|
||||
lmp_linux -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_linux -i run.in.npt
|
||||
#mpirun -np 4 lmp_linux -i run.in.nvt
|
||||
# (assuming you have 4 processors available)
|
||||
25
tools/moltemplate/examples/all_atom_examples/hexadecane/README_setup.sh
Executable file
@ -0,0 +1,25 @@
|
||||
# -------- 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.
|
||||
# These files are the input files directly read by LAMMPS. Move them to
|
||||
# the parent directory (or wherever you plan to run the simulation).
|
||||
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 ../
|
||||
@ -0,0 +1,87 @@
|
||||
|
||||
------- 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.)
|
||||
@ -0,0 +1,16 @@
|
||||
# -------- 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, 2014-4-19)
|
||||