Merge pull request #1270 from akohlmey/get-moltemplate-from-web
Replace bundled moltemplate distribution with installation instructions only
|
@ -391,15 +391,16 @@ definition file. This tool was used to create the system for the
|
|||
|
||||
moltemplate tool :h4,link(moltemplate)
|
||||
|
||||
The moltemplate sub-directory contains a Python-based tool for
|
||||
building molecular systems based on a text-file description, and
|
||||
creating LAMMPS data files that encode their molecular topology as
|
||||
lists of bonds, angles, dihedrals, etc. See the README.TXT file for
|
||||
more information.
|
||||
The moltemplate sub-directory contains instructions for installing
|
||||
moltemplate, a Python-based tool for building molecular systems based
|
||||
on a text-file description, and creating LAMMPS data files that encode
|
||||
their molecular topology as lists of bonds, angles, dihedrals, etc.
|
||||
See the README.txt file for more information.
|
||||
|
||||
This tool was written by Andrew Jewett (jewett.aij at gmail.com), who
|
||||
supports it. It has its own WWW page at
|
||||
"http://moltemplate.org"_http://moltemplate.org.
|
||||
The latest sources can be found "on its GitHub page"_https://github.com/jewettaij/moltemplate/releases
|
||||
|
||||
:line
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ lmp2arc convert LAMMPS output to Accelrys Insight format
|
|||
lmp2cfg convert LAMMPS output to CFG files for AtomEye viz
|
||||
matlab MatLab scripts for post-processing LAMMPS output
|
||||
micelle2d create a data file of small lipid chains in solvent
|
||||
moltemplate Moltemplate builder program
|
||||
moltemplate Instructions for installing the Moltemplate builder program
|
||||
msi2lmp use Accelrys Insight code to setup LAMMPS input
|
||||
phonon post-process output of the fix phonon command
|
||||
polybond Python tool for programmable polymer bonding
|
||||
|
|
|
@ -1,180 +0,0 @@
|
|||
# from https://github.com/github/gitignore/blob/master/Python.gitignore
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
env/
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*,cover
|
||||
.hypothesis/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# celery beat schedule file
|
||||
celerybeat-schedule
|
||||
|
||||
# dotenv
|
||||
.env
|
||||
|
||||
# virtualenv
|
||||
.venv/
|
||||
venv/
|
||||
ENV/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# text-editor temporary files:
|
||||
*~
|
||||
|
||||
# misc rubbish
|
||||
deleteme*
|
||||
DELETEME*
|
||||
|
||||
######## files specific to moltemplate and lammps ########
|
||||
|
||||
# latex/bibtex temporary files for the moltemplate manual:
|
||||
moltemplate_manual*.aux
|
||||
moltemplate_manual*.bbl
|
||||
moltemplate_manual*.blg
|
||||
moltemplate_manual*.log
|
||||
moltemplate_manual*.out
|
||||
moltemplate_manual*.toc
|
||||
|
||||
######## files created by running LAMMPS: ########
|
||||
|
||||
log.lammps
|
||||
log.cite
|
||||
traj*.lammpstrj
|
||||
|
||||
######## files generated by running moltemplate: ########
|
||||
|
||||
system.data
|
||||
system.in
|
||||
system.in.init
|
||||
system.in.settings
|
||||
system.in.charges
|
||||
system.psf
|
||||
ttree_assignments.txt
|
||||
output_ttree/
|
||||
|
||||
# Sections from the LAMMPS data file generated by moltemplate.sh
|
||||
"Data Header"*
|
||||
"Data Atoms"*
|
||||
"Data Masses"*
|
||||
"Data Velocities"*
|
||||
"Data Bonds"*
|
||||
"Data Bond List"*
|
||||
"Data Bonds AtomId AtomId"*
|
||||
"Data Angles"*
|
||||
"Data Dihedrals"*
|
||||
"Data Impropers"*
|
||||
"Data Bond Coeffs"*
|
||||
"Data Angle Coeffs"*
|
||||
"Data Dihedral Coeffs"*
|
||||
"Data Improper Coeffs"*
|
||||
"Data Pair Coeffs"*
|
||||
"Data PairIJ Coeffs"*
|
||||
|
||||
# interactions-by-type (not id. This is not part of the LAMMPS standard.)
|
||||
"Data Charge By Bond"*
|
||||
"Data Bonds By Type"*
|
||||
"Data Angles By Type"*
|
||||
"Data Dihedrals By Type"*
|
||||
"Data Impropers By Type"*
|
||||
|
||||
# class2 data sections
|
||||
"Data BondBond Coeffs"*
|
||||
"Data BondAngle Coeffs"*
|
||||
"Data MiddleBondTorsion Coeffs"*
|
||||
"Data EndBondTorsion Coeffs"*
|
||||
"Data AngleTorsion Coeffs"*
|
||||
"Data AngleAngleTorsion Coeffs"*
|
||||
"Data BondBond13 Coeffs"*
|
||||
"Data AngleAngle Coeffs"*
|
||||
|
||||
# sections for non-point-like particles:
|
||||
"Data Ellipsoids"*
|
||||
"Data Lines"*
|
||||
"Data Triangles"*
|
||||
|
||||
# periodic boundary conditions
|
||||
"Data Boundary"*
|
||||
|
||||
# Sections from the LAMMPS input script(s) generated by moltemplate.sh
|
||||
|
||||
"In Init"*
|
||||
"In Settings"*
|
||||
"In Coords"*
|
||||
"In Charges"*
|
||||
#temporary file created by moltemplate.sh for storing coordinates
|
||||
tmp_atom_coords.dat
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
Modified BSD License (BSD-3-Clause)
|
||||
====================
|
||||
|
||||
_Copyright © `2012`, `University of California, Santa Barbara`_
|
||||
_All rights reserved._
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holders nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -1,104 +0,0 @@
|
|||
[](https://travis-ci.org/jewettaij/moltemplate.svg?branch=master)
|
||||
|
||||
Moltemplate
|
||||
===========
|
||||
|
||||
## Description
|
||||
|
||||
Moltemplate is a *general* cross-platform text-based molecule builder for **LAMMPS** and **ESPResSo**. Moltemplate was intended for building custom coarse-grained molecular models, but it can be used to prepare realistic all-atom simulations as well. It currently supports the **OPLS**, **COMPASS**, **AMBER**(GAFF,GAFF2), **MARTINI**, **SDK**, **LOPLS**(2015), and **TraPPE**(1998) force fields, and includes approximately 40 examples. (New force fields and examples are added continually by users.)
|
||||
|
||||
## Typical usage
|
||||
|
||||
moltemplate.sh [-atomstyle style] [-pdb/-xyz coord_file] [-vmd] system.lt
|
||||
|
||||
## Web page
|
||||
|
||||
Documentation, examples, and supporting code can be downloaded at:
|
||||
|
||||
http://www.moltemplate.org
|
||||
|
||||
## Requirements
|
||||
|
||||
Moltemplate requires the Bourne-shell, and a recent version of python
|
||||
(2.7, 3.0 or higher), and can run on OS X, linux, or windows. (...if a
|
||||
suitable shell environment has been installed. See below.)
|
||||
|
||||
|
||||
## INSTALLATION INSTRUCTIONS
|
||||
|
||||
This directory should contain 3 folders:
|
||||
|
||||
moltemplate/ <-- source code and force fields
|
||||
doc/ <-- the moltemplate reference manual
|
||||
examples/ <-- examples built with moltemplate
|
||||
|
||||
There are two ways to install moltemplate:
|
||||
|
||||
## Installation using pip
|
||||
If you are familiar with pip, then run the following command from within the directory where this README file is located:
|
||||
|
||||
pip install .
|
||||
|
||||
If you receive an error regarding permissions, then run pip with the "--user" argument:
|
||||
|
||||
pip install . --user
|
||||
|
||||
Make sure that your default pip install bin directory is in your PATH. (This is usually something like ~/.local/bin/ or ~/anaconda3/bin/. If you have installed anaconda, this will be done for you automatically.) Later, you can uninstall moltemplate using:
|
||||
|
||||
pip uninstall moltemplate
|
||||
|
||||
If you continue to run into difficulty, try installing moltemplate into a temporary virtual environment by installing "*virtualenv*", downloading moltemplate (to "~/moltemplate" in the example below), and running these commands:
|
||||
|
||||
cd ~/moltemplate
|
||||
virtualenv venv
|
||||
source venv/bin/activate
|
||||
pip install .
|
||||
#(now do something useful with moltemplate...)
|
||||
|
||||
(You will have to "run source ~/moltemplate/venv/bin/activate" beforehand every time you want to run moltemplate.
|
||||
The *virtualenv* tool is
|
||||
[explained in detail here](http://docs.python-guide.org/en/latest/dev/virtualenvs/)) If all this fails, then try installing moltemplate by manually updating your \$PATH environment variable. Instructions for doing that are included below.
|
||||
|
||||
## Manual installation:
|
||||
|
||||
Alternatively, you can edit your $PATH environment variable manually to
|
||||
include the subdirectory where the "moltemplate.sh" script is located,
|
||||
as well as the subdirectory where most of the python scripts are located.
|
||||
Suppose the directory with this README file is named "moltemplate"
|
||||
and is located in your home directory:
|
||||
|
||||
If you use the bash shell, typically you would edit your
|
||||
`~/.profile`, `~/.bash_profile` or `~/.bashrc` files
|
||||
to contain the following lines:
|
||||
|
||||
export PATH="$PATH:$HOME/moltemplate/moltemplate"
|
||||
export PATH="$PATH:$HOME/moltemplate/moltemplate/scripts"
|
||||
|
||||
If you use the tcsh shell, typically you would edit your
|
||||
`~/.login`, `~/.cshrc`, or `~/.tcshrc` files to contain the following lines:
|
||||
|
||||
setenv PATH "$PATH:$HOME/moltemplate/moltemplate"
|
||||
setenv PATH "$PATH:$HOME/moltemplate/moltemplate/scripts"
|
||||
|
||||
After making these changes, you may need to start a new terminal (shell) for the changes to take effect. If you do not know what a `PATH` environment variable is and are curious, read:
|
||||
http://www.linfo.org/path_env_var.html
|
||||
(I receive this question often.)
|
||||
|
||||
|
||||
### WINDOWS installation suggestions
|
||||
|
||||
You can install both moltemplate and LAMMPS in windows, but you will first need to install the BASH shell environment on your computer. If you are using Windows 10 or later, try installing the "Windows Subsystem for Linux (WSL)"
|
||||
|
||||
https://solarianprogrammer.com/2017/04/15/install-wsl-windows-subsystem-for-linux/
|
||||
https://msdn.microsoft.com/en-us/commandline/wsl/faq
|
||||
|
||||
If you are using an older version of windows, try following the tutorial written by Yanqing Fu instead:
|
||||
|
||||
https://sourceforge.net/p/lammps/mailman/message/32599824/
|
||||
|
||||
To use LAMMPS and moltemplate, You will also need to install (and learn how to use) a text editor. (Word, Wordpad, and Notepad will not work.) Popular free text editors which you can safely install and run from within the WSL terminal include: **nano**, **ne**, **emacs**, **vim**, and **jove**. (Unfortunately, as of 2017-5-17, [graphical unix-friendly text editors such as Atom, VSCode, Notepad++, and sublime won't work with WSL, and may cause file system corruption. Avoid these editors for now.](https://www.reddit.com/r/bashonubuntuonwindows/comments/6bu1d1/since_we_shouldnt_edit_files_stored_in_wsl_with/))
|
||||
|
||||
## License
|
||||
|
||||
Moltemplate is available under the terms of the open-source 3-clause BSD
|
||||
license. (See `LICENSE.md`.)
|
|
@ -0,0 +1,142 @@
|
|||
|
||||
Moltemplate
|
||||
===========
|
||||
|
||||
## Description
|
||||
|
||||
This folder used to contain a distribution of Moltemplate, a general purpose,
|
||||
cross-platform, text-based molecule and topology builder for LAMMPS.
|
||||
Moltemplate was originally conceived for building custom coarse-grained
|
||||
molecular models, but it has since been generalized for all-atom simulations
|
||||
as well. It currently supports the OPLS, COMPASS, AMBER(GAFF,GAFF2),
|
||||
MARTINI, SDK, LOPLS(2015), and TraPPE(1998) force fields, and includes
|
||||
(New force fields and examples are added continually through user
|
||||
contributions).
|
||||
|
||||
Moltemplate is now distributed via the pip python package manager,
|
||||
or can be downloaded from http://www.moltemplate.org/download.html
|
||||
or https://github.com/jewettaij/moltemplate/releases
|
||||
The most up-to-date version is usually available through GitHub
|
||||
|
||||
## Typical usage
|
||||
|
||||
moltemplate.sh [-atomstyle style] [-pdb/-xyz coord_file] [-vmd] system.lt
|
||||
|
||||
## Web page
|
||||
|
||||
Documentation, examples, and supporting code can be downloaded at:
|
||||
|
||||
http://www.moltemplate.org
|
||||
|
||||
## Requirements
|
||||
|
||||
Moltemplate requires the Bourne-shell, and a recent version of python
|
||||
(2.7, 3.0 or higher), and can run on OS X, linux, or windows. (...if a
|
||||
suitable shell environment has been installed. See below.)
|
||||
|
||||
|
||||
## INSTALLATION INSTRUCTIONS
|
||||
|
||||
## Download / install via pip
|
||||
If you have a working installation of "pip" and access to the internet,
|
||||
you can download and install it into your home directory ($HOME/.local/bin
|
||||
and the corresponding python package folders) simply by:
|
||||
|
||||
pip install moltemplate --user
|
||||
|
||||
If instead, you want a system-wide installation, you need superuser access,
|
||||
e.g. via:
|
||||
|
||||
sudo pip install moltemplate
|
||||
|
||||
Updates to this distribution method are less frequent, than others, so if
|
||||
you need a more recent version, you can download it as a .tar.gz or .zip
|
||||
archive from the moltemplate home page or GitHub (see linke above). After
|
||||
downloading an archive and unpacking it, you should have 3 folders.
|
||||
|
||||
moltemplate/ <-- source code and force fields
|
||||
doc/ <-- the moltemplate reference manual
|
||||
examples/ <-- examples built with moltemplate
|
||||
|
||||
From here on, you can use pip to install this downloaded version as well
|
||||
by issuing the following command from within the top-level directory of
|
||||
the unpacked source archive:
|
||||
|
||||
pip install . --user
|
||||
|
||||
If you want to install into a system folder, then you need to run pip with
|
||||
superuser priviledges. e.g. with:
|
||||
|
||||
sudo pip install .
|
||||
|
||||
Make sure that your default pip install bin directory is in your PATH.
|
||||
This is usually something like ~/.local/bin/ or ~/anaconda3/bin/.
|
||||
If you have installed anaconda, this will be done for you automatically.
|
||||
As you can see, this is mostly identical to the direct install with pip.
|
||||
|
||||
Later, you can uninstall moltemplate using:
|
||||
|
||||
pip uninstall moltemplate
|
||||
|
||||
If you continue to run into difficulty, try installing moltemplate into
|
||||
a temporary virtual environment by installing virtualenv, downloading
|
||||
moltemplate (to "~/moltemplate" in the example below), and running
|
||||
these commands:
|
||||
|
||||
cd ~/moltemplate
|
||||
virtualenv venv
|
||||
source venv/bin/activate
|
||||
pip install .
|
||||
#(now do something useful with moltemplate...)
|
||||
|
||||
(You will have to "run source ~/moltemplate/venv/bin/activate" beforehand
|
||||
every time you want to run moltemplate.
|
||||
The *virtualenv* tool is explained in detail here:
|
||||
|
||||
http://docs.python-guide.org/en/latest/dev/virtualenvs/
|
||||
|
||||
If all this fails, then try installing moltemplate by manually updating
|
||||
your \$PATH environment variable. Instructions for doing that are included below.
|
||||
|
||||
## Manual installation:
|
||||
|
||||
Alternatively, after downloading and unpacking the moltemplate source archive,
|
||||
you can edit your $PATH environment variable manually to include the subdirectory
|
||||
where the "moltemplate.sh" script is located, as well as the subdirectory where
|
||||
most of the python scripts are located.
|
||||
Suppose the top-level directory of the unpacked archive "moltemplate"
|
||||
and is located in your home directory:
|
||||
|
||||
If you use the bash shell, typically you would edit your
|
||||
`~/.profile`, `~/.bash_profile` or `~/.bashrc` files
|
||||
to contain the following lines:
|
||||
|
||||
export PATH="$PATH:$HOME/moltemplate/moltemplate"
|
||||
export PATH="$PATH:$HOME/moltemplate/moltemplate/scripts"
|
||||
|
||||
If you use the tcsh shell, typically you would edit your
|
||||
`~/.login`, `~/.cshrc`, or `~/.tcshrc` files to contain the following lines:
|
||||
|
||||
setenv PATH "$PATH:$HOME/moltemplate/moltemplate"
|
||||
setenv PATH "$PATH:$HOME/moltemplate/moltemplate/scripts"
|
||||
|
||||
After making these changes, you may need to start a new terminal (shell) for the changes to take effect. If you do not know what a `PATH` environment variable is and are curious, read:
|
||||
http://www.linfo.org/path_env_var.html
|
||||
(I receive this question often.)
|
||||
|
||||
|
||||
### WINDOWS installation suggestions
|
||||
|
||||
You can install both moltemplate and LAMMPS in windows, but you will
|
||||
first need to install the BASH shell environment on your computer.
|
||||
If you are using Windows 10 or later, try installing the "Windows Subsystem for Linux (WSL)"
|
||||
|
||||
https://solarianprogrammer.com/2017/04/15/install-wsl-windows-subsystem-for-linux/
|
||||
https://msdn.microsoft.com/en-us/commandline/wsl/faq
|
||||
|
||||
If you are using an older version of windows, try following the tutorial written by Yanqing Fu instead:
|
||||
|
||||
https://sourceforge.net/p/lammps/mailman/message/32599824/
|
||||
|
||||
To use LAMMPS and moltemplate, You will also need to install (and learn how to use) a text editor. (Word, Wordpad, and Notepad will not work.) Popular free text editors which you can safely install and run from within the WSL terminal include: **nano**, **ne**, **emacs**, **vim**, and **jove**. (Unfortunately, as of 2017-5-17, [graphical unix-friendly text editors such as Atom, VSCode, Notepad++, and sublime won't work with WSL, and may cause file system corruption. Avoid these editors for now.](https://www.reddit.com/r/bashonubuntuonwindows/comments/6bu1d1/since_we_shouldnt_edit_files_stored_in_wsl_with/))
|
||||
|
Before ![]() (image error) Size: 3.4 KiB |
Before ![]() (image error) Size: 15 KiB |
Before ![]() (image error) Size: 39 KiB |
Before ![]() (image error) Size: 24 KiB |
|
@ -1,10 +0,0 @@
|
|||
To create the file "moltemplate_manual.pdf", install pdflatex and run
|
||||
these commands:
|
||||
|
||||
pdflatex moltemplate_manual
|
||||
pdflatex moltemplate_manual
|
||||
bibtex moltemplate_manual
|
||||
bibtex moltemplate_manual
|
||||
pdflatex moltemplate_manual
|
||||
pdflatex moltemplate_manual
|
||||
|
Before ![]() (image error) Size: 3.0 KiB |
Before ![]() (image error) Size: 23 KiB |
Before ![]() (image error) Size: 48 KiB |
Before ![]() (image error) Size: 49 KiB |
Before ![]() (image error) Size: 16 KiB |
Before ![]() (image error) Size: 12 KiB |
Before ![]() (image error) Size: 2.6 KiB |
Before ![]() (image error) Size: 4.3 KiB |
Before ![]() (image error) Size: 30 KiB |
|
@ -1,161 +0,0 @@
|
|||
@STRING{CELL="Cell"}
|
||||
@STRING{JMB="J. Mol. Biol."}
|
||||
@STRING{BIOCHEMISTRY="Biochemistry"}
|
||||
@STRING{BIOPHYSICALCHEMISTRY="Biophys. Chem."}
|
||||
@STRING{JCP="J. Chem. Phys."}
|
||||
@STRING{PNAS="Proc. Natl. Acad. Sci. USA"}
|
||||
@STRING{BIOPOLYMERS="Biopolymers"}
|
||||
@STRING{SCIENCE="Science"}
|
||||
@STRING{MMBR="Microbiol. Mol. Biol. R."}
|
||||
@STRING{NATURE="Nature"}
|
||||
@STRING{NATSTRUCTBIOL="Nat. Struct. Biol."}
|
||||
@STRING{NATBIOTECHNOL="Nat. Biotechnol."}
|
||||
@STRING{JBIOLCHEM="J. Biol. Chem."}
|
||||
@STRING{JSTRUCTBIOL="J. Struct. Biol."}
|
||||
@STRING{FOLDINGANDDESIGN="Folding and Design"}
|
||||
%@STRING{PROTSTRFUNCGEN="Prot. Str. Func. Gen."}
|
||||
@STRING{PROTSTRFUNCGEN="Proteins"}
|
||||
@STRING{PRL="Phys. Rev. Lett."}
|
||||
@STRING{TIBS="Trends in Biochem. Sci."}
|
||||
@STRING{EMBOJ="EMBO J."}
|
||||
@STRING{FEBS="FEBS Letters"}
|
||||
@STRING{FASEB="FASEB"}
|
||||
@STRING{JBIOCHEMTOXICOL="J. Biochem. Toxicol."}
|
||||
@STRING{CRBMB="Crit. Rev. Biochem. Mol. Biol."}
|
||||
@STRING{CHEMREV="Chem. Rev."}
|
||||
@STRING{ANNUREVBIOCHEM="Annu. Rev. Biochem."}
|
||||
% ------------------ books ----------------------
|
||||
|
||||
|
||||
@INBOOK{vanKampenBook,
|
||||
AUTHOR="van Kampen, N. G.",
|
||||
TITLE="Stochastic Processes in Physics and Chemistry, 2nd Edition",
|
||||
PUBLISHER="North Holland",
|
||||
PAGES={96--127},
|
||||
MONTH="July",
|
||||
DAY="1",
|
||||
YEAR=2001
|
||||
}
|
||||
|
||||
|
||||
@ARTICLE{LAMMPS,
|
||||
AUTHOR="S. Plimpton",
|
||||
TITLE="Fast Parallel Algorithms for Short-Range Molecular Dynamics",
|
||||
JOURNAL="J. Comp. Phys.",
|
||||
VOLUME=117,
|
||||
PAGES={1--19},
|
||||
YEAR="1995",
|
||||
NOTE={\url{http://lammps.sandia.gov/}}
|
||||
}
|
||||
|
||||
|
||||
@ARTICLE{packmol,
|
||||
AUTHOR="Martínez, L. and Andrade, R. and Brigin, E. G. and Martínez, J. M.",
|
||||
TITLE="Packmol: A package for building initial configurations for molecular dynamics simulations.",
|
||||
JOURNAL="J. Comp. Chem.",
|
||||
VOLUME=30,
|
||||
NUMBER=13,
|
||||
PAGES={2157--2164},
|
||||
YEAR=2009,
|
||||
NOTE={\url{http://www.ime.unicamp.br/~martinez/packmol/}}
|
||||
}
|
||||
|
||||
|
||||
%% The primary VMD citation, should be used by all publications using VMD
|
||||
@article{VMD,
|
||||
author={William Humphrey and Andrew Dalke and Klaus Schulten},
|
||||
title={{VMD} -- {V}isual {M}olecular {D}ynamics},
|
||||
journal={Journal of Molecular Graphics},
|
||||
year=1996,
|
||||
volume=14,
|
||||
pages={33-38},
|
||||
tbstatus={Published.},
|
||||
techrep={},
|
||||
tbreference={222},
|
||||
NOTE={\url{http://www.ks.uiuc.edu/Research/vmd}}
|
||||
}
|
||||
|
||||
%% Interactive Molecular Dynamics, cited by papers doing IMD simulations
|
||||
@inproceedings{VMDIMD,
|
||||
author={John Stone and Justin Gullingsrud and Paul Grayson and Klaus Schulten},
|
||||
title={A System for Interactive Molecular Dynamics Simulation},
|
||||
booktitle={2001 ACM Symposium on Interactive 3D Graphics},
|
||||
publisher={ACM SIGGRAPH},
|
||||
address={New York},
|
||||
editor={John F. Hughes and Carlo H. S\'equin},
|
||||
pages={191-194},
|
||||
year={2001},
|
||||
note={},
|
||||
tbreference={304},
|
||||
tbstatus={Published.},
|
||||
annote={This symposium took place between March 19-21, 2001. {ISBN} 1-58113-292-1.}
|
||||
}
|
||||
|
||||
@MISC{topotools,
|
||||
AUTHOR="Axel Kohlmeyer",
|
||||
TITLE="{The TopoTools VMD plugin}",
|
||||
HOWPUBLISHED={\url{http://sites.google.com/site/akohlmey/software/topotools/}}
|
||||
}
|
||||
|
||||
|
||||
@MISC{pizzapy,
|
||||
AUTHOR="Steve Plimpton",
|
||||
TITLE="{The Pizza.py toolkit}",
|
||||
HOWPUBLISHED={\url{http://www.cs.sandia.gov/~sjplimp/pizza.html}}
|
||||
}
|
||||
|
||||
|
||||
@ARTICLE{TraPPE,
|
||||
AUTHOR="Marcus G. Martin and J. Ilja Siepmann",
|
||||
TITLE="Transferable Potentials for Phase Equilibria. 1. United-Atom Description of n-Alkanes",
|
||||
JOURNAL="J. Phys. Chem. B",
|
||||
VOLUME=102,
|
||||
NUMBER=14,
|
||||
PAGES={2569--2577},
|
||||
YEAR=1998
|
||||
}
|
||||
|
||||
|
||||
@ARTICLE{Raviv++SafinyaBiophysJ2007,
|
||||
AUTHOR="Uri Raviv and Toan Nguyen and Rouzbeh Ghafouri and Daniel J. Needleman and Youli Li and Herbert P. Miller and Leslie Wilson and Robijn F. Bruinsma and Cyrus R. Safinya",
|
||||
TITLE="Microtubule Protofilament Number Is Modulated in a Stepwise Fashion by the Charge Density of an Enveloping Layer",
|
||||
JOURNAL="Biophys. J.",
|
||||
VOLUME=92,
|
||||
NUMBER=1,
|
||||
PAGES={278--287},
|
||||
YEAR="2007",
|
||||
MONTH={January},
|
||||
DAY={1}
|
||||
}
|
||||
|
||||
|
||||
@ARTICLE{Raviv++SafinyaPNAS2005,
|
||||
AUTHOR="Uri Raviv and Daniel J. Needleman and Youli Li and Herbert P. Miller and Leslie Wilson and Cyrus R. Safinya",
|
||||
TITLE="Cationic liposome-microtubule complexes: Pathways to the formation of two-state lipid-protein nanotubes with open or closed ends",
|
||||
JOURNAL="Proc. Natl. Acad. Sci. USA",
|
||||
VOLUME=102,
|
||||
NUMBER=32,
|
||||
PAGES={11167--11172},
|
||||
YEAR="2005",
|
||||
MONTH={August},
|
||||
DAY={9}
|
||||
}
|
||||
|
||||
@ARTICLE{Berendsen++StraatsmaJPhysChem1987,
|
||||
AUTHOR="H. J. C. Berendsen and J. R. Grigera and T. P. Straatsma",
|
||||
TITLE="The Missing Term in Effective Pair Potentials",
|
||||
JOURNAL="J. Phys. Chem.",
|
||||
VOLUME=91,
|
||||
NUMBER=24,
|
||||
PAGES={6269--6271},
|
||||
YEAR="1987",
|
||||
}
|
||||
|
||||
|
||||
@ARTICLE{Klimov+ThirumalaiPRL1997,
|
||||
AUTHOR="Klimov, D. K. and Thirumalai, D.",
|
||||
JOURNAL="Phys. Rev. Lett.",
|
||||
VOLUME=79,
|
||||
PAGES={317--320},
|
||||
YEAR="1997"
|
||||
}
|
Before ![]() (image error) Size: 4.4 KiB |
Before ![]() (image error) Size: 2.7 KiB |
Before ![]() (image error) Size: 46 KiB |
Before ![]() (image error) Size: 32 KiB |
|
@ -1,121 +0,0 @@
|
|||
(Rough-draft documentation for dump2data.py and raw2data.py)
|
||||
|
||||
---- Description ----
|
||||
|
||||
"dump2data.py" was originally designed to convert dump files into LAMMPS DATA format (for restarting a simulation from where it left off). However it also reads and writes .XYZ and .RAW (simple 3-column text format) files also.
|
||||
|
||||
Comparison with pizza.py:
|
||||
This script duplicates some of the tools in pizza.py, but you don't have to learn python to use it. If you are willing to learn a little python, pizza.py, can handle more general dump files which might cause dump2data.py to crash (eg "atom_style tri"). Unlike "dump2data.py", pizza.py is maintained by the lammps team:
|
||||
http://pizza.sandia.gov/doc/Manual.html
|
||||
|
||||
----- General Usage -----
|
||||
|
||||
General usage:
|
||||
|
||||
dump2data.py [old_data_file -xyz -raw -last -t time -tstart ta -tstop tb -interval n -multi -center -scale x -atomstyle style] < DUMP_FILE > OUTPUT_FILE
|
||||
|
||||
----- examples -----
|
||||
|
||||
If your LAMMPS dump file is named "traj.lammpstrj", you can
|
||||
extract the coordinates this way:
|
||||
|
||||
dump2data.py -xyz < traj.lammpstrj > traj.xyz
|
||||
|
||||
This generates a 3-column text file containing the xyz coordinates on each line of each atom (sorted by atomid). If there are multiple frames in the trajectory file, it will concatenate them together this way:
|
||||
|
||||
8192
|
||||
LAMMPS data from timestep 50000
|
||||
1 -122.28 -19.2293 -7.93705
|
||||
2 -121.89 -19.2417 -8.85591
|
||||
3 -121.6 -19.2954 -7.20586
|
||||
: : : :
|
||||
8192
|
||||
LAMMPS data from timestep 100000
|
||||
1 -121.59 -20.3273 -2.0079
|
||||
2 -122.2 -19.8527 -2.64669
|
||||
3 -120.83 -19.7342 -2.2393
|
||||
|
||||
(When using the "-raw" argument to create simple 3-column .RAW files, blank lines are used to delimit different frames in the trajectory.)
|
||||
|
||||
---- optional command line arguments ---
|
||||
|
||||
If you want to select a particular frame from the trajectory, use:
|
||||
|
||||
dump2data.py -xyz -t 10000 < traj.lammpstrj > coords.xyz
|
||||
|
||||
To select the most recent (complete) frame, use:
|
||||
|
||||
dump2data.py -xyz -last < traj.lammpstrj > coords.xyz
|
||||
|
||||
(If the last frame is incomplete, this script will attempt to use the previous frame.)
|
||||
|
||||
If you want to select multiple frames, but there are too many frames in your trajectory, you can run dump2data.py this way...
|
||||
|
||||
dump2data.py -xyz -interval 10000 < traj.lammpstrj > traj.xyz
|
||||
|
||||
...to indicate the desired interval between frames (it must be a multiple of
|
||||
the save interval). You can also use "-tstart 500000 and "-tstop 1000000" arguments to limit the output to a particular range of time. (500000-1000000 in this example).
|
||||
|
||||
--- creating DATA files ---
|
||||
|
||||
"dump2data.py" can also create lammps DATA files. You must supply it with an existing DATA file containing the correct number of atoms and topology information.
|
||||
|
||||
If your coordinates are stored in a DUMP file (eg "traj.lammpstrj"), you can create a new data file this way:
|
||||
|
||||
dump2data.py -t 10000 data_file < traj.lammpstrj > new_file
|
||||
|
||||
Again, in this example, "10000" is the timestep for the frame you have selected. You can use "-last" to select the last frame. If you do not specify the frame you want, multiple data files may be created...
|
||||
|
||||
Creating multiple data files:
|
||||
The "-multi" command line argument tells "dump2data.py" to generate a new data file for each frame in the trajectory/dump-file. Those files will have names ending in ".1", ".2", ".3", ... (If you use the "-interval" argument, frames in the trajectory whose timestep is not a multiple of the interval will be discarded.) I can't remember if this behavior is switched on by default.
|
||||
|
||||
Reading simple 3-column coordinate files:
|
||||
If you have a file containing only the coordinates of the atoms (in sorted order), you can use "raw2data.py" to create a data file with those atoms coordinates.
|
||||
|
||||
raw2data.py -atomstyle ATOMSTYLE data_file < coords.raw > new_data_file
|
||||
|
||||
(where ATOMSTYLE is a quoted string, such as "full" or "hybrid sphere dipole" discussed earlier. Warning: "raw2data.py" is not a stand-alone script. Make sure raw2data.py is located in the same directory with dump2data.py.)
|
||||
|
||||
--- scaling and centering coordinates ---
|
||||
|
||||
-center
|
||||
This will center the coordinates around the geometric center, so that the average position of the atoms in each frame is located at the origin. (This script attempts to pay attention to the periodic image flags. As such, I think this script works with triclinic cells, but I have not tested that feature carefully.)
|
||||
|
||||
-scale 1.6
|
||||
This will multiply the coordinates by a constant (eg "1.6") (Please email me if this fails with periodic image flags.)
|
||||
|
||||
---- limitations ----
|
||||
|
||||
Speed.
|
||||
The program is somewhat slow, although it should be able to handle big trajectories. If speed is important to you, you probably should write your own custom script or use pizza.py which might be faster.
|
||||
|
||||
triclinic cells
|
||||
Support for triclinic cells has been added, but not tested.
|
||||
|
||||
exotic atom_styles
|
||||
|
||||
This script was designed to work with point-like atoms, and it extracts the x,y,z (and if present vx,vy,vz velocity) degrees of freedom and (by default) copies it to the new data being created by this script.
|
||||
|
||||
By default, this script assumes you are using "atom_style full".
|
||||
If you are using some other atom style (eg "hybrid bond dipole"), then you can try to run it this way:
|
||||
|
||||
dump2data.py -t 10000 \
|
||||
-atomstyle "hybrid bond dipole" \
|
||||
old_data_file < traj.lammpstrj > new_data_file
|
||||
|
||||
In general, the -atomstyle argument can be any of the atom styles listed in the
|
||||
table at:
|
||||
http://lammps.sandia.gov/doc/atom_style.html
|
||||
...such as "angle", "bond", "charge", "full", "molecular", "dipole", "ellipsoid", or any hybrid combination of these styles. (When using hybrid atom styles, you must enclose the argument in quotes, for example: "hybrid sphere dipole")
|
||||
Warning: I have not tested using dump2data.py with exotic (non-point-like) atom
|
||||
styles. (I suspect that the script will not crash, but the dipole orientations
|
||||
will not be updated.)
|
||||
|
||||
You can also customize the order columns you want to appear in that file using -atomstyle ”molid x y z atomid atomtype mux muy muz”, but again, I don't think the mux, muy, muz information in the new data file will be accurate.
|
||||
|
||||
I also strongly suspect that "dump2data.py" does not currently work with the "tri", "ellipsoid", and new "body" styles.
|
||||
|
||||
Again, try using pizza.py if you are simulating systems with exotic data types.
|
||||
http://pizza.sandia.gov/doc/Manual.html
|
||||
|
||||
I hope this is useful to someone.
|
|
@ -1,59 +0,0 @@
|
|||
extract_lammps_data.py is a simple script which extracts sections of text from
|
||||
a LAMMPS data file. (Of coarse, you can accomplish the same thing with a text
|
||||
editor, but this script turns it into a one-line command.)
|
||||
|
||||
Typical usage:
|
||||
|
||||
extract_lammps_data.py SECTION_NAME < FILE.DATA > EXCERPT.TXT
|
||||
|
||||
This extracts a section from a LAMMPS data file and saves it in EXCERPT.TXT.
|
||||
|
||||
More general usage:
|
||||
|
||||
extract_lammps_data.py [-n] SECTION_LIST < FILE.DATA > EXCERPT.TXT
|
||||
|
||||
The SECTION_LIST is a list of sections you want in your output file
|
||||
(eg "EXCERPT.TXT"). Each section must be a quoted-string, and spaces
|
||||
(not commas) should separate each section name.
|
||||
|
||||
The optional "-n" flag negates the selection. (Selecting instead, everything
|
||||
except the sections you listed.)
|
||||
|
||||
Examples:
|
||||
|
||||
extract_lammps_data.py "Atoms" < FILE.DATA > Atoms.txt
|
||||
extract_lammps_data.py "Header" < FILE.DATA > Header.txt
|
||||
extract_lammps_data.py -n "Header" < FILE.DATA > everything_except_Header.txt
|
||||
|
||||
extract_lammps_data.py "Bonds" "Angles" "Dihedrals" "Impropers" \
|
||||
< FILE.DATA > topology.txt
|
||||
|
||||
extract_lammps_data.py "Pair Coeffs" "Bond Coeffs" "Angle Coeffs" \
|
||||
"Dihedral Coeffs" "Improper Coeffs" \
|
||||
< FILE.DATA > force_field.txt
|
||||
|
||||
|
||||
The following section names are allowed:
|
||||
|
||||
"Header" # The header section at the beginning of the file.
|
||||
"Atoms"
|
||||
"Masses"
|
||||
"Bonds"
|
||||
"Bond Coeffs"
|
||||
"Angles"
|
||||
"Angle Coeffs"
|
||||
"Dihedrals"
|
||||
"Dihedral Coeffs"
|
||||
"Impropers"
|
||||
"Improper Coeffs"
|
||||
"BondBond Coeffs" # class2 angles
|
||||
"BondAngle Coeffs" # class2 angles
|
||||
"MiddleBondTorsion Coeffs" # class2 dihedrals
|
||||
"EndBondTorsion Coeffs" # class2 dihedrals
|
||||
"AngleTorsion Coeffs" # class2 dihedrals
|
||||
"AngleAngleTorsion Coeffs" # class2 dihedrals
|
||||
"BondBond13 Coeffs" # class2 dihedrals
|
||||
"AngleAngle Coeffs" # class2 impropers
|
||||
"Angles By Type" # moltemplate-specific. (not standard LAMMPS)
|
||||
"Dihedrals By Type" # moltemplate-specific. (not standard LAMMPS)
|
||||
"Angles By Type' # moltemplate-specific. (not standard LAMMPS)
|
|
@ -1,206 +0,0 @@
|
|||
Explanation:
|
||||
|
||||
Generate a moltemplate file containing a definition of a Polymer
|
||||
molecule containing monomers located at the positions specified in
|
||||
"coords.raw" (a 3-column text file). Monomers will be rotated so
|
||||
that they point along the polymer axis direction (see "-dir-indices")
|
||||
with an optional helical twist added (see "-helix"). Users can
|
||||
specify one or more bonds connecting each monomer to the next monomer
|
||||
(see "-bond"). Similarly, 3-body and 4-body angular interactions between
|
||||
atoms in different monomers can either be generated automatically
|
||||
(using the standard moltemplate "Angle By Type" rules)
|
||||
OR generated manually (using "-angle", "-dihedral", "-improper" arguments).
|
||||
|
||||
Usage:
|
||||
|
||||
genpoly_lt.py \
|
||||
[-bond btype a1 a2] \
|
||||
[-helix deltaphi] \
|
||||
[-axis x,y,z] \
|
||||
[-circular yes/no/connected] \
|
||||
[-dir-indices ia ib] \
|
||||
[-angle atype a1 a2 a3 i1 i2 i3] \
|
||||
[-dihedral dtype a1 a2 a3 a4 i1 i2 i3 i4] \
|
||||
[-improper itype a1 a2 a3 a4 i1 i2 i3 i4] \
|
||||
[-monomer-name mname] \
|
||||
[-sequence sequence.txt] \
|
||||
[-polymer-name pname] \
|
||||
[-inherits ForceFieldObject] \
|
||||
[-header "import monomer.lt"] \
|
||||
[-cuts cuts.txt] \
|
||||
[-box paddingX,paddingY,paddingZ] \
|
||||
< coords.raw > polymer.lt
|
||||
|
||||
Arguments (optional):
|
||||
|
||||
-axis x,y,z direction of the polymer axis in the original monomer object.
|
||||
These three numbers (separated by commas with no spaces)
|
||||
define the direction that the monomer subunit is pointing in.
|
||||
By default, the three numbers are 1 0 0 (ie, the X axis)
|
||||
|
||||
-helix deltaphi = Optionally, rotate each monomer around it's axis by
|
||||
angle deltaphi (in degrees) beforehand
|
||||
|
||||
-circular keyword
|
||||
keyword must be one of these:
|
||||
"no" The polymer is a linear chain with the two ends
|
||||
not connected.
|
||||
"yes" The polymer is a circular loop with the two ends
|
||||
connected pointing in similar directions.
|
||||
"connected" Connect the two ends together with bonds (and angles,
|
||||
and dihedrals, if applicable) to make a closed loop.
|
||||
But do not adjust the orientation of the first and
|
||||
last monomers so that they point towards eachother.
|
||||
(Use this if you plan to simulate an "infinitely"
|
||||
long polymer using periodic boundary conditions,
|
||||
with the two ends are connected on opposite sides.)
|
||||
|
||||
-dir-indices ia ib
|
||||
The program attempts to orient each monomer in a direction that
|
||||
the polymer is pointing. By default, the program will
|
||||
orient monomer i in the direction connecting the monomers before
|
||||
and after it (monomers i-1 and i+1). The user can override this
|
||||
using the -dir-indices command line argument. The ia and ib
|
||||
arguments are integer offsets. To point monomer i in the direction
|
||||
connecting it to the following monomer (i+1), use -dir-indices 0 1
|
||||
(For circular polymers, the indices will be wrapped appropriately.)
|
||||
|
||||
-bond btype a1 a2
|
||||
Add a bond between successive monomers of type btype.
|
||||
between atoms named a1 and a2 (all three arguments are strings and
|
||||
omit the @bond: and $atom: prefixes in moltemplate variables)
|
||||
Multiple bonds between successive monomers can be added by having
|
||||
"-bond bt a1 a2" appear several times in the argument list.
|
||||
For example, double-stranded DNA can be implemented as a polymer
|
||||
with 2 bonds connecting separate monomers (if each "monomer
|
||||
corresponds to a base pair).
|
||||
|
||||
-angle atype a1 a2 a3 i1 i2 i3
|
||||
Add a 3-body angle interaction between atoms a1 a2 a3 in monomers
|
||||
i1 i2 and i3. (The aname atype a1, a2, a3 arguments are strings
|
||||
containing moltemplate variable names. The standard moltemplate
|
||||
prefixes "$angle:", "@angle:", and "$atom:" should be omitted.
|
||||
The i1, i2, i3 arguments are integer indices indicating the monomer
|
||||
that each atom belongs to.
|
||||
0 corresponds to the current monomer
|
||||
1 corresponds to the next monomer
|
||||
2 corresponds to the following monomer, etc...
|
||||
(For circular polymers, the indices will be wrapped appropriately.)
|
||||
Multiple angles per monomer can be added by having:
|
||||
"-angle aname atype a1 a2 a3 i1 i2 i3"
|
||||
appear several times in the argument list.
|
||||
|
||||
|
||||
-dihedral dtype a1 a2 a3 a4 i1 i2 i3 i4
|
||||
Add a 4-body dihedral interaction between atoms a1 a2 a3 a4 in
|
||||
monomers i1 i2 and i3. (The dname dtype a1, a2, a3, a4, arguments
|
||||
are strings containing moltemplate variable names. The moltemplate
|
||||
prefixes "$dihedral:", "@dihedral:", and "$atom:" should be omitted
|
||||
The i1, i2, i3, i4 arguments are integer indices indicating the
|
||||
monomer that each atom belongs to. (See explanation above.)
|
||||
Multiple dihedrals per monomer can be added by having:
|
||||
"-dihedral dname dtype a1 a2 a3 a4 i1 i2 i3 i4"
|
||||
appear several times in the argument list.
|
||||
|
||||
-improper itype a1 a2 a3 a4 i1 i2 i3 i4
|
||||
Add a 4-body improper interaction between atoms a1 a2 a3 a4 in
|
||||
monomers i1 i2 and i3. (The iname itype a1, a2, a3, a4, arguments
|
||||
are strings containing moltemplate variable names. The moltemplate
|
||||
prefixes "$improper:", "@improper:", and "$atom:" should be omitted
|
||||
The i1, i2, i3, i4 arguments are integer indices indicating the
|
||||
that each atom belongs to. (See explanation above.)
|
||||
Multiple impropers per monomer can be added by having:
|
||||
"-improper iname itype a1 a2 a3 a4 i1 i2 i3 i4"
|
||||
appear several times in the argument list.
|
||||
|
||||
-monomer-name name
|
||||
Name of the moltemplate object that will be created.
|
||||
(By default "Monomer") Note: You can include 1 or more
|
||||
coordinate transformations added to the monomer subunit
|
||||
before it is moved into position. For example, it is
|
||||
often useful to to use a modified version of the monomer
|
||||
whose initial coordinates are compressed to avoid collisions
|
||||
with other monomers. To do this, use something like
|
||||
"Monomer.scale(0.5,0.7,0.7)" instead of "Monomer".
|
||||
This typically would compress each monomer lengthwise by 0.5
|
||||
and 0.7 laterally. (After minimization, each monomer should
|
||||
expand back to its ordinary size and shape.)
|
||||
|
||||
-header 'some text'
|
||||
This is a way to add text at the beginning of the file.
|
||||
It was intended to be used to define the force fields and
|
||||
the monomer subunits you are using. For example:
|
||||
-header 'import "FILE_WHICH_DEFINES_Monomer.lt"'
|
||||
|
||||
-sequence sequence.txt
|
||||
If you are building a heteropolymer this argument allows
|
||||
you to specify the sequence of monomers in the polymer.
|
||||
Here "sequence.txt" file contains the sequence of monomers
|
||||
you want in your polymer. Each line of this file should
|
||||
be the name of a moltemplate object for the monomer subunit
|
||||
you want at that location. The number of lines in this file
|
||||
should match the number of lines in the coordinate file.
|
||||
As before, you can include coordinate transforms in each
|
||||
monomer's name.
|
||||
|
||||
-polymer-name name
|
||||
Name of the moltemplate object that will be created.
|
||||
(By default "Polymer")
|
||||
|
||||
-inherits ForceFieldObject
|
||||
"ForceFieldObject" is the name of a moltemplate object which
|
||||
defines any rules for creating angles, dihedrals, impropers
|
||||
which you want to be generated automatically. Hopefully
|
||||
this is object was defined somewhere in the file that
|
||||
you imported using the "-header" argument.
|
||||
|
||||
-cuts cut_locations.txt
|
||||
Cut the polymer in several places along its length.
|
||||
This can be useful if your goal is to create many
|
||||
polymers of different lenthgs. Rather than being forced
|
||||
to define a new Polymer object for each polymer, simply
|
||||
cut the polymer N times along its length. The file
|
||||
"cut_locations.txt" is a text file containing a list of
|
||||
positive integers (one per line) indicating where you would
|
||||
like the polymer to be cut. For each integer, i, which
|
||||
appears in this file, a cut is made between monomers
|
||||
i-1 and i (Indexing begins at 0, so a value of 1
|
||||
corresonds to a cut between the first and second monomers.)
|
||||
A separate polymer object will be created for each polymer,
|
||||
and an integer suffix will be added to the name, to
|
||||
distinguish them from eachother. (Each of these
|
||||
polymers will be part of a larger object defined by this
|
||||
program. Instantiating that object will create all of the
|
||||
individual polymers.)
|
||||
|
||||
-box paddingX,paddingY,paddingZ
|
||||
This will cause the program to attempt to estimate the size
|
||||
of the smallest rectangular box which encloses all of the
|
||||
coordinates in the coordinate file. The user must supply
|
||||
3 comma-separated numbers (no spaces) which indicate how much
|
||||
extra room is needed in the x,y,z directions, at both ends.
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
1) Make a simple polymer, adding "@bond:Backbone" type bonds between
|
||||
"$atom:c2" from each monomer with "$atom:c1" from the next monomer.
|
||||
|
||||
genpoly_lt.py -bond Backbone c2 c1 < crds.raw > poly.lt
|
||||
|
||||
2) Make a circular twisted double-stranded DNA model, treating each base-pair
|
||||
as a monomer, and connecting each base-pair monomer with 2 bonds
|
||||
with the next base-pair. This is done using 2 "-bond"
|
||||
commands connecting the "O3p_a" atom with the "P_a" atom (in strand A),
|
||||
and the "P_b" atom with the "O3p_b" atom (from the opposite strand, B).
|
||||
|
||||
genpoly_lt.py -circular yes -helix 34.2857 \
|
||||
-header 'import "basepair.lt" #<--defines "BasePair"' \
|
||||
-monomer-name "BasePair" \
|
||||
-polymer-name "Plasmid" \
|
||||
-bond Backbone O3p_a P_a \
|
||||
-bond Backbone P_b O3p_b \
|
||||
< dna_basepair_CM_coords.raw \
|
||||
> chromosome.lt
|
||||
If you want to control the sequence of the polymer, replace the
|
||||
"-monomer-name" argument with "-sequence sequence.txt".
|
|
@ -1,56 +0,0 @@
|
|||
raw2data.py replaces the coordinates of a LAMMPS data file with new coordinates.
|
||||
|
||||
|
||||
Typical usage:
|
||||
|
||||
raw2data.py -atomstyle ATOMSTYLE FILE_OLD.data < COORDS.raw > FILE_NEW.data
|
||||
|
||||
|
||||
This will create a new LAMMPS DATA file named "FILE_NEW.data" whose atom
|
||||
coordinates are copied from the COORDS.raw file, but is otherwise identical
|
||||
to the original DATA file (eg, "FILE_OLD.data"). The optional
|
||||
-atomstyle ATOMSTYLE argument tells raw2data.py about the format of the DATA
|
||||
file. If not specified, the atom style is "full" by default.
|
||||
|
||||
|
||||
Arguments:
|
||||
|
||||
ATOMSTYLE is a quoted string, such as "full" or "hybrid sphere dipole" indicating the format of the data file. It can be any of the atom styles listed in the table at:
|
||||
http://lammps.sandia.gov/doc/atom_style.html
|
||||
...such as "angle", "bond", "charge", "full", "molecular", "dipole", "ellipsoid"
|
||||
or any hybrid combination of these styles.
|
||||
|
||||
FILE_OLD.data
|
||||
The second argument to raw2data.py is the name of a DATA file you want to read.
|
||||
raw2data.py will replace the coordinates in the "Atoms" section of this file,
|
||||
while preserving the rest of the data file.
|
||||
|
||||
COORDS.raw is a simple 3-column ASCII file containing the coordinates of the
|
||||
atoms in your system. It has a very simple format:
|
||||
-122.28 -19.2293 -7.93705
|
||||
-121.89 -19.2417 -8.85591
|
||||
-121.6 -19.2954 -7.20586
|
||||
-121.59 -20.3273 -2.0079
|
||||
-122.2 -19.8527 -2.64669
|
||||
-120.83 -19.7342 -2.2393
|
||||
: : :
|
||||
|
||||
The order of the atoms in this file should match the ATOM-ID number in the
|
||||
first column of the "Atoms" section of the FILE_OLD.data file.
|
||||
(...I THINK...
|
||||
To be on the safe side, use a DATA file with the atoms in sorted order.)
|
||||
|
||||
Exotic atom styles:
|
||||
When using hybrid atom styles, you must enclose the argument in quotes,
|
||||
for example: "hybrid sphere dipole"
|
||||
|
||||
Warning 1: I have not tested using raw2data.py with exotic (non-point-like)
|
||||
atom styles. (I suspect that the script will not crash, but dipole orientations
|
||||
and other internal degrees of freedom will not be updated.)
|
||||
|
||||
Warning 2: "raw2data.py" is not a stand-alone script. Make sure dump2data.py is located in the same directory with raw2data.py.
|
||||
|
||||
Note: I have not tested it, but I suspect many of the other arguments that work with "dump2data.py", such as "-scale", and "-xyz" also work with raw2data.py.
|
||||
|
||||
Try using pizza.py if you are simulating systems with exotic data types.
|
||||
http://pizza.sandia.gov/doc/Manual.html
|
|
@ -1,24 +0,0 @@
|
|||
These are examples for the "moltemplate" molecule builder for LAMMPS.
|
||||
http://www.moltemplate.org
|
||||
|
||||
Each directory contains one or more examples.
|
||||
|
||||
Each example directory contains:
|
||||
|
||||
images/ This folder has pictures of the molecules in the system
|
||||
moltemplate_files/ This folder contains LT files and other auxiliary files
|
||||
README_setup.sh Instructions for how to use moltemplate (executable)
|
||||
README_visualize.txt Instructions for viewing in DATA/DUMP files in VMD
|
||||
|
||||
...and one or more LAMMPS input scripts with names like
|
||||
|
||||
run.in.min
|
||||
run.in.npt
|
||||
run.in.nvt
|
||||
|
||||
You can run these scripts using
|
||||
lmp_linux -i run.in.npt
|
||||
(The name of your lammps binary, "lmp_linux" in this example, may vary.
|
||||
Sometimes, these scripts must be run in a certain order. For example
|
||||
it may be necessary to run run.in.min to minimize the system before you can use run.in.npt, and later run.in.nvt. The README_run.sh file in each subdirectory
|
||||
specifies indicates the order. These files have not been optimized.)
|
|
@ -1,54 +0,0 @@
|
|||
# -------- WARNING: --------
|
||||
|
||||
This directory contains some examples of all-atom simulations using the GAFF
|
||||
force field, prepared using moltemplate.
|
||||
|
||||
This software is experimental, and the force-fields and equilbration protocols
|
||||
have not been tested carefully by me. There is no gaurantee that simulations
|
||||
prepared using moltemplate will reproduce the behavior of AmberTools/AMBER.
|
||||
|
||||
# -------- REQUEST FOR HELP: --------
|
||||
|
||||
If you notice a problem with these examples, please report it.
|
||||
Peer-review is the only way to improve this software (or any software).
|
||||
Other suggestions are also welcome!
|
||||
|
||||
(Contact jewett.aij@gmail.com, 2013-12-01)
|
||||
|
||||
|
||||
--- Charge ---
|
||||
|
||||
Some force-fields (such as OPLSAA) can assign charge based on atom type.
|
||||
But AMBER simulations, charge is usually assigned using AmberTools which
|
||||
typically estimates partial charges using quantum chemistry.
|
||||
|
||||
You must assign partial charges to each atom or LAMMPS will crash
|
||||
when it discovers your system has no charged particles.
|
||||
(To disable this, change the pair_style to lj/cut or something similar.)
|
||||
|
||||
You have to assign charge manually, just as you would for an ordinary molecule.
|
||||
|
||||
(For example, charges are explicitly assigned to each atom in these files:
|
||||
waterTIP3P+isobutane/moltemplate_files/isobutane.lt
|
||||
hexadecane/moltemplate_files/ch2group.lt
|
||||
hexadecane/moltemplate_files/ch3group.lt)
|
||||
|
||||
(How you do this is up to you. In these examples, I obtained
|
||||
partial charges from the OPLSAA parameter file located here:
|
||||
http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm)
|
||||
|
||||
--- Improper angles ---
|
||||
|
||||
I am also uncertain whether the improper angle interactions generated by
|
||||
moltemplate are equivalent to those generated by AmberTools. (I think they are,
|
||||
but I am worried that I might have listed the atom types in the wrong order.)
|
||||
|
||||
--- Bloated lammps input scripts ---
|
||||
|
||||
LAMMPS input scripts prepared using moltemplate contain the entire contents
|
||||
of the GAFF force-field, even when simulating small systems with just a few
|
||||
atom types.
|
||||
|
||||
This is harmless, but if you want to get rid of this extra information,
|
||||
follow the README instructions in the "optional_cleanup" directories.
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
This example shows how to build a box of benzene molecules using the
|
||||
AMBER/GAFF force-field.
|
||||
|
||||
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
|
|
@ -1,8 +0,0 @@
|
|||
|
||||
# Note: By default, the system.data and system.in.settings files contain
|
||||
# extra information for atoms defined in AMGER/GAFF ("gaff.lt") 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, run this script:
|
||||
|
||||
cleanup_moltemplate.sh
|
|
@ -1,39 +0,0 @@
|
|||
# --- Running LAMMPS ---
|
||||
# -------- REQUIREMENTS: ---------
|
||||
# 1) This example requires building LAMMPS with the "USER-MISC" package.
|
||||
# (because it makes use of "gaff.lt" which uses dihedral_style fourier)
|
||||
# To do this, type "make yes-user-misc" before compiling LAMMPS.
|
||||
# http://lammps.sandia.gov/doc/Section_start.html#start_3
|
||||
# -------- PREREQUISITES: --------
|
||||
# The 2 files "run.in.npt", and "run.in.nvt" are LAMMPS
|
||||
# input scripts which link to the input scripts and data files
|
||||
# you hopefully have created earlier with moltemplate.sh:
|
||||
# system.in.init, system.in.settings, system.data
|
||||
# If not, carry out the instructions in "README_setup.sh".
|
||||
#
|
||||
# -- Instructions: --
|
||||
# If "lmp_mpi" is the name of the command you use to invoke lammps,
|
||||
# then you would run lammps on these files this way:
|
||||
|
||||
|
||||
lmp_mpi -i run.in.npt # minimization and simulation at constant pressure
|
||||
lmp_mpi -i run.in.nvt # minimization and simulation at constant volume
|
||||
|
||||
#(Note: The constant volume simulation lacks pressure equilibration. These are
|
||||
# completely separate simulations. The results of the constant pressure
|
||||
# simulation might be ignored when beginning the simulation at constant
|
||||
# volume. (This is because restart files in LAMMPS don't always work,
|
||||
# and I was spending a lot of time trying to convince people it was a
|
||||
# LAMMPS bug, instead of a moltemplate bug, so I disabled restart files.)
|
||||
# Read the "run.in.nvt" file to find out how to use the "read_restart"
|
||||
# command to load the results of the pressure-equilibration simulation,
|
||||
# before beginning a constant-volume run.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# If you have compiled the MPI version of lammps, you can run lammps in parallel
|
||||
#mpirun -np 4 lmp_mpi -i run.in.npt
|
||||
#mpirun -np 4 lmp_mpi -i run.in.nvt
|
||||
# (assuming you have 4 processors available)
|
|
@ -1,35 +0,0 @@
|
|||
|
||||
# Create LAMMPS input files this way:
|
||||
cd moltemplate_files
|
||||
|
||||
# run moltemplate
|
||||
|
||||
moltemplate.sh system.lt
|
||||
|
||||
# Optional:
|
||||
# To check for missing angle,dihedral params run moltemplate this way instead:
|
||||
# moltemplate.sh -checkff system.lt
|
||||
|
||||
|
||||
# Moltemplate generates various files with names ending in *.in* and *.data.
|
||||
# Move them to the directory where you plan to run LAMMPS (in this case "../")
|
||||
mv -f system.data system.in* ../
|
||||
|
||||
|
||||
# Optional:
|
||||
# The "./output_ttree/" directory is full of temporary files generated by
|
||||
# moltemplate. They can be useful for debugging, but are usually thrown away.
|
||||
#rm -rf output_ttree/
|
||||
|
||||
cd ../
|
||||
|
||||
|
||||
|
||||
|
||||
# Optional:
|
||||
# Note: The system.data and system.in.settings files contain extra information
|
||||
# for atoms defined in OPLSAA 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, run this script:
|
||||
#
|
||||
# cleanup_moltemplate.sh
|
|
@ -1,87 +0,0 @@
|
|||
|
||||
------- To view a lammps trajectory in VMD --------
|
||||
|
||||
|
||||
1) Build a PSF file for use in viewing with VMD.
|
||||
|
||||
This step works with VMD 1.9 and topotools 1.2.
|
||||
(Older versions, like VMD 1.8.6, don't support this.)
|
||||
|
||||
|
||||
a) Start VMD
|
||||
b) Menu Extensions->Tk Console
|
||||
c) Enter:
|
||||
|
||||
(I assume that the the DATA file is called "system.data")
|
||||
|
||||
topo readlammpsdata system.data full
|
||||
animate write psf system.psf
|
||||
|
||||
2)
|
||||
|
||||
Later, to Load a trajectory in VMD:
|
||||
|
||||
Start VMD
|
||||
Select menu: File->New Molecule
|
||||
-Browse to select the PSF file you created above, and load it.
|
||||
(Don't close the window yet.)
|
||||
-Browse to select the trajectory file.
|
||||
If necessary, for "file type" select: "LAMMPS Trajectory"
|
||||
Load it.
|
||||
|
||||
---- A note on trajectory format: -----
|
||||
If the trajectory is a DUMP file, then make sure the it contains the
|
||||
information you need for pbctools (see below. I've been using this
|
||||
command in my LAMMPS scripts to create the trajectories:
|
||||
|
||||
dump 1 all custom 5000 DUMP_FILE.lammpstrj id mol type x y z ix iy iz
|
||||
|
||||
It's a good idea to use an atom_style which supports molecule-ID numbers
|
||||
so that you can assign a molecule-ID number to each atom. (I think this
|
||||
is needed to wrap atom coordinates without breaking molecules in half.)
|
||||
|
||||
Of course, you don't have to save your trajectories in DUMP format,
|
||||
(other formats like DCD work fine) I just mention dump files
|
||||
because these are the files I'm familiar with.
|
||||
|
||||
3) ----- Wrap the coordinates to the unit cell
|
||||
(without cutting the molecules in half)
|
||||
|
||||
a) Start VMD
|
||||
b) Load the trajectory in VMD (see above)
|
||||
c) Menu Extensions->Tk Console
|
||||
d) Try entering these commands:
|
||||
|
||||
pbc wrap -compound res -all
|
||||
pbc box
|
||||
|
||||
----- Optional ----
|
||||
Sometimes the solvent or membrane obscures the view of the solute.
|
||||
It can help to shift the location of the periodic boundary box
|
||||
To shift the box in the y direction (for example) do this:
|
||||
|
||||
pbc wrap -compound res -all -shiftcenterrel {0.0 0.15 0.0}
|
||||
pbc box -shiftcenterrel {0.0 0.15 0.0}
|
||||
|
||||
Distances are measured in units of box-length fractions, not Angstroms.
|
||||
|
||||
Alternately if you have a solute whose atoms are all of type 1,
|
||||
then you can also try this to center the box around it:
|
||||
|
||||
pbc wrap -sel type=1 -all -centersel type=2 -center com
|
||||
|
||||
4)
|
||||
You should check if your periodic boundary conditions are too small.
|
||||
To do that:
|
||||
select Graphics->Representations menu option
|
||||
click on the "Periodic" tab, and
|
||||
click on the "+x", "-x", "+y", "-y", "+z", "-z" checkboxes.
|
||||
|
||||
5) Optional: If you like, change the atom types in the PSF file so
|
||||
that VMD recognizes the atom types, use something like:
|
||||
|
||||
sed -e 's/ 1 1 / C C /g' < system.psf > temp1.psf
|
||||
sed -e 's/ 2 2 / H H /g' < temp1.psf > temp2.psf
|
||||
sed -e 's/ 3 3 / P P /g' < temp2.psf > system.psf
|
||||
|
||||
(If you do this, it might effect step 2 above.)
|
|
@ -1,52 +0,0 @@
|
|||
|
||||
import "gaff.lt"
|
||||
|
||||
# The "gaff.lt" file is usually located in the "force_fields"
|
||||
# subdirectory distributed with moltemplate.
|
||||
# Excerpt:
|
||||
#
|
||||
# @atom:ca # Sp2 C in pure aromatic systems
|
||||
# @atom:ha # H bonded to aromatic carbon
|
||||
#
|
||||
# I looked up the charge of each atom using the OPLSAA parameters
|
||||
# from the "oplsaa.prm" file distributed with TINKER
|
||||
# http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
|
||||
# ---------------------------------------------------------------
|
||||
# This is NOT how AmberTools assigns charge, and it will NOT
|
||||
# reproduce the behavior of AMBER force-fields.
|
||||
|
||||
|
||||
Benzene inherits GAFF {
|
||||
|
||||
# atomID molID atomType charge X Y Z
|
||||
write('Data Atoms') {
|
||||
$atom:C1 $mol @atom:ca -0.115 -0.739 1.189 -0.00733
|
||||
$atom:C2 $mol @atom:ca -0.115 0.614 1.208 0.35167
|
||||
$atom:C3 $mol @atom:ca -0.115 1.353 0.019 0.35867
|
||||
$atom:C4 $mol @atom:ca -0.115 0.739 -1.189 0.00667
|
||||
$atom:C5 $mol @atom:ca -0.115 -0.614 -1.208 -0.35133
|
||||
$atom:C6 $mol @atom:ca -0.115 -1.353 -0.019 -0.35833
|
||||
$atom:H11 $mol @atom:ha 0.115 -1.309 2.106 -0.01233
|
||||
$atom:H21 $mol @atom:ha 0.115 1.088 2.14 0.62267
|
||||
$atom:H31 $mol @atom:ha 0.115 2.397 0.034 0.63467
|
||||
$atom:H41 $mol @atom:ha 0.115 1.309 -2.106 0.01267
|
||||
$atom:H51 $mol @atom:ha 0.115 -1.088 -2.14 -0.62233
|
||||
$atom:H61 $mol @atom:ha 0.115 -2.397 -0.034 -0.63533
|
||||
}
|
||||
|
||||
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
|
|
@ -1,14 +0,0 @@
|
|||
import "benzene.lt" # <- defines the "Benzene" molecule type.
|
||||
|
||||
|
||||
# Periodic boundary conditions:
|
||||
write_once("Data Boundary") {
|
||||
0.0 64.00 xlo xhi
|
||||
0.0 64.00 ylo yhi
|
||||
0.0 64.00 zlo zhi
|
||||
}
|
||||
|
||||
benzenes = new Benzene [8].move(8,0,0)
|
||||
[8].move(0,8,0)
|
||||
[8].move(0,0,8)
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
# PREREQUISITES:
|
||||
#
|
||||
# You must use moltemplate.sh to create 3 files:
|
||||
# system.data system.in.init system.in.settings
|
||||
# (Follow the instructions in README_setup.sh,
|
||||
# or run the file as a script using ./README_setup.sh)
|
||||
|
||||
# ------------------------------- Initialization Section --------------------
|
||||
|
||||
include "system.in.init"
|
||||
|
||||
# ------------------------------- Atom Definition Section -------------------
|
||||
|
||||
read_data "system.data"
|
||||
|
||||
# ------------------------------- Settings Section --------------------------
|
||||
|
||||
include "system.in.settings"
|
||||
|
||||
# ------------------------------- Run Section -------------------------------
|
||||
|
||||
|
||||
# -- minimization protocol --
|
||||
|
||||
minimize 1.0e-4 1.0e-6 100000 400000
|
||||
|
||||
# -- simulation protocol --
|
||||
|
||||
timestep 1.0
|
||||
|
||||
thermo 100
|
||||
dump 1 all custom 5000 traj_npt.lammpstrj id mol type x y z ix iy iz
|
||||
|
||||
print "---------------------------------------------------------------------------"
|
||||
print "First, use Langevin dynamics to randomize the initial shape of the molecules"
|
||||
print "---------------------------------------------------------------------------"
|
||||
|
||||
|
||||
fix 1 all momentum 100 linear 0 0 0
|
||||
fix fxlan all langevin 1000.0 1000.0 5000.0 123456 # temp: 1000 K
|
||||
fix fxnve all nve
|
||||
|
||||
run 20000
|
||||
unfix fxlan
|
||||
unfix fxnve
|
||||
|
||||
|
||||
|
||||
print "---------------------------------------------------------------------------"
|
||||
print "Optional: use short high pressure run to get rid of small bubbles."
|
||||
print " (In case there are any. I'm not certain there are."
|
||||
print " Later we will restore ordinary pressure.)"
|
||||
print "---------------------------------------------------------------------------"
|
||||
fix fxlan all langevin 298.0 298.0 5000 123456 # temp: 298 K
|
||||
fix fxnph all nph iso 500.0 500.0 1000.0 # pressure: 500 barr
|
||||
|
||||
run 80000
|
||||
unfix fxlan
|
||||
unfix fxnph
|
||||
|
||||
|
||||
|
||||
print "---------------------------------------------------------------------------"
|
||||
print "--- Now continue the simulation using a Nose-Hoover Thermostat/Barostat ---"
|
||||
print "---------------------------------------------------------------------------"
|
||||
# temperature: 298 K, pressure: 1 barr
|
||||
fix fxnpt all npt temp 298.0 298.0 100.0 iso 1.0 1.0 1000.0 drag 1.0
|
||||
#thermo_modify flush yes
|
||||
|
||||
run 5000000
|
||||
|
||||
write_data system_after_npt.data
|
|
@ -1,51 +0,0 @@
|
|||
# PREREQUISITES:
|
||||
#
|
||||
# 1) You must use moltemplate.sh to create 3 files:
|
||||
# system.data system.in.init system.in.settings
|
||||
# (Follow the instructions in README_setup.sh,
|
||||
# or run the file as a script using ./README_setup.sh)
|
||||
# 2) You must equilibrate the system beforehand using "run.in.npt".
|
||||
# This will create the file "system_after_npt.data" which this file reads.
|
||||
# (Note: I have not verified that this equilibration protocol works well.)
|
||||
|
||||
# ------------------------------- Initialization Section --------------------
|
||||
|
||||
include "system.in.init"
|
||||
|
||||
# ------------------------------- Atom Definition Section -------------------
|
||||
|
||||
# Read the coordinates generated by an earlier NPT simulation
|
||||
|
||||
read_data "system_after_npt.data"
|
||||
|
||||
# OPLSAA atom charges are stored in a separate file.
|
||||
# Load that file now:
|
||||
|
||||
include "system.in.charges"
|
||||
|
||||
# ------------------------------- Settings Section --------------------------
|
||||
|
||||
include "system.in.settings"
|
||||
|
||||
|
||||
# (The "write_restart" and "read_restart" commands were buggy in 2012,
|
||||
# but they should work also. I prefer "write_data" and "read_data".)
|
||||
|
||||
# ------------------------------- Settings Section --------------------------
|
||||
|
||||
include system.in.settings
|
||||
|
||||
# ------------------------------- Run Section -------------------------------
|
||||
|
||||
# -- simulation protocol --
|
||||
|
||||
|
||||
timestep 1.0
|
||||
dump 1 all custom 5000 traj_nvt.lammpstrj id mol type x y z ix iy iz
|
||||
fix fxnvt all nvt temp 300.0 300.0 500.0 tchain 1
|
||||
thermo 500
|
||||
#thermo_modify flush yes
|
||||
|
||||
run 200000
|
||||
|
||||
write_restart system_after_nvt.data
|
|
@ -1,13 +0,0 @@
|
|||
This example shows how to simulate a mixture of ethylene and benzene
|
||||
using the AMBER/GAFF force field.
|
||||
|
||||
As of 2016-11-21, 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
|
|
@ -1,8 +0,0 @@
|
|||
|
||||
# Note: By default, the system.data and system.in.settings files contain
|
||||
# extra information for atoms defined in AMGER/GAFF ("gaff.lt") 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, run this script:
|
||||
|
||||
cleanup_moltemplate.sh
|
|
@ -1,39 +0,0 @@
|
|||
# --- Running LAMMPS ---
|
||||
# -------- REQUIREMENTS: ---------
|
||||
# 1) This example requires building LAMMPS with the "USER-MISC" package.
|
||||
# (because it makes use of "gaff.lt" which uses dihedral_style fourier)
|
||||
# To do this, type "make yes-user-misc" before compiling LAMMPS.
|
||||
# http://lammps.sandia.gov/doc/Section_start.html#start_3
|
||||
# -------- PREREQUISITES: --------
|
||||
# The 2 files "run.in.npt", and "run.in.nvt" are LAMMPS
|
||||
# input scripts which link to the input scripts and data files
|
||||
# you hopefully have created earlier with moltemplate.sh:
|
||||
# system.in.init, system.in.settings, system.data
|
||||
# If not, carry out the instructions in "README_setup.sh".
|
||||
#
|
||||
# -- Instructions: --
|
||||
# If "lmp_mpi" is the name of the command you use to invoke lammps,
|
||||
# then you would run lammps on these files this way:
|
||||
|
||||
|
||||
lmp_mpi -i run.in.npt # minimization and simulation at constant pressure
|
||||
lmp_mpi -i run.in.nvt # minimization and simulation at constant volume
|
||||
|
||||
#(Note: The constant volume simulation lacks pressure equilibration. These are
|
||||
# completely separate simulations. The results of the constant pressure
|
||||
# simulation might be ignored when beginning the simulation at constant
|
||||
# volume. (This is because restart files in LAMMPS don't always work,
|
||||
# and I was spending a lot of time trying to convince people it was a
|
||||
# LAMMPS bug, instead of a moltemplate bug, so I disabled restart files.)
|
||||
# Read the "run.in.nvt" file to find out how to use the "read_restart"
|
||||
# command to load the results of the pressure-equilibration simulation,
|
||||
# before beginning a constant-volume run.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# If you have compiled the MPI version of lammps, you can run lammps in parallel
|
||||
#mpirun -np 4 lmp_mpi -i run.in.npt
|
||||
#mpirun -np 4 lmp_mpi -i run.in.nvt
|
||||
# (assuming you have 4 processors available)
|
|
@ -1,34 +0,0 @@
|
|||
# Create LAMMPS input files this way:
|
||||
cd moltemplate_files
|
||||
|
||||
# run moltemplate
|
||||
|
||||
moltemplate.sh system.lt
|
||||
|
||||
# Optional:
|
||||
# To check for missing angle,dihedral params run moltemplate this way instead:
|
||||
# moltemplate.sh -checkff system.lt
|
||||
|
||||
|
||||
# Moltemplate generates various files with names ending in *.in* and *.data.
|
||||
# Move them to the directory where you plan to run LAMMPS (in this case "../")
|
||||
mv -f system.data system.in* ../
|
||||
|
||||
|
||||
# Optional:
|
||||
# The "./output_ttree/" directory is full of temporary files generated by
|
||||
# moltemplate. They can be useful for debugging, but are usually thrown away.
|
||||
#rm -rf output_ttree/
|
||||
|
||||
cd ../
|
||||
|
||||
|
||||
|
||||
|
||||
# Optional:
|
||||
# Note: The system.data and system.in.settings files contain extra information
|
||||
# for atoms defined in OPLSAA 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, run this script:
|
||||
#
|
||||
# cleanup_moltemplate.sh
|
|
@ -1,87 +0,0 @@
|
|||
|
||||
------- To view a lammps trajectory in VMD --------
|
||||
|
||||
|
||||
1) Build a PSF file for use in viewing with VMD.
|
||||
|
||||
This step works with VMD 1.9 and topotools 1.2.
|
||||
(Older versions, like VMD 1.8.6, don't support this.)
|
||||
|
||||
|
||||
a) Start VMD
|
||||
b) Menu Extensions->Tk Console
|
||||
c) Enter:
|
||||
|
||||
(I assume that the the DATA file is called "system.data")
|
||||
|
||||
topo readlammpsdata system.data full
|
||||
animate write psf system.psf
|
||||
|
||||
2)
|
||||
|
||||
Later, to Load a trajectory in VMD:
|
||||
|
||||
Start VMD
|
||||
Select menu: File->New Molecule
|
||||
-Browse to select the PSF file you created above, and load it.
|
||||
(Don't close the window yet.)
|
||||
-Browse to select the trajectory file.
|
||||
If necessary, for "file type" select: "LAMMPS Trajectory"
|
||||
Load it.
|
||||
|
||||
---- A note on trajectory format: -----
|
||||
If the trajectory is a DUMP file, then make sure the it contains the
|
||||
information you need for pbctools (see below. I've been using this
|
||||
command in my LAMMPS scripts to create the trajectories:
|
||||
|
||||
dump 1 all custom 5000 DUMP_FILE.lammpstrj id mol type x y z ix iy iz
|
||||
|
||||
It's a good idea to use an atom_style which supports molecule-ID numbers
|
||||
so that you can assign a molecule-ID number to each atom. (I think this
|
||||
is needed to wrap atom coordinates without breaking molecules in half.)
|
||||
|
||||
Of course, you don't have to save your trajectories in DUMP format,
|
||||
(other formats like DCD work fine) I just mention dump files
|
||||
because these are the files I'm familiar with.
|
||||
|
||||
3) ----- Wrap the coordinates to the unit cell
|
||||
(without cutting the molecules in half)
|
||||
|
||||
a) Start VMD
|
||||
b) Load the trajectory in VMD (see above)
|
||||
c) Menu Extensions->Tk Console
|
||||
d) Try entering these commands:
|
||||
|
||||
pbc wrap -compound res -all
|
||||
pbc box
|
||||
|
||||
----- Optional ----
|
||||
Sometimes the solvent or membrane obscures the view of the solute.
|
||||
It can help to shift the location of the periodic boundary box
|
||||
To shift the box in the y direction (for example) do this:
|
||||
|
||||
pbc wrap -compound res -all -shiftcenterrel {-0.05 -0.05 -0.05}
|
||||
pbc box -shiftcenterrel {-0.05 -0.05 -0.05}
|
||||
|
||||
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.)
|
Before ![]() (image error) Size: 15 KiB |
Before ![]() (image error) Size: 36 KiB |
Before ![]() (image error) Size: 51 KiB |
Before ![]() (image error) Size: 11 KiB |
|
@ -1,49 +0,0 @@
|
|||
|
||||
import "gaff.lt"
|
||||
|
||||
# The "gaff.lt" file is usually located in "force_fields" subdirectory
|
||||
# of the moltemplate distribution.
|
||||
# It contains definitions of the atoms "ca", "ha", as well as the bonded
|
||||
# and non-bonded interactions between them (and many other atoms).
|
||||
#
|
||||
# Moltemplate is only a simple text manipulation tool. It cannot
|
||||
# calculate atomic charge using quantom chemistry methods.
|
||||
# Atom charges for this example were taken from the OPLSAA force field file:
|
||||
# http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
|
||||
# However, normally simulations in AMBER are assigned charges using the
|
||||
# "HF/6-31G* RESP2" or "AM1-BCC3" methods using AmberTools.
|
||||
|
||||
Benzene inherits GAFF {
|
||||
|
||||
# atomID molID atomType charge X Y Z
|
||||
write('Data Atoms') {
|
||||
$atom:C1 $mol @atom:ca -0.115 -0.739 1.189 -0.00733
|
||||
$atom:C2 $mol @atom:ca -0.115 0.614 1.208 0.35167
|
||||
$atom:C3 $mol @atom:ca -0.115 1.353 0.019 0.35867
|
||||
$atom:C4 $mol @atom:ca -0.115 0.739 -1.189 0.00667
|
||||
$atom:C5 $mol @atom:ca -0.115 -0.614 -1.208 -0.35133
|
||||
$atom:C6 $mol @atom:ca -0.115 -1.353 -0.019 -0.35833
|
||||
$atom:H11 $mol @atom:ha 0.115 -1.309 2.106 -0.01233
|
||||
$atom:H21 $mol @atom:ha 0.115 1.088 2.14 0.62267
|
||||
$atom:H31 $mol @atom:ha 0.115 2.397 0.034 0.63467
|
||||
$atom:H41 $mol @atom:ha 0.115 1.309 -2.106 0.01267
|
||||
$atom:H51 $mol @atom:ha 0.115 -1.088 -2.14 -0.62233
|
||||
$atom:H61 $mol @atom:ha 0.115 -2.397 -0.034 -0.63533
|
||||
}
|
||||
|
||||
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
|
|
@ -1,94 +0,0 @@
|
|||
# This is a modified version of the file "oplsaa.prm" distributed with TINKER
|
||||
# http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
|
||||
# In this version, all of the lines beginning with "atom" have been deleted
|
||||
# except for the atom types we will be using in this simulation
|
||||
#
|
||||
# If you use this file, please also cite the software this file comes from:
|
||||
#
|
||||
# Ponder, J. W., and Richards, F. M. J. Comput. Chem. (1987) 8(7), 1016-1024
|
||||
# "An efficient newton‐like method for molecular mechanics energy
|
||||
# minimization of large molecules."
|
||||
#
|
||||
# Ponder, J. W, (2004)
|
||||
# "TINKER: Software tools for molecular design"
|
||||
# http://dasher.wustl.edu/tinker/
|
||||
|
||||
##############################
|
||||
## ##
|
||||
## Force Field Definition ##
|
||||
## ##
|
||||
##############################
|
||||
|
||||
|
||||
forcefield OPLS-AA
|
||||
|
||||
vdwindex TYPE
|
||||
vdwtype LENNARD-JONES
|
||||
radiusrule GEOMETRIC
|
||||
radiustype SIGMA
|
||||
radiussize DIAMETER
|
||||
epsilonrule GEOMETRIC
|
||||
vdw-14-scale 2.0
|
||||
chg-14-scale 2.0
|
||||
electric 332.06
|
||||
dielectric 1.0
|
||||
|
||||
|
||||
#############################
|
||||
## ##
|
||||
## Literature References ##
|
||||
## ##
|
||||
#############################
|
||||
|
||||
|
||||
The parameters supplied with TINKER are from "OPLS All-Atom Parameters
|
||||
for Organic Molecules, Ions, Peptides & Nucleic Acids, July 2008" as
|
||||
provided by W. L. Jorgensen, Yale University during June 2009. These
|
||||
parameters are taken from those distributed with BOSS Version 4.8.
|
||||
|
||||
Note that "atom type" numbers and not "atom class" numbers are used
|
||||
to index van der Waals parameters, see the "vdwindex" keyword above
|
||||
|
||||
The atom types with (UA) in the description are "united atom" values,
|
||||
ie, OPLS-UA, where any nonpolar hydrogen atoms are combined onto their
|
||||
attached atoms. All other parameters are "all-atom", OPLS-AA, including
|
||||
explicit hydrogen atoms.
|
||||
|
||||
|
||||
#############################
|
||||
## ##
|
||||
## Atom Type Definitions ##
|
||||
## ##
|
||||
#############################
|
||||
|
||||
|
||||
atom 88 47 CM "Alkene H2-C=" 6 12.011 3
|
||||
atom 89 46 HC "Alkene H-C=" 1 1.008 1
|
||||
atom 90 48 CA "Aromatic C" 6 12.011 3
|
||||
atom 91 49 HA "Aromatic H-C" 1 1.008 1
|
||||
|
||||
|
||||
################################
|
||||
## ##
|
||||
## Van der Waals Parameters ##
|
||||
## ##
|
||||
################################
|
||||
|
||||
|
||||
vdw 88 3.5500 0.0760
|
||||
vdw 89 2.4200 0.0300
|
||||
vdw 90 3.5500 0.0700
|
||||
vdw 91 2.4200 0.0300
|
||||
|
||||
|
||||
########################################
|
||||
## ##
|
||||
## Atomic Partial Charge Parameters ##
|
||||
## ##
|
||||
########################################
|
||||
|
||||
|
||||
charge 88 -0.2300
|
||||
charge 89 0.1150
|
||||
charge 90 -0.1150
|
||||
charge 91 0.1150
|
|
@ -1,39 +0,0 @@
|
|||
|
||||
import "gaff.lt"
|
||||
|
||||
# The "gaff.lt" file is usually located in "force_fields" subdirectory
|
||||
# of the moltemplate distribution.
|
||||
# It contains definitions of the atoms "c2", "hc", as well as the bonded
|
||||
# and non-bonded interactions between them (and many other atoms).
|
||||
#
|
||||
# Moltemplate is only a simple text manipulation tool. It cannot
|
||||
# calculate atomic charge using quantom chemistry methods.
|
||||
# Atom charges for this example were taken from the OPLSAA force field file:
|
||||
# http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
|
||||
# However, normally simulations in AMBER are assigned charges using the
|
||||
# "HF/6-31G* RESP2" or "AM1-BCC3" methods using AmberTools.
|
||||
|
||||
|
||||
Ethylene inherits GAFF {
|
||||
|
||||
# atom-id mol-id atom-type charge X Y Z
|
||||
|
||||
write('Data Atoms') {
|
||||
$atom:C1 $mol @atom:c2 -0.23 -0.6695 0.000000 0.000000
|
||||
$atom:C2 $mol @atom:c2 -0.23 0.6695 0.000000 0.000000
|
||||
$atom:H11 $mol @atom:hc 0.115 -1.234217 -0.854458 0.000000
|
||||
$atom:H12 $mol @atom:hc 0.115 -1.234217 0.854458 0.000000
|
||||
$atom:H21 $mol @atom:hc 0.115 1.234217 -0.854458 0.000000
|
||||
$atom:H22 $mol @atom:hc 0.115 1.234217 0.854458 0.000000
|
||||
}
|
||||
|
||||
write('Data Bond List') {
|
||||
$bond:C12 $atom:C1 $atom:C2
|
||||
$bond:C1H1 $atom:C1 $atom:H11
|
||||
$bond:C1H2 $atom:C1 $atom:H12
|
||||
$bond:C2H1 $atom:C2 $atom:H21
|
||||
$bond:C2H2 $atom:C2 $atom:H22
|
||||
}
|
||||
|
||||
} # Ethylene
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
import "ethylene.lt" # <- defines the "Ethylene" molecule type.
|
||||
import "benzene.lt" # <- defines the "Benzene" molecule type.
|
||||
|
||||
|
||||
# Periodic boundary conditions:
|
||||
write_once("Data Boundary") {
|
||||
0.0 48.00 xlo xhi
|
||||
0.0 48.00 ylo yhi
|
||||
0.0 48.00 zlo zhi
|
||||
}
|
||||
|
||||
# Create 216 ethylenes and 108 benzenes
|
||||
|
||||
ethylenes = new Ethylene[6].move(8.0, 0, 0)
|
||||
[6].move(0, 8.0, 0)
|
||||
[6].move(0, 0, 8.0)
|
||||
|
||||
benzenes = new Benzene[6].move(8.0, 0, 0)
|
||||
[6].move(0, 8.0, 0)
|
||||
[3].move(0, 0, 16.0)
|
||||
|
||||
# Now shift the positions of all of the benzene molecules,
|
||||
# to reduce the chance that they overlap with the ethylene molecules.
|
||||
|
||||
benzenes[*][*][*].move(4.0, 4.0, 4.0)
|
||||
|
||||
# Note: There is also an example which shows how to generate the coordinates
|
||||
# using PACKMOL. (That allows us to omit the coordinates and .move() commands.)
|
|
@ -1,53 +0,0 @@
|
|||
# PREREQUISITES:
|
||||
#
|
||||
# You must use moltemplate.sh to create 3 files:
|
||||
# system.data system.in.init system.in.settings
|
||||
# (Follow the instructions in README_setup.sh,
|
||||
# or run the file as a script using ./README_setup.sh)
|
||||
|
||||
# ------------------------------- Initialization Section --------------------
|
||||
|
||||
include "system.in.init"
|
||||
|
||||
# ------------------------------- Atom Definition Section -------------------
|
||||
|
||||
read_data "system.data"
|
||||
|
||||
# ------------------------------- Settings Section --------------------------
|
||||
|
||||
include "system.in.settings"
|
||||
|
||||
# ------------------------------- Run Section -------------------------------
|
||||
|
||||
|
||||
# -- minimization protocol --
|
||||
|
||||
minimize 1.0e-4 1.0e-6 100000 400000
|
||||
|
||||
# -- simulation protocol --
|
||||
|
||||
timestep 1.0
|
||||
|
||||
print "---------------------------------------------------------------------------"
|
||||
print "First, use Langevin dynamics to randomize the initial shape of the molecules"
|
||||
print "(This is not really necessary, but it seems to speed up equilibration.)"
|
||||
print "---------------------------------------------------------------------------"
|
||||
|
||||
fix fxlan all langevin 300.0 300.0 120 123456 # temp: 300 K
|
||||
fix fxnph all nph iso 50.0 50.0 1000.0 # pressure: 50 barr
|
||||
run 2000
|
||||
unfix fxlan
|
||||
unfix fxnph
|
||||
|
||||
print "---------------------------------------------------------------------------"
|
||||
print "--- Now continue the simulation using a Nose-Hoover Thermostat/Barostat ---"
|
||||
print "---------------------------------------------------------------------------"
|
||||
dump 1 all custom 1000 traj_npt.lammpstrj id mol type x y z ix iy iz
|
||||
# temperature: 300 K, pressure: 50 barr
|
||||
fix fxnpt all npt temp 300.0 300.0 100.0 iso 50.0 50.0 1000.0 drag 1.0
|
||||
thermo 100
|
||||
#thermo_modify flush yes
|
||||
|
||||
run 100000
|
||||
|
||||
write_data system_after_npt.data
|
|
@ -1,46 +0,0 @@
|
|||
# PREREQUISITES:
|
||||
#
|
||||
# 1) You must use moltemplate.sh to create 3 files:
|
||||
# system.data system.in.init system.in.settings
|
||||
# (Follow the instructions in README_setup.sh,
|
||||
# or run the file as a script using ./README_setup.sh)
|
||||
# 2) You must equilibrate the system beforehand using "run.in.npt".
|
||||
# This will create the file "system_after_npt.data" which this file reads.
|
||||
# (Note: I have not verified that this equilibration protocol works well.)
|
||||
|
||||
# ------------------------------- Initialization Section --------------------
|
||||
|
||||
include "system.in.init"
|
||||
|
||||
# ------------------------------- Atom Definition Section -------------------
|
||||
|
||||
# Read the coordinates generated by an earlier NPT simulation
|
||||
|
||||
read_data "system_after_npt.data"
|
||||
|
||||
# ------------------------------- Settings Section --------------------------
|
||||
|
||||
include "system.in.settings"
|
||||
|
||||
|
||||
# (The "write_restart" and "read_restart" commands were buggy in 2012,
|
||||
# but they should work also. I prefer "write_data" and "read_data".)
|
||||
|
||||
# ------------------------------- Settings Section --------------------------
|
||||
|
||||
include system.in.settings
|
||||
|
||||
# ------------------------------- Run Section -------------------------------
|
||||
|
||||
# -- simulation protocol --
|
||||
|
||||
|
||||
timestep 2.0
|
||||
dump 1 all custom 5000 traj_nvt.lammpstrj id mol type x y z ix iy iz
|
||||
fix fxnvt all nvt temp 300.0 300.0 500.0 tchain 1
|
||||
thermo 500
|
||||
#thermo_modify flush yes
|
||||
|
||||
run 200000
|
||||
|
||||
write_data system_after_nvt.data
|
|
@ -1,44 +0,0 @@
|
|||
This example is a simple simulation of 288 hexadecane molecules in a box at
|
||||
room temperature and atmospheric pressure. Please read the WARNING.TXT file.
|
||||
|
||||
-------- REQUIREMENTS: ---------
|
||||
This example requires building LAMMPS with the "USER-MISC" package.
|
||||
(because it uses dihedral_style fourier)
|
||||
To do this, type "make yes-user-misc" before compiling LAMMPS.
|
||||
http://lammps.sandia.gov/doc/Section_start.html#start_3
|
||||
|
||||
More detailed instructions on how to build LAMMPS input files and
|
||||
run a short simulation are provided in other README files:
|
||||
|
||||
step 1) to setup the LAMMPS input files, run this file:
|
||||
README_setup.sh
|
||||
|
||||
(Currently there is a bug which makes this step slow.
|
||||
I'll fix it later -Andrew 2013-10-15.)
|
||||
|
||||
step 2) to run LAMMPS, follow the instructions in this file:
|
||||
README_run.sh
|
||||
|
||||
------------ NOTE: There are two versions of this example. ----------------
|
||||
|
||||
Both examples use the same force-field parameters.
|
||||
|
||||
1)
|
||||
In this version, the force-field parameters are loaded from the "gaff.lt" file
|
||||
(located in the "force_fields" subdirectory of the moltemplate distribution).
|
||||
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.)
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
|
||||
# Note: By default, the system.data and system.in.settings files contain
|
||||
# extra information for atoms defined in AMGER/GAFF ("gaff.lt") 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, run this script:
|
||||
|
||||
cleanup_moltemplate.sh
|
|
@ -1,39 +0,0 @@
|
|||
# --- Running LAMMPS ---
|
||||
# -------- REQUIREMENTS: ---------
|
||||
# 1) This example requires building LAMMPS with the "USER-MISC" package.
|
||||
# (because it makes use of "gaff.lt" which uses dihedral_style fourier)
|
||||
# To do this, type "make yes-user-misc" before compiling LAMMPS.
|
||||
# http://lammps.sandia.gov/doc/Section_start.html#start_3
|
||||
# -------- PREREQUISITES: --------
|
||||
# The 2 files "run.in.npt", and "run.in.nvt" are LAMMPS
|
||||
# input scripts which link to the input scripts and data files
|
||||
# you hopefully have created earlier with moltemplate.sh:
|
||||
# system.in.init, system.in.settings, system.data
|
||||
# If not, carry out the instructions in "README_setup.sh".
|
||||
#
|
||||
# -- Instructions: --
|
||||
# If "lmp_mpi" is the name of the command you use to invoke lammps,
|
||||
# then you would run lammps on these files this way:
|
||||
|
||||
|
||||
lmp_mpi -i run.in.npt # minimization and simulation at constant pressure
|
||||
lmp_mpi -i run.in.nvt # minimization and simulation at constant volume
|
||||
|
||||
#(Note: The constant volume simulation lacks pressure equilibration. These are
|
||||
# completely separate simulations. The results of the constant pressure
|
||||
# simulation might be ignored when beginning the simulation at constant
|
||||
# volume. (This is because restart files in LAMMPS don't always work,
|
||||
# and I was spending a lot of time trying to convince people it was a
|
||||
# LAMMPS bug, instead of a moltemplate bug, so I disabled restart files.)
|
||||
# Read the "run.in.nvt" file to find out how to use the "read_restart"
|
||||
# command to load the results of the pressure-equilibration simulation,
|
||||
# before beginning a constant-volume run.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# If you have compiled the MPI version of lammps, you can run lammps in parallel
|
||||
#mpirun -np 4 lmp_mpi -i run.in.npt
|
||||
#mpirun -np 4 lmp_mpi -i run.in.nvt
|
||||
# (assuming you have 4 processors available)
|
|
@ -1,35 +0,0 @@
|
|||
|
||||
# Create LAMMPS input files this way:
|
||||
cd moltemplate_files
|
||||
|
||||
# run moltemplate
|
||||
|
||||
moltemplate.sh system.lt
|
||||
|
||||
# Optional:
|
||||
# To check for missing angle,dihedral params run moltemplate this way instead:
|
||||
# moltemplate.sh -checkff system.lt
|
||||
|
||||
|
||||
# Moltemplate generates various files with names ending in *.in* and *.data.
|
||||
# Move them to the directory where you plan to run LAMMPS (in this case "../")
|
||||
mv -f system.data system.in* ../
|
||||
|
||||
|
||||
# Optional:
|
||||
# The "./output_ttree/" directory is full of temporary files generated by
|
||||
# moltemplate. They can be useful for debugging, but are usually thrown away.
|
||||
#rm -rf output_ttree/
|
||||
|
||||
cd ../
|
||||
|
||||
|
||||
|
||||
|
||||
# Optional:
|
||||
# Note: The system.data and system.in.settings files contain extra information
|
||||
# for atoms defined in OPLSAA 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, run this script:
|
||||
#
|
||||
# cleanup_moltemplate.sh
|
|
@ -1,87 +0,0 @@
|
|||
|
||||
------- To view a lammps trajectory in VMD --------
|
||||
|
||||
|
||||
1) Build a PSF file for use in viewing with VMD.
|
||||
|
||||
This step works with VMD 1.9 and topotools 1.2.
|
||||
(Older versions, like VMD 1.8.6, don't support this.)
|
||||
|
||||
|
||||
a) Start VMD
|
||||
b) Menu Extensions->Tk Console
|
||||
c) Enter:
|
||||
|
||||
(I assume that the the DATA file is called "system.data")
|
||||
|
||||
topo readlammpsdata system.data full
|
||||
animate write psf system.psf
|
||||
|
||||
2)
|
||||
|
||||
Later, to Load a trajectory in VMD:
|
||||
|
||||
Start VMD
|
||||
Select menu: File->New Molecule
|
||||
-Browse to select the PSF file you created above, and load it.
|
||||
(Don't close the window yet.)
|
||||
-Browse to select the trajectory file.
|
||||
If necessary, for "file type" select: "LAMMPS Trajectory"
|
||||
Load it.
|
||||
|
||||
---- A note on trajectory format: -----
|
||||
If the trajectory is a DUMP file, then make sure the it contains the
|
||||
information you need for pbctools (see below. I've been using this
|
||||
command in my LAMMPS scripts to create the trajectories:
|
||||
|
||||
dump 1 all custom 5000 DUMP_FILE.lammpstrj id mol type x y z ix iy iz
|
||||
|
||||
It's a good idea to use an atom_style which supports molecule-ID numbers
|
||||
so that you can assign a molecule-ID number to each atom. (I think this
|
||||
is needed to wrap atom coordinates without breaking molecules in half.)
|
||||
|
||||
Of course, you don't have to save your trajectories in DUMP format,
|
||||
(other formats like DCD work fine) I just mention dump files
|
||||
because these are the files I'm familiar with.
|
||||
|
||||
3) ----- Wrap the coordinates to the unit cell
|
||||
(without cutting the molecules in half)
|
||||
|
||||
a) Start VMD
|
||||
b) Load the trajectory in VMD (see above)
|
||||
c) Menu Extensions->Tk Console
|
||||
d) Try entering these commands:
|
||||
|
||||
pbc wrap -compound res -all
|
||||
pbc box
|
||||
|
||||
----- Optional ----
|
||||
Sometimes the solvent or membrane obscures the view of the solute.
|
||||
It can help to shift the location of the periodic boundary box
|
||||
To shift the box in the y direction (for example) do this:
|
||||
|
||||
pbc wrap -compound res -all -shiftcenterrel {0.0 0.15 0.0}
|
||||
pbc box -shiftcenterrel {0.0 0.15 0.0}
|
||||
|
||||
Distances are measured in units of box-length fractions, not Angstroms.
|
||||
|
||||
Alternately if you have a solute whose atoms are all of type 1,
|
||||
then you can also try this to center the box around it:
|
||||
|
||||
pbc wrap -sel type=1 -all -centersel type=2 -center com
|
||||
|
||||
4)
|
||||
You should check if your periodic boundary conditions are too small.
|
||||
To do that:
|
||||
select Graphics->Representations menu option
|
||||
click on the "Periodic" tab, and
|
||||
click on the "+x", "-x", "+y", "-y", "+z", "-z" checkboxes.
|
||||
|
||||
5) Optional: If you like, change the atom types in the PSF file so
|
||||
that VMD recognizes the atom types, use something like:
|
||||
|
||||
sed -e 's/ 1 1 / C C /g' < system.psf > temp1.psf
|
||||
sed -e 's/ 2 2 / H H /g' < temp1.psf > temp2.psf
|
||||
sed -e 's/ 3 3 / P P /g' < temp2.psf > system.psf
|
||||
|
||||
(If you do this, it might effect step 2 above.)
|
|
@ -1,16 +0,0 @@
|
|||
# -------- WARNING: --------
|
||||
|
||||
This software is experimental, and the force-fields and equilbration protocols
|
||||
have not been tested carefully by me. There is no gaurantee that the simulation
|
||||
will reproduce the behavior of real hexadecane molecules,
|
||||
(or even of hexadecane molecules simulated using AMBER, which should
|
||||
be using the same force-field).
|
||||
|
||||
# -------- REQUEST FOR HELP: --------
|
||||
|
||||
However, if you notice a problem with this example, please report it.
|
||||
I confess I do not have a lot of experience running all-atom simulations.
|
||||
Peer-review is the only way to improve this software (or any software).
|
||||
Other suggestions are also welcome!
|
||||
|
||||
(Contact jewett.aij@gmail.com, 2013-10-16)
|
Before ![]() (image error) Size: 26 KiB |
Before ![]() (image error) Size: 35 KiB |
Before ![]() (image error) Size: 5.1 KiB |
|
@ -1,59 +0,0 @@
|
|||
|
||||
import "gaff.lt" # <-- defines the "GAFF" force field
|
||||
|
||||
|
||||
# The "gaff.lt" file is usually located in $MOLTEMPLATE_PATH (and is
|
||||
# distributed with moltemplate. See the "Installation" section in the manual.)
|
||||
# It contains definitions of the atoms "c3", "hc", as well as the force-field
|
||||
# parameters for bonded and non-bonded interactions between them
|
||||
# (and many other atoms).
|
||||
|
||||
# Atom charges were taken from the OPLSAA force field file:
|
||||
# http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
|
||||
|
||||
|
||||
CH2 inherits GAFF {
|
||||
|
||||
# atom-id mol-id atom-type charge x y z
|
||||
|
||||
write("Data Atoms") {
|
||||
$atom:C $mol:... @atom:c3 -0.120 0.000 0.000 0.000
|
||||
$atom:H1 $mol:... @atom:hc 0.060 0.000 0.63104384422426 0.892430762954
|
||||
$atom:H2 $mol:... @atom:hc 0.060 0.000 0.63104384422426 -0.892430762954
|
||||
}
|
||||
|
||||
# Note: The "..." in "$mol:..." tells moltemplate that this molecule may
|
||||
# be a part of a larger molecule, and (if so) to use the larger
|
||||
# parent object's molecule id number as it's own.
|
||||
# The CH2 group is part of the Hexadecane molecule.
|
||||
|
||||
# Now specify which pairs of atoms are bonded:
|
||||
write('Data Bond List') {
|
||||
$bond:CH1 $atom:C $atom:H1
|
||||
$bond:CH2 $atom:C $atom:H2
|
||||
}
|
||||
|
||||
} # CH2
|
||||
|
||||
|
||||
# Optional: Shift all the coordinates in the +Y direction by 0.4431163.
|
||||
# This way, the carbon atom is no longer located at 0,0,0, but the
|
||||
# axis of an alkane chain containing this monomer is at 0,0,0.
|
||||
# (This makes it more convenient to construct a polymer later.
|
||||
# If this is confusing, then simply add 0.4431163 to the Y
|
||||
# coordinates in the "Data Atoms" section above.)
|
||||
|
||||
CH2.move(0,0.4431163,0)
|
||||
|
||||
|
||||
|
||||
|
||||
######### (scratchwork calculations for the atomic coordinates) #########
|
||||
# Lcc = 1.5350 # length of the C-C bond (Sp3)
|
||||
# Lch = 1.0930 # length of the C-H bond
|
||||
# theta=2*atan(sqrt(2)) # ~= 109.5 degrees = tetrahedronal angle (C-C-C angle)
|
||||
# DeltaXc = Lcc*sin(theta/2) # = 1.2533222517240594
|
||||
# DeltaYc = Lcc*cos(theta/2) # = 0.8862326632060754
|
||||
# # 0.5*DeltaYc = 0.4431163316030377
|
||||
# DeltaZh = Lch*sin(theta/2) # = 0.8924307629540046
|
||||
# DeltaYh = Lch*cos(theta/2) # = 0.6310438442242609
|
|
@ -1,65 +0,0 @@
|
|||
import "gaff.lt" # <-- defines the "GAFF" force field
|
||||
|
||||
|
||||
# The "gaff.lt" file is usually located in $MOLTEMPLATE_PATH (and is
|
||||
# distributed with moltemplate. See the "Installation" section in the manual.)
|
||||
# It contains definitions of the atoms "c3", "hc", as well as the force-field
|
||||
# parameters for bonded and non-bonded interactions between them
|
||||
# (and many other atoms).
|
||||
#
|
||||
# Moltemplate is only a simple text manipulation tool. It cannot
|
||||
# calculate atomic charge using quantom chemistry methods.
|
||||
# Atom charges for this example were taken from the OPLSAA force field file:
|
||||
# http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
|
||||
# However, normally simulations in AMBER are assigned charges using the
|
||||
# "HF/6-31G* RESP2" or "AM1-BCC3" methods using AmberTools.
|
||||
|
||||
|
||||
CH3 inherits GAFF {
|
||||
|
||||
# atom-id mol-id atom-type charge x y z
|
||||
|
||||
write("Data Atoms") {
|
||||
$atom:C $mol:... @atom:c3 -0.180 0.000000 0.000000 0.000000
|
||||
$atom:H1 $mol:... @atom:hc 0.060 0.000000 0.6310438442242609 0.8924307629540046
|
||||
$atom:H2 $mol:... @atom:hc 0.060 0.000000 0.6310438442242609 -0.8924307629540046
|
||||
$atom:H3 $mol:... @atom:hc 0.060 -0.8924307629540046 -0.6310438442242609 0.000000
|
||||
}
|
||||
|
||||
# Note: The "..." in "$mol:..." tells moltemplate that this molecule may
|
||||
# be a part of a larger molecule, and (if so) to use the larger
|
||||
# parent object's molecule id number as it's own.
|
||||
# The CH3 group is part of the Hexadecane molecule.
|
||||
|
||||
# Now specify which pairs of atoms are bonded:
|
||||
write('Data Bond List') {
|
||||
$bond:CH1 $atom:C $atom:H1
|
||||
$bond:CH2 $atom:C $atom:H2
|
||||
$bond:CH3 $atom:C $atom:H3
|
||||
}
|
||||
|
||||
} # CH3
|
||||
|
||||
|
||||
# Optional: Shift all the coordinates in the +Y direction by 0.4431163.
|
||||
# This way, the carbon atom is no longer located at 0,0,0, but the
|
||||
# axis of an alkane chain containing this monomer is at 0,0,0.
|
||||
# (This makes it more convenient to construct a polymer later.
|
||||
# If this is confusing, then simply add 0.4431163 to the Y
|
||||
# coordinates in the "Data Atoms" section above.)
|
||||
|
||||
CH3.move(0,0.4431163,0)
|
||||
|
||||
|
||||
|
||||
|
||||
######### (scratchwork calculations for the atomic coordinates) #########
|
||||
# Lcc = 1.5350 # length of the C-C bond (Sp3)
|
||||
# Lch = 1.0930 # length of the C-H bond
|
||||
# theta=2*atan(sqrt(2)) # ~= 109.5 degrees = tetrahedronal angle (C-C-C angle)
|
||||
# DeltaXc = Lcc*sin(theta/2) # = 1.2533222517240594
|
||||
# DeltaYc = Lcc*cos(theta/2) # = 0.8862326632060754
|
||||
# # 0.5*DeltaYc = 0.4431163316030377
|
||||
# DeltaZh = Lch*sin(theta/2) # = 0.8924307629540046
|
||||
# DeltaYh = Lch*cos(theta/2) # = 0.6310438442242609
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
# This example looks complicated because I split the
|
||||
# hexadecane molecule into individual CH2 and CH3 monomers.
|
||||
#
|
||||
# I defined it this way so that you can easily modify
|
||||
# it to change the length of the alkane chain.
|
||||
|
||||
|
||||
import "gaff.lt" # load the "GAFF" force-field information
|
||||
import "ch2group.lt" # load the definition of the "CH2" object
|
||||
import "ch3group.lt" # load the definition of the "CH3" object
|
||||
|
||||
|
||||
|
||||
Hexadecane inherits GAFF {
|
||||
|
||||
|
||||
create_var {$mol} # optional:force all monomers to share the same molecule-ID
|
||||
|
||||
|
||||
# Now create an array of 16 "CH2" objects distributed along the X axis
|
||||
|
||||
monomers = new CH2 [16].rot(180,1,0,0).move(1.2533223,0,0)
|
||||
|
||||
# Each monomer is rotated 180 degrees with respect to the previous
|
||||
# monomer, and then moved 1.2533223 Angstroms down the X axis.
|
||||
|
||||
# ---- Now, modify the ends: ---
|
||||
# Delete the CH2 groups at the beginning and end, and replace them with CH3.
|
||||
# (Note: Alternately, instead of deleting the CH2 groups at each end, you
|
||||
# could modify them by adding an extra hydrogen atom to those carbons.)
|
||||
|
||||
delete monomers[0]
|
||||
delete monomers[15]
|
||||
monomers[0] = new CH3
|
||||
monomers[15] = new CH3
|
||||
|
||||
# Move the CH3 groups to the correct location at either end of the chain:
|
||||
|
||||
monomers[15].rot(180.0,0,0,1).move(18.7998345,0,0)
|
||||
|
||||
# Note: 18.7998345 = (16-1) * 1.2533223
|
||||
|
||||
|
||||
# Now add a list of bonds connecting the carbon atoms together:
|
||||
|
||||
write('Data Bond List') {
|
||||
$bond:b1 $atom:monomers[0]/C $atom:monomers[1]/C
|
||||
$bond:b2 $atom:monomers[1]/C $atom:monomers[2]/C
|
||||
$bond:b3 $atom:monomers[2]/C $atom:monomers[3]/C
|
||||
$bond:b4 $atom:monomers[3]/C $atom:monomers[4]/C
|
||||
$bond:b5 $atom:monomers[4]/C $atom:monomers[5]/C
|
||||
$bond:b6 $atom:monomers[5]/C $atom:monomers[6]/C
|
||||
$bond:b7 $atom:monomers[6]/C $atom:monomers[7]/C
|
||||
$bond:b8 $atom:monomers[7]/C $atom:monomers[8]/C
|
||||
$bond:b9 $atom:monomers[8]/C $atom:monomers[9]/C
|
||||
$bond:b10 $atom:monomers[9]/C $atom:monomers[10]/C
|
||||
$bond:b11 $atom:monomers[10]/C $atom:monomers[11]/C
|
||||
$bond:b12 $atom:monomers[11]/C $atom:monomers[12]/C
|
||||
$bond:b13 $atom:monomers[12]/C $atom:monomers[13]/C
|
||||
$bond:b14 $atom:monomers[13]/C $atom:monomers[14]/C
|
||||
$bond:b15 $atom:monomers[14]/C $atom:monomers[15]/C
|
||||
}
|
||||
|
||||
} # Hexadecane
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
######### (scratchwork calculations for the atomic coordinates) #########
|
||||
#
|
||||
# 1.2533223 = DeltaXc = how far each CH2 group is shifted along
|
||||
# the X axis (in Angstoms).
|
||||
# 0.4431163 = DeltaYc/2 = lateral displacement of carbons away
|
||||
# from the central axis. (See below.)
|
||||
#
|
||||
# Lcc = 1.5350 # length of the C-C bond (Sp3)
|
||||
# Lch = 1.0930 # length of the C-H bond
|
||||
# theta=2*atan(sqrt(2)) # ~= 109.5 degrees = tetrahedronal angle (C-C-C angle)
|
||||
# DeltaXc = Lcc*sin(theta/2) # = 1.2533222517240594
|
||||
# DeltaYc = Lcc*cos(theta/2) # = 0.8862326632060754
|
||||
# # 0.5*DeltaYc = 0.4431163316030377
|
||||
# DeltaZh = Lch*sin(theta/2) # = 0.8924307629540046
|
||||
# DeltaYh = Lch*cos(theta/2) # = 0.6310438442242609
|
|
@ -1,18 +0,0 @@
|
|||
import "hexadecane.lt" # <- defines the "Hexadecane" molecule type.
|
||||
|
||||
# Periodic boundary conditions:
|
||||
write_once("Data Boundary") {
|
||||
0.0 62.4 xlo xhi
|
||||
0.0 62.4 ylo yhi
|
||||
0.0 62.4 zlo zhi
|
||||
}
|
||||
|
||||
molecules = new Hexadecane [12].move(0, 0, 5.2)
|
||||
[12].move(0, 5.2, 0)
|
||||
[2].move(31.2, 0, 0)
|
||||
|
||||
|
||||
# NOTE: The spacing between molecules is large. There should be extra room to
|
||||
# move during the initial stages of equilibration. However, you will have to
|
||||
# run the simulation at NPT conditions later to compress the system to a
|
||||
# more realistic density.
|
|
@ -1,86 +0,0 @@
|
|||
# PREREQUISITES:
|
||||
#
|
||||
# You must use moltemplate.sh to create 3 files:
|
||||
# system.data system.in.init system.in.settings
|
||||
# (Follow the instructions in README_setup.sh,
|
||||
# or run the file as a script using ./README_setup.sh)
|
||||
|
||||
# ------------------------------- Initialization Section --------------------
|
||||
|
||||
include system.in.init
|
||||
|
||||
# ------------------------------- Atom Definition Section -------------------
|
||||
|
||||
read_data system.data
|
||||
|
||||
# ------------------------------- Settings Section --------------------------
|
||||
|
||||
include system.in.settings
|
||||
|
||||
# ------------------------------- Run Section -------------------------------
|
||||
|
||||
# To avvoid explosions, I have a 4-step equilibraion process (expand, minimize,
|
||||
# reorient, compress). The system (as defined in the "system.data" file)
|
||||
# is already expanded. That means there are 3 steps left:
|
||||
|
||||
dump dumpeq1 all custom 50 traj_eq1_min.lammpstrj id mol type x y z ix iy iz
|
||||
thermo 50
|
||||
|
||||
# -- Equilibration: part 1: initial minimization --
|
||||
|
||||
# Note: In general, it's always a good idea to minimize the system at first.
|
||||
|
||||
minimize 1.0e-5 1.0e-7 100000 400000
|
||||
undump dumpeq1
|
||||
|
||||
write_data system_after_eq1_min.data
|
||||
|
||||
# -- Equilibration part 2: reorienting the molecules (NVT) --
|
||||
|
||||
timestep 1.0
|
||||
dump dumpeq2 all custom 200 traj_eq2_reorient.lammpstrj id mol type x y z ix iy iz
|
||||
|
||||
# Run the system at high temperature (at constant volume) to reorient the
|
||||
# the molecules (which would otherwise be pointing in the same direction).
|
||||
|
||||
# To speed it up, I randomize the atomic positions for a few thousand steps
|
||||
# using fix langevin (and fix nve). Then I switch to fix nvt (Nose-Hoover).
|
||||
# (If I start with fix nvt (Nose-Hoover), it seems to get "stuck" for a while.)
|
||||
|
||||
|
||||
fix fxlan all langevin 900.0 900.0 120 48279
|
||||
fix fxnve all nve
|
||||
|
||||
run 4000
|
||||
|
||||
unfix fxlan
|
||||
unfix fxnve
|
||||
# Now continue the simulation at high temperature using fix nvt (Nose-Hoover).
|
||||
fix fxnvt all nvt temp 900.0 900.0 100.0
|
||||
|
||||
run 50000
|
||||
undump dumpeq2
|
||||
|
||||
|
||||
write_data system_after_eq2_reorient.data
|
||||
|
||||
unfix fxnvt
|
||||
|
||||
# -- equilibration part 3: Equilibrating the density (NPT) --
|
||||
|
||||
# Originally, the simulation box (in "system.data" and "system.lt") was
|
||||
# unrealistically large. The spacing between the molecules was large also.
|
||||
# I did this to enable the molecules to move freely and reorient themselves.
|
||||
# After doing that, we should run the simulation under NPT conditions to
|
||||
# allow the simulation box to contract to it's natural size. We do that here:
|
||||
# We begin the simulation at 100 barr (a relatively low pressure), and
|
||||
# slowly decrease it to 1 barr, maintianing the temperature at 300K.
|
||||
|
||||
dump dumpeq3 all custom 200 traj_eq3_npt.lammpstrj id mol type x y z ix iy iz
|
||||
fix fxnpt all npt temp 900.0 300.0 100.0 iso 100.0 1.0 1000.0 drag 2.0
|
||||
|
||||
timestep 1.0
|
||||
run 100000
|
||||
|
||||
write_data system_after_eq3_npt.data
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
# PREREQUISITES:
|
||||
#
|
||||
# 1) You must use moltemplate.sh to create 3 files:
|
||||
# system.data system.in.init system.in.settings
|
||||
# (Follow the instructions in README_setup.sh,
|
||||
# or run the file as a script using ./README_setup.sh)
|
||||
# 2) You must equilibrate the system beforehand using "run.in.npt".
|
||||
# This will create the file "system_after_npt.data" which this file reads.
|
||||
# (Note: I have not verified that this equilibration protocol works well.)
|
||||
|
||||
# ------------------------------- Initialization Section --------------------
|
||||
|
||||
include system.in.init
|
||||
|
||||
# ------------------------------- Atom Definition Section -------------------
|
||||
|
||||
|
||||
# Read the coordinates generated by an earlier NPT simulation
|
||||
|
||||
read_data system_after_eq3_npt.data
|
||||
|
||||
# (The "write_restart" and "read_restart" commands were buggy in 2012,
|
||||
# but they should work also. I prefer "write_data" and "read_data".)
|
||||
|
||||
|
||||
# ------------------------------- Settings Section --------------------------
|
||||
|
||||
include system.in.settings
|
||||
|
||||
# ------------------------------- Run Section -------------------------------
|
||||
|
||||
# -- simulation protocol --
|
||||
|
||||
|
||||
timestep 1.0
|
||||
dump 1 all custom 500 traj_nvt.lammpstrj id mol type x y z ix iy iz
|
||||
fix fxnvt all nvt temp 350.0 350.0 500.0 tchain 1
|
||||
thermo 100
|
||||
#thermo_modify flush yes
|
||||
|
||||
run 50000
|
||||
|
||||
write_data system_after_nvt.data
|
|
@ -1,37 +0,0 @@
|
|||
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 the
|
||||
"force_fields/tip3p_2004.lt" file distributed with moltemplate.)
|
||||
|
||||
WARNING: THIS EXAMPLE HAS NOT BEEN CAREFULLY TESTED.
|
||||
PLEASE REPORT BUGS AND/OR SEND CORRECTIONS. -A 2016-12-16
|
||||
|
||||
----------------- 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: ---------
|
||||
|
||||
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
|
||||
|
||||
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
|
|
@ -1,8 +0,0 @@
|
|||
|
||||
# Note: By default, the system.data and system.in.settings files contain
|
||||
# extra information for atoms defined in AMGER/GAFF ("gaff.lt") 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, run this script:
|
||||
|
||||
cleanup_moltemplate.sh
|
|
@ -1,39 +0,0 @@
|
|||
# --- Running LAMMPS ---
|
||||
# -------- REQUIREMENTS: ---------
|
||||
# 1) This example requires building LAMMPS with the "USER-MISC" package.
|
||||
# (because it makes use of "gaff.lt" which uses dihedral_style fourier)
|
||||
# To do this, type "make yes-user-misc" before compiling LAMMPS.
|
||||
# http://lammps.sandia.gov/doc/Section_start.html#start_3
|
||||
# -------- PREREQUISITES: --------
|
||||
# The 2 files "run.in.npt", and "run.in.nvt" are LAMMPS
|
||||
# input scripts which link to the input scripts and data files
|
||||
# you hopefully have created earlier with moltemplate.sh:
|
||||
# system.in.init, system.in.settings, system.data
|
||||
# If not, carry out the instructions in "README_setup.sh".
|
||||
#
|
||||
# -- Instructions: --
|
||||
# If "lmp_mpi" is the name of the command you use to invoke lammps,
|
||||
# then you would run lammps on these files this way:
|
||||
|
||||
|
||||
lmp_mpi -i run.in.npt # minimization and simulation at constant pressure
|
||||
lmp_mpi -i run.in.nvt # minimization and simulation at constant volume
|
||||
|
||||
#(Note: The constant volume simulation lacks pressure equilibration. These are
|
||||
# completely separate simulations. The results of the constant pressure
|
||||
# simulation might be ignored when beginning the simulation at constant
|
||||
# volume. (This is because restart files in LAMMPS don't always work,
|
||||
# and I was spending a lot of time trying to convince people it was a
|
||||
# LAMMPS bug, instead of a moltemplate bug, so I disabled restart files.)
|
||||
# Read the "run.in.nvt" file to find out how to use the "read_restart"
|
||||
# command to load the results of the pressure-equilibration simulation,
|
||||
# before beginning a constant-volume run.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# If you have compiled the MPI version of lammps, you can run lammps in parallel
|
||||
#mpirun -np 4 lmp_mpi -i run.in.npt
|
||||
#mpirun -np 4 lmp_mpi -i run.in.nvt
|
||||
# (assuming you have 4 processors available)
|
|
@ -1,29 +0,0 @@
|
|||
|
||||
# Create LAMMPS input files this way:
|
||||
cd moltemplate_files
|
||||
|
||||
# run moltemplate
|
||||
|
||||
moltemplate.sh system.lt
|
||||
|
||||
# Moltemplate generates various files with names ending in *.in* and *.data.
|
||||
# Move them to the directory where you plan to run LAMMPS (in this case "../")
|
||||
mv -f system.data system.in* ../
|
||||
|
||||
# Optional:
|
||||
# The "./output_ttree/" directory is full of temporary files generated by
|
||||
# moltemplate. They can be useful for debugging, but are usually thrown away.
|
||||
#rm -rf output_ttree/
|
||||
|
||||
cd ../
|
||||
|
||||
|
||||
|
||||
|
||||
# Optional:
|
||||
# Note: The system.data and system.in.settings files contain extra information
|
||||
# for atoms defined in OPLSAA 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, run this script:
|
||||
#
|
||||
# cleanup_moltemplate.sh
|
|
@ -1,87 +0,0 @@
|
|||
|
||||
------- To view a lammps trajectory in VMD --------
|
||||
|
||||
|
||||
1) Build a PSF file for use in viewing with VMD.
|
||||
|
||||
This step works with VMD 1.9 and topotools 1.2.
|
||||
(Older versions, like VMD 1.8.6, don't support this.)
|
||||
|
||||
|
||||
a) Start VMD
|
||||
b) Menu Extensions->Tk Console
|
||||
c) Enter:
|
||||
|
||||
(I assume that the the DATA file is called "system.data")
|
||||
|
||||
topo readlammpsdata system.data full
|
||||
animate write psf system.psf
|
||||
|
||||
2)
|
||||
|
||||
Later, to Load a trajectory in VMD:
|
||||
|
||||
Start VMD
|
||||
Select menu: File->New Molecule
|
||||
-Browse to select the PSF file you created above, and load it.
|
||||
(Don't close the window yet.)
|
||||
-Browse to select the trajectory file.
|
||||
If necessary, for "file type" select: "LAMMPS Trajectory"
|
||||
Load it.
|
||||
|
||||
---- A note on trajectory format: -----
|
||||
If the trajectory is a DUMP file, then make sure the it contains the
|
||||
information you need for pbctools (see below. I've been using this
|
||||
command in my LAMMPS scripts to create the trajectories:
|
||||
|
||||
dump 1 all custom 5000 DUMP_FILE.lammpstrj id mol type x y z ix iy iz
|
||||
|
||||
It's a good idea to use an atom_style which supports molecule-ID numbers
|
||||
so that you can assign a molecule-ID number to each atom. (I think this
|
||||
is needed to wrap atom coordinates without breaking molecules in half.)
|
||||
|
||||
Of course, you don't have to save your trajectories in DUMP format,
|
||||
(other formats like DCD work fine) I just mention dump files
|
||||
because these are the files I'm familiar with.
|
||||
|
||||
3) ----- Wrap the coordinates to the unit cell
|
||||
(without cutting the molecules in half)
|
||||
|
||||
a) Start VMD
|
||||
b) Load the trajectory in VMD (see above)
|
||||
c) Menu Extensions->Tk Console
|
||||
d) Try entering these commands:
|
||||
|
||||
pbc wrap -compound res -all
|
||||
pbc box
|
||||
|
||||
----- Optional ----
|
||||
Sometimes the solvent or membrane obscures the view of the solute.
|
||||
It can help to shift the location of the periodic boundary box
|
||||
To shift the box in the y direction (for example) do this:
|
||||
|
||||
pbc wrap -compound res -all -shiftcenterrel {0.0 0.15 0.0}
|
||||
pbc box -shiftcenterrel {0.0 0.15 0.0}
|
||||
|
||||
Distances are measured in units of box-length fractions, not Angstroms.
|
||||
|
||||
Alternately if you have a solute whose atoms are all of type 1,
|
||||
then you can also try this to center the box around it:
|
||||
|
||||
pbc wrap -sel type=1 -all -centersel type=2 -center com
|
||||
|
||||
4)
|
||||
You should check if your periodic boundary conditions are too small.
|
||||
To do that:
|
||||
select Graphics->Representations menu option
|
||||
click on the "Periodic" tab, and
|
||||
click on the "+x", "-x", "+y", "-y", "+z", "-z" checkboxes.
|
||||
|
||||
5) Optional: If you like, change the atom types in the PSF file so
|
||||
that VMD recognizes the atom types, use something like:
|
||||
|
||||
sed -e 's/ 1 1 / C C /g' < system.psf > temp1.psf
|
||||
sed -e 's/ 2 2 / H H /g' < temp1.psf > temp2.psf
|
||||
sed -e 's/ 3 3 / P P /g' < temp2.psf > system.psf
|
||||
|
||||
(If you do this, it might effect step 2 above.)
|
Before ![]() (image error) Size: 24 KiB |
Before ![]() (image error) Size: 102 KiB |
Before ![]() (image error) Size: 72 KiB |
Before ![]() (image error) Size: 9.8 KiB |
|
@ -1,57 +0,0 @@
|
|||
|
||||
import "gaff.lt"
|
||||
|
||||
# The "gaff.lt" file is usually located in "force_fields" subdirectory
|
||||
# of the moltemplate distribution.
|
||||
# It contains definitions of the atoms "c3", "h1", as well as the bonded
|
||||
# and non-bonded interactions between them (and many other atoms).
|
||||
#
|
||||
# Moltemplate is only a simple text manipulation tool. It cannot
|
||||
# calculate atomic charge using quantom chemistry methods.
|
||||
# Atom charges for this example were taken from the OPLSAA force field file:
|
||||
# http://dasher.wustl.edu/tinker/distribution/params/oplsaa.prm
|
||||
# However, normally simulations in AMBER are assigned charges using the
|
||||
# "HF/6-31G* RESP2" or "AM1-BCC3" methods using AmberTools.
|
||||
|
||||
|
||||
Isobutane inherits GAFF {
|
||||
|
||||
# atomID molID atomTyle charge X Y Z
|
||||
write('Data Atoms') {
|
||||
$atom:C0 $mol:. @atom:c3 -0.0600 -0.001 -0.001 -0.439
|
||||
$atom:C1 $mol:. @atom:c3 -0.1800 -1.257 -0.726 0.078
|
||||
$atom:C2 $mol:. @atom:c3 -0.1800 1.258 -0.726 0.072
|
||||
$atom:C3 $mol:. @atom:c3 -0.1800 -0.001 1.453 0.069
|
||||
$atom:H0 $mol:. @atom:hc 0.0600 -0.003 -0.004 -1.439
|
||||
$atom:H11 $mol:. @atom:hc 0.0600 -2.075 -0.255 -0.254
|
||||
$atom:H12 $mol:. @atom:hc 0.0600 -1.256 -0.724 1.078
|
||||
$atom:H13 $mol:. @atom:hc 0.0600 -1.259 -1.669 -0.253
|
||||
$atom:H21 $mol:. @atom:hc 0.0600 2.074 -0.255 -0.264
|
||||
$atom:H22 $mol:. @atom:hc 0.0600 1.258 -1.669 -0.259
|
||||
$atom:H23 $mol:. @atom:hc 0.0600 1.261 -0.724 1.072
|
||||
$atom:H31 $mol:. @atom:hc 0.0600 -0.817 1.923 -0.263
|
||||
$atom:H32 $mol:. @atom:hc 0.0600 0.816 1.923 -0.268
|
||||
$atom:H33 $mol:. @atom:hc 0.0600 0.003 1.456 1.070
|
||||
}
|
||||
|
||||
# The "." in "$mol:." refers to this molecule object's molecule ID
|
||||
# (It means we do not expect this molecule to be a group or a subunit
|
||||
# of a larger molecule. Otherwise we would use "$mol:..." instead.)
|
||||
|
||||
write('Data Bond List') {
|
||||
$bond:C01 $atom:C0 $atom:C1
|
||||
$bond:C02 $atom:C0 $atom:C2
|
||||
$bond:C03 $atom:C0 $atom:C3
|
||||
$bond:C0H $atom:C0 $atom:H0
|
||||
$bond:C1H1 $atom:C1 $atom:H11
|
||||
$bond:C1H2 $atom:C1 $atom:H12
|
||||
$bond:C1H3 $atom:C1 $atom:H13
|
||||
$bond:C2H1 $atom:C2 $atom:H21
|
||||
$bond:C2H2 $atom:C2 $atom:H22
|
||||
$bond:C2H3 $atom:C2 $atom:H23
|
||||
$bond:C3H1 $atom:C3 $atom:H31
|
||||
$bond:C3H2 $atom:C3 $atom:H32
|
||||
$bond:C3H3 $atom:C3 $atom:H33
|
||||
}
|
||||
|
||||
} # Isobutane
|
|
@ -1,30 +0,0 @@
|
|||
|
||||
import "tip3p_2004.lt" # <-- This defines the TIP3P water molecule. This file
|
||||
# is located in the "force_fields" subdirectory
|
||||
# of the moltemplate distribution.
|
||||
|
||||
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)
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
# PREREQUISITES:
|
||||
#
|
||||
# You must use moltemplate.sh to create 3 files:
|
||||
# system.data system.in.init system.in.settings
|
||||
# (Follow the instructions in README_setup.sh,
|
||||
# or run the file as a script using ./README_setup.sh)
|
||||
#
|
||||
# ------------------------------- Initialization Section --------------------
|
||||
|
||||
include system.in.init
|
||||
|
||||
# ------------------------------- Atom Definition Section -------------------
|
||||
|
||||
read_data system.data
|
||||
|
||||
# ------------------------------- Settings Section --------------------------
|
||||
|
||||
include system.in.settings
|
||||
|
||||
# ------------------------------- Run Section -------------------------------
|
||||
|
||||
|
||||
# -- minimization protocol --
|
||||
|
||||
# Note: The minimization step is not necessary in this example. However
|
||||
# in general, it's always a good idea to minimize the system beforehand.
|
||||
# fShakeTIP3P was defined in system.in.settings. It is incompatible with "minimize".
|
||||
unfix fShakeTIP3P
|
||||
minimize 1.0e-4 1.0e-6 100000 400000
|
||||
# Now read "system.in.settings" in order to redefine fShakeTIP3P again:
|
||||
include system.in.settings
|
||||
|
||||
# -- simulation protocol --
|
||||
|
||||
|
||||
timestep 1.0
|
||||
dump 1 all custom 500 traj_npt.lammpstrj id mol type x y z ix iy iz
|
||||
fix fxnpt all npt temp 300.0 300.0 100.0 iso 1.0 1.0 1000.0 drag 1.0
|
||||
thermo 100
|
||||
#thermo_modify flush yes
|
||||
|
||||
run 40000
|
||||
|
||||
write_data system_after_npt.data
|
|
@ -1,52 +0,0 @@
|
|||
# PREREQUISITES:
|
||||
#
|
||||
# 1) You must use moltemplate.sh to create 3 files:
|
||||
# system.data system.in.init system.in.settings
|
||||
# (Follow the instructions in README_setup.sh,
|
||||
# or run the file as a script using ./README_setup.sh)
|
||||
# 2) You must equilibrate the system beforehand using "run.in.npt".
|
||||
# This will create the file "system_after_npt.data" which this file reads.
|
||||
# (Note: I have not verified that this equilibration protocol works well.)
|
||||
|
||||
# ------------------------------- Initialization Section --------------------
|
||||
|
||||
include system.in.init
|
||||
|
||||
# ------------------------------- Atom Definition Section -------------------
|
||||
|
||||
|
||||
# Read the coordinates generated by an earlier NPT simulation
|
||||
|
||||
read_data system_after_npt.data
|
||||
|
||||
# (The "write_restart" and "read_restart" commands were buggy in 2012,
|
||||
# but they should work also. I prefer "write_data" and "read_data".)
|
||||
|
||||
# ------------------------------- Settings Section --------------------------
|
||||
|
||||
include system.in.settings
|
||||
|
||||
# ------------------------------- Run Section -------------------------------
|
||||
|
||||
# COMMENTING OUT MINIMIZATION STEPS:
|
||||
# If you are reading the coordinates generated by the NPT run
|
||||
# then you should not need to minimize the system beforehand.
|
||||
# -- minimization protocol --
|
||||
## ("fix shake" is incompatible with "minimize".)
|
||||
#unfix fShakeTIP3P
|
||||
#minimize 1.0e-4 1.0e-6 100000 400000
|
||||
## Now read "system.in.settings" in order to redefine fShakeTIP3P again:
|
||||
#include system.in.settings
|
||||
|
||||
# -- simulation protocol --
|
||||
|
||||
|
||||
timestep 1.0
|
||||
dump 1 all custom 500 traj_nvt.lammpstrj id mol type x y z ix iy iz
|
||||
fix fxnvt all nvt temp 300.0 300.0 500.0 tchain 1
|
||||
thermo 500
|
||||
#thermo_modify flush yes
|
||||
|
||||
run 50000
|
||||
|
||||
write_data system_after_nvt.data
|
|
@ -1,38 +0,0 @@
|
|||
# -------- WARNING: --------
|
||||
|
||||
This directory contains some examples of all-atom simulations using the COMPASS
|
||||
force field.
|
||||
|
||||
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.
|
||||
|
||||
The moltemplate implementation of COMPASS currently relies on the same
|
||||
incomplete force-field file that "msi2lmp" uses ("compass_published.frc").
|
||||
Unfortunately this means that many force field parameters and some atom types
|
||||
(such as sp2-carbons) have not (yet) been publicly released and are not
|
||||
available.
|
||||
|
||||
Currently I recommend that users should run the "cleanup_moltemplate.sh"
|
||||
script after running "moltemplate.sh system.lt". Then manually check that
|
||||
the "system.in.settings" and "system.in.charges" files which remain
|
||||
make sense. Specifically, you must check that the angle_coeff,
|
||||
dihedral_coeff, bond_coeff commands are not full of zeros (in places
|
||||
where they should not be zero. This is another consequence of the
|
||||
fact that the .FRC files I mentioned above are incomplete.) It's a
|
||||
good idea to also check that the charges in the "system.in.charges"
|
||||
file seem reasonable (ie. not all zeros). (There is a list of
|
||||
warnings at the end of the "compass_published.lt" file. You can check
|
||||
to see if any of the bonds in your system are covered by these
|
||||
warnings.) Later on hopefully I'll add some automated way to warn
|
||||
users when these problems arise, but now you should check for them
|
||||
manually.
|
||||
|
||||
# -------- 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, 2017-10-03)
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
This example is a simple simulation of a long alkane chain,
|
||||
in a vacuum at room temperature using the COMPASS force field.
|
||||
|
||||
1) Create the "system.data", "system.in.init", and "system.in.settings"
|
||||
files which LAMMPS will read by running:
|
||||
|
||||
moltemplate.sh system.lt
|
||||
|
||||
|
||||
2) Run LAMMPS in this order:
|
||||
|
||||
lmp_mpi -i run.in.min # minimize the energy (to avoid atom overlap) before...
|
||||
lmp_mpi -i run.in.nvt # running the simulation at constant temperature
|
||||
|
||||
(The name of the LAMMPS executable, eg "lmp_mpi", may vary.)
|
||||
|
||||
---- Details ----
|
||||
|
||||
The "Alkane50" molecule, as well as the "CH2", and "CH3" monomers it contains
|
||||
use the COMPASS force-field. This means that when we define these molecules,
|
||||
we only specify the atom names, bond list, and coordinates.
|
||||
We do not have to list the atom charges, angles, dihedrals, or impropers.
|
||||
The rules for creating atomic charge and angle topology are contained in
|
||||
the "compass_published.lt" file created by step 3) above. The "ch2group.lt",
|
||||
"ch3group.lt", and "alkane50.lt" files all refer to "compass_published.lt",
|
||||
(as well as the "COMPASS" force-field object which it defines). Excerpt:
|
||||
|
||||
import "compass_published.lt"
|
||||
CH2 inherits COMPASS { ...
|
||||
CH3 inherits COMPASS { ...
|
||||
Alkane50 inherits COMPASS { ...
|
||||
|
||||
Alternatively, you can manually define a list of angles, dihedrals, and
|
||||
improper interactions in these files, instead of asking the force-field
|
||||
to generate them for you. You can also specify some of the angles and
|
||||
dihedrals explicitly, and let the force-field handle the rest.
|
||||
(Many of the examples which come with moltemplate do this.)
|
|
@ -1,8 +0,0 @@
|
|||
|
||||
# Note: By default, the system.data and system.in.settings files contain
|
||||
# extra information for atoms defined in OPLSAA 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, run this script:
|
||||
|
||||
cleanup_moltemplate.sh
|
|
@ -1,34 +0,0 @@
|
|||
# --- Running LAMMPS ---
|
||||
#
|
||||
# The 2 files "run.in.npt", and "run.in.nvt" are LAMMPS
|
||||
# input scripts which link to the input scripts and data files
|
||||
# you hopefully have created earlier with moltemplate.sh:
|
||||
# system.in.init, system.in.settings, system.data
|
||||
# If not, carry out the instructions in "README_setup.sh".
|
||||
#
|
||||
# -- Instructions: --
|
||||
# If "lmp_mpi" is the name of the command you use to invoke lammps,
|
||||
# then you would run lammps on these files this way:
|
||||
|
||||
|
||||
lmp_mpi -i run.in.min # minimization
|
||||
lmp_mpi -i run.in.nvt # minimization and simulation at constant volume
|
||||
|
||||
#(Note: The constant volume simulation lacks pressure equilibration. These are
|
||||
# completely separate simulations. The results of the constant pressure
|
||||
# simulation might be ignored when beginning the simulation at constant
|
||||
# volume. (This is because restart files in LAMMPS don't always work,
|
||||
# and I was spending a lot of time trying to convince people it was a
|
||||
# LAMMPS bug, instead of a moltemplate bug, so I disabled restart files.)
|
||||
# Read the "run.in.nvt" file to find out how to use the "read_restart"
|
||||
# command to load the results of the pressure-equilibration simulation,
|
||||
# before beginning a constant-volume run.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# If you have compiled the MPI version of lammps, you can run lammps in parallel
|
||||
#mpirun -np 4 lmp_mpi -i run.in.npt
|
||||
#mpirun -np 4 lmp_mpi -i run.in.nvt
|
||||
# (assuming you have 4 processors available)
|
|
@ -1,34 +0,0 @@
|
|||
|
||||
# Create LAMMPS input files this way:
|
||||
cd moltemplate_files
|
||||
|
||||
# run moltemplate
|
||||
|
||||
moltemplate.sh system.lt
|
||||
|
||||
# Optional:
|
||||
# To check for missing angle,dihedral params run moltemplate this way instead:
|
||||
# moltemplate.sh -checkff system.lt
|
||||
|
||||
|
||||
# Moltemplate generates various files with names ending in *.in* and *.data.
|
||||
# Move them to the directory where you plan to run LAMMPS (in this case "../")
|
||||
mv -f system.data system.in* ../
|
||||
|
||||
# Optional:
|
||||
# The "./output_ttree/" directory is full of temporary files generated by
|
||||
# moltemplate. They can be useful for debugging, but are usually thrown away.
|
||||
rm -rf output_ttree/
|
||||
|
||||
cd ../
|
||||
|
||||
|
||||
|
||||
|
||||
# Optional:
|
||||
# Note: The system.data and system.in.settings files contain extra information
|
||||
# for atoms defined in OPLSAA 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, run this script:
|
||||
#
|
||||
# cleanup_moltemplate.sh
|
|
@ -1,87 +0,0 @@
|
|||
|
||||
------- To view a lammps trajectory in VMD --------
|
||||
|
||||
|
||||
1) Build a PSF file for use in viewing with VMD.
|
||||
|
||||
This step works with VMD 1.9 and topotools 1.2.
|
||||
(Older versions, like VMD 1.8.6, don't support this.)
|
||||
|
||||
|
||||
a) Start VMD
|
||||
b) Menu Extensions->Tk Console
|
||||
c) Enter:
|
||||
|
||||
(I assume that the the DATA file is called "system.data")
|
||||
|
||||
topo readlammpsdata system.data full
|
||||
animate write psf system.psf
|
||||
|
||||
2)
|
||||
|
||||
Later, to Load a trajectory in VMD:
|
||||
|
||||
Start VMD
|
||||
Select menu: File->New Molecule
|
||||
-Browse to select the PSF file you created above, and load it.
|
||||
(Don't close the window yet.)
|
||||
-Browse to select the trajectory file.
|
||||
If necessary, for "file type" select: "LAMMPS Trajectory"
|
||||
Load it.
|
||||
|
||||
---- A note on trajectory format: -----
|
||||
If the trajectory is a DUMP file, then make sure the it contains the
|
||||
information you need for pbctools (see below. I've been using this
|
||||
command in my LAMMPS scripts to create the trajectories:
|
||||
|
||||
dump 1 all custom 5000 DUMP_FILE.lammpstrj id mol type x y z ix iy iz
|
||||
|
||||
It's a good idea to use an atom_style which supports molecule-ID numbers
|
||||
so that you can assign a molecule-ID number to each atom. (I think this
|
||||
is needed to wrap atom coordinates without breaking molecules in half.)
|
||||
|
||||
Of course, you don't have to save your trajectories in DUMP format,
|
||||
(other formats like DCD work fine) I just mention dump files
|
||||
because these are the files I'm familiar with.
|
||||
|
||||
3) ----- Wrap the coordinates to the unit cell
|
||||
(without cutting the molecules in half)
|
||||
|
||||
a) Start VMD
|
||||
b) Load the trajectory in VMD (see above)
|
||||
c) Menu Extensions->Tk Console
|
||||
d) Try entering these commands:
|
||||
|
||||
pbc wrap -compound res -all
|
||||
pbc box
|
||||
|
||||
----- Optional ----
|
||||
Sometimes the solvent or membrane obscures the view of the solute.
|
||||
It can help to shift the location of the periodic boundary box
|
||||
To shift the box in the y direction (for example) do this:
|
||||
|
||||
pbc wrap -compound res -all -shiftcenterrel {0.0 0.15 0.0}
|
||||
pbc box -shiftcenterrel {0.0 0.15 0.0}
|
||||
|
||||
Distances are measured in units of box-length fractions, not Angstroms.
|
||||
|
||||
Alternately if you have a solute whose atoms are all of type 1,
|
||||
then you can also try this to center the box around it:
|
||||
|
||||
pbc wrap -sel type=1 -all -centersel type=2 -center com
|
||||
|
||||
4)
|
||||
You should check if your periodic boundary conditions are too small.
|
||||
To do that:
|
||||
select Graphics->Representations menu option
|
||||
click on the "Periodic" tab, and
|
||||
click on the "+x", "-x", "+y", "-y", "+z", "-z" checkboxes.
|
||||
|
||||
5) Optional: If you like, change the atom types in the PSF file so
|
||||
that VMD recognizes the atom types, use something like:
|
||||
|
||||
sed -e 's/ 1 1 / C C /g' < system.psf > temp1.psf
|
||||
sed -e 's/ 2 2 / H H /g' < temp1.psf > temp2.psf
|
||||
sed -e 's/ 3 3 / P P /g' < temp2.psf > system.psf
|
||||
|
||||
(If you do this, it might effect step 2 above.)
|
Before ![]() (image error) Size: 4.6 KiB |
Before ![]() (image error) Size: 6.8 KiB |
Before ![]() (image error) Size: 50 KiB |
Before ![]() (image error) Size: 59 KiB |
|
@ -1,137 +0,0 @@
|
|||
# This is a simple example showing how to build a long polymer
|
||||
# (in this case, an alkane chain). I split the
|
||||
# hexadecane molecule into individual CH2 and CH3 monomers.
|
||||
# I defined it this way so that you can easily modify
|
||||
# it to change the length of the alkane chain.
|
||||
|
||||
|
||||
import "ch2group.lt" # load the definition of the "CH2" object
|
||||
import "ch3group.lt" # load the definition of the "CH3" object
|
||||
|
||||
|
||||
|
||||
Alkane50 inherits COMPASS {
|
||||
|
||||
|
||||
create_var {$mol} # optional:force all monomers to share the same molecule-ID
|
||||
|
||||
# This is a long polymer consisting of 48 CH2 groups and 2 CH3 end-caps.
|
||||
# Rather than create them one-by-one, I decided to create them all
|
||||
# using a single "new" command. Later, I can modify this array.
|
||||
|
||||
# Create an array of 50 "CH2" objects distributed along the X axis
|
||||
|
||||
monomers = new CH2 [50].rot(180,1,0,0).move(1.2533223,0,0)
|
||||
|
||||
# NOTE: the ".rot(180,1,0,0).move(1.2533223,0,0)" means that each
|
||||
# successive monomer is rotated 180 degrees (with respect to the previous
|
||||
# monomer), and then moved 1.2533223 Angstroms down the X axis.
|
||||
# Alternately, if you are reading the coordinates from a file, you don't have
|
||||
# to indicate the position & orientation of each monomer. In that case, use:
|
||||
# monomers = new CH2 [50]
|
||||
|
||||
|
||||
# ---- Now, modify the ends: ---
|
||||
# Delete the CH2 groups at the beginning and end, and replace them with CH3.
|
||||
|
||||
delete monomers[0]
|
||||
delete monomers[49]
|
||||
|
||||
monomers[0] = new CH3
|
||||
monomers[49] = new CH3
|
||||
|
||||
# Move the CH3 groups to the correct location at either end of the chain:
|
||||
|
||||
#monomers[0].move(0,0,0) # <--(this monomer is already in the correct place)
|
||||
monomers[49].rot(180.0,0,0,1).move(61.4127927,0,0) #61.4127927=49*1.2533223
|
||||
|
||||
|
||||
## NOTE: Alternately, you can define the polymer without deleting the ends:
|
||||
# monomers[0] = new CH3
|
||||
# monomers[1-48] = new CH2[48].rot(180,1,0,0).move(1.2533223,0,0)
|
||||
## Note: monomers[0] and monomers[1] overlap, so we move 1-48 to make room:
|
||||
# monomers[1-48].rot(180,1,0,0).move(1.2533223,0,0) # move many monomers
|
||||
## Now add the final monomer at the end:
|
||||
# monomers[49] = new CH3.rot(180.0,0,0,1).move(61.4127927,0,0)
|
||||
#
|
||||
## NOTE: Alternately, you can read the coordinates from a file.
|
||||
## In that case, you can use simpler commands:
|
||||
# monomers[0] = new CH3
|
||||
# monomers[1-48] = new CH2[48]
|
||||
# monomers[49] = new CH3
|
||||
|
||||
|
||||
|
||||
# Now add a list of bonds connecting the carbon atoms together:
|
||||
# (Angles, dihedrals, impropers will be automatically added later.)
|
||||
|
||||
write('Data Bond List') {
|
||||
$bond:b1 $atom:monomers[0]/C $atom:monomers[1]/C
|
||||
$bond:b2 $atom:monomers[1]/C $atom:monomers[2]/C
|
||||
$bond:b3 $atom:monomers[2]/C $atom:monomers[3]/C
|
||||
$bond:b4 $atom:monomers[3]/C $atom:monomers[4]/C
|
||||
$bond:b5 $atom:monomers[4]/C $atom:monomers[5]/C
|
||||
$bond:b6 $atom:monomers[5]/C $atom:monomers[6]/C
|
||||
$bond:b7 $atom:monomers[6]/C $atom:monomers[7]/C
|
||||
$bond:b8 $atom:monomers[7]/C $atom:monomers[8]/C
|
||||
$bond:b9 $atom:monomers[8]/C $atom:monomers[9]/C
|
||||
$bond:b10 $atom:monomers[9]/C $atom:monomers[10]/C
|
||||
$bond:b11 $atom:monomers[10]/C $atom:monomers[11]/C
|
||||
$bond:b12 $atom:monomers[11]/C $atom:monomers[12]/C
|
||||
$bond:b13 $atom:monomers[12]/C $atom:monomers[13]/C
|
||||
$bond:b14 $atom:monomers[13]/C $atom:monomers[14]/C
|
||||
$bond:b15 $atom:monomers[14]/C $atom:monomers[15]/C
|
||||
$bond:b16 $atom:monomers[15]/C $atom:monomers[16]/C
|
||||
$bond:b17 $atom:monomers[16]/C $atom:monomers[17]/C
|
||||
$bond:b18 $atom:monomers[17]/C $atom:monomers[18]/C
|
||||
$bond:b19 $atom:monomers[18]/C $atom:monomers[19]/C
|
||||
$bond:b20 $atom:monomers[19]/C $atom:monomers[20]/C
|
||||
$bond:b21 $atom:monomers[20]/C $atom:monomers[21]/C
|
||||
$bond:b22 $atom:monomers[21]/C $atom:monomers[22]/C
|
||||
$bond:b23 $atom:monomers[22]/C $atom:monomers[23]/C
|
||||
$bond:b24 $atom:monomers[23]/C $atom:monomers[24]/C
|
||||
$bond:b25 $atom:monomers[24]/C $atom:monomers[25]/C
|
||||
$bond:b26 $atom:monomers[25]/C $atom:monomers[26]/C
|
||||
$bond:b27 $atom:monomers[26]/C $atom:monomers[27]/C
|
||||
$bond:b28 $atom:monomers[27]/C $atom:monomers[28]/C
|
||||
$bond:b29 $atom:monomers[28]/C $atom:monomers[29]/C
|
||||
$bond:b30 $atom:monomers[29]/C $atom:monomers[30]/C
|
||||
$bond:b31 $atom:monomers[30]/C $atom:monomers[31]/C
|
||||
$bond:b32 $atom:monomers[31]/C $atom:monomers[32]/C
|
||||
$bond:b33 $atom:monomers[32]/C $atom:monomers[33]/C
|
||||
$bond:b34 $atom:monomers[33]/C $atom:monomers[34]/C
|
||||
$bond:b35 $atom:monomers[34]/C $atom:monomers[35]/C
|
||||
$bond:b36 $atom:monomers[35]/C $atom:monomers[36]/C
|
||||
$bond:b37 $atom:monomers[36]/C $atom:monomers[37]/C
|
||||
$bond:b38 $atom:monomers[37]/C $atom:monomers[38]/C
|
||||
$bond:b39 $atom:monomers[38]/C $atom:monomers[39]/C
|
||||
$bond:b40 $atom:monomers[39]/C $atom:monomers[40]/C
|
||||
$bond:b41 $atom:monomers[40]/C $atom:monomers[41]/C
|
||||
$bond:b42 $atom:monomers[41]/C $atom:monomers[42]/C
|
||||
$bond:b43 $atom:monomers[42]/C $atom:monomers[43]/C
|
||||
$bond:b44 $atom:monomers[43]/C $atom:monomers[44]/C
|
||||
$bond:b45 $atom:monomers[44]/C $atom:monomers[45]/C
|
||||
$bond:b46 $atom:monomers[45]/C $atom:monomers[46]/C
|
||||
$bond:b47 $atom:monomers[46]/C $atom:monomers[47]/C
|
||||
$bond:b48 $atom:monomers[47]/C $atom:monomers[48]/C
|
||||
$bond:b49 $atom:monomers[48]/C $atom:monomers[49]/C
|
||||
}
|
||||
|
||||
} # Alkane50
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
######### (scratchwork calculations for the atomic coordinates) #########
|
||||
# Lcc = 1.5350 # length of the C-C bond (Sp3)
|
||||
# Lch = 1.0930 # length of the C-H bond
|
||||
# theta=2*atan(sqrt(2)) # ~= 109.5 degrees = tetrahedronal angle (C-C-C angle)
|
||||
# DeltaXc = Lcc*sin(theta/2) # = 1.2533222517240594
|
||||
# DeltaYc = Lcc*cos(theta/2) # = 0.8862326632060754
|
||||
# # 0.5*DeltaYc = 0.4431163316030377
|
||||
# DeltaZh = Lch*sin(theta/2) # = 0.8924307629540046
|
||||
# DeltaYh = Lch*cos(theta/2) # = 0.6310438442242609
|
|
@ -1,76 +0,0 @@
|
|||
# This file contains a definition for the "CH2" molecular subunit.
|
||||
|
||||
# First, load the COMPASS force field parameters we will need:
|
||||
|
||||
import "compass_published.lt" # <-- defines the "COMPASS" force field
|
||||
|
||||
# (The "compass_published.lt" file is located in the "force_fields"
|
||||
# subdirectory distributed with moltemplate.)
|
||||
|
||||
|
||||
# Then define "CH2":
|
||||
|
||||
|
||||
CH2 inherits COMPASS {
|
||||
|
||||
# atom-id mol-id atom-type charge x y z
|
||||
|
||||
write("Data Atoms") {
|
||||
$atom:C $mol:... @atom:c4 0.0 0.000000 0.000000 0.000000
|
||||
$atom:H1 $mol:... @atom:h1 0.0 0.000000 0.631044 0.892431
|
||||
$atom:H2 $mol:... @atom:h1 0.0 0.000000 0.631044 -0.892431
|
||||
}
|
||||
|
||||
write('Data Bond List') {
|
||||
$bond:CH1 $atom:C $atom:H1
|
||||
$bond:CH2 $atom:C $atom:H2
|
||||
}
|
||||
|
||||
# COMMENTS:
|
||||
# 1) Atom type names are defined in "compass_published.lt".
|
||||
# 2) In this example, the atomic charge of an atom is calculated by summing
|
||||
# partial charge contributions from neighboring atoms bonded to this atom.
|
||||
# (according to the rules in "compass_published.lt"). For this reason,
|
||||
# we can ignore the "charge" column in the "Data Atoms" section. Just
|
||||
# leave theses charges as "0.0" for now. Moltemplate will recalculate them.
|
||||
# 3) The "..." in "$mol:..." tells moltemplate that this molecule may be part
|
||||
# of a larger molecule, and (if so) to use the larger parent object's
|
||||
# molecule id number as it's own.
|
||||
|
||||
} # CH2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Optional: Shift all the coordinates in the +Y direction by 0.4431163.
|
||||
# This way, the carbon atom is no longer located at 0,0,0, but the
|
||||
# axis of an alkane chain containing this monomer is at 0,0,0.
|
||||
# (This makes it more convenient to construct a polymer later.
|
||||
# If this is confusing, then simply add 0.4431163 to the Y
|
||||
# coordinates in the "Data Atoms" section above.)
|
||||
|
||||
CH2.move(0,0.4431163,0)
|
||||
|
||||
|
||||
|
||||
|
||||
######### (scratchwork calculations for the atomic coordinates) #########
|
||||
# Lcc = 1.5350 # length of the C-C bond (Sp3)
|
||||
# Lch = 1.0930 # length of the C-H bond
|
||||
# theta=2*atan(sqrt(2)) # ~= 109.5 degrees = tetrahedronal angle (C-C-C angle)
|
||||
# DeltaXc = Lcc*sin(theta/2) # = 1.2533222517240594
|
||||
# DeltaYc = Lcc*cos(theta/2) # = 0.8862326632060754
|
||||
# # 0.5*DeltaYc = 0.4431163
|
||||
# DeltaZh = Lch*sin(theta/2) # = 0.892431
|
||||
# DeltaYh = Lch*cos(theta/2) # = 0.631044
|
|
@ -1,78 +0,0 @@
|
|||
# This file contains a definition for the "CH3" molecular subunit.
|
||||
|
||||
# First, load the COMPASS force field parameters we will need:
|
||||
|
||||
import "compass_published.lt" # <-- defines the "COMPASS" force field
|
||||
|
||||
# (The "compass_published.lt" file is located in the "force_fields"
|
||||
# subdirectory distributed with moltemplate.)
|
||||
|
||||
|
||||
# Then define "CH3":
|
||||
|
||||
|
||||
CH3 inherits COMPASS {
|
||||
|
||||
# atom-id mol-id atom-type charge x y z
|
||||
|
||||
write("Data Atoms") {
|
||||
$atom:C $mol:... @atom:c4 0.0 0.000000 0.000000 0.000000
|
||||
$atom:H1 $mol:... @atom:h1 0.0 0.000000 0.631044 0.892431
|
||||
$atom:H2 $mol:... @atom:h1 0.0 0.000000 0.631044 -0.892431
|
||||
$atom:H3 $mol:... @atom:h1 0.0 -0.892431 -0.631044 0.000000
|
||||
}
|
||||
|
||||
write('Data Bond List') {
|
||||
$bond:CH1 $atom:C $atom:H1
|
||||
$bond:CH2 $atom:C $atom:H2
|
||||
$bond:CH3 $atom:C $atom:H3
|
||||
}
|
||||
|
||||
# COMMENTS:
|
||||
# 1) Atom type names are defined in "compass_published.lt".
|
||||
# 2) In this example, the atomic charge of an atom is calculated by summing
|
||||
# partial charge contributions from neighboring atoms bonded to this atom.
|
||||
# (according to the rules in "compass_published.lt"). For this reason,
|
||||
# we can ignore the "charge" column in the "Data Atoms" section. Just
|
||||
# leave theses charges as "0.0" for now. Moltemplate will recalculate them.
|
||||
# 3) The "..." in "$mol:..." tells moltemplate that this molecule may be part
|
||||
# of a larger molecule, and (if so) to use the larger parent object's
|
||||
# molecule id number as it's own.
|
||||
|
||||
} # CH3
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Optional: Shift all the coordinates in the +Y direction by 0.4431163.
|
||||
# This way, the carbon atom is no longer located at 0,0,0, but the
|
||||
# axis of an alkane chain containing this monomer is at 0,0,0.
|
||||
# (This makes it more convenient to construct a polymer later.
|
||||
# If this is confusing, then simply add 0.4431163 to the Y
|
||||
# coordinates in the "Data Atoms" section above.)
|
||||
|
||||
CH3.move(0,0.4431163,0)
|
||||
|
||||
|
||||
|
||||
|
||||
######### (scratchwork calculations for the atomic coordinates) #########
|
||||
# Lcc = 1.5350 # length of the C-C bond (Sp3)
|
||||
# Lch = 1.0930 # length of the C-H bond
|
||||
# theta=2*atan(sqrt(2)) # ~= 109.5 degrees = tetrahedronal angle (C-C-C angle)
|
||||
# DeltaXc = Lcc*sin(theta/2) # = 1.2533222517240594
|
||||
# DeltaYc = Lcc*cos(theta/2) # = 0.8862326632060754
|
||||
# # 0.5*DeltaYc = 0.4431163
|
||||
# DeltaZh = Lch*sin(theta/2) # = 0.892431
|
||||
# DeltaYh = Lch*cos(theta/2) # = 0.631044
|
|
@ -1,30 +0,0 @@
|
|||
import "alkane50.lt" # Defines the "Alkane50" molecule
|
||||
|
||||
|
||||
polymer = new Alkane50
|
||||
|
||||
|
||||
# Specify the size of the world the polymer lives in:
|
||||
write_once("Data Boundary") {
|
||||
0.0 72.0 xlo xhi
|
||||
0.0 72.0 ylo yhi
|
||||
0.0 72.0 zlo zhi
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Note: If you want to create multiple polymers, and/or mix them with other
|
||||
# molecules, just add more "new" commands, for example:
|
||||
# polymer1 = new Alkane50.move(0,0,10)
|
||||
# polymer2 = new Alkane50.move(0,0,20)
|
||||
# :
|
||||
# ...or use array notation, for example:
|
||||
# polymers = new Alkane50[20].move(0,0,10)
|
||||
#
|
||||
# Note: Multidimensional arrays can be used to fill a planar region or a volume
|
||||
# polymers = new Alkane50 [4].move(0, 0, 30.0)
|
||||
# [4].move(0, 30.0, 0)
|
||||
# [2].move(70.0, 0, 0)
|
|
@ -1,37 +0,0 @@
|
|||
# PREREQUISITES:
|
||||
#
|
||||
# You must use moltemplate.sh to create 3 files:
|
||||
# system.data system.in.init system.in.settings
|
||||
#
|
||||
# ------------------------------- Initialization Section --------------------
|
||||
|
||||
include "system.in.init"
|
||||
|
||||
# ------------------------------- Atom Definition Section -------------------
|
||||
|
||||
read_data "system.data"
|
||||
|
||||
# ------------------------------- Settings Section --------------------------
|
||||
|
||||
include "system.in.settings"
|
||||
include "system.in.charges"
|
||||
|
||||
# ------------------------------- Run Section -------------------------------
|
||||
|
||||
|
||||
# -- minimization protocol --
|
||||
|
||||
# Note: The minimization step is not necessary in this example. However
|
||||
# in general, it's always a good idea to minimize the system beforehand.
|
||||
|
||||
thermo 50
|
||||
dump 1 all custom 50 traj_min.lammpstrj id mol type x y z ix iy iz
|
||||
minimize 1.0e-4 1.0e-6 100000 400000
|
||||
|
||||
|
||||
# (The "write_restart" and "read_restart" commands were buggy in 2012,
|
||||
# but they should work also. I prefer "write_data" and "read_data".)
|
||||
|
||||
write_data system_after_min.data
|
||||
|
||||
|