forked from lijiext/lammps
Merge remote-tracking branch 'akohlmey/integration' into ipython-update-and-cleanup
This commit is contained in:
commit
c87f9aeb9f
|
@ -1 +1 @@
|
|||
|
||||
/html
|
||||
|
|
Binary file not shown.
63
doc/Makefile
63
doc/Makefile
|
@ -1,4 +1,6 @@
|
|||
# Makefile for LAMMPS documentation
|
||||
|
||||
SHELL = /bin/bash
|
||||
SHA1 = $(shell echo $USER-$PWD | python utils/sha1sum.py)
|
||||
BUILDDIR = /tmp/lammps-docs-$(SHA1)
|
||||
RSTDIR = $(BUILDDIR)/rst
|
||||
|
@ -18,15 +20,21 @@ endif
|
|||
SOURCES=$(wildcard src/*.txt)
|
||||
OBJECTS=$(SOURCES:src/%.txt=$(RSTDIR)/%.rst)
|
||||
|
||||
.PHONY: help clean-all clean html pdf venv
|
||||
.PHONY: help clean-all clean html pdf old venv
|
||||
|
||||
# ------------------------------------------
|
||||
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " html to make HTML version of documentation using Sphinx"
|
||||
@echo " pdf to make Manual.pdf"
|
||||
@echo " txt2html to build txt2html tool"
|
||||
@echo " clean to remove all generated RST files"
|
||||
@echo " clean-all to reset the entire build environment"
|
||||
@echo " html create HTML doc pages in html dir"
|
||||
@echo " pdf create Manual.pdf and Developer.pdf in this dir"
|
||||
@echo " old create old-style HTML doc pages in old dir"
|
||||
@echo " fetch fetch HTML and PDF files from LAMMPS web site"
|
||||
@echo " clean remove all intermediate RST files"
|
||||
@echo " clean-all reset the entire build environment"
|
||||
@echo " txt2html build txt2html tool"
|
||||
|
||||
# ------------------------------------------
|
||||
|
||||
clean-all:
|
||||
rm -rf $(BUILDDIR)/* utils/txt2html/txt2html.exe
|
||||
|
@ -34,8 +42,6 @@ clean-all:
|
|||
clean:
|
||||
rm -rf $(RSTDIR)
|
||||
|
||||
txt2html: utils/txt2html/txt2html.exe
|
||||
|
||||
html: $(OBJECTS)
|
||||
@(\
|
||||
. $(VENV)/bin/activate ;\
|
||||
|
@ -44,20 +50,53 @@ html: $(OBJECTS)
|
|||
deactivate ;\
|
||||
)
|
||||
-rm html/searchindex.js
|
||||
-rm -rf html/_sources
|
||||
@rm -rf html/_sources
|
||||
@rm -rf html/PDF
|
||||
@rm -rf html/USER
|
||||
@cp -r src/PDF html/PDF
|
||||
@cp -r src/USER html/USER
|
||||
@rm -rf html/PDF/.[sg]*
|
||||
@rm -rf html/USER/.[sg]*
|
||||
@rm -rf html/USER/*/.[sg]*
|
||||
@rm -rf html/USER/*/*.[sg]*
|
||||
@echo "Build finished. The HTML pages are in doc/html."
|
||||
|
||||
pdf: utils/txt2html/txt2html.exe
|
||||
@(\
|
||||
cd src; \
|
||||
../utils/txt2html/txt2html.exe -b *.txt; \
|
||||
htmldoc --batch ../lammps.book; \
|
||||
htmldoc --batch lammps.book; \
|
||||
for s in `echo *.txt | sed -e 's,\.txt,\.html,g'` ; \
|
||||
do grep -q $$s ../lammps.book || \
|
||||
echo doc file $$s missing in lammps.book; done; \
|
||||
do grep -q $$s lammps.book || \
|
||||
echo doc file $$s missing in src/lammps.book; done; \
|
||||
rm *.html; \
|
||||
cd Developer; \
|
||||
pdflatex developer; \
|
||||
pdflatex developer; \
|
||||
mv developer.pdf ../../Developer.pdf; \
|
||||
)
|
||||
|
||||
old: utils/txt2html/txt2html.exe
|
||||
@rm -rf old
|
||||
@mkdir old; mkdir old/Eqs; mkdir old/JPG; mkdir old/PDF
|
||||
@cd src; ../utils/txt2html/txt2html.exe -b *.txt; \
|
||||
mv *.html ../old; \
|
||||
cp Eqs/*.jpg ../old/Eqs; \
|
||||
cp JPG/* ../old/JPG; \
|
||||
cp PDF/* ../old/PDF;
|
||||
|
||||
fetch:
|
||||
@rm -rf html_www Manual_www.pdf Developer_www.pdf
|
||||
@curl -s -o Manual_www.pdf http://lammps.sandia.gov/doc/Manual.pdf
|
||||
@curl -s -o Developer_www.pdf http://lammps.sandia.gov/doc/Developer.pdf
|
||||
@curl -s -o lammps-doc.tar.gz http://lammps.sandia.gov/tars/lammps-doc.tar.gz
|
||||
@tar xzf lammps-doc.tar.gz
|
||||
@rm -f lammps-doc.tar.gz
|
||||
|
||||
txt2html: utils/txt2html/txt2html.exe
|
||||
|
||||
# ------------------------------------------
|
||||
|
||||
utils/txt2html/txt2html.exe: utils/txt2html/txt2html.cpp
|
||||
g++ -O -Wall -o $@ $<
|
||||
|
||||
|
|
BIN
doc/Manual.pdf
BIN
doc/Manual.pdf
Binary file not shown.
|
@ -0,0 +1,53 @@
|
|||
Generation of LAMMPS Documentation
|
||||
|
||||
The generation of all documentation is managed by the Makefile in this
|
||||
dir.
|
||||
|
||||
----------------
|
||||
|
||||
Options:
|
||||
|
||||
make html # generate HTML in html dir using Sphinx
|
||||
make pdf # generate 2 PDF files (Manual.pdf,Developer.pdf)
|
||||
# in this dir via htmldoc and pdflatex
|
||||
make old # generate old-style HTML pages in old dir via txt2html
|
||||
make fetch # fetch HTML doc pages and 2 PDF files from web site
|
||||
# as a tarball and unpack into html dir and 2 PDFs
|
||||
make clean # remove intermediate RST files created by HTML build
|
||||
make clean-all # remove entire build folder and any cached data
|
||||
|
||||
----------------
|
||||
|
||||
Installing prerequisites for HTML build
|
||||
|
||||
To run the HTML documention build toolchain, Python 3 and virtualenv
|
||||
have to be installed. Here are instructions for common setups:
|
||||
|
||||
# Ubuntu
|
||||
|
||||
sudo apt-get install python-virtualenv
|
||||
|
||||
# Fedora (up to version 21)
|
||||
# Red Hat Enterprise Linux or CentOS (up to version 7.x)
|
||||
|
||||
sudo yum install python3-virtualenv
|
||||
|
||||
# Fedora (since version 22)
|
||||
|
||||
sudo dnf install python3-virtualenv
|
||||
|
||||
# MacOS X
|
||||
|
||||
## Python 3
|
||||
|
||||
Download the latest Python 3 MacOS X package from
|
||||
https://www.python.org and install it. This will install both Python
|
||||
3 and pip3.
|
||||
|
||||
## virtualenv
|
||||
|
||||
Once Python 3 is installed, open a Terminal and type
|
||||
|
||||
pip3 install virtualenv
|
||||
|
||||
This will install virtualenv from the Python Package Index.
|
|
@ -1,48 +0,0 @@
|
|||
# Generation of LAMMPS Documentation
|
||||
|
||||
The generation of all the documentation is managed by the Makefile inside the
|
||||
`doc/` folder.
|
||||
|
||||
## Usage:
|
||||
|
||||
```bash
|
||||
make html # generate HTML using Sphinx
|
||||
make pdf # generate PDF using htmldoc
|
||||
make clean # remove generated RST files
|
||||
make clean-all # remove entire build folder and any cached data
|
||||
```
|
||||
|
||||
## Installing prerequisites
|
||||
|
||||
To run the documention build toolchain, Python 3 and virtualenv have
|
||||
to be installed. Here are instructions for common setups:
|
||||
|
||||
### Ubuntu
|
||||
|
||||
```bash
|
||||
sudo apt-get install python-virtualenv
|
||||
```
|
||||
|
||||
### Fedora (up to version 21), Red Hat Enterprise Linux or CentOS (up to version 7.x)
|
||||
|
||||
```bash
|
||||
sudo yum install python3-virtualenv
|
||||
```
|
||||
|
||||
### Fedora (since version 22)
|
||||
|
||||
```bash
|
||||
sudo dnf install python3-virtualenv
|
||||
```
|
||||
|
||||
### MacOS X
|
||||
|
||||
## Python 3
|
||||
|
||||
Download the latest Python 3 MacOS X package from https://www.python.org and install it.
|
||||
This will install both Python 3 and pip3.
|
||||
|
||||
## virtualenv
|
||||
|
||||
Once Python 3 is installed, open a Terminal and type `pip3 install virtualenv`. This will
|
||||
install virtualenv from the Python Package Index.
|
|
@ -1,7 +1,7 @@
|
|||
<!-- HTML_ONLY -->
|
||||
<HEAD>
|
||||
<TITLE>LAMMPS Users Manual</TITLE>
|
||||
<META NAME="docnumber" CONTENT="20 Sep 2016 version">
|
||||
<META NAME="docnumber" CONTENT="26 Sep 2016 version">
|
||||
<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
|
||||
<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
|
||||
</HEAD>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<H1></H1>
|
||||
|
||||
LAMMPS Documentation :c,h3
|
||||
20 Sep 2016 version :c,h4
|
||||
26 Sep 2016 version :c,h4
|
||||
|
||||
Version info: :h4
|
||||
|
||||
|
|
|
@ -501,6 +501,7 @@ USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT.
|
|||
"bond/create"_fix_bond_create.html,
|
||||
"bond/swap"_fix_bond_swap.html,
|
||||
"box/relax"_fix_box_relax.html,
|
||||
"cmap"_fix_cmap.html,
|
||||
"controller"_fix_controller.html,
|
||||
"deform (k)"_fix_deform.html,
|
||||
"deposit"_fix_deposit.html,
|
||||
|
|
|
@ -105,8 +105,8 @@ web site.
|
|||
|
||||
If you uncomment the "dump image"_dump_image.html line(s) in the input
|
||||
script a series of JPG images will be produced by the run (assuming
|
||||
you built LAMMPS with JPG support; see "Section start
|
||||
2.2"_Section_start.html for details). These can be viewed
|
||||
you built LAMMPS with JPG support; see "Section
|
||||
2.2"_Section_start.html#start_2 for details). These can be viewed
|
||||
individually or turned into a movie or animated by tools like
|
||||
ImageMagick or QuickTime or various Windows-based tools. See the
|
||||
"dump image"_dump_image.html doc page for more details. E.g. this
|
||||
|
@ -136,5 +136,5 @@ The USER directory has a large number of sub-directories which
|
|||
correspond by name to a USER package. They contain scripts that
|
||||
illustrate how to use the command(s) provided in that package. Many
|
||||
of the sub-directories have their own README files which give further
|
||||
instructions. See the "Section packages"_Section_packages.html doc
|
||||
instructions. See the "Section 4"_Section_packages.html doc
|
||||
page for more info on specific USER packages.
|
||||
|
|
|
@ -71,16 +71,16 @@ Package, Description, Author(s), Doc page, Example, Library
|
|||
"COMPRESS"_#COMPRESS, I/O compression, Axel Kohlmeyer (Temple U), "dump */gz"_dump.html, -, -
|
||||
"CORESHELL"_#CORESHELL, adiabatic core/shell model, Hendrik Heenen (Technical U of Munich), "Section 6.6.25"_Section_howto.html#howto_25, coreshell, -
|
||||
"DIPOLE"_#DIPOLE, point dipole particles, -, "pair_style dipole/cut"_pair_dipole.html, dipole, -
|
||||
"GPU"_#GPU, GPU-enabled styles, Mike Brown (ORNL), "Section accelerate"_accelerate_gpu.html, gpu, lib/gpu
|
||||
"GPU"_#GPU, GPU-enabled styles, Mike Brown (ORNL), "Section 5.3.1"_accelerate_gpu.html, gpu, lib/gpu
|
||||
"GRANULAR"_#GRANULAR, granular systems, -, "Section 6.6.6"_Section_howto.html#howto_6, pour, -
|
||||
"KIM"_#KIM, openKIM potentials, Smirichinski & Elliot & Tadmor (3), "pair_style kim"_pair_kim.html, kim, KIM
|
||||
"KOKKOS"_#KOKKOS, Kokkos-enabled styles, Trott & Moore (4), "Section 5"_accelerate_kokkos.html, kokkos, lib/kokkos
|
||||
"KOKKOS"_#KOKKOS, Kokkos-enabled styles, Trott & Moore (4), "Section 5.3.3"_accelerate_kokkos.html, kokkos, lib/kokkos
|
||||
"KSPACE"_#KSPACE, long-range Coulombic solvers, -, "kspace_style"_kspace_style.html, peptide, -
|
||||
"MANYBODY"_#MANYBODY, many-body potentials, -, "pair_style tersoff"_pair_tersoff.html, shear, -
|
||||
"MEAM"_#MEAM, modified EAM potential, Greg Wagner (Sandia), "pair_style meam"_pair_meam.html, meam, lib/meam
|
||||
"MC"_#MC, Monte Carlo options, -, "fix gcmc"_fix_gcmc.html, -, -
|
||||
"MOLECULE"_#MOLECULE, molecular system force fields, -, "Section 6.6.3"_Section_howto.html#howto_3, peptide, -
|
||||
"OPT"_#OPT, optimized pair styles, Fischer & Richie & Natoli (2), "Section accelerate"_accelerate_opt.html, -, -
|
||||
"OPT"_#OPT, optimized pair styles, Fischer & Richie & Natoli (2), "Section 5.3.5"_accelerate_opt.html, -, -
|
||||
"PERI"_#PERI, Peridynamics models, Mike Parks (Sandia), "pair_style peri"_pair_peri.html, peri, -
|
||||
"POEMS"_#POEMS, coupled rigid body motion, Rudra Mukherjee (JPL), "fix poems"_fix_poems.html, rigid, lib/poems
|
||||
"PYTHON"_#PYTHON, embed Python code in an input script, -, "python"_python.html, python, lib/python
|
||||
|
@ -127,7 +127,6 @@ of the LAMMPS distribution. See the lib/package/README file for info
|
|||
on how to build the library. If it is not listed as lib/package, then
|
||||
it is a third-party library not included in the LAMMPS distribution.
|
||||
See details on all of this below for individual packages.
|
||||
p.s.: are we ever going to get commit messages from you? ;-)
|
||||
|
||||
:line
|
||||
|
||||
|
@ -150,7 +149,7 @@ make machine :pre
|
|||
|
||||
Make.py -p ^asphere -a machine :pre
|
||||
|
||||
Supporting info: "Section howto 6.14"_Section_howto.html#howto_14,
|
||||
Supporting info: "Section 6.14"_Section_howto.html#howto_14,
|
||||
"pair_style gayberne"_pair_gayberne.html, "pair_style
|
||||
resquared"_pair_resquared.html,
|
||||
"doc/PDF/pair_gayberne_extra.pdf"_PDF/pair_gayberne_extra.pdf,
|
||||
|
@ -279,9 +278,8 @@ Contents: Compute and pair styles that implement the adiabatic
|
|||
core/shell model for polarizability. The compute temp/cs command
|
||||
measures the temperature of a system with core/shell particles. The
|
||||
pair styles augment Born, Buckingham, and Lennard-Jones styles with
|
||||
core/shell capabilities. See "Section howto
|
||||
6.26"_Section_howto.html#howto_26 for an overview of how to use the
|
||||
package.
|
||||
core/shell capabilities. See "Section 6.26"_Section_howto.html#howto_26
|
||||
for an overview of how to use the package.
|
||||
|
||||
To install via make or Make.py:
|
||||
|
||||
|
@ -297,8 +295,8 @@ make machine :pre
|
|||
|
||||
Make.py -p ^coreshell -a machine :pre
|
||||
|
||||
Supporting info: "Section howto
|
||||
6.26"_Section_howto.html#howto_26, "compute temp/cs"_compute_temp_cs.html,
|
||||
Supporting info: "Section 6.26"_Section_howto.html#howto_26,
|
||||
"compute temp/cs"_compute_temp_cs.html,
|
||||
"pair_style born/coul/long/cs"_pair_cs.html, "pair_style
|
||||
buck/coul/long/cs"_pair_cs.html, pair_style
|
||||
lj/cut/coul/long/cs"_pair_lj.html, examples/coreshell
|
||||
|
@ -335,7 +333,7 @@ GPU package :link(GPU),h5
|
|||
|
||||
Contents: Dozens of pair styles and a version of the PPPM long-range
|
||||
Coulombic solver for NVIDIA GPUs. All of them have a "gpu" in their
|
||||
style name. "Section accelerate gpu"_accelerate_gpu.html gives
|
||||
style name. "Section 5.3.1"_accelerate_gpu.html gives
|
||||
details of what hardware and Cuda software is required on your system,
|
||||
and how to build and use this package. See the KOKKOS package, which
|
||||
also has GPU-enabled styles.
|
||||
|
@ -380,10 +378,11 @@ make machine :pre
|
|||
|
||||
Make.py -p ^gpu -a machine :pre
|
||||
|
||||
Supporting info: src/GPU/README, lib/gpu/README, "Section
|
||||
acclerate"_Section_accelerate.html, "Section accelerate
|
||||
gpu"_accelerate_gpu.html, Pair Styles section of "Section commands
|
||||
3.5"_Section_commands.html#cmd_5 for any pair style listed with a (g),
|
||||
Supporting info: src/GPU/README, lib/gpu/README,
|
||||
"Section 5.3"_Section_accelerate.html#acc_3,
|
||||
"Section 5.3.1"_accelerate_gpu.html,
|
||||
Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5
|
||||
for any pair style listed with a (g),
|
||||
"kspace_style"_kspace_style.html, "package gpu"_package.html,
|
||||
examples/accelerate, bench/FERMI, bench/KEPLER
|
||||
|
||||
|
@ -409,7 +408,7 @@ make machine :pre
|
|||
|
||||
Make.py -p ^granular -a machine :pre
|
||||
|
||||
Supporting info: "Section howto 6.6"_Section_howto.html#howto_6, "fix
|
||||
Supporting info: "Section 6.6"_Section_howto.html#howto_6, "fix
|
||||
pour"_fix_pour.html, "fix wall/gran"_fix_wall_gran.html, "pair_style
|
||||
gran/hooke"_pair_gran.html, "pair_style
|
||||
gran/hertz/history"_pair_gran.html, examples/pour, bench/in.chute
|
||||
|
@ -453,7 +452,7 @@ Contents: Dozens of atom, pair, bond, angle, dihedral, improper styles
|
|||
which run with the Kokkos library to provide optimization for
|
||||
multicore CPUs (via OpenMP), NVIDIA GPUs, or the Intel Xeon Phi (in
|
||||
native mode). All of them have a "kk" in their style name. "Section
|
||||
accelerate kokkos"_accelerate_kokkos.html gives details of what
|
||||
5.3.3"_accelerate_kokkos.html gives details of what
|
||||
hardware and software is required on your system, and how to build and
|
||||
use this package. See the GPU, OPT, USER-INTEL, USER-OMP packages,
|
||||
which also provide optimizations for the same range of hardware.
|
||||
|
@ -473,9 +472,8 @@ the KOKKOS_ARCH setting in Makefile.kokkos_cuda), Or, as illustrated
|
|||
below, you can use the Make.py script with its "-kokkos" option to
|
||||
choose which hardware to build for. Type "python src/Make.py -h
|
||||
-kokkos" to see the details. If these methods do not work on your
|
||||
system, you will need to read the "Section accelerate
|
||||
kokkos"_accelerate_kokkos.html doc page for details of what
|
||||
Makefile.machine settings are needed.
|
||||
system, you will need to read the "Section 5.3.3"_accelerate_kokkos.html
|
||||
doc page for details of what Makefile.machine settings are needed.
|
||||
|
||||
To install via make or Make.py for each of 3 hardware options:
|
||||
|
||||
|
@ -495,11 +493,11 @@ make machine :pre
|
|||
|
||||
Make.py -p ^kokkos -a machine :pre
|
||||
|
||||
Supporting info: src/KOKKOS/README, lib/kokkos/README, "Section
|
||||
acclerate"_Section_accelerate.html, "Section accelerate
|
||||
kokkos"_accelerate_kokkos.html, Pair Styles section of "Section
|
||||
commands 3.5"_Section_commands.html#cmd_5 for any pair style listed
|
||||
with a (k), "package kokkos"_package.html,
|
||||
Supporting info: src/KOKKOS/README, lib/kokkos/README,
|
||||
"Section 5.3"_Section_accelerate.html#acc_3,
|
||||
"Section 5.3.3"_accelerate_kokkos.html,
|
||||
Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5
|
||||
for any pair style listed with a (k), "package kokkos"_package.html,
|
||||
examples/accelerate, bench/FERMI, bench/KEPLER
|
||||
|
||||
:line
|
||||
|
@ -514,7 +512,7 @@ particle-mesh (PPPM), and multilevel summation method (MSM) solvers.
|
|||
Building with the KSPACE package requires a 1d FFT library be present
|
||||
on your system for use by the PPPM solvers. This can be the KISS FFT
|
||||
library provided with LAMMPS, or 3rd party libraries like FFTW or a
|
||||
vendor-supplied FFT library. See step 6 of "Section start
|
||||
vendor-supplied FFT library. See step 6 of "Section
|
||||
2.2.2"_Section_start.html#start_2_2 of the manual for details of how
|
||||
to select different FFT options in your machine Makefile. The Make.py
|
||||
tool has an "-fft" option which can insert these settings into your
|
||||
|
@ -536,12 +534,13 @@ make machine :pre
|
|||
Make.py -p ^kspace -a machine :pre
|
||||
|
||||
Supporting info: "kspace_style"_kspace_style.html,
|
||||
"doc/PDF/kspace.pdf"_PDF/kspace.pdf, "Section howto
|
||||
6.7"_Section_howto.html#howto_7, "Section howto
|
||||
6.8"_Section_howto.html#howto_8, "Section howto
|
||||
6.9"_Section_howto.html#howto_9, "pair_style coul"_pair_coul.html,
|
||||
other pair style command doc pages which have "long" or "msm" in their
|
||||
style name, examples/peptide, bench/in.rhodo
|
||||
"doc/PDF/kspace.pdf"_PDF/kspace.pdf,
|
||||
"Section 6.7"_Section_howto.html#howto_7,
|
||||
"Section 6.8"_Section_howto.html#howto_8,
|
||||
"Section 6.9"_Section_howto.html#howto_9,
|
||||
"pair_style coul"_pair_coul.html, other pair style command doc pages
|
||||
which have "long" or "msm" in their style name,
|
||||
examples/peptide, bench/in.rhodo
|
||||
|
||||
:line
|
||||
|
||||
|
@ -568,7 +567,7 @@ Make.py -p ^manybody -a machine :pre
|
|||
|
||||
Supporting info:
|
||||
|
||||
Examples: Pair Styles section of "Section commands
|
||||
Examples: Pair Styles section of "Section
|
||||
3.5"_Section_commands.html#cmd_5, examples/comb, examples/eim,
|
||||
examples/nb3d, examples/vashishta
|
||||
|
||||
|
@ -700,9 +699,9 @@ Supporting info:"atom_style"_atom_style.html,
|
|||
"dihedral_style"_dihedral_style.html,
|
||||
"improper_style"_improper_style.html, "pair_style
|
||||
hbond/dreiding/lj"_pair_hbond_dreiding.html, "pair_style
|
||||
lj/charmm/coul/charmm"_pair_charmm.html, "Section howto
|
||||
6.3"_Section_howto.html#howto_3, examples/micelle, examples/peptide,
|
||||
bench/in.chain, bench/in.rhodo
|
||||
lj/charmm/coul/charmm"_pair_charmm.html,
|
||||
"Section 6.3"_Section_howto.html#howto_3,
|
||||
examples/micelle, examples/peptide, bench/in.chain, bench/in.rhodo
|
||||
|
||||
:line
|
||||
|
||||
|
@ -738,7 +737,7 @@ OPT package :link(OPT),h5
|
|||
Contents: A handful of pair styles with an "opt" in their style name
|
||||
which are optimized for improved CPU performance on single or multiple
|
||||
cores. These include EAM, LJ, CHARMM, and Morse potentials. "Section
|
||||
accelerate opt"_accelerate_opt.html gives details of how to build and
|
||||
5.3.5"_accelerate_opt.html gives details of how to build and
|
||||
use this package. See the KOKKOS, USER-INTEL, and USER-OMP packages,
|
||||
which also have styles optimized for CPU performance.
|
||||
|
||||
|
@ -763,10 +762,10 @@ make machine :pre
|
|||
|
||||
Make.py -p ^opt -a machine :pre
|
||||
|
||||
Supporting info: "Section acclerate"_Section_accelerate.html, "Section
|
||||
accelerate opt"_accelerate_opt.html, Pair Styles section of "Section
|
||||
commands 3.5"_Section_commands.html#cmd_5 for any pair style listed
|
||||
with an (o), examples/accelerate, bench/KEPLER
|
||||
Supporting info: "Section 5.3"_Section_accelerate.html#acc_3,
|
||||
"Section 5.3.5"_accelerate_opt.html, Pair Styles section of
|
||||
"Section 3.5"_Section_commands.html#cmd_5 for any pair style
|
||||
listed with an (t), examples/accelerate, bench/KEPLER
|
||||
|
||||
:line
|
||||
|
||||
|
@ -845,14 +844,14 @@ PYTHON package :link(PYTHON),h5
|
|||
|
||||
Contents: A "python"_python.html command which allow you to execute
|
||||
Python code from a LAMMPS input script. The code can be in a separate
|
||||
file or embedded in the input script itself. See "Section python
|
||||
11.2"_Section_python.html" for an overview of using Python from
|
||||
file or embedded in the input script itself. See "Section
|
||||
11.2"_Section_python.html#py-2 for an overview of using Python from
|
||||
LAMMPS and for other ways to use LAMMPS and Python together.
|
||||
|
||||
Building with the PYTHON package assumes you have a Python shared
|
||||
library available on your system, which needs to be a Python 2
|
||||
version, 2.6 or later. Python 3 is not supported. The build uses the
|
||||
contents of the lib/python/Makefile.lammps file to find all the Python
|
||||
version, 2.6 or later. Python 3 is not yet supported. The build uses
|
||||
the contents of the lib/python/Makefile.lammps file to find all the Python
|
||||
files required in the build/link process. See the lib/python/README
|
||||
file if the settings in that file do not work on your system. Note
|
||||
that the Make.py script has a "-python" option to allow an alternate
|
||||
|
@ -950,7 +949,7 @@ REPLICA package :link(REPLICA),h5
|
|||
Contents: A collection of multi-replica methods that are used by
|
||||
invoking multiple instances (replicas) of LAMMPS
|
||||
simulations. Communication between individual replicas is performed in
|
||||
different ways by the different methods. See "Section howto
|
||||
different ways by the different methods. See "Section
|
||||
6.5"_Section_howto.html#howto_5 for an overview of how to run
|
||||
multi-replica simulations in LAMMPS. Multi-replica methods included
|
||||
in the package are nudged elastic band (NEB), parallel replica
|
||||
|
@ -973,7 +972,7 @@ make machine :pre
|
|||
|
||||
Make.py -p ^replica -a machine :pre
|
||||
|
||||
Supporting info: "Section howto 6.5"_Section_howto.html#howto_5,
|
||||
Supporting info: "Section 6.5"_Section_howto.html#howto_5,
|
||||
"neb"_neb.html, "prd"_prd.html, "tad"_tad.html, "temper"_temper.html,
|
||||
"run_style verlet/split"_run_style.html, examples/neb, examples/prd,
|
||||
examples/tad
|
||||
|
@ -1148,13 +1147,13 @@ Package, Description, Author(s), Doc page, Example, Pic/movie, Library
|
|||
"USER-EFF"_#USER-EFF, electron force field, Andres Jaramillo-Botero (Caltech), "pair_style eff/cut"_pair_eff.html, USER/eff, "eff"_eff, -
|
||||
"USER-FEP"_#USER-FEP, free energy perturbation, Agilio Padua (U Blaise Pascal Clermont-Ferrand), "compute fep"_compute_fep.html, USER/fep, -, -
|
||||
"USER-H5MD"_#USER-H5MD, dump output via HDF5, Pierre de Buyl (KU Leuven), "dump h5md"_dump_h5md.html, -, -, lib/h5md
|
||||
"USER-INTEL"_#USER-INTEL, Vectorized CPU and Intel(R) coprocessor styles, W. Michael Brown (Intel), "Section accelerate"_accelerate_intel.html, examples/intel, -, -
|
||||
"USER-INTEL"_#USER-INTEL, Vectorized CPU and Intel(R) coprocessor styles, W. Michael Brown (Intel), "Section 5.3.2"_accelerate_intel.html, examples/intel, -, -
|
||||
"USER-LB"_#USER-LB, Lattice Boltzmann fluid, Colin Denniston (U Western Ontario), "fix lb/fluid"_fix_lb_fluid.html, USER/lb, -, -
|
||||
"USER-MGPT"_#USER-MGPT, fast MGPT multi-ion potentials, Tomas Oppelstrup & John Moriarty (LLNL), "pair_style mgpt"_pair_mgpt.html, USER/mgpt, -, -
|
||||
"USER-MISC"_#USER-MISC, single-file contributions, USER-MISC/README, USER-MISC/README, -, -, -
|
||||
"USER-MANIFOLD"_#USER-MANIFOLD, motion on 2d surface, Stefan Paquay (Eindhoven U of Technology), "fix manifoldforce"_fix_manifoldforce.html, USER/manifold, "manifold"_manifold, -
|
||||
"USER-MOLFILE"_#USER-MOLFILE, "VMD"_VMD molfile plug-ins, Axel Kohlmeyer (Temple U), "dump molfile"_dump_molfile.html, -, -, VMD-MOLFILE
|
||||
"USER-OMP"_#USER-OMP, OpenMP threaded styles, Axel Kohlmeyer (Temple U), "Section accelerate"_accelerate_omp.html, -, -, -
|
||||
"USER-OMP"_#USER-OMP, OpenMP threaded styles, Axel Kohlmeyer (Temple U), "Section 5.3.4"_accelerate_omp.html, -, -, -
|
||||
"USER-PHONON"_#USER-PHONON, phonon dynamical matrix, Ling-Ti Kong (Shanghai Jiao Tong U), "fix phonon"_fix_phonon.html, USER/phonon, -, -
|
||||
"USER-QMMM"_#USER-QMMM, QM/MM coupling, Axel Kohlmeyer (Temple U), "fix qmmm"_fix_qmmm.html, USER/qmmm, -, lib/qmmm
|
||||
"USER-QTB"_#USER-QTB, quantum nuclear effects, Yuan Shen (Stanford), "fix qtb"_fix_qtb.html "fix qbmsst"_fix_qbmsst.html, qtb, -, -
|
||||
|
@ -1353,12 +1352,12 @@ USER-DRUDE package :link(USER-DRUDE),h5
|
|||
|
||||
Contents: This package contains methods for simulating polarizable
|
||||
systems using thermalized Drude oscillators. It has computes, fixes,
|
||||
and pair styles for this purpose. See "Section howto
|
||||
and pair styles for this purpose. See "Section
|
||||
6.27"_Section_howto.html#howto_27 for an overview of how to use the
|
||||
package. See src/USER-DRUDE/README for additional details. There are
|
||||
auxiliary tools for using this package in tools/drude.
|
||||
|
||||
Supporting info: "Section howto 6.27"_Section_howto.html#howto_27,
|
||||
Supporting info: "Section 6.27"_Section_howto.html#howto_27,
|
||||
src/USER-DRUDE/README, "fix drude"_fix_drude.html, "fix
|
||||
drude/transform/*"_fix_drude_transform.html, "compute
|
||||
temp/drude"_compute_temp_drude.html, "pair thole"_pair_thole.html,
|
||||
|
@ -1432,7 +1431,7 @@ USER-INTEL package :link(USER-INTEL),h5
|
|||
Contents: Dozens of pair, bond, angle, dihedral, and improper styles
|
||||
that are optimized for Intel CPUs and the Intel Xeon Phi (in offload
|
||||
mode). All of them have an "intel" in their style name. "Section
|
||||
accelerate intel"_accelerate_intel.html gives details of what hardware
|
||||
5.3.2"_accelerate_intel.html gives details of what hardware
|
||||
and compilers are required on your system, and how to build and use
|
||||
this package. Also see src/USER-INTEL/README for more details. See
|
||||
the KOKKOS, OPT, and USER-OMP packages, which also have CPU and
|
||||
|
@ -1440,7 +1439,7 @@ Phi-enabled styles.
|
|||
|
||||
Supporting info: examples/accelerate, src/USER-INTEL/TEST
|
||||
|
||||
"Section 5"_Section_accelerate.html#acc_3
|
||||
"Section 5.3"_Section_accelerate.html#acc_3
|
||||
|
||||
Author: Mike Brown at Intel (michael.w.brown at intel.com). Contact
|
||||
him directly if you have questions.
|
||||
|
@ -1532,7 +1531,7 @@ More information about each feature can be found by reading its doc
|
|||
page in the LAMMPS doc directory. The doc page which lists all LAMMPS
|
||||
input script commands is as follows:
|
||||
|
||||
"Section 3"_Section_commands.html#cmd_5
|
||||
"Section 3.5"_Section_commands.html#cmd_5
|
||||
|
||||
User-contributed features are listed at the bottom of the fix,
|
||||
compute, pair, etc sections.
|
||||
|
@ -1609,7 +1608,7 @@ styles, and fix styles.
|
|||
|
||||
See this section of the manual to get started:
|
||||
|
||||
"Section 5"_Section_accelerate.html#acc_3
|
||||
"Section 5.3"_Section_accelerate.html#acc_3
|
||||
|
||||
The person who created this package is Axel Kohlmeyer at Temple U
|
||||
(akohlmey at gmail.com). Contact him directly if you have questions.
|
||||
|
|
|
@ -51,7 +51,7 @@ of these 5 problems on 1 or 4 cores of Linux desktop. The bench/FERMI
|
|||
and bench/KEPLER dirs have input files and scripts and instructions
|
||||
for running the same (or similar) problems using OpenMP or GPU or Xeon
|
||||
Phi acceleration options. See the README files in those dirs and the
|
||||
"Section accelerate"_Section_accelerate.html doc pages for
|
||||
"Section 5.3"_Section_accelerate.html#acc_3 doc pages for
|
||||
instructions on how to build LAMMPS and run on that kind of hardware.
|
||||
|
||||
The bench/POTENTIALS directory has input files which correspond to the
|
||||
|
|
|
@ -21,7 +21,6 @@ experienced users.
|
|||
2.8 "Screen output"_#start_8
|
||||
2.9 "Tips for users of previous versions"_#start_9 :all(b)
|
||||
|
||||
:line
|
||||
:line
|
||||
|
||||
2.1 What's in the LAMMPS distribution :h4,link(start_1)
|
||||
|
@ -70,12 +69,12 @@ launch a LAMMPS Windows executable on a Windows box.
|
|||
|
||||
This section has the following sub-sections:
|
||||
|
||||
"Read this first"_#start_2_1
|
||||
"Steps to build a LAMMPS executable"_#start_2_2
|
||||
"Common errors that can occur when making LAMMPS"_#start_2_3
|
||||
"Additional build tips"_#start_2_4
|
||||
"Building for a Mac"_#start_2_5
|
||||
"Building for Windows"_#start_2_6 :ul
|
||||
2.2.1 "Read this first"_#start_2_1
|
||||
2.2.1 "Steps to build a LAMMPS executable"_#start_2_2
|
||||
2.2.3 "Common errors that can occur when making LAMMPS"_#start_2_3
|
||||
2.2.4 "Additional build tips"_#start_2_4
|
||||
2.2.5 "Building for a Mac"_#start_2_5
|
||||
2.2.6 "Building for Windows"_#start_2_6 :all(b)
|
||||
|
||||
:line
|
||||
|
||||
|
@ -559,8 +558,7 @@ Typing "make clean-all" or "make clean-machine" will delete *.o object
|
|||
files created when LAMMPS is built, for either all builds or for a
|
||||
particular machine.
|
||||
|
||||
Changing the LAMMPS size limits via -DLAMMPS_SMALLBIG or
|
||||
-DLAMMPS_BIGBIG or -DLAMMPS_SMALLSMALL :h6
|
||||
Changing the LAMMPS size limits via -DLAMMPS_SMALLBIG or -DLAMMPS_BIGBIG or -DLAMMPS_SMALLSMALL :h6
|
||||
|
||||
As explained above, any of these 3 settings can be specified on the
|
||||
LMP_INC line in your low-level src/MAKE/Makefile.foo.
|
||||
|
@ -612,7 +610,7 @@ neighbor lists and would run very slowly in terms of CPU secs/timestep.
|
|||
|
||||
Building for a Mac :h5,link(start_2_5)
|
||||
|
||||
OS X is BSD Unix, so it should just work. See the
|
||||
OS X is a derivative of BSD Unix, so it should just work. See the
|
||||
src/MAKE/MACHINES/Makefile.mac and Makefile.mac_mpi files.
|
||||
|
||||
:line
|
||||
|
@ -637,9 +635,9 @@ happy to distribute contributed instructions and modifications, but
|
|||
we cannot provide support for those.
|
||||
|
||||
With the so-called "Anniversary Update" to Windows 10, there is a
|
||||
Ubuntu subsystem available for Windows, that can be installed and
|
||||
then it can be used to compile/install LAMMPS as if you are running
|
||||
on a Ubuntu Linux system.
|
||||
Ubuntu Linux subsystem available for Windows, that can be installed
|
||||
and then used to compile/install LAMMPS as if you are running on a
|
||||
Ubuntu Linux system instead of Windows.
|
||||
|
||||
As an alternative, you can download "daily builds" (and some older
|
||||
versions) of the installer packages from
|
||||
|
@ -654,10 +652,10 @@ many examples, but no source code.
|
|||
|
||||
This section has the following sub-sections:
|
||||
|
||||
"Package basics"_#start_3_1
|
||||
"Including/excluding packages"_#start_3_2
|
||||
"Packages that require extra libraries"_#start_3_3
|
||||
"Packages that require Makefile.machine settings"_#start_3_4 :ul
|
||||
2.3.1 "Package basics"_#start_3_1
|
||||
2.3.2 "Including/excluding packages"_#start_3_2
|
||||
2.3.3 "Packages that require extra libraries"_#start_3_3
|
||||
2.3.4 "Packages that require Makefile.machine settings"_#start_3_4 :all(b)
|
||||
|
||||
Note that the following "Section 2.4"_#start_4 describes the Make.py
|
||||
tool which can be used to install/un-install packages and build the
|
||||
|
@ -673,7 +671,7 @@ are always included, plus optional packages. Packages are groups of
|
|||
files that enable a specific set of features. For example, force
|
||||
fields for molecular systems or granular systems are in packages.
|
||||
|
||||
"Section packages"_Section_packages.html in the manual has details
|
||||
"Section 4"_Section_packages.html in the manual has details
|
||||
about all the packages, including specific instructions for building
|
||||
LAMMPS with each package, which are covered in a more general manner
|
||||
below.
|
||||
|
@ -727,15 +725,15 @@ before building LAMMPS. From the src directory, this is typically as
|
|||
simple as:
|
||||
|
||||
make yes-colloid
|
||||
make g++ :pre
|
||||
make mpi :pre
|
||||
|
||||
or
|
||||
|
||||
make no-manybody
|
||||
make g++ :pre
|
||||
make mpi :pre
|
||||
|
||||
NOTE: You should NOT include/exclude packages and build LAMMPS in a
|
||||
single make command using multiple targets, e.g. make yes-colloid g++.
|
||||
single make command using multiple targets, e.g. make yes-colloid mpi.
|
||||
This is because the make procedure creates a list of source files that
|
||||
will be out-of-date for the build if the package configuration changes
|
||||
within the same command.
|
||||
|
@ -826,7 +824,7 @@ where to find them.
|
|||
For libraries with provided code, the sub-directory README file
|
||||
(e.g. lib/atc/README) has instructions on how to build that library.
|
||||
This information is also summarized in "Section
|
||||
packages"_Section_packages.html. Typically this is done by typing
|
||||
4"_Section_packages.html. Typically this is done by typing
|
||||
something like:
|
||||
|
||||
make -f Makefile.g++ :pre
|
||||
|
@ -885,17 +883,17 @@ A few packages require specific settings in Makefile.machine, to
|
|||
either build or use the package effectively. These are the
|
||||
USER-INTEL, KOKKOS, USER-OMP, and OPT packages, used for accelerating
|
||||
code performance on CPUs or other hardware, as discussed in "Section
|
||||
acclerate"_Section_accelerate.html.
|
||||
5.3"_Section_accelerate.html#acc_3.
|
||||
|
||||
A summary of what Makefile.machine changes are needed for each of
|
||||
these packages is given in "Section packages"_Section_packages.html.
|
||||
these packages is given in "Section 4"_Section_packages.html.
|
||||
The details are given on the doc pages that describe each of these
|
||||
accelerator packages in detail:
|
||||
|
||||
"USER-INTEL package"_accelerate_intel.html
|
||||
"KOKKOS package"_accelerate_kokkos.html
|
||||
"USER-OMP package"_accelerate_omp.html
|
||||
"OPT package"_accelerate_opt.html :ul
|
||||
5.3.1 "USER-INTEL package"_accelerate_intel.html
|
||||
5.3.3 "KOKKOS package"_accelerate_kokkos.html
|
||||
5.3.4 "USER-OMP package"_accelerate_omp.html
|
||||
5.3.5 "OPT package"_accelerate_opt.html :all(b)
|
||||
|
||||
You can also look at the following machine Makefiles in
|
||||
src/MAKE/OPTIONS, which include the changes. Note that the USER-INTEL
|
||||
|
@ -1367,7 +1365,7 @@ Note that the keywords do not use a leading minus sign. I.e. the
|
|||
keyword is "t", not "-t". Also note that each of the keywords has a
|
||||
default setting. Example of when to use these options and what
|
||||
settings to use on different platforms is given in "Section
|
||||
5.8"_Section_accelerate.html#acc_3.
|
||||
5.3"_Section_accelerate.html#acc_3.
|
||||
|
||||
d or device
|
||||
g or gpus
|
||||
|
|
|
@ -107,9 +107,10 @@ The ch2lmp sub-directory contains tools for converting files
|
|||
back-and-forth between the CHARMM MD code and LAMMPS.
|
||||
|
||||
They are intended to make it easy to use CHARMM as a builder and as a
|
||||
post-processor for LAMMPS. Using charmm2lammps.pl, you can convert an
|
||||
ensemble built in CHARMM into its LAMMPS equivalent. Using
|
||||
lammps2pdb.pl you can convert LAMMPS atom dumps into pdb files.
|
||||
post-processor for LAMMPS. Using charmm2lammps.pl, you can convert a
|
||||
PDB file with associated CHARMM info, including CHARMM force field
|
||||
data, into its LAMMPS equivalent. Using lammps2pdb.pl you can convert
|
||||
LAMMPS atom dumps into PDB files.
|
||||
|
||||
See the README file in the ch2lmp sub-directory for more information.
|
||||
|
||||
|
|
|
@ -156,19 +156,25 @@ CPU-only (run all-MPI or with OpenMP threading):
|
|||
|
||||
cd lammps/src
|
||||
make yes-kokkos
|
||||
make g++ KOKKOS_DEVICES=OpenMP :pre
|
||||
make kokkos_omp :pre
|
||||
|
||||
Intel Xeon Phi:
|
||||
CPU-only (only MPI, no threading):
|
||||
|
||||
cd lammps/src
|
||||
make yes-kokkos
|
||||
make g++ KOKKOS_DEVICES=OpenMP KOKKOS_ARCH=KNC :pre
|
||||
make kokkos_mpi :pre
|
||||
|
||||
CPUs and GPUs:
|
||||
Intel Xeon Phi (Intel Compiler, Intel MPI):
|
||||
|
||||
cd lammps/src
|
||||
make yes-kokkos
|
||||
make cuda KOKKOS_DEVICES=Cuda :pre
|
||||
make kokkos_phi :pre
|
||||
|
||||
CPUs and GPUs (with MPICH):
|
||||
|
||||
cd lammps/src
|
||||
make yes-kokkos
|
||||
make kokkos_cuda_mpich :pre
|
||||
|
||||
These examples set the KOKKOS-specific OMP, MIC, CUDA variables on the
|
||||
make command line which requires a GNU-compatible make command. Try
|
||||
|
@ -180,26 +186,6 @@ first two examples above, then you *must* perform a "make clean-all"
|
|||
or "make clean-machine" before each build. This is to force all the
|
||||
KOKKOS-dependent files to be re-compiled with the new options.
|
||||
|
||||
You can also hardwire these make variables in the specified machine
|
||||
makefile, e.g. src/MAKE/Makefile.g++ in the first two examples above,
|
||||
with a line like:
|
||||
|
||||
KOKKOS_ARCH = KNC :pre
|
||||
|
||||
Note that if you build LAMMPS multiple times in this manner, using
|
||||
different KOKKOS options (defined in different machine makefiles), you
|
||||
do not have to worry about doing a "clean" in between. This is
|
||||
because the targets will be different.
|
||||
|
||||
NOTE: The 3rd example above for a GPU, uses a different machine
|
||||
makefile, in this case src/MAKE/Makefile.cuda, which is included in
|
||||
the LAMMPS distribution. To build the KOKKOS package for a GPU, this
|
||||
makefile must use the NVIDA "nvcc" compiler. And it must have a
|
||||
KOKKOS_ARCH setting that is appropriate for your NVIDIA hardware and
|
||||
installed software. Typical values for KOKKOS_ARCH are given below,
|
||||
as well as other settings that must be included in the machine
|
||||
makefile, if you create your own.
|
||||
|
||||
NOTE: Currently, there are no precision options with the KOKKOS
|
||||
package. All compilation and computation is performed in double
|
||||
precision.
|
||||
|
@ -246,7 +232,7 @@ used if running with KOKKOS_DEVICES=Pthreads for pthreads. It is not
|
|||
necessary for KOKKOS_DEVICES=OpenMP for OpenMP, because OpenMP
|
||||
provides alternative methods via environment variables for binding
|
||||
threads to hardware cores. More info on binding threads to cores is
|
||||
given in "this section"_Section_accelerate.html#acc_3.
|
||||
given in "Section 5.3"_Section_accelerate.html#acc_3.
|
||||
|
||||
KOKKOS_ARCH=KNC enables compiler switches needed when compling for an
|
||||
Intel Phi processor.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
:line
|
||||
|
||||
"Return to Section accelerate overview"_Section_accelerate.html
|
||||
"Return to Section 5 overview"_Section_accelerate.html
|
||||
|
||||
5.3.4 USER-OMP package :h5
|
||||
|
||||
|
@ -103,8 +103,8 @@ USER-OMP style (in serial or parallel) with a single thread per MPI
|
|||
task, versus running standard LAMMPS with its standard un-accelerated
|
||||
styles (in serial or all-MPI parallelization with 1 task/core). This
|
||||
is because many of the USER-OMP styles contain similar optimizations
|
||||
to those used in the OPT package, described in "Section accelerate
|
||||
5.3.6"_accelerate_opt.html.
|
||||
to those used in the OPT package, described in "Section
|
||||
5.3.5"_accelerate_opt.html.
|
||||
|
||||
With multiple threads/task, the optimal choice of number of MPI
|
||||
tasks/node and OpenMP threads/task can vary a lot and should always be
|
||||
|
|
|
@ -35,7 +35,12 @@ group/group"_compute_group_group.html only that the data is
|
|||
accumulated directly during the non-bonded force computation. The
|
||||
computes {force/tally}, {pe/tally}, {stress/tally}, and
|
||||
{heat/flux/tally} are primarily provided as example how to program
|
||||
additional, more sophisticated computes using the tally mechanism.
|
||||
additional, more sophisticated computes using the tally callback
|
||||
mechanism. Compute {pe/mol/tally} is one such style, that can
|
||||
- through using this mechanism - separately tally intermolecular
|
||||
and intramolecular energies. Something that would otherwise be
|
||||
impossible without integrating this as a core functionality into
|
||||
the based classes of LAMMPS.
|
||||
|
||||
:line
|
||||
|
||||
|
@ -56,7 +61,7 @@ atom scalar (the contributions of the single atom to the global
|
|||
scalar). Compute {pe/mol/tally} calculates a global 4-element vector
|
||||
containing (in this order): {evdwl} and {ecoul} for intramolecular pairs
|
||||
and {evdwl} and {ecoul} for intermolecular pairs. Since molecules are
|
||||
identified my their molecule IDs, the partitioning does not have to be
|
||||
identified by their molecule IDs, the partitioning does not have to be
|
||||
related to molecules, but the energies are tallied into the respective
|
||||
slots depending on whether the molecule IDs of a pair are the same or
|
||||
different. Compute {force/tally} calculates a global scalar (the force
|
||||
|
|
|
@ -328,8 +328,8 @@ bonds and colors.
|
|||
|
||||
Note that {atom}, {custom}, {dcd}, {xtc}, and {xyz} style dump files
|
||||
can be read directly by "VMD"_http://www.ks.uiuc.edu/Research/vmd, a
|
||||
popular molecular viewing program. See "Section
|
||||
tools"_Section_tools.html#vmd of the manual and the
|
||||
popular molecular viewing program. See
|
||||
"Section 9"_Section_tools.html#vmd of the manual and the
|
||||
tools/lmp2vmd/README.txt file for more information about support in
|
||||
VMD for reading and visualizing LAMMPS dump files.
|
||||
|
||||
|
@ -390,7 +390,7 @@ Using MPI-IO requires two steps. First, build LAMMPS with its MPIIO
|
|||
package installed, e.g.
|
||||
|
||||
make yes-mpiio # installs the MPIIO package
|
||||
make g++ # build LAMMPS for your platform :pre
|
||||
make mpi # build LAMMPS for your platform :pre
|
||||
|
||||
Second, use a dump filename which contains ".mpiio". Note that it
|
||||
does not have to end in ".mpiio", just contain those characters.
|
||||
|
@ -531,7 +531,7 @@ so that each value is 0.0 to 1.0. If the simulation box is triclinic
|
|||
(tilted), then all atom coords will still be between 0.0 and 1.0.
|
||||
I.e. actual unscaled (x,y,z) = xs*A + ys*B + zs*C, where (A,B,C) are
|
||||
the non-orthogonal vectors of the simulation box edges, as discussed
|
||||
in "Section howto 6.12"_Section_howto.html#howto_12.
|
||||
in "Section 6.12"_Section_howto.html#howto_12.
|
||||
|
||||
Use {xu}, {yu}, {zu} if you want the coordinates "unwrapped" by the
|
||||
image flags for each atom. Unwrapped means that if the atom has
|
||||
|
|
|
@ -34,7 +34,7 @@ to one or more files every N timesteps in one of several formats.
|
|||
Only information for atoms in the specified group is dumped. This
|
||||
specific dump style uses molfile plugins that are bundled with the
|
||||
"VMD"_http://www.ks.uiuc.edu/Research/vmd molecular visualization and
|
||||
analysis program. See "Section tools"_Section_tools.html#vmd of the
|
||||
analysis program. See "Section 9"_Section_tools.html#vmd of the
|
||||
manual and the tools/lmp2vmd/README.txt file for more information
|
||||
about support in VMD for reading and visualizing native LAMMPS dump
|
||||
files.
|
||||
|
|
|
@ -0,0 +1,132 @@
|
|||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
fix cmap command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
fix ID group-ID cmap filename :pre
|
||||
|
||||
ID, group-ID are documented in "fix"_fix.html command
|
||||
cmap = style name of this fix command
|
||||
filename = force-field file with CMAP coefficients :ul
|
||||
|
||||
[Examples:]
|
||||
|
||||
fix myCMAP all cmap ../potentials/cmap36.data
|
||||
read_data proteinX.data fix myCMAP crossterm CMAP
|
||||
fix_modify myCMAP energy yes :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
This command enables CMAP crossterms to be added to simulations which
|
||||
use the CHARMM force field. These are relevant for any CHARMM model
|
||||
of a peptide or protein sequences that is 3 or more amino-acid
|
||||
residues long; see "(Buck)"_#Buck and "(Brooks)"_#Brooks for details,
|
||||
including the analytic energy expressions for CMAP interactions. The
|
||||
CMAP crossterms add additional potential energy contributions to pairs
|
||||
of overlapping phi-psi dihedrals of amino-acids, which are important
|
||||
to properly represent their conformational behavior.
|
||||
|
||||
The examples/cmap directory has a sample input script and data file
|
||||
for a small peptide, that illustrates use of the fix cmap command.
|
||||
|
||||
As in the example above, this fix should be used before reading a data
|
||||
file that contains a listing of CMAP interactions. The {filename}
|
||||
specified should contain the CMAP parameters for a particular version
|
||||
of the CHARMM force field. Two such files are including in the
|
||||
lammps/potentials directory: charmm22.cmap and charmm36.cmap.
|
||||
|
||||
The data file read by the "read_data" must contain the topology of all
|
||||
the CMAP interactions, similar to the topology data for bonds, angles,
|
||||
dihedrals, etc. Specically it should have a line like this
|
||||
in its header section:
|
||||
|
||||
N crossterms :pre
|
||||
|
||||
where N is the number of CMAP crossterms. It should also have a section
|
||||
in the body of the data file like this with N lines:
|
||||
|
||||
CMAP :pre
|
||||
|
||||
1 1 8 10 12 18 20
|
||||
2 5 18 20 22 25 27
|
||||
...
|
||||
N 3 314 315 317 318 330 :pre
|
||||
|
||||
The first column is an index from 1 to N to enumerate the CMAP terms;
|
||||
it is ignored by LAMMPS. The 2nd column is the "type" of the
|
||||
interaction; it is an index into the CMAP force field file. The
|
||||
remaining 5 columns are the atom IDs of the atoms in the two 4-atom
|
||||
dihedrals that overlap to create the CMAP 5-body interaction. Note
|
||||
that the "crossterm" and "CMAP" keywords for the header and body
|
||||
sections match those specified in the read_data command following the
|
||||
data file name; see the "read_data"_doc/read_data.html doc page for
|
||||
more details.
|
||||
|
||||
A data file containing CMAP crossterms can be generated from a PDB
|
||||
file using the charmm2lammps.pl script in the tools/ch2lmp directory
|
||||
of the LAMMPS distribution. The script must be invoked with the
|
||||
optional "-cmap" flag to do this; see the tools/ch2lmp/README file for
|
||||
more information.
|
||||
|
||||
The potential energy associated with CMAP interactions can be output
|
||||
as described below. It can also be included in the total potential
|
||||
energy of the system, as output by the
|
||||
"thermo_style"_thermo_style.html command, if the "fix_modify
|
||||
energy"_fix_modify.html command is used, as in the example above. See
|
||||
the note below about how to include the CMAP energy when performing an
|
||||
"energy minimization"_minimize.html.
|
||||
|
||||
:line
|
||||
|
||||
[Restart, fix_modify, output, run start/stop, minimize info:]
|
||||
|
||||
No information about this fix is written to "binary restart
|
||||
files"_restart.html.
|
||||
|
||||
The "fix_modify"_fix_modify.html {energy} option is supported by this
|
||||
fix to add the potential "energy" of the CMAP interactions system's
|
||||
potential energy as part of "thermodynamic output"_thermo_style.html.
|
||||
|
||||
This fix computes a global scalar which can be accessed by various
|
||||
"output commands"_Section_howto.html#howto_15. The scalar is the
|
||||
potential energy discussed above. The scalar value calculated by this
|
||||
fix is "extensive".
|
||||
|
||||
No parameter of this fix can be used with the {start/stop} keywords of
|
||||
the "run"_run.html command.
|
||||
|
||||
The forces due to this fix are imposed during an energy minimization,
|
||||
invoked by the "minimize"_minimize.html command.
|
||||
|
||||
NOTE: If you want the potential energy associated with the CMAP terms
|
||||
forces to be included in the total potential energy of the system (the
|
||||
quantity being minimized), you MUST enable the
|
||||
"fix_modify"_fix_modify.html {energy} option for this fix.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
This fix can only be used if LAMMPS was built with the MOLECULE
|
||||
package (which it is by default). See the "Making
|
||||
LAMMPS"_Section_start.html#start_3 section for more info on packages.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"fix_modify"_fix_modify.html, "read_data"_read_data.html
|
||||
|
||||
[Default:] none
|
||||
|
||||
:line
|
||||
|
||||
(Buck)
|
||||
Buck, Bouguet-Bonnet, Pastor, MacKerell Jr., Biophys J, 90, L36
|
||||
(2006).
|
||||
|
||||
(Brooks)
|
||||
Brooks, Brooks, MacKerell Jr., J Comput Chem, 30, 1545 (2009).
|
|
@ -43,10 +43,11 @@ fix 1 all phonon 10 5000 500000 GAMMA EAM0D nasr 100 :pre
|
|||
Calculate the dynamical matrix from molecular dynamics simulations
|
||||
based on fluctuation-dissipation theory for a group of atoms.
|
||||
|
||||
Consider a crystal with \(N\) unit cells in three dimensions labelled \(l = (l_1, l_2, l_3)\) where \(l_i\)
|
||||
are integers. Each unit cell is defined by three linearly independent
|
||||
vectors \(\mathbf\{a\}_1\), \(\mathbf\{a\}_2\), \(\mathbf\{a\}_3\) forming a
|
||||
parallelipiped, containing \(K\) basis atoms labeled \(k\).
|
||||
Consider a crystal with \(N\) unit cells in three dimensions labelled
|
||||
\(l = (l_1, l_2, l_3)\) where \(l_i\) are integers. Each unit cell is
|
||||
defined by three linearly independent vectors \(\mathbf\{a\}_1\),
|
||||
\(\mathbf\{a\}_2\), \(\mathbf\{a\}_3\) forming a parallelipiped,
|
||||
containing \(K\) basis atoms labeled \(k\).
|
||||
|
||||
Based on fluctuation-dissipation theory, the force constant
|
||||
coefficients of the system in reciprocal space are given by
|
||||
|
@ -62,18 +63,16 @@ where \(\mathbf\{G\}\) is the Green's functions coefficients given by
|
|||
\mathbf\{G\}_\{k\alpha,k^\prime \beta\}(\mathbf\{q\}) = \left< \mathbf\{u\}_\{k\alpha\}(\mathbf\{q\}) \bullet \mathbf\{u\}_\{k^\prime \beta\}^*(\mathbf\{q\}) \right>
|
||||
\end\{equation\}
|
||||
|
||||
|
||||
where \(\left< \ldots \right>\) denotes the ensemble average, and
|
||||
|
||||
\begin\{equation\}
|
||||
\mathbf\{u\}_\{k\alpha\}(\mathbf\{q\}) = \sum_l \mathbf\{u\}_\{l k \alpha\} \exp\{(i\mathbf\{qr\}_l)\}
|
||||
\end\{equation\}
|
||||
|
||||
|
||||
is the \(\alpha\) component of the atomic displacement for the \(k\) th atom
|
||||
in the unit cell in reciprocal space at \(\mathbf\{q\}\). In practice, the Green's
|
||||
functions coefficients can also be measured according to the following
|
||||
formula,
|
||||
is the \(\alpha\) component of the atomic displacement for the \(k\)
|
||||
th atom in the unit cell in reciprocal space at \(\mathbf\{q\}\). In
|
||||
practice, the Green's functions coefficients can also be measured
|
||||
according to the following formula,
|
||||
|
||||
\begin\{equation\}
|
||||
\mathbf\{G\}_\{k\alpha,k^\prime \beta\}(\mathbf\{q\}) =
|
||||
|
@ -81,12 +80,13 @@ formula,
|
|||
- \left<\mathbf\{R\}\right>_\{k \alpha\}(\mathbf\{q\}) \bullet \left<\mathbf\{R\}\right>^*_\{k^\prime \beta\}(\mathbf\{q\})
|
||||
\end\{equation\}
|
||||
|
||||
where \(\mathbf\{R\}\) is the instantaneous positions of atoms, and \(\left<\mathbf\{R\}\right>\) is the
|
||||
averaged atomic positions. It gives essentially the same results as
|
||||
the displacement method and is easier to implement in an MD code.
|
||||
where \(\mathbf\{R\}\) is the instantaneous positions of atoms, and
|
||||
\(\left<\mathbf\{R\}\right>\) is the averaged atomic positions. It
|
||||
gives essentially the same results as the displacement method and is
|
||||
easier to implement in an MD code.
|
||||
|
||||
Once the force constant matrix is known, the dynamical matrix \(\mathbf\{D\}\) can
|
||||
then be obtained by
|
||||
Once the force constant matrix is known, the dynamical matrix
|
||||
\(\mathbf\{D\}\) can then be obtained by
|
||||
|
||||
\begin\{equation\}
|
||||
\mathbf\{D\}_\{k\alpha, k^\prime\beta\}(\mathbf\{q\}) =
|
||||
|
@ -100,10 +100,11 @@ two-point correlations. To achieve this. the positions of the atoms
|
|||
are examined every {Nevery} steps and are Fourier-transformed into
|
||||
reciprocal space, where the averaging process and correlation
|
||||
computation is then done. After every {Noutput} measurements, the
|
||||
matrix \(\mathbf\{G\}(\mathbf\{q\})\) is calculated and inverted to obtain the elastic
|
||||
stiffness coefficients. The dynamical matrices are then constructed
|
||||
and written to {prefix}.bin.timestep files in binary format and to the
|
||||
file {prefix}.log for each wavevector \(\mathbf\{q\}\).
|
||||
matrix \(\mathbf\{G\}(\mathbf\{q\})\) is calculated and inverted to
|
||||
obtain the elastic stiffness coefficients. The dynamical matrices are
|
||||
then constructed and written to {prefix}.bin.timestep files in binary
|
||||
format and to the file {prefix}.log for each wavevector
|
||||
\(\mathbf\{q\}\).
|
||||
|
||||
A detailed description of this method can be found in
|
||||
("Kong2011"_#Kong2011).
|
||||
|
@ -126,12 +127,13 @@ which lattice point; the lattice indices start from 0. An auxiliary
|
|||
code, "latgen"_http://code.google.com/p/latgen, can be employed to
|
||||
generate the compatible map file for various crystals.
|
||||
|
||||
In case one simulates an aperiodic system, where the whole simulation box
|
||||
is treated as a unit cell, one can set {map_file} as {GAMMA}, so that the mapping
|
||||
info will be generated internally and a file is not needed. In this case, the
|
||||
dynamical matrix at only the gamma-point will/can be evaluated. Please keep in
|
||||
mind that fix-phonon is designed for cyrstals, it will be inefficient and
|
||||
even degrade the performance of lammps in case the unit cell is too large.
|
||||
In case one simulates an aperiodic system, where the whole simulation
|
||||
box is treated as a unit cell, one can set {map_file} as {GAMMA}, so
|
||||
that the mapping info will be generated internally and a file is not
|
||||
needed. In this case, the dynamical matrix at only the gamma-point
|
||||
will/can be evaluated. Please keep in mind that fix-phonon is designed
|
||||
for cyrstals, it will be inefficient and even degrade the performance
|
||||
of lammps in case the unit cell is too large.
|
||||
|
||||
The calculated dynamical matrix elements are written out in
|
||||
"energy/distance^2/mass"_units.html units. The coordinates for {q}
|
||||
|
|
|
@ -99,8 +99,8 @@ center-of-mass fixed during the thermodynamic integration. A nonzero
|
|||
total velocity will result in divergences during the integration due
|
||||
to the fact that the atoms are 'attached' to their equilibrium
|
||||
positions by the Einstein crystal. Check the option {zero} of "fix
|
||||
langevin"_fix_langevin_html and "velocity"_velocity.html. The use of
|
||||
the Nose-Hoover thermostat ("fix nvt"_fix_nvt.html) is {NOT}
|
||||
langevin"_fix_langevin.html and "velocity"_velocity.html. The use of
|
||||
the Nose-Hoover thermostat ("fix nvt"_fix_nh.html) is {NOT}
|
||||
recommended due to its well documented issues with the canonical
|
||||
sampling of harmonic degrees of freedom (notice that the {chain}
|
||||
option will {NOT} solve this problem). The Langevin thermostat ("fix
|
||||
|
|
|
@ -85,8 +85,10 @@ to feel no force (they don't "see" the wall) when in one location,
|
|||
then move a distance epsilon, and suddenly feel a large force because
|
||||
they now "see" the wall. In a worst-case scenario, this can blow
|
||||
particles out of the simulation box. Thus, as a general rule you
|
||||
should not use the fix wall/region command with {union} or
|
||||
{interesect} regions that have convex points or edges.
|
||||
should not use the fix wall/gran/region command with {union} or
|
||||
{interesect} regions that have convex points or edges resulting from
|
||||
the union/intersection (convex points/edges in the union/intersection
|
||||
due to a single sub-region are still OK).
|
||||
|
||||
NOTE: Similarly, you should not define {union} or {intersert} regions
|
||||
for use with this command that share an overlapping common face that
|
||||
|
|
|
@ -138,7 +138,6 @@ Fixes :h1
|
|||
fix_temp_rescale_eff
|
||||
fix_tfmc
|
||||
fix_thermal_conductivity
|
||||
fix_ti_rs
|
||||
fix_ti_spring
|
||||
fix_tmd
|
||||
fix_ttm
|
||||
|
|
|
@ -247,7 +247,6 @@ fix_smd_integrate_tlsph.html
|
|||
fix_smd_integrate_ulsph.html
|
||||
fix_smd_move_triangulated_surface.html
|
||||
fix_smd_setvel.html
|
||||
fix_smd_tlsph_reference_configuration.html
|
||||
fix_smd_wall_surface.html
|
||||
fix_spring.html
|
||||
fix_spring_chunk.html
|
||||
|
@ -262,7 +261,6 @@ fix_temp_rescale.html
|
|||
fix_temp_rescale_eff.html
|
||||
fix_tfmc.html
|
||||
fix_thermal_conductivity.html
|
||||
fix_ti_rs.html
|
||||
fix_ti_spring.html
|
||||
fix_tmd.html
|
||||
fix_ttm.html
|
|
@ -142,7 +142,7 @@ the style options are set, either to default values or to specified
|
|||
settings. I.e. settings from previous invocations do not persist
|
||||
across multiple invocations.
|
||||
|
||||
See the "Section Accelerate"_Section_accelerate.html section of the
|
||||
See the "Section 5.3"_Section_accelerate.html#acc_3 section of the
|
||||
manual for more details about using the various accelerator packages
|
||||
for speeding up LAMMPS simulations.
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ solvent simulations of salt ions "(Lenart)"_#Lenart and of surfactants
|
|||
"(Jusufi)"_#Jusufi. In these instances the Gaussian potential mimics
|
||||
the hydration barrier between a pair of particles. The hydration
|
||||
barrier is located at r_mh and has a width of sigma_h. The prefactor
|
||||
determines the hight of the potential barrier.
|
||||
determines the height of the potential barrier.
|
||||
|
||||
The following coefficients must be defined for each pair of atom types
|
||||
via the "pair_coeff"_pair_coeff.html command as in the example above,
|
||||
|
@ -73,9 +73,11 @@ commands:
|
|||
|
||||
H (energy * distance units)
|
||||
r_mh (distance units)
|
||||
sigma_h (distance units) :ul
|
||||
sigma_h (distance units)
|
||||
cutoff (distance units) :ul
|
||||
|
||||
The global cutoff (r_c) specified in the pair_style command is used.
|
||||
The last coefficient is optional. If not specified, the global cutoff
|
||||
is used.
|
||||
|
||||
:line
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ be passed to various commands as arguments, so that the variable is
|
|||
evaluated during a simulation run.
|
||||
|
||||
A broader overview of how Python can be used with LAMMPS is
|
||||
given in "Section python"_Section_python.html. There is an
|
||||
given in "Section 11"_Section_python.html. There is an
|
||||
examples/python directory which illustrates use of the python
|
||||
command.
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ MPI-IO requires two steps. First, build LAMMPS with its MPIIO package
|
|||
installed, e.g.
|
||||
|
||||
make yes-mpiio # installs the MPIIO package
|
||||
make g++ # build LAMMPS for your platform :pre
|
||||
make mpi # build LAMMPS for your platform :pre
|
||||
|
||||
Second, use a restart filename which contains ".mpiio". Note that it
|
||||
does not have to end in ".mpiio", just contain those characters.
|
||||
|
|
|
@ -186,7 +186,7 @@ functions, and include "thermo_style"_thermo_style.html command
|
|||
keywords for the simulation box parameters and timestep and elapsed
|
||||
time. Thus it is easy to specify a time-dependent radius.
|
||||
|
||||
See "Section_howto 12"_Section_howto.html#howto_12 of the doc pages
|
||||
See "Section 6.12"_Section_howto.html#howto_12 of the doc pages
|
||||
for a geometric description of triclinic boxes, as defined by LAMMPS,
|
||||
and how to transform these parameters to and from other commonly used
|
||||
triclinic representations.
|
||||
|
@ -361,7 +361,7 @@ sub-regions can be defined with the {open} keyword.
|
|||
Styles with a {kk} suffix are functionally the same as the
|
||||
corresponding style without the suffix. They have been optimized to
|
||||
run faster, depending on your available hardware, as discussed in
|
||||
"Section_accelerate"_Section_accelerate.html of the manual. The
|
||||
"Section 5"_Section_accelerate.html of the manual. The
|
||||
accelerated styles take the same arguments and should produce the same
|
||||
results, except for round-off and precision issues.
|
||||
|
||||
|
@ -378,7 +378,7 @@ by including their suffix, or you can use the "-suffix command-line
|
|||
switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can
|
||||
use the "suffix"_suffix.html command in your input script.
|
||||
|
||||
See "Section_accelerate"_Section_accelerate.html of the manual for
|
||||
See "Section 5"_Section_accelerate.html of the manual for
|
||||
more instructions on how to use the accelerated styles effectively.
|
||||
|
||||
:line
|
||||
|
|
|
@ -82,7 +82,7 @@ versions 2.0 and above. Using MPI-IO requires two steps. First,
|
|||
build LAMMPS with its MPIIO package installed, e.g.
|
||||
|
||||
make yes-mpiio # installs the MPIIO package
|
||||
make g++ # build LAMMPS for your platform :pre
|
||||
make mpi # build LAMMPS for your platform :pre
|
||||
|
||||
Second, use a restart filename which contains ".mpiio". Note that it
|
||||
does not have to end in ".mpiio", just contain those characters.
|
||||
|
|
|
@ -1121,7 +1121,7 @@ with a leading $ sign (e.g. $x or $\{abc\}) versus with a leading "v_"
|
|||
(e.g. v_x or v_abc). The former can be used in any input script
|
||||
command, including a variable command. The input script parser
|
||||
evaluates the reference variable immediately and substitutes its value
|
||||
into the command. As explained in "Section commands
|
||||
into the command. As explained in "Section
|
||||
3.2"_Section_commands.html#cmd_2 for "Parsing rules", you can also use
|
||||
un-named "immediate" variables for this purpose. For example, a
|
||||
string like this $((xlo+xhi)/2+sqrt(v_area)) in an input script
|
||||
|
|
|
@ -139,7 +139,7 @@ if rot = yes, the angular momentum is zeroed.
|
|||
If specified, the {temp} keyword is used by {create} and {scale} to
|
||||
specify a "compute"_compute.html that calculates temperature in a
|
||||
desired way, e.g. by first subtracting out a velocity bias, as
|
||||
discussed in "Section howto 16"_Section_howto.html#howto_15 of the doc
|
||||
discussed in "Section 6.16"_Section_howto.html#howto_16 of the doc
|
||||
pages. If this keyword is not specified, {create} and {scale}
|
||||
calculate temperature using a compute that is defined internally as
|
||||
follows:
|
||||
|
@ -161,8 +161,8 @@ The {bias} keyword with a {yes} setting is used by {create} and
|
|||
If the temperature compute also calculates a velocity bias, the the
|
||||
bias is subtracted from atom velocities before the {create} and
|
||||
{scale} operations are performed. After the operations, the bias is
|
||||
added back to the atom velocities. See "Section howto
|
||||
16"_Section_howto.html#howto_15 of the doc pages for more discussion
|
||||
added back to the atom velocities. See "Section
|
||||
6.16"_Section_howto.html#howto_16 of the doc pages for more discussion
|
||||
of temperature computes with biases. Note that the velocity bias is
|
||||
only applied to atoms in the temperature compute specified with the
|
||||
{temp} keyword.
|
||||
|
|
|
@ -55,7 +55,7 @@ versions 2.0 and above. Using MPI-IO requires two steps. First,
|
|||
build LAMMPS with its MPIIO package installed, e.g.
|
||||
|
||||
make yes-mpiio # installs the MPIIO package
|
||||
make g++ # build LAMMPS for your platform :pre
|
||||
make mpi # build LAMMPS for your platform :pre
|
||||
|
||||
Second, use a restart filename which contains ".mpiio". Note that it
|
||||
does not have to end in ".mpiio", just contain those characters.
|
||||
|
|
|
@ -61,6 +61,7 @@ sub-directories:
|
|||
accelerate: use of all the various accelerator packages
|
||||
balance: dynamic load balancing, 2d system
|
||||
body: body particles, 2d system
|
||||
cmap: CMAP 5-body contributions to CHARMM force field
|
||||
colloid: big colloid particles in a small particle solvent, 2d system
|
||||
coreshell: adiabatic core/shell model
|
||||
comb: models using the COMB potential
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,380 @@
|
|||
Created by charmm2lammps v1.8.2.6 beta on Sun Mar 20 00:26:35 EDT 2016
|
||||
|
||||
34 atoms
|
||||
33 bonds
|
||||
57 angles
|
||||
75 dihedrals
|
||||
7 impropers
|
||||
2 crossterms
|
||||
|
||||
13 atom types
|
||||
15 bond types
|
||||
30 angle types
|
||||
42 dihedral types
|
||||
5 improper types
|
||||
|
||||
-34.414709 45.585291 xlo xhi
|
||||
-36.134827 43.865173 ylo yhi
|
||||
-39.349142 40.650858 zlo zhi
|
||||
|
||||
Masses
|
||||
|
||||
1 1.008 # H
|
||||
2 1.008 # HC
|
||||
3 1.008 # HA
|
||||
4 1.008 # HB
|
||||
5 12.011 # C
|
||||
6 12.011 # CT1
|
||||
7 12.011 # CT2
|
||||
8 12.011 # CT3
|
||||
9 12.011 # CC
|
||||
10 14.007 # NH1
|
||||
11 14.007 # NH3
|
||||
12 15.999 # O
|
||||
13 15.999 # OC
|
||||
|
||||
Pair Coeffs
|
||||
|
||||
1 0.046 0.400013524445 0.046 0.400013524445 # H
|
||||
2 0.046 0.400013524445 0.046 0.400013524445 # HC
|
||||
3 0.022 2.35197261589 0.022 2.35197261589 # HA
|
||||
4 0.022 2.35197261589 0.022 2.35197261589 # HB
|
||||
5 0.11 3.56359487256 0.11 3.56359487256 # C
|
||||
6 0.02 4.05358916754 0.01 3.38541512893 # CT1
|
||||
7 0.055 3.87540942391 0.01 3.38541512893 # CT2
|
||||
8 0.08 3.67050271874 0.01 3.38541512893 # CT3
|
||||
9 0.07 3.56359487256 0.07 3.56359487256 # CC
|
||||
10 0.2 3.29632525712 0.2 2.76178602624 # NH1
|
||||
11 0.2 3.29632525712 0.2 3.29632525712 # NH3
|
||||
12 0.12 3.02905564168 0.12 2.49451641079 # O
|
||||
13 0.12 3.02905564168 0.12 3.02905564168 # OC
|
||||
|
||||
Atoms
|
||||
|
||||
1 1 11 -0.3 0.0088076654 -0.0395361015 -0.0125765907 # NH3
|
||||
2 1 2 0.33 -0.3781208354 -1.0038773849 -0.01724272 # HC
|
||||
3 1 2 0.33 -0.3448285543 0.4901827566 -0.8403800387 # HC
|
||||
4 1 2 0.33 -0.3306420078 0.4732826156 0.8294424358 # HC
|
||||
5 1 7 0.13 1.526230489 -0.0164860529 -0.0402820599 # CT2
|
||||
6 1 4 0.09 1.8596639218 -0.5263587482 -0.9333647137 # HB
|
||||
7 1 4 0.09 1.8904342902 -0.4510777655 0.8809945249 # HB
|
||||
8 1 5 0.51 2.0135471936 1.4020233344 -0.1137107587 # C
|
||||
9 1 12 -0.51 1.1818164992 2.2781068718 -0.313197467 # O
|
||||
10 2 10 -0.47 3.3194424268 1.666672014 0.0713249543 # NH1
|
||||
11 2 1 0.31 4.0409429153 0.9783582555 0.1693897169 # H
|
||||
12 2 6 0.07 3.8529467728 3.0161771739 0.0690818527 # CT1
|
||||
13 2 4 0.09 3.5315723829 3.5134434764 -0.8378950509 # HB
|
||||
14 2 8 -0.27 3.3981217437 3.8178727883 1.3071600161 # CT3
|
||||
15 2 3 0.09 2.2921877645 3.9163330652 1.3111957959 # HA
|
||||
16 2 3 0.09 3.7142964083 3.3104118688 2.2424399743 # HA
|
||||
17 2 3 0.09 3.8238672849 4.8446179852 1.2978564897 # HA
|
||||
18 2 5 0.51 5.3731873136 2.946062408 0.0042414688 # C
|
||||
19 2 12 -0.51 5.9268816775 1.8488403755 0.0011766847 # O
|
||||
20 3 10 -0.47 6.0445386951 4.1111769168 -0.0636349698 # NH1
|
||||
21 3 1 0.31 5.5768514013 4.9972489389 -0.0653583036 # H
|
||||
22 3 7 -0.02 7.4911642129 4.2772062416 -0.0346088891 # CT2
|
||||
23 3 4 0.09 7.9218377956 3.8786283786 -0.9407244447 # HB
|
||||
24 3 4 0.09 7.8877470687 3.8607990619 0.8803359097 # HB
|
||||
25 3 5 0.51 7.7351287723 5.7597169026 -0.0088736611 # C
|
||||
26 3 12 -0.51 6.7657462979 6.5189223559 0.005150418 # O
|
||||
27 4 10 -0.47 9.0014031015 6.1940849758 -0.0045995102 # NH1
|
||||
28 4 1 0.31 9.8272711181 5.6225413025 -0.008448093 # H
|
||||
29 4 7 -0.02 9.4067557288 7.5845263022 0.0016383819 # CT2
|
||||
30 4 4 0.09 9.0736276253 8.0578903151 0.9119901724 # HB
|
||||
31 4 4 0.09 9.0736165596 8.064051906 -0.9055419386 # HB
|
||||
32 4 9 0.34 10.9382207556 7.612479283 0.0008762597 # CC
|
||||
33 4 13 -0.67 11.5487033003 6.5062943609 -0.0007524693 # OC
|
||||
34 4 13 -0.67 11.5055524841 8.734223435 0.0013684148 # OC
|
||||
|
||||
Bond Coeffs
|
||||
|
||||
1 250 1.49 # C CT1
|
||||
2 250 1.49 # C CT2
|
||||
3 370 1.345 # C NH1
|
||||
4 620 1.23 # C O
|
||||
5 200 1.522 # CC CT2
|
||||
6 525 1.26 # CC OC
|
||||
7 222.5 1.538 # CT1 CT3
|
||||
8 330 1.08 # CT1 HB
|
||||
9 320 1.43 # CT1 NH1
|
||||
10 330 1.08 # CT2 HB
|
||||
11 320 1.43 # CT2 NH1
|
||||
12 200 1.48 # CT2 NH3
|
||||
13 322 1.111 # CT3 HA
|
||||
14 440 0.997 # H NH1
|
||||
15 403 1.04 # HC NH3
|
||||
|
||||
Bonds
|
||||
|
||||
1 15 2 1 # HC NH3
|
||||
2 15 3 1 # HC NH3
|
||||
3 15 4 1 # HC NH3
|
||||
4 12 1 5 # CT2 NH3
|
||||
5 2 8 5 # C CT2
|
||||
6 3 8 10 # C NH1
|
||||
7 10 5 6 # CT2 HB
|
||||
8 10 5 7 # CT2 HB
|
||||
9 4 9 8 # C O
|
||||
10 7 14 12 # CT1 CT3
|
||||
11 14 10 11 # H NH1
|
||||
12 9 10 12 # CT1 NH1
|
||||
13 1 18 12 # C CT1
|
||||
14 3 18 20 # C NH1
|
||||
15 8 12 13 # CT1 HB
|
||||
16 13 14 15 # CT3 HA
|
||||
17 13 14 16 # CT3 HA
|
||||
18 13 14 17 # CT3 HA
|
||||
19 4 19 18 # C O
|
||||
20 14 20 21 # H NH1
|
||||
21 11 20 22 # CT2 NH1
|
||||
22 2 25 22 # C CT2
|
||||
23 3 25 27 # C NH1
|
||||
24 10 22 23 # CT2 HB
|
||||
25 10 22 24 # CT2 HB
|
||||
26 4 26 25 # C O
|
||||
27 14 27 28 # H NH1
|
||||
28 11 27 29 # CT2 NH1
|
||||
29 5 32 29 # CC CT2
|
||||
30 10 29 30 # CT2 HB
|
||||
31 10 29 31 # CT2 HB
|
||||
32 6 32 34 # CC OC
|
||||
33 6 32 33 # CC OC
|
||||
|
||||
Angle Coeffs
|
||||
|
||||
1 52 108 0 0 # C CT1 CT3
|
||||
2 50 109.5 0 0 # C CT1 HB
|
||||
3 50 107 0 0 # C CT1 NH1
|
||||
4 50 109.5 0 0 # C CT2 HB
|
||||
5 50 107 0 0 # C CT2 NH1
|
||||
6 43.7 110 0 0 # C CT2 NH3
|
||||
7 50 120 0 0 # C NH1 CT1
|
||||
8 50 120 0 0 # C NH1 CT2
|
||||
9 34 123 0 0 # C NH1 H
|
||||
10 50 109.5 0 0 # CC CT2 HB
|
||||
11 50 107 0 0 # CC CT2 NH1
|
||||
12 80 116.5 0 0 # CT1 C NH1
|
||||
13 80 121 0 0 # CT1 C O
|
||||
14 33.43 110.1 22.53 2.179 # CT1 CT3 HA
|
||||
15 35 117 0 0 # CT1 NH1 H
|
||||
16 80 116.5 0 0 # CT2 C NH1
|
||||
17 80 121 0 0 # CT2 C O
|
||||
18 40 118 50 2.388 # CT2 CC OC
|
||||
19 35 117 0 0 # CT2 NH1 H
|
||||
20 30 109.5 20 2.074 # CT2 NH3 HC
|
||||
21 35 111 0 0 # CT3 CT1 HB
|
||||
22 70 113.5 0 0 # CT3 CT1 NH1
|
||||
23 35.5 108.4 5.4 1.802 # HA CT3 HA
|
||||
24 48 108 0 0 # HB CT1 NH1
|
||||
25 36 115 0 0 # HB CT2 HB
|
||||
26 48 108 0 0 # HB CT2 NH1
|
||||
27 51.5 107.5 0 0 # HB CT2 NH3
|
||||
28 44 109.5 0 0 # HC NH3 HC
|
||||
29 80 122.5 0 0 # NH1 C O
|
||||
30 100 124 70 2.225 # OC CC OC
|
||||
|
||||
Angles
|
||||
|
||||
1 28 2 1 3 # HC NH3 HC
|
||||
2 28 2 1 4 # HC NH3 HC
|
||||
3 20 2 1 5 # CT2 NH3 HC
|
||||
4 28 3 1 4 # HC NH3 HC
|
||||
5 20 3 1 5 # CT2 NH3 HC
|
||||
6 20 4 1 5 # CT2 NH3 HC
|
||||
7 27 1 5 6 # HB CT2 NH3
|
||||
8 27 1 5 7 # HB CT2 NH3
|
||||
9 6 1 5 8 # C CT2 NH3
|
||||
10 25 6 5 7 # HB CT2 HB
|
||||
11 4 6 5 8 # C CT2 HB
|
||||
12 4 7 5 8 # C CT2 HB
|
||||
13 17 5 8 9 # CT2 C O
|
||||
14 16 5 8 10 # CT2 C NH1
|
||||
15 29 9 8 10 # NH1 C O
|
||||
16 9 8 10 11 # C NH1 H
|
||||
17 7 8 10 12 # C NH1 CT1
|
||||
18 15 11 10 12 # CT1 NH1 H
|
||||
19 24 10 12 13 # HB CT1 NH1
|
||||
20 22 10 12 14 # CT3 CT1 NH1
|
||||
21 3 10 12 18 # C CT1 NH1
|
||||
22 21 13 12 14 # CT3 CT1 HB
|
||||
23 2 13 12 18 # C CT1 HB
|
||||
24 1 14 12 18 # C CT1 CT3
|
||||
25 14 12 14 15 # CT1 CT3 HA
|
||||
26 14 12 14 16 # CT1 CT3 HA
|
||||
27 14 12 14 17 # CT1 CT3 HA
|
||||
28 23 15 14 16 # HA CT3 HA
|
||||
29 23 15 14 17 # HA CT3 HA
|
||||
30 23 16 14 17 # HA CT3 HA
|
||||
31 13 12 18 19 # CT1 C O
|
||||
32 12 12 18 20 # CT1 C NH1
|
||||
33 29 19 18 20 # NH1 C O
|
||||
34 9 18 20 21 # C NH1 H
|
||||
35 8 18 20 22 # C NH1 CT2
|
||||
36 19 21 20 22 # CT2 NH1 H
|
||||
37 26 20 22 23 # HB CT2 NH1
|
||||
38 26 20 22 24 # HB CT2 NH1
|
||||
39 5 20 22 25 # C CT2 NH1
|
||||
40 25 23 22 24 # HB CT2 HB
|
||||
41 4 23 22 25 # C CT2 HB
|
||||
42 4 24 22 25 # C CT2 HB
|
||||
43 17 22 25 26 # CT2 C O
|
||||
44 16 22 25 27 # CT2 C NH1
|
||||
45 29 26 25 27 # NH1 C O
|
||||
46 9 25 27 28 # C NH1 H
|
||||
47 8 25 27 29 # C NH1 CT2
|
||||
48 19 28 27 29 # CT2 NH1 H
|
||||
49 26 27 29 30 # HB CT2 NH1
|
||||
50 26 27 29 31 # HB CT2 NH1
|
||||
51 11 27 29 32 # CC CT2 NH1
|
||||
52 25 30 29 31 # HB CT2 HB
|
||||
53 10 30 29 32 # CC CT2 HB
|
||||
54 10 31 29 32 # CC CT2 HB
|
||||
55 18 29 32 33 # CT2 CC OC
|
||||
56 18 29 32 34 # CT2 CC OC
|
||||
57 30 33 32 34 # OC CC OC
|
||||
|
||||
Dihedral Coeffs
|
||||
|
||||
1 0.2 3 0 1 # C CT1 CT3 HA
|
||||
2 0.2 1 180 1 # C CT1 NH1 C
|
||||
3 0 1 0 1 # C CT1 NH1 H
|
||||
4 0.2 1 180 1 # C CT2 NH1 C
|
||||
5 0 1 0 1 # C CT2 NH1 H
|
||||
6 0.1 3 0 1 # C CT2 NH3 HC
|
||||
7 1.8 1 0 1 # C NH1 CT1 CT3
|
||||
8 0 1 0 1 # C NH1 CT1 HB
|
||||
9 0.2 1 180 1 # C NH1 CT2 CC
|
||||
10 0 1 0 1 # C NH1 CT2 HB
|
||||
11 0 1 0 1 # CC CT2 NH1 H
|
||||
12 1.6 1 0 1 # CT1 C NH1 CT2
|
||||
13 2.5 2 180 0 # CT1 C NH1 CT2
|
||||
14 2.5 2 180 1 # CT1 C NH1 H
|
||||
15 1.6 1 0 1 # CT1 NH1 C CT2
|
||||
16 2.5 2 180 0 # CT1 NH1 C CT2
|
||||
17 2.5 2 180 1 # CT1 NH1 C O
|
||||
18 1.6 1 0 1 # CT2 C NH1 CT2
|
||||
19 2.5 2 180 0 # CT2 C NH1 CT2
|
||||
20 2.5 2 180 1 # CT2 C NH1 H
|
||||
21 2.5 2 180 1 # CT2 NH1 C O
|
||||
22 0 1 0 1 # CT3 CT1 C NH1
|
||||
23 1.4 1 0 1 # CT3 CT1 C O
|
||||
24 0 1 0 1 # CT3 CT1 NH1 H
|
||||
25 2.5 2 180 1 # H NH1 C O
|
||||
26 0 1 0 1 # H NH1 CT1 HB
|
||||
27 0 1 0 1 # H NH1 CT2 HB
|
||||
28 0.2 3 0 1 # HA CT3 CT1 HB
|
||||
29 0.2 3 0 1 # HA CT3 CT1 NH1
|
||||
30 0 1 0 1 # HB CT1 C NH1
|
||||
31 0 1 0 1 # HB CT1 C O
|
||||
32 0 1 0 1 # HB CT2 C NH1
|
||||
33 0 1 0 1 # HB CT2 C O
|
||||
34 0.05 6 180 1 # HB CT2 CC OC
|
||||
35 0.1 3 0 1 # HB CT2 NH3 HC
|
||||
36 0.6 1 0 1 # NH1 C CT1 NH1
|
||||
37 0.6 1 0 1 # NH1 C CT2 NH1
|
||||
38 0.4 1 0 1 # NH1 C CT2 NH3
|
||||
39 0 1 0 1 # NH1 CT1 C O
|
||||
40 0 1 0 1 # NH1 CT2 C O
|
||||
41 0.05 6 180 1 # NH1 CT2 CC OC
|
||||
42 0 1 0 1 # NH3 CT2 C O
|
||||
|
||||
Dihedrals
|
||||
|
||||
1 42 1 5 8 9 # NH3 CT2 C O
|
||||
2 38 1 5 8 10 # NH1 C CT2 NH3
|
||||
3 35 2 1 5 6 # HB CT2 NH3 HC
|
||||
4 35 2 1 5 7 # HB CT2 NH3 HC
|
||||
5 6 2 1 5 8 # C CT2 NH3 HC
|
||||
6 35 3 1 5 6 # HB CT2 NH3 HC
|
||||
7 35 3 1 5 7 # HB CT2 NH3 HC
|
||||
8 6 3 1 5 8 # C CT2 NH3 HC
|
||||
9 35 4 1 5 6 # HB CT2 NH3 HC
|
||||
10 35 4 1 5 7 # HB CT2 NH3 HC
|
||||
11 6 4 1 5 8 # C CT2 NH3 HC
|
||||
12 20 5 8 10 11 # CT2 C NH1 H
|
||||
13 15 5 8 10 12 # CT1 NH1 C CT2
|
||||
14 16 5 8 10 12 # CT1 NH1 C CT2
|
||||
15 33 6 5 8 9 # HB CT2 C O
|
||||
16 32 6 5 8 10 # HB CT2 C NH1
|
||||
17 33 7 5 8 9 # HB CT2 C O
|
||||
18 32 7 5 8 10 # HB CT2 C NH1
|
||||
19 8 8 10 12 13 # C NH1 CT1 HB
|
||||
20 7 8 10 12 14 # C NH1 CT1 CT3
|
||||
21 2 8 10 12 18 # C CT1 NH1 C
|
||||
22 25 9 8 10 11 # H NH1 C O
|
||||
23 17 9 8 10 12 # CT1 NH1 C O
|
||||
24 29 10 12 14 15 # HA CT3 CT1 NH1
|
||||
25 29 10 12 14 16 # HA CT3 CT1 NH1
|
||||
26 29 10 12 14 17 # HA CT3 CT1 NH1
|
||||
27 39 10 12 18 19 # NH1 CT1 C O
|
||||
28 36 10 12 18 20 # NH1 C CT1 NH1
|
||||
29 26 11 10 12 13 # H NH1 CT1 HB
|
||||
30 24 11 10 12 14 # CT3 CT1 NH1 H
|
||||
31 3 11 10 12 18 # C CT1 NH1 H
|
||||
32 14 12 18 20 21 # CT1 C NH1 H
|
||||
33 12 12 18 20 22 # CT1 C NH1 CT2
|
||||
34 13 12 18 20 22 # CT1 C NH1 CT2
|
||||
35 28 13 12 14 15 # HA CT3 CT1 HB
|
||||
36 28 13 12 14 16 # HA CT3 CT1 HB
|
||||
37 28 13 12 14 17 # HA CT3 CT1 HB
|
||||
38 31 13 12 18 19 # HB CT1 C O
|
||||
39 30 13 12 18 20 # HB CT1 C NH1
|
||||
40 23 14 12 18 19 # CT3 CT1 C O
|
||||
41 22 14 12 18 20 # CT3 CT1 C NH1
|
||||
42 1 15 14 12 18 # C CT1 CT3 HA
|
||||
43 1 16 14 12 18 # C CT1 CT3 HA
|
||||
44 1 17 14 12 18 # C CT1 CT3 HA
|
||||
45 10 18 20 22 23 # C NH1 CT2 HB
|
||||
46 10 18 20 22 24 # C NH1 CT2 HB
|
||||
47 4 18 20 22 25 # C CT2 NH1 C
|
||||
48 25 19 18 20 21 # H NH1 C O
|
||||
49 21 19 18 20 22 # CT2 NH1 C O
|
||||
50 40 20 22 25 26 # NH1 CT2 C O
|
||||
51 37 20 22 25 27 # NH1 C CT2 NH1
|
||||
52 27 21 20 22 23 # H NH1 CT2 HB
|
||||
53 27 21 20 22 24 # H NH1 CT2 HB
|
||||
54 5 21 20 22 25 # C CT2 NH1 H
|
||||
55 20 22 25 27 28 # CT2 C NH1 H
|
||||
56 18 22 25 27 29 # CT2 C NH1 CT2
|
||||
57 19 22 25 27 29 # CT2 C NH1 CT2
|
||||
58 33 23 22 25 26 # HB CT2 C O
|
||||
59 32 23 22 25 27 # HB CT2 C NH1
|
||||
60 33 24 22 25 26 # HB CT2 C O
|
||||
61 32 24 22 25 27 # HB CT2 C NH1
|
||||
62 10 25 27 29 30 # C NH1 CT2 HB
|
||||
63 10 25 27 29 31 # C NH1 CT2 HB
|
||||
64 9 25 27 29 32 # C NH1 CT2 CC
|
||||
65 25 26 25 27 28 # H NH1 C O
|
||||
66 21 26 25 27 29 # CT2 NH1 C O
|
||||
67 41 27 29 32 33 # NH1 CT2 CC OC
|
||||
68 41 27 29 32 34 # NH1 CT2 CC OC
|
||||
69 27 28 27 29 30 # H NH1 CT2 HB
|
||||
70 27 28 27 29 31 # H NH1 CT2 HB
|
||||
71 11 28 27 29 32 # CC CT2 NH1 H
|
||||
72 34 30 29 32 33 # HB CT2 CC OC
|
||||
73 34 30 29 32 34 # HB CT2 CC OC
|
||||
74 34 31 29 32 33 # HB CT2 CC OC
|
||||
75 34 31 29 32 34 # HB CT2 CC OC
|
||||
|
||||
Improper Coeffs
|
||||
|
||||
1 120 0 # C CT1 NH1 O
|
||||
2 120 0 # C CT2 NH1 O
|
||||
3 96 0 # CC CT2 OC OC
|
||||
4 20 0 # H CT1 C NH1
|
||||
5 20 0 # H CT2 C NH1
|
||||
|
||||
Impropers
|
||||
|
||||
1 2 8 5 10 9 # C CT2 NH1 O
|
||||
2 4 10 8 12 11 # H CT1 C NH1
|
||||
3 1 18 12 20 19 # C CT1 NH1 O
|
||||
4 5 20 18 22 21 # H CT2 C NH1
|
||||
5 2 25 22 27 26 # C CT2 NH1 O
|
||||
6 5 27 25 29 28 # H CT2 C NH1
|
||||
7 3 32 29 34 33 # CC CT2 OC OC
|
||||
|
||||
CMAP
|
||||
|
||||
1 1 8 10 12 18 20
|
||||
2 5 18 20 22 25 27
|
|
@ -0,0 +1,36 @@
|
|||
# Created by charmm2lammps v1.8.2.6 beta on Thu Mar 3 20:56:57 EST 2016
|
||||
|
||||
units real
|
||||
neigh_modify delay 2 every 1
|
||||
#newton off
|
||||
|
||||
boundary p p p
|
||||
|
||||
atom_style full
|
||||
bond_style harmonic
|
||||
angle_style charmm
|
||||
dihedral_style charmm
|
||||
improper_style harmonic
|
||||
|
||||
pair_style lj/charmm/coul/charmm 8 12
|
||||
#pair_style lj/charmmfsw/coul/charmmfsh 8 12
|
||||
pair_modify mix arithmetic
|
||||
|
||||
fix cmap all cmap charmm22.cmap
|
||||
fix_modify cmap energy yes
|
||||
|
||||
read_data gagg.data fix cmap crossterm CMAP
|
||||
|
||||
special_bonds charmm
|
||||
fix 1 all nve
|
||||
|
||||
#fix 1 all nvt temp 300 300 100.0
|
||||
#fix 2 all shake 1e-9 500 0 m 1.0
|
||||
|
||||
velocity all create 0.0 12345678 dist uniform
|
||||
|
||||
thermo 1000
|
||||
thermo_style custom step ecoul evdwl ebond eangle edihed f_cmap eimp
|
||||
timestep 2.0
|
||||
|
||||
run 100000
|
|
@ -0,0 +1,200 @@
|
|||
LAMMPS (21 Sep 2016)
|
||||
# Created by charmm2lammps v1.8.2.6 beta on Thu Mar 3 20:56:57 EST 2016
|
||||
|
||||
units real
|
||||
neigh_modify delay 2 every 1
|
||||
#newton off
|
||||
|
||||
boundary p p p
|
||||
|
||||
atom_style full
|
||||
bond_style harmonic
|
||||
angle_style charmm
|
||||
dihedral_style charmm
|
||||
improper_style harmonic
|
||||
|
||||
pair_style lj/charmm/coul/charmm 8 12
|
||||
#pair_style lj/charmmfsw/coul/charmmfsh 8 12
|
||||
pair_modify mix arithmetic
|
||||
|
||||
fix cmap all cmap charmm22.cmap
|
||||
fix_modify cmap energy yes
|
||||
|
||||
read_data gagg.data fix cmap crossterm CMAP
|
||||
orthogonal box = (-34.4147 -36.1348 -39.3491) to (45.5853 43.8652 40.6509)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
34 atoms
|
||||
scanning bonds ...
|
||||
4 = max bonds/atom
|
||||
scanning angles ...
|
||||
6 = max angles/atom
|
||||
scanning dihedrals ...
|
||||
12 = max dihedrals/atom
|
||||
scanning impropers ...
|
||||
1 = max impropers/atom
|
||||
reading bonds ...
|
||||
33 bonds
|
||||
reading angles ...
|
||||
57 angles
|
||||
reading dihedrals ...
|
||||
75 dihedrals
|
||||
reading impropers ...
|
||||
7 impropers
|
||||
4 = max # of 1-2 neighbors
|
||||
7 = max # of 1-3 neighbors
|
||||
13 = max # of 1-4 neighbors
|
||||
16 = max # of special neighbors
|
||||
|
||||
special_bonds charmm
|
||||
fix 1 all nve
|
||||
|
||||
#fix 1 all nvt temp 300 300 100.0
|
||||
#fix 2 all shake 1e-9 500 0 m 1.0
|
||||
|
||||
velocity all create 0.0 12345678 dist uniform
|
||||
|
||||
thermo 1000
|
||||
thermo_style custom step ecoul evdwl ebond eangle edihed f_cmap eimp
|
||||
timestep 2.0
|
||||
|
||||
run 100000
|
||||
Neighbor list info ...
|
||||
1 neighbor list requests
|
||||
update every 1 steps, delay 2 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 14
|
||||
ghost atom cutoff = 14
|
||||
binsize = 7 -> bins = 12 12 12
|
||||
Memory usage per processor = 14.6355 Mbytes
|
||||
Step E_coul E_vdwl E_bond E_angle E_dihed f_cmap E_impro
|
||||
0 26.542777 -0.93822087 1.2470497 4.8441789 4.5432816 -1.473352 0.10453023
|
||||
1000 28.673005 -0.47724367 0.80029132 3.151679 4.4684446 -2.3928648 0.18604953
|
||||
2000 27.67955 -1.170342 0.72018905 4.0400131 4.4713764 -2.5490207 0.21834436
|
||||
3000 29.256656 -0.35856055 0.73303546 3.7411606 4.4710568 -2.8939692 0.37728884
|
||||
4000 30.097549 -1.1353905 0.79007053 3.0688444 4.4091469 -2.3383587 0.20743631
|
||||
5000 28.357525 -1.0723742 0.9180297 3.6579424 4.8792664 -2.3185572 0.088366962
|
||||
6000 29.214175 -0.95299225 0.81926009 3.6805429 4.6742897 -2.9343577 0.26697813
|
||||
7000 27.018614 -0.52423475 0.72502764 3.8840137 4.7780956 -2.3916009 0.24952584
|
||||
8000 29.682167 -1.0939711 0.76111486 3.1090116 4.9359719 -2.5662984 0.1411154
|
||||
9000 27.909695 -0.80905986 0.78952533 4.203187 4.1301204 -2.000402 0.088859259
|
||||
10000 27.480298 -0.86273377 1.1293962 4.3857421 4.899282 -3.3895621 0.12126215
|
||||
11000 28.303203 -1.0221152 0.62762348 4.055414 4.5863024 -2.5842816 0.17996907
|
||||
12000 28.311127 -0.94227367 0.91859012 3.6673926 4.7018632 -3.902715 0.30065704
|
||||
13000 30.818607 -1.5220116 0.95710386 3.3364371 4.543427 -3.0423067 0.16712905
|
||||
14000 27.643736 -1.0144117 0.95806952 4.1046912 4.800236 -4.0534389 0.29293405
|
||||
15000 27.660491 -1.0390086 0.78061056 4.1139174 4.7197202 -2.3670379 0.22126985
|
||||
16000 27.845157 -0.63654502 0.78007478 3.9365994 4.949418 -3.1470214 0.22335355
|
||||
17000 28.44772 -1.0255112 0.70402007 4.0573343 4.2887527 -2.2099596 0.048050962
|
||||
18000 27.128323 -0.96218536 1.1327159 4.3222585 4.326607 -2.2881766 0.13491257
|
||||
19000 27.337633 -0.78999574 0.80152298 4.2239689 4.7073478 -2.2924164 0.12710292
|
||||
20000 27.780537 -0.46458072 0.79707671 3.7232618 4.943417 -2.5290628 0.26191223
|
||||
21000 26.435484 -0.7803224 1.0753217 4.4196051 5.9945933 -2.3340925 0.16448475
|
||||
22000 28.619429 -1.1623149 0.9401731 3.8508844 5.1636737 -2.5551846 0.25318434
|
||||
23000 28.399338 -0.79700962 0.85575503 4.488526 4.5975422 -2.5663549 0.13601693
|
||||
24000 29.645532 -1.158744 0.83180313 3.8193399 4.60319 -2.6847864 0.24260466
|
||||
25000 28.695339 -1.4802204 0.76583757 3.6786272 4.8959496 -2.3627896 0.080867326
|
||||
26000 28.149711 -1.029689 0.79383806 3.7885067 4.3345813 -2.1041553 0.14598209
|
||||
27000 29.580373 -1.0525813 1.0262723 3.7767318 4.6119758 -2.2802386 0.088556038
|
||||
28000 28.44308 -0.93411225 0.8794395 3.948079 4.780246 -2.1814583 0.14340149
|
||||
29000 29.335621 -1.6087988 0.71803091 3.7819186 4.6688385 -2.4282242 0.16061111
|
||||
30000 28.706138 -1.3938241 0.67713818 4.031275 4.4756505 -2.1807056 0.11461356
|
||||
31000 27.451944 0.010297225 0.65064883 3.6402029 4.3607811 -2.5511516 0.12637237
|
||||
32000 27.070878 -1.103158 1.1932199 5.1329709 4.5201653 -2.2224479 0.11215427
|
||||
33000 29.889976 -1.6228316 0.69407996 3.5361991 4.3502767 -1.9847454 0.09089949
|
||||
34000 28.223151 -0.927208 1.043253 3.4650939 5.1028142 -2.8127219 0.10648823
|
||||
35000 27.985986 -0.48153861 0.63878449 3.3724641 4.9551679 -2.6565919 0.12123115
|
||||
36000 28.580688 -1.4500694 1.055762 4.0490064 4.423782 -2.3103578 0.072747638
|
||||
37000 29.192947 -0.49678176 1.1146731 2.9233947 4.5738603 -2.4376144 0.22874047
|
||||
38000 26.954594 -0.53812359 0.79230685 4.3356989 5.0284656 -2.3791255 0.0486081
|
||||
39000 27.567555 -0.57870028 0.73614374 4.191991 4.9209556 -2.6122044 0.08635571
|
||||
40000 28.494172 -0.79057135 0.79072816 4.1893209 4.4826919 -2.4179635 0.14612898
|
||||
41000 28.44904 -1.1002948 0.93405654 4.3586358 4.4338415 -2.2950944 0.15705834
|
||||
42000 28.95725 -1.0297067 1.1632348 4.274711 4.9979487 -2.7611464 0.15944725
|
||||
43000 28.640394 -0.70938882 0.68100893 3.1844315 5.1817454 -2.2837487 0.14189233
|
||||
44000 27.997558 -1.0115099 0.59125208 4.0883422 4.6033907 -2.2775964 0.094273258
|
||||
45000 27.67163 -0.67992747 1.1225552 3.9020703 4.8171056 -2.1952679 0.041418433
|
||||
46000 28.822607 -0.6687953 0.74160059 3.3193715 4.5546965 -2.3024572 0.047569065
|
||||
47000 29.20147 -1.4456785 0.79223353 3.8288813 4.5811826 -2.5154936 0.061230141
|
||||
48000 27.843026 -1.0222301 0.87322137 4.3432743 4.4266307 -2.1414153 0.06802794
|
||||
49000 28.199573 -1.1887794 1.2781088 4.0779644 4.5881353 -2.319775 0.094803547
|
||||
50000 28.759212 -1.354416 0.68534569 3.8394841 4.2308134 -2.1281844 0.1395951
|
||||
51000 27.876455 -1.5705462 0.76557156 4.5335223 4.523708 -2.203702 0.14679803
|
||||
52000 27.930587 -1.2277489 0.96071516 3.960953 5.1152188 -2.4101451 0.060949521
|
||||
53000 27.031236 -1.4746477 1.2341141 5.0540975 4.3656865 -2.1288513 0.092725656
|
||||
54000 28.809394 -1.1162427 0.94350207 3.4013958 4.4755547 -2.3342811 0.18855912
|
||||
55000 28.948415 -1.1560418 0.6260139 3.5386373 4.5244978 -2.340212 0.17474657
|
||||
56000 28.048368 -0.95784532 0.76432571 4.1404665 4.4570033 -2.0899628 0.045693628
|
||||
57000 28.707642 -1.366574 0.9907873 3.729903 4.3131997 -2.2777698 0.065420213
|
||||
58000 26.361663 -1.0424403 1.0452563 5.0977108 4.7035231 -2.3101244 0.13671642
|
||||
59000 29.218218 -1.2210564 0.62435875 3.4236327 4.5481681 -2.1575943 0.037984042
|
||||
60000 27.655546 -1.1053224 0.86323501 3.7641375 4.8946898 -2.2422249 0.077725979
|
||||
61000 27.252108 -1.3744824 1.1150806 5.0444848 4.4878135 -2.2743829 0.058331257
|
||||
62000 27.163469 -1.1715781 0.72099321 4.5295501 4.9509918 -2.2993961 0.050401105
|
||||
63000 29.581575 -1.2238537 0.86303245 3.1194038 5.2218965 -2.5002427 0.055032632
|
||||
64000 27.897822 -1.1011516 0.74540883 4.2869228 4.3394269 -2.2552393 0.1403321
|
||||
65000 27.083245 -1.0633392 0.92771724 5.0805224 4.2747962 -2.2388039 0.064196692
|
||||
66000 29.072723 -1.5514209 0.89798805 4.2600224 4.4261812 -2.3524752 0.15067414
|
||||
67000 27.308181 -0.72224802 0.97109517 4.5074578 4.4559352 -2.1381121 0.089297603
|
||||
68000 27.505686 -0.43855431 0.80785812 4.1917251 5.0157721 -2.3382145 0.11105164
|
||||
69000 29.041681 -0.64735378 0.89874684 3.3891579 4.3753361 -2.2320941 0.14716747
|
||||
70000 29.735756 -1.7061457 0.9206878 3.5767878 4.3851664 -2.2516304 0.097196062
|
||||
71000 28.224352 -0.92217702 0.86093586 3.9507157 4.5596589 -2.2173397 0.089116669
|
||||
72000 29.282336 -1.056142 0.65185725 3.8735742 4.4839333 -2.4314756 0.071909704
|
||||
73000 26.257283 -0.64273826 0.98300685 5.063943 5.045958 -2.5544375 0.2180275
|
||||
74000 28.825119 -0.97736616 0.87201848 3.55875 4.3653309 -2.2303567 0.098963875
|
||||
75000 29.239507 -0.96508809 0.74517323 3.4306236 4.7651921 -2.6077732 0.17883654
|
||||
76000 27.349841 -0.50990238 1.1183613 4.4252451 4.4097775 -2.4125794 0.18483606
|
||||
77000 28.130197 -1.4081219 0.94921357 4.2572132 4.5162849 -2.4013797 0.073744606
|
||||
78000 28.235774 -0.9214321 0.6324981 3.8697686 4.8092154 -2.2272847 0.092108346
|
||||
79000 26.732846 -0.55949486 1.0989617 5.0088609 4.4930687 -2.277945 0.03855146
|
||||
80000 28.529208 -0.94244671 0.79407482 3.961106 4.3930011 -2.3127726 0.091124948
|
||||
81000 29.603852 -1.6116062 1.060847 3.7824932 4.151001 -1.9139868 0.19875986
|
||||
82000 28.232876 -1.1833011 1.0182713 3.4195758 5.1394333 -2.4632697 0.28501012
|
||||
83000 29.565482 -1.3479552 0.99056973 3.7851802 4.4781011 -2.7872481 0.2031991
|
||||
84000 28.780274 -1.3073882 1.0512637 4.004638 4.502282 -2.3789146 0.015656202
|
||||
85000 27.262312 -1.1305346 1.203524 4.7938623 4.1747105 -2.0952844 0.054240361
|
||||
86000 28.157348 -1.0662817 0.81163796 3.9912709 4.8320213 -2.255237 0.14698333
|
||||
87000 28.445543 -1.3365026 0.78156195 4.4767689 4.4457575 -2.5008786 0.13879386
|
||||
88000 27.656717 -1.1490599 0.87974869 4.4629952 4.7023033 -2.3258145 0.081904139
|
||||
89000 28.838821 -1.020709 0.85587929 3.7110705 4.4938307 -2.4914483 0.11447952
|
||||
90000 27.356497 -0.59107077 0.81879666 4.5209332 4.4703836 -2.3806717 0.071307775
|
||||
91000 27.780445 -0.80564513 0.94752313 3.8468943 4.2924253 -2.1011134 0.1118672
|
||||
92000 28.555276 -1.3514732 0.80826674 3.9590742 4.5775954 -2.4891232 0.054254978
|
||||
93000 28.747267 -1.2133243 0.75507246 4.1319789 4.9048611 -2.4913887 0.13045693
|
||||
94000 27.479343 -0.69973695 0.99696121 3.5966229 4.549025 -2.4155312 0.41745762
|
||||
95000 27.726945 -1.1905026 1.1120842 4.7433275 4.5386861 -2.7947142 0.33671682
|
||||
96000 28.021114 -1.0341645 0.6663033 4.2397505 4.6203984 -1.9904034 0.10972565
|
||||
97000 28.382022 -1.3916008 1.180588 4.0729621 4.6741792 -2.554927 0.13462346
|
||||
98000 27.895969 -0.7496449 1.3072185 4.2611888 4.3726077 -2.1320701 0.15376665
|
||||
99000 28.517889 -1.2183957 1.279778 3.957647 4.2638434 -2.2888407 0.042705003
|
||||
100000 28.109211 -1.2538948 0.83671785 4.3734766 4.544545 -2.3076497 0.042189096
|
||||
Loop time of 2.96683 on 1 procs for 100000 steps with 34 atoms
|
||||
|
||||
Performance: 5824.390 ns/day, 0.004 hours/ns, 33705.963 timesteps/s
|
||||
100.0% CPU use with 1 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0.98759 | 0.98759 | 0.98759 | 0.0 | 33.29
|
||||
Bond | 1.6463 | 1.6463 | 1.6463 | 0.0 | 55.49
|
||||
Neigh | 0.007688 | 0.007688 | 0.007688 | 0.0 | 0.26
|
||||
Comm | 0.012214 | 0.012214 | 0.012214 | 0.0 | 0.41
|
||||
Output | 0.0010295 | 0.0010295 | 0.0010295 | 0.0 | 0.03
|
||||
Modify | 0.25684 | 0.25684 | 0.25684 | 0.0 | 8.66
|
||||
Other | | 0.05519 | | | 1.86
|
||||
|
||||
Nlocal: 34 ave 34 max 34 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 0 ave 0 max 0 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 395 ave 395 max 395 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 395
|
||||
Ave neighs/atom = 11.6176
|
||||
Ave special neighs/atom = 9.52941
|
||||
Neighbor list builds = 237
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:02
|
|
@ -0,0 +1,200 @@
|
|||
LAMMPS (21 Sep 2016)
|
||||
# Created by charmm2lammps v1.8.2.6 beta on Thu Mar 3 20:56:57 EST 2016
|
||||
|
||||
units real
|
||||
neigh_modify delay 2 every 1
|
||||
#newton off
|
||||
|
||||
boundary p p p
|
||||
|
||||
atom_style full
|
||||
bond_style harmonic
|
||||
angle_style charmm
|
||||
dihedral_style charmm
|
||||
improper_style harmonic
|
||||
|
||||
pair_style lj/charmm/coul/charmm 8 12
|
||||
#pair_style lj/charmmfsw/coul/charmmfsh 8 12
|
||||
pair_modify mix arithmetic
|
||||
|
||||
fix cmap all cmap charmm22.cmap
|
||||
fix_modify cmap energy yes
|
||||
|
||||
read_data gagg.data fix cmap crossterm CMAP
|
||||
orthogonal box = (-34.4147 -36.1348 -39.3491) to (45.5853 43.8652 40.6509)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
reading atoms ...
|
||||
34 atoms
|
||||
scanning bonds ...
|
||||
4 = max bonds/atom
|
||||
scanning angles ...
|
||||
6 = max angles/atom
|
||||
scanning dihedrals ...
|
||||
12 = max dihedrals/atom
|
||||
scanning impropers ...
|
||||
1 = max impropers/atom
|
||||
reading bonds ...
|
||||
33 bonds
|
||||
reading angles ...
|
||||
57 angles
|
||||
reading dihedrals ...
|
||||
75 dihedrals
|
||||
reading impropers ...
|
||||
7 impropers
|
||||
4 = max # of 1-2 neighbors
|
||||
7 = max # of 1-3 neighbors
|
||||
13 = max # of 1-4 neighbors
|
||||
16 = max # of special neighbors
|
||||
|
||||
special_bonds charmm
|
||||
fix 1 all nve
|
||||
|
||||
#fix 1 all nvt temp 300 300 100.0
|
||||
#fix 2 all shake 1e-9 500 0 m 1.0
|
||||
|
||||
velocity all create 0.0 12345678 dist uniform
|
||||
|
||||
thermo 1000
|
||||
thermo_style custom step ecoul evdwl ebond eangle edihed f_cmap eimp
|
||||
timestep 2.0
|
||||
|
||||
run 100000
|
||||
Neighbor list info ...
|
||||
1 neighbor list requests
|
||||
update every 1 steps, delay 2 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 14
|
||||
ghost atom cutoff = 14
|
||||
binsize = 7 -> bins = 12 12 12
|
||||
Memory usage per processor = 15.9307 Mbytes
|
||||
Step E_coul E_vdwl E_bond E_angle E_dihed f_cmap E_impro
|
||||
0 26.542777 -0.93822087 1.2470497 4.8441789 4.5432816 -1.473352 0.10453023
|
||||
1000 28.673005 -0.47724367 0.80029132 3.151679 4.4684446 -2.3928648 0.18604953
|
||||
2000 27.67955 -1.170342 0.72018905 4.0400131 4.4713764 -2.5490207 0.21834436
|
||||
3000 29.256656 -0.35856055 0.73303546 3.7411606 4.4710568 -2.8939692 0.37728884
|
||||
4000 30.097549 -1.1353905 0.79007053 3.0688444 4.4091469 -2.3383587 0.20743631
|
||||
5000 28.357525 -1.0723742 0.9180297 3.6579424 4.8792663 -2.3185572 0.088366962
|
||||
6000 29.214175 -0.95299239 0.81926011 3.6805428 4.6742897 -2.9343578 0.26697816
|
||||
7000 27.018614 -0.52423469 0.72502751 3.8840141 4.7780958 -2.3916014 0.24952572
|
||||
8000 29.682494 -1.0940368 0.76113051 3.1089345 4.9357863 -2.5662256 0.14112613
|
||||
9000 27.853918 -0.7913741 0.79503268 4.2177256 4.146792 -2.00475 0.090585666
|
||||
10000 27.13754 -0.80551128 1.1325023 4.4718283 5.2460631 -3.4947725 0.11893125
|
||||
11000 28.277434 -1.4897448 0.90075953 4.1895717 4.3594269 -1.9553119 0.090222212
|
||||
12000 28.630973 -1.222206 0.67796385 3.3905661 4.9691334 -2.9052721 0.13897658
|
||||
13000 28.593007 -0.95684026 0.75585196 3.7242568 4.7417932 -2.3893117 0.2074121
|
||||
14000 26.147115 -0.6026921 0.93591488 5.1292829 4.9821952 -2.2571835 0.11872421
|
||||
15000 26.29432 -0.82424162 1.048979 4.5569495 5.1189308 -2.9750422 0.16195676
|
||||
16000 29.189992 -0.80998247 0.74093508 3.8299275 4.4536688 -2.5497538 0.19155639
|
||||
17000 25.878012 -0.3519646 1.0988924 4.7359591 5.3923098 -2.7211029 0.13405223
|
||||
18000 27.726135 -0.28229987 0.63072344 4.1777888 4.7237271 -2.2177157 0.15939372
|
||||
19000 27.153504 -0.66477422 0.77910129 4.2036117 5.113851 -2.3494315 0.094793307
|
||||
20000 28.044833 -1.2835827 0.88745367 3.9955526 4.5077788 -3.0116467 0.17197859
|
||||
21000 27.205696 -0.74090037 1.0023251 4.3421733 4.912671 -2.3473271 0.26089356
|
||||
22000 27.385785 -0.93740972 0.84554838 4.562743 4.883866 -2.2110955 0.11573301
|
||||
23000 27.05534 -0.95605442 0.96719024 3.9277618 5.0359014 -2.6135949 0.21368061
|
||||
24000 28.273378 -0.97543103 0.8983443 4.2067985 4.4782971 -2.4230505 0.30311692
|
||||
25000 27.477789 -0.20383849 0.8380706 3.8037992 4.8312504 -2.5831791 0.093843746
|
||||
26000 30.344199 -1.9773473 0.92882437 3.7821405 4.5176677 -2.3020968 0.2194307
|
||||
27000 27.32767 -0.9803839 0.92988865 3.7611603 5.0328211 -2.4647656 0.18213622
|
||||
28000 27.34208 -1.037938 0.74488346 4.1727342 4.7056812 -2.2718346 0.17741362
|
||||
29000 27.682777 -0.51006495 0.57074224 4.7332237 4.7080462 -2.0491512 0.2130517
|
||||
30000 24.925731 0.13670248 0.84976065 4.4143762 6.0677158 -3.5479173 0.28059419
|
||||
31000 28.623419 -0.90725708 1.0710501 3.6930688 4.6639301 -2.2225373 0.20988139
|
||||
32000 27.732286 -1.1948367 0.89230134 4.4398373 4.8923907 -3.5849327 0.49167488
|
||||
33000 28.800772 -1.5319589 0.93455495 4.1634728 4.6107706 -2.3503486 0.22636535
|
||||
34000 27.374398 -1.0957453 0.89450276 3.9829508 4.991786 -2.3548834 0.15869465
|
||||
35000 28.38753 -0.89261166 0.90000776 3.536864 4.4293294 -2.4218118 0.10640557
|
||||
36000 27.713974 0.088038031 0.85190574 3.8969601 4.6256355 -2.7935475 0.34671662
|
||||
37000 29.13007 -1.378597 0.74412556 3.131538 4.6458653 -2.9373734 0.38035616
|
||||
38000 28.556573 -1.4055344 1.139984 4.0035753 4.2938358 -2.489329 0.25338326
|
||||
39000 26.447036 -1.1829705 0.87032438 5.0804461 4.5772023 -2.7346466 0.32165802
|
||||
40000 27.991454 -0.64295679 0.61020872 4.165871 4.4623087 -2.2244194 0.13826991
|
||||
41000 29.483296 -1.2400745 0.66926627 3.3473666 4.5766617 -2.3051145 0.12171554
|
||||
42000 26.948627 -1.2162288 1.1440628 4.3993073 5.1176533 -2.4734485 0.15497709
|
||||
43000 28.04459 -0.26543193 0.83647367 3.5160747 4.6964397 -2.2805068 0.12618821
|
||||
44000 28.213608 -1.216128 0.9132792 4.0206483 4.9483599 -2.3387049 0.10132022
|
||||
45000 28.283506 -1.0390766 0.86113772 4.504509 4.7209088 -2.3043085 0.14588362
|
||||
46000 27.433853 -0.57912107 0.78448334 4.5998579 5.1181394 -2.6165094 0.18722528
|
||||
47000 27.552939 -1.1128925 0.80087638 4.3448001 4.8062869 -2.4296883 0.2702479
|
||||
48000 28.874034 -1.3242519 0.71770727 3.5648565 4.4671824 -2.2608958 0.16115978
|
||||
49000 29.216186 -1.2210307 0.76937497 3.9260628 4.7550577 -2.7316081 0.085505664
|
||||
50000 28.065856 -1.1545547 0.86953819 4.4137666 4.732157 -2.4450867 0.23320539
|
||||
51000 26.308975 -0.99728352 0.90408444 4.2400186 5.6340425 -2.2090554 0.079882158
|
||||
52000 28.517571 -1.5027398 0.83520278 3.8176552 4.3001251 -2.0731682 0.1665375
|
||||
53000 28.77579 -1.3564268 0.97253881 3.6866407 4.8532347 -2.5330776 0.17668411
|
||||
54000 29.135315 -1.0994106 0.67605671 3.6819254 4.3134408 -1.9796929 0.076951331
|
||||
55000 26.168938 -0.76247492 0.88784685 4.6533473 6.0484793 -2.1334561 0.036876985
|
||||
56000 27.471775 -0.68648837 1.0576168 4.0354311 4.4767052 -2.2368959 0.24950568
|
||||
57000 29.787083 -1.4914384 1.0702944 3.5388133 4.5173097 -2.6694464 0.27937092
|
||||
58000 28.705448 -1.3016617 0.63337853 3.9552713 4.4119825 -1.8774657 0.17540021
|
||||
59000 29.130155 -0.91647363 0.84384883 3.1076903 4.5346348 -2.3457338 0.16674486
|
||||
60000 26.874199 -0.81598034 1.3432151 5.1322624 4.9545484 -2.9566615 0.25950486
|
||||
61000 27.401306 -0.82895856 1.1636949 4.020154 4.5745928 -2.601466 0.18061051
|
||||
62000 28.930313 -1.5231967 0.85173243 4.3517328 4.4878662 -2.5859205 0.1755493
|
||||
63000 26.56874 0.026147233 0.60836216 4.4231618 4.4390677 -2.1721849 0.08594237
|
||||
64000 26.729023 -0.76953985 0.76734633 4.5104288 5.0886456 -2.2118551 0.11339216
|
||||
65000 28.900471 -1.3901477 0.86194657 4.2774976 4.498325 -2.3672362 0.20668335
|
||||
66000 26.884253 -0.21198879 0.98509625 4.0843117 4.4344172 -2.3289416 0.23631017
|
||||
67000 27.210888 -0.84075559 1.0396559 4.7253607 4.4314589 -2.2985702 0.19326507
|
||||
68000 28.042102 -1.1898715 1.053534 3.8748712 4.4358449 -2.3998723 0.2431659
|
||||
69000 28.939141 -1.6968936 0.98155912 4.0460838 5.0075204 -2.5547087 0.28645131
|
||||
70000 27.15577 -0.85202797 1.1469079 4.7645212 4.6133209 -2.3410451 0.086576572
|
||||
71000 25.507417 -0.27780727 0.95157881 4.8759406 4.853401 -2.9598705 0.41011008
|
||||
72000 29.804703 -1.4847015 0.96345767 3.6797304 4.3678377 -2.4594626 0.14480206
|
||||
73000 28.602798 -1.4906143 0.72497266 4.2442974 4.5360598 -2.3621638 0.14385651
|
||||
74000 28.4928 -0.91319873 1.0377472 3.8033127 4.3991601 -2.4051911 0.095567428
|
||||
75000 26.38168 -0.70733237 1.1557817 5.697939 4.5935618 -2.4285007 0.058980519
|
||||
76000 27.16626 -0.83631031 0.84844246 4.7460887 4.5801472 -2.1260014 0.12845946
|
||||
77000 29.040661 -1.3089499 0.80285084 4.664804 4.5215895 -2.6861939 0.13215598
|
||||
78000 27.477871 -1.0600977 0.88595045 4.6264017 5.4095605 -2.474411 0.10987174
|
||||
79000 26.151797 -0.55779685 0.91382436 4.99964 4.9184022 -2.2547241 0.22854038
|
||||
80000 28.14523 -0.54460026 0.8982411 3.5374555 4.3785673 -2.3196807 0.088567964
|
||||
81000 29.029941 -1.6467789 0.79042284 3.7269899 4.7407998 -2.3795824 0.1408727
|
||||
82000 27.920287 -0.72798032 1.0076975 3.4449461 4.5621371 -2.8239074 0.25103454
|
||||
83000 29.131054 -1.114367 0.76887285 3.459639 4.5163922 -2.607825 0.19991648
|
||||
84000 28.249768 -0.69944068 1.0510846 4.0436296 4.6430538 -2.4213355 0.077299966
|
||||
85000 28.06888 -0.62132922 0.91829312 4.1294147 4.3099557 -2.354063 0.15866186
|
||||
86000 28.664264 -1.1022906 0.87831695 4.5773522 4.6045802 -2.9206875 0.33950063
|
||||
87000 27.960967 -1.2852756 0.77694253 3.9011301 4.9114139 -3.2374868 0.3068138
|
||||
88000 27.190678 -1.2803268 1.1545301 4.5769709 5.2404761 -2.3825838 0.10356039
|
||||
89000 26.792931 -0.44516641 1.0236244 4.2007253 4.7098685 -2.3608551 0.034447062
|
||||
90000 27.173991 -0.87185611 1.065719 4.1953618 4.6856408 -2.6539232 0.16957757
|
||||
91000 28.626528 -1.239257 0.89524651 4.7048012 4.6344201 -2.7367901 0.43534143
|
||||
92000 27.661812 -1.109044 0.92817391 5.0294489 4.3890711 -2.4108669 0.12570139
|
||||
93000 28.156793 -1.0820907 0.92812693 4.938385 4.4901426 -2.4023366 0.30135781
|
||||
94000 28.842149 -1.3524969 1.1451109 4.3125908 4.6959035 -2.6747199 0.2254607
|
||||
95000 27.862247 -1.2119045 1.0218976 4.2614082 4.4931316 -2.6902934 0.16345201
|
||||
96000 27.084973 -0.93738328 1.3984324 4.5647189 4.4232205 -2.2834097 0.11217888
|
||||
97000 27.587078 -0.89397255 0.78218462 3.8944421 4.3981479 -2.4205318 0.16570942
|
||||
98000 27.981746 -1.2380545 0.84847869 4.311441 4.7340377 -2.4270441 0.023565612
|
||||
99000 27.476625 -0.8569146 0.82550381 4.1656963 4.4064921 -2.4169708 0.160814
|
||||
100000 26.121325 -0.63610855 1.0803389 4.9257118 4.7073263 -2.4010334 0.066303044
|
||||
Loop time of 2.60487 on 4 procs for 100000 steps with 34 atoms
|
||||
|
||||
Performance: 6633.735 ns/day, 0.004 hours/ns, 38389.667 timesteps/s
|
||||
99.1% CPU use with 4 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0.066848 | 0.26055 | 0.6843 | 48.6 | 10.00
|
||||
Bond | 0.067332 | 0.45486 | 0.93545 | 55.1 | 17.46
|
||||
Neigh | 0.0078266 | 0.007863 | 0.0078835 | 0.0 | 0.30
|
||||
Comm | 0.41829 | 1.3207 | 1.8951 | 50.8 | 50.70
|
||||
Output | 0.0033038 | 0.0036355 | 0.0040481 | 0.4 | 0.14
|
||||
Modify | 0.040861 | 0.15162 | 0.27091 | 27.3 | 5.82
|
||||
Other | | 0.4057 | | | 15.57
|
||||
|
||||
Nlocal: 8.5 ave 15 max 2 min
|
||||
Histogram: 1 1 0 0 0 0 0 0 1 1
|
||||
Nghost: 25.5 ave 32 max 19 min
|
||||
Histogram: 1 1 0 0 0 0 0 0 1 1
|
||||
Neighs: 98.75 ave 257 max 18 min
|
||||
Histogram: 1 1 1 0 0 0 0 0 0 1
|
||||
|
||||
Total # of neighbors = 395
|
||||
Ave neighs/atom = 11.6176
|
||||
Ave special neighs/atom = 9.52941
|
||||
Neighbor list builds = 294
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:02
|
|
@ -28,6 +28,15 @@ import os
|
|||
import select
|
||||
import re
|
||||
|
||||
|
||||
class MPIAbortException(Exception):
|
||||
def __init__(self, message):
|
||||
self.message = message
|
||||
|
||||
def __str__(self):
|
||||
return repr(self.message)
|
||||
|
||||
|
||||
class lammps(object):
|
||||
# detect if Python is using version of mpi4py that can pass a communicator
|
||||
|
||||
|
@ -43,6 +52,7 @@ class lammps(object):
|
|||
# create instance of LAMMPS
|
||||
|
||||
def __init__(self,name="",cmdargs=None,ptr=None,comm=None):
|
||||
self.comm = comm
|
||||
|
||||
# determine module location
|
||||
|
||||
|
@ -150,10 +160,14 @@ class lammps(object):
|
|||
if cmd: cmd = cmd.encode()
|
||||
self.lib.lammps_command(self.lmp,cmd)
|
||||
|
||||
if self.lib.lammps_has_error(self.lmp):
|
||||
if self.uses_exceptions and self.lib.lammps_has_error(self.lmp):
|
||||
sb = create_string_buffer(100)
|
||||
self.lib.lammps_get_last_error_message(self.lmp, sb, 100)
|
||||
raise Exception(sb.value.decode().strip())
|
||||
error_type = self.lib.lammps_get_last_error_message(self.lmp, sb, 100)
|
||||
error_msg = sb.value.decode().strip()
|
||||
|
||||
if error_type == 2:
|
||||
raise MPIAbortException(error_msg)
|
||||
raise Exception(error_msg)
|
||||
|
||||
def extract_global(self,name,type):
|
||||
if name: name = name.encode()
|
||||
|
@ -286,6 +300,14 @@ class lammps(object):
|
|||
if name: name = name.encode()
|
||||
self.lib.lammps_scatter_atoms(self.lmp,name,type,count,data)
|
||||
|
||||
@property
|
||||
def uses_exceptions(self):
|
||||
try:
|
||||
if self.lib.lammps_has_error:
|
||||
return True
|
||||
except(AttributeError):
|
||||
return False
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# -------------------------------------------------------------------------
|
||||
# -------------------------------------------------------------------------
|
||||
|
|
|
@ -33,6 +33,7 @@ public:
|
|||
void init_style();
|
||||
double single(int, int, int, int, double, double, double, double &);
|
||||
double memory_usage();
|
||||
void *extract(const char *, int &) { return NULL; }
|
||||
|
||||
int pack_forward_comm(int, int *, double *, int, int *);
|
||||
void unpack_forward_comm(int, int, double *);
|
||||
|
|
|
@ -33,6 +33,7 @@ public:
|
|||
void init_style();
|
||||
double single(int, int, int, int, double, double, double, double &);
|
||||
double memory_usage();
|
||||
void *extract(const char *, int &) { return NULL; }
|
||||
|
||||
int pack_forward_comm(int, int *, double *, int, int *);
|
||||
void unpack_forward_comm(int, int, double *);
|
||||
|
|
|
@ -34,6 +34,7 @@ class PairEAMGPU : public PairEAM {
|
|||
void init_style();
|
||||
double single(int, int, int, int, double, double, double, double &);
|
||||
double memory_usage();
|
||||
void *extract(const char *, int &) { return NULL; }
|
||||
|
||||
int pack_forward_comm(int, int *, double *, int, int *);
|
||||
void unpack_forward_comm(int, int, double *);
|
||||
|
|
|
@ -61,6 +61,7 @@ class PairEAMAlloyKokkos : public PairEAM {
|
|||
virtual ~PairEAMAlloyKokkos();
|
||||
virtual void compute(int, int);
|
||||
void init_style();
|
||||
void *extract(const char *, int &) { return NULL; }
|
||||
void coeff(int, char **);
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
|
|
|
@ -61,6 +61,7 @@ class PairEAMFSKokkos : public PairEAM {
|
|||
virtual ~PairEAMFSKokkos();
|
||||
virtual void compute(int, int);
|
||||
void init_style();
|
||||
void *extract(const char *, int &) { return NULL; }
|
||||
void coeff(int, char **);
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
|
|
|
@ -59,6 +59,7 @@ class PairEAMKokkos : public PairEAM {
|
|||
virtual ~PairEAMKokkos();
|
||||
virtual void compute(int, int);
|
||||
void init_style();
|
||||
void *extract(const char *, int &) { return NULL; }
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void operator()(TagPairEAMPackForwardComm, const int&) const;
|
||||
|
|
|
@ -54,6 +54,7 @@ PairEAM::PairEAM(LAMMPS *lmp) : Pair(lmp)
|
|||
frho = NULL;
|
||||
rhor = NULL;
|
||||
z2r = NULL;
|
||||
scale = NULL;
|
||||
|
||||
frho_spline = NULL;
|
||||
rhor_spline = NULL;
|
||||
|
@ -232,6 +233,7 @@ void PairEAM::compute(int eflag, int vflag)
|
|||
if (eflag) {
|
||||
phi = ((coeff[3]*p + coeff[4])*p + coeff[5])*p + coeff[6];
|
||||
if (rho[i] > rhomax) phi += fp[i] * (rho[i]-rhomax);
|
||||
phi *= scale[type[i]][type[i]];
|
||||
if (eflag_global) eng_vdwl += phi;
|
||||
if (eflag_atom) eatom[i] += phi;
|
||||
}
|
||||
|
@ -306,7 +308,7 @@ void PairEAM::compute(int eflag, int vflag)
|
|||
f[j][2] -= delz*fpair;
|
||||
}
|
||||
|
||||
if (eflag) evdwl = phi;
|
||||
if (eflag) evdwl = scale[itype][jtype]*phi;
|
||||
if (evflag) ev_tally(i,j,nlocal,newton_pair,
|
||||
evdwl,0.0,fpair,delx,dely,delz);
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ class PairEAM : public Pair {
|
|||
void init_style();
|
||||
double init_one(int, int);
|
||||
double single(int, int, int, int, double, double, double, double &);
|
||||
void *extract(const char *, int &);
|
||||
virtual void *extract(const char *, int &);
|
||||
|
||||
virtual int pack_forward_comm(int, int *, double *, int, int *);
|
||||
virtual void unpack_forward_comm(int, int, double *);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,129 @@
|
|||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef FIX_CLASS
|
||||
|
||||
FixStyle(cmap,FixCMAP)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_FIX_CMAP_H
|
||||
#define LMP_FIX_CMAP_H
|
||||
|
||||
#include "fix.h"
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class FixCMAP : public Fix {
|
||||
public:
|
||||
FixCMAP(class LAMMPS *, int, char **);
|
||||
~FixCMAP();
|
||||
int setmask();
|
||||
void init();
|
||||
void setup(int);
|
||||
void setup_pre_neighbor();
|
||||
void min_setup(int);
|
||||
void pre_neighbor();
|
||||
void pre_reverse(int, int);
|
||||
void post_force(int);
|
||||
void post_force_respa(int, int, int);
|
||||
void min_post_force(int);
|
||||
double compute_scalar();
|
||||
|
||||
void read_data_header(char *);
|
||||
void read_data_section(char *, int, char *, tagint);
|
||||
bigint read_data_skip_lines(char *);
|
||||
void write_data_header(FILE *, int);
|
||||
void write_data_section_size(int, int &, int &);
|
||||
void write_data_section_pack(int, double **);
|
||||
void write_data_section_keyword(int, FILE *);
|
||||
void write_data_section(int, FILE *, int, double **, int);
|
||||
|
||||
void write_restart(FILE *);
|
||||
void restart(char *);
|
||||
int pack_restart(int, double *);
|
||||
void unpack_restart(int, int);
|
||||
int size_restart(int);
|
||||
int maxsize_restart();
|
||||
|
||||
void grow_arrays(int);
|
||||
void copy_arrays(int, int, int);
|
||||
void set_arrays(int);
|
||||
int pack_exchange(int, double *);
|
||||
int unpack_exchange(int, double *);
|
||||
|
||||
double memory_usage();
|
||||
|
||||
private:
|
||||
int nprocs,me;
|
||||
int newton_bond,eflag_caller;
|
||||
int ctype,nlevels_respa;
|
||||
int ncrosstermtypes,crossterm_per_atom,maxcrossterm;
|
||||
int ncrosstermlist;
|
||||
bigint ncmap;
|
||||
|
||||
int **crosstermlist;
|
||||
|
||||
int nmax_previous;
|
||||
int *num_crossterm;
|
||||
int **crossterm_type;
|
||||
tagint **crossterm_atom1,**crossterm_atom2,**crossterm_atom3;
|
||||
tagint **crossterm_atom4,**crossterm_atom5;
|
||||
|
||||
double E,dEdPhi,dEdPsi;
|
||||
double ecmap;
|
||||
double fcmap[4],cij[4][4];
|
||||
double *g_axis;
|
||||
|
||||
// CMAP grid points obtained from external file
|
||||
|
||||
double ***cmapgrid;
|
||||
|
||||
// partial derivatives and cross-derivatives of the grid data
|
||||
|
||||
double ***d1cmapgrid,***d2cmapgrid,***d12cmapgrid;
|
||||
|
||||
// read map grid data
|
||||
|
||||
void read_grid_map(char *);
|
||||
|
||||
// read in CMAP cross terms from LAMMPS data file
|
||||
|
||||
void read_cmap_data(int, char *);
|
||||
|
||||
// pre-compute the partial and cross-derivatives of map grid points
|
||||
|
||||
void set_map_derivatives(double **, double **, double **, double **);
|
||||
|
||||
// cubic spline interpolation functions for derivatives of map grid points
|
||||
|
||||
void spline(double *, double *, int);
|
||||
void spl_interpolate(double, double *, double *, double &, double &);
|
||||
|
||||
// calculate dihedral angles
|
||||
|
||||
double dihedral_angle_atan2(double, double, double, double, double, double,
|
||||
double, double, double, double);
|
||||
|
||||
// calculate bicubic interpolation coefficient matrix c_ij
|
||||
|
||||
void bc_coeff(double *, double *, double *, double *);
|
||||
|
||||
// perform bicubic interpolation at point of interest
|
||||
|
||||
void bc_interpol(double, double, int, int, double *, double *, double *,
|
||||
double *);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -247,6 +247,7 @@ void PairEAMOpt::eval()
|
|||
if (EFLAG) {
|
||||
double phi = ((coeff[3]*p + coeff[4])*p + coeff[5])*p + coeff[6];
|
||||
if (rho[i] > rhomax) phi += fp[i] * (rho[i]-rhomax);
|
||||
phi *= scale[type[i]][type[i]];
|
||||
if (eflag_global) eng_vdwl += phi;
|
||||
if (eflag_atom) eatom[i] += phi;
|
||||
}
|
||||
|
@ -273,6 +274,7 @@ void PairEAMOpt::eval()
|
|||
double tmpfz = 0.0;
|
||||
|
||||
fast_gamma_t* _noalias tabssi = &tabss[itype1*ntypes*nr];
|
||||
double* _noalias scale_i = scale[itype1+1]+1;
|
||||
|
||||
for (jj = 0; jj < jnum; jj++) {
|
||||
j = jlist[jj];
|
||||
|
@ -316,12 +318,13 @@ void PairEAMOpt::eval()
|
|||
// psip needs both fp[i] and fp[j] terms since r_ij appears in two
|
||||
// terms of embed eng: Fi(sum rho_ij) and Fj(sum rho_ji)
|
||||
// hence embed' = Fi(sum rho_ij) rhojp + Fj(sum rho_ji) rhoip
|
||||
// scale factor can be applied by thermodynamic integration
|
||||
|
||||
double recip = 1.0/r;
|
||||
double phi = z2*recip;
|
||||
double phip = z2p*recip - phi*recip;
|
||||
double psip = fp[i]*rhojp + fp[j]*rhoip + phip;
|
||||
double fpair = -psip*recip;
|
||||
double fpair = -scale_i[jtype]*psip*recip;
|
||||
|
||||
tmpfx += delx*fpair;
|
||||
tmpfy += dely*fpair;
|
||||
|
@ -332,7 +335,7 @@ void PairEAMOpt::eval()
|
|||
ff[j].z -= delz*fpair;
|
||||
}
|
||||
|
||||
if (EFLAG) evdwl = phi;
|
||||
if (EFLAG) evdwl = scale_i[jtype]*phi;
|
||||
|
||||
if (EVFLAG) ev_tally(i,j,nlocal,NEWTON_PAIR,
|
||||
evdwl,0.0,fpair,delx,dely,delz);
|
||||
|
|
|
@ -13,6 +13,9 @@ style_kspace.h
|
|||
style_minimize.h
|
||||
style_pair.h
|
||||
style_region.h
|
||||
# deleted on 20 Sep 2016
|
||||
fix_ti_rs.cpp
|
||||
fix_ti_rs.h
|
||||
# deleted on 31 May 2016
|
||||
fix_ave_spatial_sphere.cpp
|
||||
fix_ave_spatial_sphere.h
|
||||
|
|
|
@ -12,14 +12,14 @@
|
|||
------------------------------------------------------------------------- */
|
||||
|
||||
/* -------------------------------------------------------------------------
|
||||
Contributing authors:
|
||||
Contributing authors:
|
||||
Rodrigo Freitas (UC Berkeley) - rodrigof@berkeley.edu
|
||||
Mark Asta (UC Berkeley) - mdasta@berkeley.edu
|
||||
Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "fix_ti_spring.h"
|
||||
#include "atom.h"
|
||||
#include "update.h"
|
||||
|
@ -27,12 +27,13 @@
|
|||
#include "respa.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "citeme.h"
|
||||
#include "force.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
|
||||
static const char cite_ti_spring[] =
|
||||
static const char cite_fix_ti_spring[] =
|
||||
"ti/spring command:\n\n"
|
||||
"@article{freitas2016,\n"
|
||||
" author={Freitas, Rodrigo and Asta, Mark and de Koning, Maurice},\n"
|
||||
|
@ -46,9 +47,11 @@ static const char cite_ti_spring[] =
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixTISpring::FixTISpring(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg)
|
||||
FixTISpring::FixTISpring(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg)
|
||||
{
|
||||
if (lmp->citeme) lmp->citeme->add(cite_fix_ti_spring);
|
||||
|
||||
if (narg < 6 || narg > 8)
|
||||
error->all(FLERR,"Illegal fix ti/spring command");
|
||||
|
||||
|
@ -62,22 +65,25 @@ FixTISpring::FixTISpring(LAMMPS *lmp, int narg, char **arg) :
|
|||
extscalar = 1;
|
||||
extvector = 1;
|
||||
|
||||
// disallow resetting the time step, while this fix is defined
|
||||
time_depend = 1;
|
||||
|
||||
// Spring constant.
|
||||
k = force->numeric(FLERR,arg[3]);
|
||||
if (k <= 0.0) error->all(FLERR,"Illegal fix ti/spring command");
|
||||
|
||||
// Perform initial allocation of atom-based array.
|
||||
// Registar with Atom class.
|
||||
// Perform initial allocation of atom-based array
|
||||
// Register with Atom class
|
||||
xoriginal = NULL;
|
||||
grow_arrays(atom->nmax);
|
||||
atom->add_callback(0);
|
||||
atom->add_callback(1);
|
||||
|
||||
// xoriginal = initial unwrapped positions of atom.
|
||||
// xoriginal = initial unwrapped positions of atoms
|
||||
|
||||
double **x = atom->x;
|
||||
int *mask = atom->mask;
|
||||
tagint *image = atom->image;
|
||||
imageint *image = atom->image;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
|
@ -86,22 +92,22 @@ FixTISpring::FixTISpring(LAMMPS *lmp, int narg, char **arg) :
|
|||
}
|
||||
|
||||
// Time variables.
|
||||
t_switch = atoi(arg[4]); // Switching time.
|
||||
t_equil = atoi(arg[5]); // Equilibration time.
|
||||
t0 = update->ntimestep; // Initial time.
|
||||
if (t_switch < 0.0) error->all(FLERR,"Illegal fix ti/spring command");
|
||||
if (t_equil < 0.0) error->all(FLERR,"Illegal fix ti/spring command");
|
||||
t0 = update->ntimestep; // timestep of original/starting coordinates
|
||||
t_switch = force->bnumeric(FLERR,arg[4]); // Number of steps for switching
|
||||
t_equil = force->bnumeric(FLERR,arg[5]); // Number of steps for equilibration
|
||||
if ((t_switch <= 0) || (t_equil < 0))
|
||||
error->all(FLERR,"Illegal fix ti/spring command");
|
||||
|
||||
// Coupling parameter initialization.
|
||||
// Coupling parameter initialization
|
||||
sf = 1;
|
||||
if (narg > 6) {
|
||||
if (strcmp(arg[6], "function") == 0) sf = atoi(arg[7]);
|
||||
if (strcmp(arg[6], "function") == 0) sf = force->inumeric(FLERR,arg[7]);
|
||||
else error->all(FLERR,"Illegal fix ti/spring switching function");
|
||||
if ((sf!=1) && (sf!=2))
|
||||
if ((sf!=1) && (sf!=2))
|
||||
error->all(FLERR,"Illegal fix ti/spring switching function");
|
||||
}
|
||||
lambda = switch_func(0);
|
||||
dlambda = dswitch_func(0);
|
||||
lambda = switch_func(0);
|
||||
dlambda = dswitch_func(0);
|
||||
|
||||
espring = 0.0;
|
||||
}
|
||||
|
@ -163,14 +169,13 @@ void FixTISpring::min_setup(int vflag)
|
|||
|
||||
void FixTISpring::post_force(int vflag)
|
||||
{
|
||||
// If on the first equilibration do not calculate forces.
|
||||
int t = update->ntimestep - t0;
|
||||
if(t < t_equil) return;
|
||||
// do not calculate forces during equilibration
|
||||
if ((update->ntimestep - t0) < t_equil) return;
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
int *mask = atom->mask;
|
||||
tagint *image = atom->image;
|
||||
imageint *image = atom->image;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
double dx, dy, dz;
|
||||
|
@ -209,21 +214,24 @@ void FixTISpring::min_post_force(int vflag)
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void FixTISpring::initial_integrate(int vflag)
|
||||
{
|
||||
// Update the coupling parameter value.
|
||||
double t = update->ntimestep - (t0+t_equil);
|
||||
void FixTISpring::initial_integrate(int vflag)
|
||||
{
|
||||
// Update the coupling parameter value if needed
|
||||
if ((update->ntimestep - t0) < t_equil) return;
|
||||
|
||||
if( (t >= 0) && (t <= t_switch) ) {
|
||||
lambda = switch_func(t/t_switch);
|
||||
dlambda = dswitch_func(t/t_switch);
|
||||
const bigint t = update->ntimestep - (t0+t_equil);
|
||||
const double r_switch = 1.0/t_switch;
|
||||
|
||||
if ( (t >= 0) && (t <= t_switch) ) {
|
||||
lambda = switch_func(t*r_switch);
|
||||
dlambda = dswitch_func(t*r_switch);
|
||||
}
|
||||
|
||||
if( (t >= t_equil+t_switch) && (t <= (t_equil+2*t_switch)) ) {
|
||||
lambda = switch_func(1.0 - (t - t_switch - t_equil)/t_switch );
|
||||
dlambda = - dswitch_func(1.0 - (t - t_switch - t_equil)/t_switch );
|
||||
if ( (t >= t_equil+t_switch) && (t <= (t_equil+2*t_switch)) ) {
|
||||
lambda = switch_func(1.0 - (t - t_switch - t_equil)*r_switch);
|
||||
dlambda = - dswitch_func(1.0 - (t - t_switch - t_equil)*r_switch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
energy of stretched springs
|
||||
|
@ -323,11 +331,11 @@ void FixTISpring::unpack_restart(int nlocal, int nth)
|
|||
double **extra = atom->extra;
|
||||
|
||||
// skip to Nth set of extra values
|
||||
|
||||
|
||||
int m = 0;
|
||||
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
||||
m++;
|
||||
|
||||
|
||||
xoriginal[nlocal][0] = extra[nlocal][m++];
|
||||
xoriginal[nlocal][1] = extra[nlocal][m++];
|
||||
xoriginal[nlocal][2] = extra[nlocal][m++];
|
||||
|
@ -352,10 +360,10 @@ int FixTISpring::size_restart(int nlocal)
|
|||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Switching function.
|
||||
Switching function
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
double FixTISpring::switch_func(double t)
|
||||
double FixTISpring::switch_func(double t)
|
||||
{
|
||||
if (sf == 1) return t;
|
||||
|
||||
|
@ -365,10 +373,10 @@ double FixTISpring::switch_func(double t)
|
|||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Switching function derivative.
|
||||
Switching function derivative
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
double FixTISpring::dswitch_func(double t)
|
||||
double FixTISpring::dswitch_func(double t)
|
||||
{
|
||||
if(sf == 1) return 1.0/t_switch;
|
||||
|
||||
|
|
|
@ -66,9 +66,9 @@ class FixTISpring : public Fix {
|
|||
double lambda; // Coupling parameter.
|
||||
double dlambda; // Lambda variation with t.
|
||||
double linfo[2]; // Current lambda status.
|
||||
int t_switch; // Total switching steps.
|
||||
int t_equil; // Equilibration time.
|
||||
int t0; // Initial time.
|
||||
bigint t_switch; // Total switching steps.
|
||||
bigint t_equil; // Equilibration time.
|
||||
bigint t0; // Initial time.
|
||||
int sf; // Switching function option.
|
||||
int nlevels_respa;
|
||||
};
|
||||
|
|
|
@ -49,6 +49,8 @@ public:
|
|||
/// Reports the memory usage of this pair style to LAMMPS.
|
||||
double memory_usage();
|
||||
|
||||
void *extract(const char *, int &) { return NULL; }
|
||||
|
||||
/// Parses the coefficients of the h polynomial from the end of the EAM file.
|
||||
void read_h_coeff(char* filename);
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ void PairEAMOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
if (EFLAG) {
|
||||
phi = ((coeff[3]*p + coeff[4])*p + coeff[5])*p + coeff[6];
|
||||
if (rho[i] > rhomax) phi += fp[i] * (rho[i]-rhomax);
|
||||
e_tally_thr(this, i, i, nlocal, NEWTON_PAIR, phi, 0.0, thr);
|
||||
e_tally_thr(this, i, i, nlocal, NEWTON_PAIR, scale[type[i]][type[i]]*phi, 0.0, thr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -230,6 +230,7 @@ void PairEAMOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
ztmp = x[i].z;
|
||||
itype = type[i];
|
||||
fxtmp = fytmp = fztmp = 0.0;
|
||||
const double * _noalias const scale_i = scale[itype];
|
||||
|
||||
jlist = firstneigh[i];
|
||||
jnum = numneigh[i];
|
||||
|
@ -274,7 +275,7 @@ void PairEAMOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
phi = z2*recip;
|
||||
phip = z2p*recip - phi*recip;
|
||||
psip = fp[i]*rhojp + fp[j]*rhoip + phip;
|
||||
fpair = -psip*recip;
|
||||
fpair = -scale_i[jtype]*psip*recip;
|
||||
|
||||
fxtmp += delx*fpair;
|
||||
fytmp += dely*fpair;
|
||||
|
@ -285,7 +286,7 @@ void PairEAMOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
f[j].z -= delz*fpair;
|
||||
}
|
||||
|
||||
if (EFLAG) evdwl = phi;
|
||||
if (EFLAG) evdwl = scale_i[jtype]*phi;
|
||||
if (EVFLAG) ev_tally_thr(this, i,j,nlocal,NEWTON_PAIR,
|
||||
evdwl,0.0,fpair,delx,dely,delz,thr);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,12 @@ using namespace LAMMPS_NS;
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Error::Error(LAMMPS *lmp) : Pointers(lmp), last_error_message(NULL) {}
|
||||
Error::Error(LAMMPS *lmp) : Pointers(lmp) {
|
||||
#ifdef LAMMPS_EXCEPTIONS
|
||||
last_error_message = NULL;
|
||||
last_error_type = ERROR_NONE;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
called by all procs in universe
|
||||
|
@ -198,6 +203,7 @@ void Error::done(int status)
|
|||
exit(status);
|
||||
}
|
||||
|
||||
#ifdef LAMMPS_EXCEPTIONS
|
||||
/* ----------------------------------------------------------------------
|
||||
return the last error message reported by LAMMPS (only used if
|
||||
compiled with -DLAMMPS_EXCEPTIONS)
|
||||
|
@ -208,13 +214,22 @@ char * Error::get_last_error() const
|
|||
return last_error_message;
|
||||
}
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
set the last error message (only used if compiled with
|
||||
-DLAMMPS_EXCEPTIONS)
|
||||
return the type of the last error reported by LAMMPS (only used if
|
||||
compiled with -DLAMMPS_EXCEPTIONS)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Error::set_last_error(const char * msg)
|
||||
ErrorType Error::get_last_error_type() const
|
||||
{
|
||||
return last_error_type;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
set the last error message and error type
|
||||
(only used if compiled with -DLAMMPS_EXCEPTIONS)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Error::set_last_error(const char * msg, ErrorType type)
|
||||
{
|
||||
delete [] last_error_message;
|
||||
|
||||
|
@ -224,4 +239,6 @@ void Error::set_last_error(const char * msg)
|
|||
} else {
|
||||
last_error_message = NULL;
|
||||
}
|
||||
last_error_type = type;
|
||||
}
|
||||
#endif
|
||||
|
|
46
src/error.h
46
src/error.h
|
@ -15,41 +15,14 @@
|
|||
#define LMP_ERROR_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include <string>
|
||||
#include <exception>
|
||||
|
||||
#ifdef LAMMPS_EXCEPTIONS
|
||||
#include "exceptions.h"
|
||||
#endif
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class LAMMPSException : public std::exception
|
||||
{
|
||||
public:
|
||||
std::string message;
|
||||
|
||||
LAMMPSException(std::string msg) : message(msg) {
|
||||
}
|
||||
|
||||
~LAMMPSException() throw() {
|
||||
}
|
||||
|
||||
virtual const char * what() const throw() {
|
||||
return message.c_str();
|
||||
}
|
||||
};
|
||||
|
||||
class LAMMPSAbortException : public LAMMPSException {
|
||||
public:
|
||||
MPI_Comm universe;
|
||||
|
||||
LAMMPSAbortException(std::string msg, MPI_Comm universe) :
|
||||
LAMMPSException(msg),
|
||||
universe(universe)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class Error : protected Pointers {
|
||||
char * last_error_message;
|
||||
|
||||
public:
|
||||
Error(class LAMMPS *);
|
||||
|
||||
|
@ -63,8 +36,15 @@ class Error : protected Pointers {
|
|||
void message(const char *, int, const char *, int = 1);
|
||||
void done(int = 0); // 1 would be fully backwards compatible
|
||||
|
||||
char * get_last_error() const;
|
||||
void set_last_error(const char * msg);
|
||||
#ifdef LAMMPS_EXCEPTIONS
|
||||
char * get_last_error() const;
|
||||
ErrorType get_last_error_type() const;
|
||||
void set_last_error(const char * msg, ErrorType type = ERROR_NORMAL);
|
||||
|
||||
private:
|
||||
char * last_error_message;
|
||||
ErrorType last_error_type;
|
||||
#endif
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifndef LMP_EXCEPTIONS_H
|
||||
#define LMP_EXCEPTIONS_H
|
||||
|
||||
#include <mpi.h>
|
||||
#include <string>
|
||||
#include <exception>
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class LAMMPSException : public std::exception
|
||||
{
|
||||
public:
|
||||
std::string message;
|
||||
|
||||
LAMMPSException(std::string msg) : message(msg) {
|
||||
}
|
||||
|
||||
~LAMMPSException() throw() {
|
||||
}
|
||||
|
||||
virtual const char * what() const throw() {
|
||||
return message.c_str();
|
||||
}
|
||||
};
|
||||
|
||||
class LAMMPSAbortException : public LAMMPSException {
|
||||
public:
|
||||
MPI_Comm universe;
|
||||
|
||||
LAMMPSAbortException(std::string msg, MPI_Comm universe) :
|
||||
LAMMPSException(msg),
|
||||
universe(universe)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
enum ErrorType {
|
||||
ERROR_NONE = 0,
|
||||
ERROR_NORMAL = 1,
|
||||
ERROR_ABORT = 2
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -139,7 +139,7 @@ void Fix::modify_params(int narg, char **arg)
|
|||
} else if (strcmp(arg[iarg],"respa") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal fix_modify command");
|
||||
if (!respa_level_support) error->all(FLERR,"Illegal fix_modify command");
|
||||
int lvl = force->inumeric(FLERR,arg[1]);
|
||||
int lvl = force->inumeric(FLERR,arg[iarg+1]);
|
||||
if (lvl < 0) error->all(FLERR,"Illegal fix_modify command");
|
||||
respa_level = lvl-1;
|
||||
iarg += 2;
|
||||
|
|
|
@ -321,7 +321,7 @@ void FixAdapt::init()
|
|||
delete[] psuffix;
|
||||
}
|
||||
if (ad->pair == NULL) ad->pair = force->pair_match(pstyle,1,nsub);
|
||||
if (ad->pair == NULL)
|
||||
if (ad->pair == NULL)
|
||||
error->all(FLERR,"Fix adapt pair style does not exist");
|
||||
|
||||
void *ptr = ad->pair->extract(ad->pparam,ad->pdim);
|
||||
|
|
|
@ -48,8 +48,10 @@ enum{EQUAL,ATOM};
|
|||
|
||||
FixMove::FixMove(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg),
|
||||
xvarstr(NULL), yvarstr(NULL), zvarstr(NULL), vxvarstr(NULL), vyvarstr(NULL), vzvarstr(NULL),
|
||||
xoriginal(NULL), toriginal(NULL), qoriginal(NULL), displace(NULL), velocity(NULL)
|
||||
xvarstr(NULL), yvarstr(NULL), zvarstr(NULL), vxvarstr(NULL),
|
||||
vyvarstr(NULL), vzvarstr(NULL),
|
||||
xoriginal(NULL), toriginal(NULL), qoriginal(NULL),
|
||||
displace(NULL), velocity(NULL)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR,"Illegal fix move command");
|
||||
|
||||
|
|
|
@ -54,7 +54,8 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg),
|
|||
tstat_flag(0), pstat_flag(0),
|
||||
rfix(NULL), id_dilate(NULL), irregular(NULL), id_temp(NULL), id_press(NULL),
|
||||
tcomputeflag(0), pcomputeflag(0), eta(NULL), eta_dot(NULL), eta_dotdot(NULL),
|
||||
eta_mass(NULL), etap(NULL), etap_dot(NULL), etap_dotdot(NULL), etap_mass(NULL), mpchain(0)
|
||||
eta_mass(NULL), etap(NULL), etap_dot(NULL), etap_dotdot(NULL),
|
||||
etap_mass(NULL), mpchain(0)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR,"Illegal fix nvt/npt/nph command");
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ vstore(NULL), astore(NULL), rbuf(NULL)
|
|||
// 0/1 flag = not-store or store peratom values in restart file
|
||||
// nvalues = # of peratom values, N = 1 is vector, N > 1 is array
|
||||
|
||||
disable = 0;
|
||||
nvalues = vecflag = 0;
|
||||
flavor = UNKNOWN;
|
||||
|
||||
|
@ -230,6 +231,8 @@ void FixStore::grow_arrays(int nmax)
|
|||
|
||||
void FixStore::copy_arrays(int i, int j, int delflag)
|
||||
{
|
||||
if (disable) return;
|
||||
|
||||
if (vecflag) vstore[j] = vstore[i];
|
||||
else
|
||||
for (int m = 0; m < nvalues; m++)
|
||||
|
@ -242,6 +245,8 @@ void FixStore::copy_arrays(int i, int j, int delflag)
|
|||
|
||||
int FixStore::pack_exchange(int i, double *buf)
|
||||
{
|
||||
if (disable) return 0;
|
||||
|
||||
if (vecflag) buf[0] = vstore[i];
|
||||
else
|
||||
for (int m = 0; m < nvalues; m++)
|
||||
|
@ -255,6 +260,8 @@ int FixStore::pack_exchange(int i, double *buf)
|
|||
|
||||
int FixStore::unpack_exchange(int nlocal, double *buf)
|
||||
{
|
||||
if (disable) return 0;
|
||||
|
||||
if (vecflag) vstore[nlocal] = buf[0];
|
||||
else
|
||||
for (int m = 0; m < nvalues; m++)
|
||||
|
@ -268,6 +275,11 @@ int FixStore::unpack_exchange(int nlocal, double *buf)
|
|||
|
||||
int FixStore::pack_restart(int i, double *buf)
|
||||
{
|
||||
if (disable) {
|
||||
buf[0] = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
buf[0] = nvalues+1;
|
||||
if (vecflag) buf[1] = vstore[i];
|
||||
else
|
||||
|
@ -282,6 +294,8 @@ int FixStore::pack_restart(int i, double *buf)
|
|||
|
||||
void FixStore::unpack_restart(int nlocal, int nth)
|
||||
{
|
||||
if (disable) return;
|
||||
|
||||
double **extra = atom->extra;
|
||||
|
||||
// skip to Nth set of extra values
|
||||
|
@ -302,6 +316,7 @@ void FixStore::unpack_restart(int nlocal, int nth)
|
|||
|
||||
int FixStore::maxsize_restart()
|
||||
{
|
||||
if (disable) return 1;
|
||||
return nvalues+1;
|
||||
}
|
||||
|
||||
|
@ -311,6 +326,7 @@ int FixStore::maxsize_restart()
|
|||
|
||||
int FixStore::size_restart(int nlocal)
|
||||
{
|
||||
if (disable) return 1;
|
||||
return nvalues+1;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ class FixStore : public Fix {
|
|||
int nvalues; // number of per-atom values
|
||||
double *vstore; // vector storage for GLOBAL or PERATOM
|
||||
double **astore; // array storage for GLOBAL or PERATOM
|
||||
int disable; // 1 if operations (except grow) are currently disabled
|
||||
|
||||
FixStore(class LAMMPS *, int, char **);
|
||||
~FixStore();
|
||||
|
|
557
src/library.cpp
557
src/library.cpp
|
@ -38,6 +38,45 @@
|
|||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Utility macros for optional code path which captures all exceptions
|
||||
and stores the last error message. These assume there is a variable lmp
|
||||
which is a pointer to the current LAMMPS instance.
|
||||
|
||||
Usage:
|
||||
|
||||
BEGIN_CAPTURE
|
||||
{
|
||||
// code paths which might throw exception
|
||||
...
|
||||
}
|
||||
END_CAPTURE
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef LAMMPS_EXCEPTIONS
|
||||
#define BEGIN_CAPTURE \
|
||||
Error * error = lmp->error; \
|
||||
try
|
||||
|
||||
#define END_CAPTURE \
|
||||
catch(LAMMPSAbortException & ae) { \
|
||||
int nprocs = 0; \
|
||||
MPI_Comm_size(ae.universe, &nprocs ); \
|
||||
\
|
||||
if (nprocs > 1) { \
|
||||
error->set_last_error(ae.message.c_str(), ERROR_ABORT); \
|
||||
} else { \
|
||||
error->set_last_error(ae.message.c_str(), ERROR_NORMAL); \
|
||||
} \
|
||||
} catch(LAMMPSException & e) { \
|
||||
error->set_last_error(e.message.c_str(), ERROR_NORMAL); \
|
||||
}
|
||||
#else
|
||||
#define BEGIN_CAPTURE
|
||||
#define END_CAPTURE
|
||||
#endif
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
create an instance of LAMMPS and return pointer to it
|
||||
pass in command-line args and MPI communicator to run on
|
||||
|
@ -45,8 +84,20 @@ using namespace LAMMPS_NS;
|
|||
|
||||
void lammps_open(int argc, char **argv, MPI_Comm communicator, void **ptr)
|
||||
{
|
||||
#ifdef LAMMPS_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
LAMMPS *lmp = new LAMMPS(argc,argv,communicator);
|
||||
*ptr = (void *) lmp;
|
||||
}
|
||||
catch(LAMMPSException & e) {
|
||||
fprintf(stderr, "LAMMPS Exception: %s", e.message.c_str());
|
||||
*ptr = (void*) NULL;
|
||||
}
|
||||
#else
|
||||
LAMMPS *lmp = new LAMMPS(argc,argv,communicator);
|
||||
*ptr = (void *) lmp;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
@ -68,8 +119,20 @@ void lammps_open_no_mpi(int argc, char **argv, void **ptr)
|
|||
|
||||
MPI_Comm communicator = MPI_COMM_WORLD;
|
||||
|
||||
#ifdef LAMMPS_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
LAMMPS *lmp = new LAMMPS(argc,argv,communicator);
|
||||
*ptr = (void *) lmp;
|
||||
}
|
||||
catch(LAMMPSException & e) {
|
||||
fprintf(stderr, "LAMMPS Exception: %s", e.message.c_str());
|
||||
*ptr = (void*) NULL;
|
||||
}
|
||||
#else
|
||||
LAMMPS *lmp = new LAMMPS(argc,argv,communicator);
|
||||
*ptr = (void *) lmp;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
@ -99,7 +162,12 @@ int lammps_version(void *ptr)
|
|||
void lammps_file(void *ptr, char *str)
|
||||
{
|
||||
LAMMPS *lmp = (LAMMPS *) ptr;
|
||||
lmp->input->file(str);
|
||||
|
||||
BEGIN_CAPTURE
|
||||
{
|
||||
lmp->input->file(str);
|
||||
}
|
||||
END_CAPTURE
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
@ -108,15 +176,16 @@ void lammps_file(void *ptr, char *str)
|
|||
|
||||
char *lammps_command(void *ptr, char *str)
|
||||
{
|
||||
LAMMPS * lmp = (LAMMPS *) ptr;
|
||||
Error * error = lmp->error;
|
||||
LAMMPS *lmp = (LAMMPS *) ptr;
|
||||
char * result = NULL;
|
||||
|
||||
try {
|
||||
return lmp->input->one(str);
|
||||
} catch(LAMMPSException & e) {
|
||||
error->set_last_error(e.message.c_str());
|
||||
return NULL;
|
||||
BEGIN_CAPTURE
|
||||
{
|
||||
result = lmp->input->one(str);
|
||||
}
|
||||
END_CAPTURE
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
@ -215,58 +284,62 @@ void *lammps_extract_compute(void *ptr, char *id, int style, int type)
|
|||
{
|
||||
LAMMPS *lmp = (LAMMPS *) ptr;
|
||||
|
||||
int icompute = lmp->modify->find_compute(id);
|
||||
if (icompute < 0) return NULL;
|
||||
Compute *compute = lmp->modify->compute[icompute];
|
||||
BEGIN_CAPTURE
|
||||
{
|
||||
int icompute = lmp->modify->find_compute(id);
|
||||
if (icompute < 0) return NULL;
|
||||
Compute *compute = lmp->modify->compute[icompute];
|
||||
|
||||
if (style == 0) {
|
||||
if (type == 0) {
|
||||
if (!compute->scalar_flag) return NULL;
|
||||
if (compute->invoked_scalar != lmp->update->ntimestep)
|
||||
compute->compute_scalar();
|
||||
return (void *) &compute->scalar;
|
||||
if (style == 0) {
|
||||
if (type == 0) {
|
||||
if (!compute->scalar_flag) return NULL;
|
||||
if (compute->invoked_scalar != lmp->update->ntimestep)
|
||||
compute->compute_scalar();
|
||||
return (void *) &compute->scalar;
|
||||
}
|
||||
if (type == 1) {
|
||||
if (!compute->vector_flag) return NULL;
|
||||
if (compute->invoked_vector != lmp->update->ntimestep)
|
||||
compute->compute_vector();
|
||||
return (void *) compute->vector;
|
||||
}
|
||||
if (type == 2) {
|
||||
if (!compute->array_flag) return NULL;
|
||||
if (compute->invoked_array != lmp->update->ntimestep)
|
||||
compute->compute_array();
|
||||
return (void *) compute->array;
|
||||
}
|
||||
}
|
||||
if (type == 1) {
|
||||
if (!compute->vector_flag) return NULL;
|
||||
if (compute->invoked_vector != lmp->update->ntimestep)
|
||||
compute->compute_vector();
|
||||
return (void *) compute->vector;
|
||||
|
||||
if (style == 1) {
|
||||
if (!compute->peratom_flag) return NULL;
|
||||
if (type == 1) {
|
||||
if (compute->invoked_peratom != lmp->update->ntimestep)
|
||||
compute->compute_peratom();
|
||||
return (void *) compute->vector_atom;
|
||||
}
|
||||
if (type == 2) {
|
||||
if (compute->invoked_peratom != lmp->update->ntimestep)
|
||||
compute->compute_peratom();
|
||||
return (void *) compute->array_atom;
|
||||
}
|
||||
}
|
||||
if (type == 2) {
|
||||
if (!compute->array_flag) return NULL;
|
||||
if (compute->invoked_array != lmp->update->ntimestep)
|
||||
compute->compute_array();
|
||||
return (void *) compute->array;
|
||||
}
|
||||
}
|
||||
|
||||
if (style == 1) {
|
||||
if (!compute->peratom_flag) return NULL;
|
||||
if (type == 1) {
|
||||
if (compute->invoked_peratom != lmp->update->ntimestep)
|
||||
compute->compute_peratom();
|
||||
return (void *) compute->vector_atom;
|
||||
}
|
||||
if (type == 2) {
|
||||
if (compute->invoked_peratom != lmp->update->ntimestep)
|
||||
compute->compute_peratom();
|
||||
return (void *) compute->array_atom;
|
||||
}
|
||||
}
|
||||
|
||||
if (style == 2) {
|
||||
if (!compute->local_flag) return NULL;
|
||||
if (type == 1) {
|
||||
if (compute->invoked_local != lmp->update->ntimestep)
|
||||
compute->compute_local();
|
||||
return (void *) compute->vector_local;
|
||||
}
|
||||
if (type == 2) {
|
||||
if (compute->invoked_local != lmp->update->ntimestep)
|
||||
compute->compute_local();
|
||||
return (void *) compute->array_local;
|
||||
|
||||
if (style == 2) {
|
||||
if (!compute->local_flag) return NULL;
|
||||
if (type == 1) {
|
||||
if (compute->invoked_local != lmp->update->ntimestep)
|
||||
compute->compute_local();
|
||||
return (void *) compute->vector_local;
|
||||
}
|
||||
if (type == 2) {
|
||||
if (compute->invoked_local != lmp->update->ntimestep)
|
||||
compute->compute_local();
|
||||
return (void *) compute->array_local;
|
||||
}
|
||||
}
|
||||
}
|
||||
END_CAPTURE
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -300,40 +373,44 @@ void *lammps_extract_fix(void *ptr, char *id, int style, int type,
|
|||
{
|
||||
LAMMPS *lmp = (LAMMPS *) ptr;
|
||||
|
||||
int ifix = lmp->modify->find_fix(id);
|
||||
if (ifix < 0) return NULL;
|
||||
Fix *fix = lmp->modify->fix[ifix];
|
||||
BEGIN_CAPTURE
|
||||
{
|
||||
int ifix = lmp->modify->find_fix(id);
|
||||
if (ifix < 0) return NULL;
|
||||
Fix *fix = lmp->modify->fix[ifix];
|
||||
|
||||
if (style == 0) {
|
||||
double *dptr = (double *) malloc(sizeof(double));
|
||||
if (type == 0) {
|
||||
if (!fix->scalar_flag) return NULL;
|
||||
*dptr = fix->compute_scalar();
|
||||
return (void *) dptr;
|
||||
if (style == 0) {
|
||||
double *dptr = (double *) malloc(sizeof(double));
|
||||
if (type == 0) {
|
||||
if (!fix->scalar_flag) return NULL;
|
||||
*dptr = fix->compute_scalar();
|
||||
return (void *) dptr;
|
||||
}
|
||||
if (type == 1) {
|
||||
if (!fix->vector_flag) return NULL;
|
||||
*dptr = fix->compute_vector(i);
|
||||
return (void *) dptr;
|
||||
}
|
||||
if (type == 2) {
|
||||
if (!fix->array_flag) return NULL;
|
||||
*dptr = fix->compute_array(i,j);
|
||||
return (void *) dptr;
|
||||
}
|
||||
}
|
||||
if (type == 1) {
|
||||
if (!fix->vector_flag) return NULL;
|
||||
*dptr = fix->compute_vector(i);
|
||||
return (void *) dptr;
|
||||
|
||||
if (style == 1) {
|
||||
if (!fix->peratom_flag) return NULL;
|
||||
if (type == 1) return (void *) fix->vector_atom;
|
||||
if (type == 2) return (void *) fix->array_atom;
|
||||
}
|
||||
if (type == 2) {
|
||||
if (!fix->array_flag) return NULL;
|
||||
*dptr = fix->compute_array(i,j);
|
||||
return (void *) dptr;
|
||||
|
||||
if (style == 2) {
|
||||
if (!fix->local_flag) return NULL;
|
||||
if (type == 1) return (void *) fix->vector_local;
|
||||
if (type == 2) return (void *) fix->array_local;
|
||||
}
|
||||
}
|
||||
|
||||
if (style == 1) {
|
||||
if (!fix->peratom_flag) return NULL;
|
||||
if (type == 1) return (void *) fix->vector_atom;
|
||||
if (type == 2) return (void *) fix->array_atom;
|
||||
}
|
||||
|
||||
if (style == 2) {
|
||||
if (!fix->local_flag) return NULL;
|
||||
if (type == 1) return (void *) fix->vector_local;
|
||||
if (type == 2) return (void *) fix->array_local;
|
||||
}
|
||||
END_CAPTURE
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -369,23 +446,27 @@ void *lammps_extract_variable(void *ptr, char *name, char *group)
|
|||
{
|
||||
LAMMPS *lmp = (LAMMPS *) ptr;
|
||||
|
||||
int ivar = lmp->input->variable->find(name);
|
||||
if (ivar < 0) return NULL;
|
||||
BEGIN_CAPTURE
|
||||
{
|
||||
int ivar = lmp->input->variable->find(name);
|
||||
if (ivar < 0) return NULL;
|
||||
|
||||
if (lmp->input->variable->equalstyle(ivar)) {
|
||||
double *dptr = (double *) malloc(sizeof(double));
|
||||
*dptr = lmp->input->variable->compute_equal(ivar);
|
||||
return (void *) dptr;
|
||||
}
|
||||
if (lmp->input->variable->equalstyle(ivar)) {
|
||||
double *dptr = (double *) malloc(sizeof(double));
|
||||
*dptr = lmp->input->variable->compute_equal(ivar);
|
||||
return (void *) dptr;
|
||||
}
|
||||
|
||||
if (lmp->input->variable->atomstyle(ivar)) {
|
||||
int igroup = lmp->group->find(group);
|
||||
if (igroup < 0) return NULL;
|
||||
int nlocal = lmp->atom->nlocal;
|
||||
double *vector = (double *) malloc(nlocal*sizeof(double));
|
||||
lmp->input->variable->compute_atom(ivar,igroup,vector,1,0);
|
||||
return (void *) vector;
|
||||
if (lmp->input->variable->atomstyle(ivar)) {
|
||||
int igroup = lmp->group->find(group);
|
||||
if (igroup < 0) return NULL;
|
||||
int nlocal = lmp->atom->nlocal;
|
||||
double *vector = (double *) malloc(nlocal*sizeof(double));
|
||||
lmp->input->variable->compute_atom(ivar,igroup,vector,1,0);
|
||||
return (void *) vector;
|
||||
}
|
||||
}
|
||||
END_CAPTURE
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -399,7 +480,14 @@ void *lammps_extract_variable(void *ptr, char *name, char *group)
|
|||
int lammps_set_variable(void *ptr, char *name, char *str)
|
||||
{
|
||||
LAMMPS *lmp = (LAMMPS *) ptr;
|
||||
int err = lmp->input->variable->set_string(name,str);
|
||||
int err = -1;
|
||||
|
||||
BEGIN_CAPTURE
|
||||
{
|
||||
err = lmp->input->variable->set_string(name,str);
|
||||
}
|
||||
END_CAPTURE
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -414,9 +502,14 @@ int lammps_set_variable(void *ptr, char *name, char *str)
|
|||
double lammps_get_thermo(void *ptr, char *name)
|
||||
{
|
||||
LAMMPS *lmp = (LAMMPS *) ptr;
|
||||
double dval;
|
||||
double dval = 0.0;
|
||||
|
||||
BEGIN_CAPTURE
|
||||
{
|
||||
lmp->output->thermo->evaluate_keyword(name,&dval);
|
||||
}
|
||||
END_CAPTURE
|
||||
|
||||
lmp->output->thermo->evaluate_keyword(name,&dval);
|
||||
return dval;
|
||||
}
|
||||
|
||||
|
@ -449,79 +542,83 @@ void lammps_gather_atoms(void *ptr, char *name,
|
|||
{
|
||||
LAMMPS *lmp = (LAMMPS *) ptr;
|
||||
|
||||
// error if tags are not defined or not consecutive
|
||||
BEGIN_CAPTURE
|
||||
{
|
||||
// error if tags are not defined or not consecutive
|
||||
|
||||
int flag = 0;
|
||||
if (lmp->atom->tag_enable == 0 || lmp->atom->tag_consecutive() == 0) flag = 1;
|
||||
if (lmp->atom->natoms > MAXSMALLINT) flag = 1;
|
||||
if (flag) {
|
||||
if (lmp->comm->me == 0)
|
||||
lmp->error->warning(FLERR,"Library error in lammps_gather_atoms");
|
||||
return;
|
||||
}
|
||||
|
||||
int natoms = static_cast<int> (lmp->atom->natoms);
|
||||
|
||||
int i,j,offset;
|
||||
void *vptr = lmp->atom->extract(name);
|
||||
|
||||
// copy = Natom length vector of per-atom values
|
||||
// use atom ID to insert each atom's values into copy
|
||||
// MPI_Allreduce with MPI_SUM to merge into data, ordered by atom ID
|
||||
|
||||
if (type == 0) {
|
||||
int *vector = NULL;
|
||||
int **array = NULL;
|
||||
if (count == 1) vector = (int *) vptr;
|
||||
else array = (int **) vptr;
|
||||
|
||||
int *copy;
|
||||
lmp->memory->create(copy,count*natoms,"lib/gather:copy");
|
||||
for (i = 0; i < count*natoms; i++) copy[i] = 0;
|
||||
|
||||
tagint *tag = lmp->atom->tag;
|
||||
int nlocal = lmp->atom->nlocal;
|
||||
|
||||
if (count == 1)
|
||||
for (i = 0; i < nlocal; i++)
|
||||
copy[tag[i]-1] = vector[i];
|
||||
else
|
||||
for (i = 0; i < nlocal; i++) {
|
||||
offset = count*(tag[i]-1);
|
||||
for (j = 0; j < count; j++)
|
||||
copy[offset++] = array[i][0];
|
||||
}
|
||||
|
||||
MPI_Allreduce(copy,data,count*natoms,MPI_INT,MPI_SUM,lmp->world);
|
||||
lmp->memory->destroy(copy);
|
||||
|
||||
} else {
|
||||
double *vector = NULL;
|
||||
double **array = NULL;
|
||||
if (count == 1) vector = (double *) vptr;
|
||||
else array = (double **) vptr;
|
||||
|
||||
double *copy;
|
||||
lmp->memory->create(copy,count*natoms,"lib/gather:copy");
|
||||
for (i = 0; i < count*natoms; i++) copy[i] = 0.0;
|
||||
|
||||
tagint *tag = lmp->atom->tag;
|
||||
int nlocal = lmp->atom->nlocal;
|
||||
|
||||
if (count == 1) {
|
||||
for (i = 0; i < nlocal; i++)
|
||||
copy[tag[i]-1] = vector[i];
|
||||
} else {
|
||||
for (i = 0; i < nlocal; i++) {
|
||||
offset = count*(tag[i]-1);
|
||||
for (j = 0; j < count; j++)
|
||||
copy[offset++] = array[i][j];
|
||||
}
|
||||
int flag = 0;
|
||||
if (lmp->atom->tag_enable == 0 || lmp->atom->tag_consecutive() == 0) flag = 1;
|
||||
if (lmp->atom->natoms > MAXSMALLINT) flag = 1;
|
||||
if (flag) {
|
||||
if (lmp->comm->me == 0)
|
||||
lmp->error->warning(FLERR,"Library error in lammps_gather_atoms");
|
||||
return;
|
||||
}
|
||||
|
||||
MPI_Allreduce(copy,data,count*natoms,MPI_DOUBLE,MPI_SUM,lmp->world);
|
||||
lmp->memory->destroy(copy);
|
||||
int natoms = static_cast<int> (lmp->atom->natoms);
|
||||
|
||||
int i,j,offset;
|
||||
void *vptr = lmp->atom->extract(name);
|
||||
|
||||
// copy = Natom length vector of per-atom values
|
||||
// use atom ID to insert each atom's values into copy
|
||||
// MPI_Allreduce with MPI_SUM to merge into data, ordered by atom ID
|
||||
|
||||
if (type == 0) {
|
||||
int *vector = NULL;
|
||||
int **array = NULL;
|
||||
if (count == 1) vector = (int *) vptr;
|
||||
else array = (int **) vptr;
|
||||
|
||||
int *copy;
|
||||
lmp->memory->create(copy,count*natoms,"lib/gather:copy");
|
||||
for (i = 0; i < count*natoms; i++) copy[i] = 0;
|
||||
|
||||
tagint *tag = lmp->atom->tag;
|
||||
int nlocal = lmp->atom->nlocal;
|
||||
|
||||
if (count == 1)
|
||||
for (i = 0; i < nlocal; i++)
|
||||
copy[tag[i]-1] = vector[i];
|
||||
else
|
||||
for (i = 0; i < nlocal; i++) {
|
||||
offset = count*(tag[i]-1);
|
||||
for (j = 0; j < count; j++)
|
||||
copy[offset++] = array[i][0];
|
||||
}
|
||||
|
||||
MPI_Allreduce(copy,data,count*natoms,MPI_INT,MPI_SUM,lmp->world);
|
||||
lmp->memory->destroy(copy);
|
||||
|
||||
} else {
|
||||
double *vector = NULL;
|
||||
double **array = NULL;
|
||||
if (count == 1) vector = (double *) vptr;
|
||||
else array = (double **) vptr;
|
||||
|
||||
double *copy;
|
||||
lmp->memory->create(copy,count*natoms,"lib/gather:copy");
|
||||
for (i = 0; i < count*natoms; i++) copy[i] = 0.0;
|
||||
|
||||
tagint *tag = lmp->atom->tag;
|
||||
int nlocal = lmp->atom->nlocal;
|
||||
|
||||
if (count == 1) {
|
||||
for (i = 0; i < nlocal; i++)
|
||||
copy[tag[i]-1] = vector[i];
|
||||
} else {
|
||||
for (i = 0; i < nlocal; i++) {
|
||||
offset = count*(tag[i]-1);
|
||||
for (j = 0; j < count; j++)
|
||||
copy[offset++] = array[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
MPI_Allreduce(copy,data,count*natoms,MPI_DOUBLE,MPI_SUM,lmp->world);
|
||||
lmp->memory->destroy(copy);
|
||||
}
|
||||
}
|
||||
END_CAPTURE
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
@ -538,69 +635,74 @@ void lammps_scatter_atoms(void *ptr, char *name,
|
|||
{
|
||||
LAMMPS *lmp = (LAMMPS *) ptr;
|
||||
|
||||
// error if tags are not defined or not consecutive or no atom map
|
||||
BEGIN_CAPTURE
|
||||
{
|
||||
// error if tags are not defined or not consecutive or no atom map
|
||||
|
||||
int flag = 0;
|
||||
if (lmp->atom->tag_enable == 0 || lmp->atom->tag_consecutive() == 0) flag = 1;
|
||||
if (lmp->atom->natoms > MAXSMALLINT) flag = 1;
|
||||
if (lmp->atom->map_style == 0) flag = 1;
|
||||
if (flag) {
|
||||
if (lmp->comm->me == 0)
|
||||
lmp->error->warning(FLERR,"Library error in lammps_scatter_atoms");
|
||||
return;
|
||||
}
|
||||
|
||||
int natoms = static_cast<int> (lmp->atom->natoms);
|
||||
|
||||
int i,j,m,offset;
|
||||
void *vptr = lmp->atom->extract(name);
|
||||
|
||||
// copy = Natom length vector of per-atom values
|
||||
// use atom ID to insert each atom's values into copy
|
||||
// MPI_Allreduce with MPI_SUM to merge into data, ordered by atom ID
|
||||
|
||||
if (type == 0) {
|
||||
int *vector = NULL;
|
||||
int **array = NULL;
|
||||
if (count == 1) vector = (int *) vptr;
|
||||
else array = (int **) vptr;
|
||||
int *dptr = (int *) data;
|
||||
|
||||
if (count == 1) {
|
||||
for (i = 0; i < natoms; i++)
|
||||
if ((m = lmp->atom->map(i+1)) >= 0)
|
||||
vector[m] = dptr[i];
|
||||
} else {
|
||||
for (i = 0; i < natoms; i++)
|
||||
if ((m = lmp->atom->map(i+1)) >= 0) {
|
||||
offset = count*i;
|
||||
for (j = 0; j < count; j++)
|
||||
array[m][j] = dptr[offset++];
|
||||
}
|
||||
int flag = 0;
|
||||
if (lmp->atom->tag_enable == 0 || lmp->atom->tag_consecutive() == 0) flag = 1;
|
||||
if (lmp->atom->natoms > MAXSMALLINT) flag = 1;
|
||||
if (lmp->atom->map_style == 0) flag = 1;
|
||||
if (flag) {
|
||||
if (lmp->comm->me == 0)
|
||||
lmp->error->warning(FLERR,"Library error in lammps_scatter_atoms");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
double *vector = NULL;
|
||||
double **array = NULL;
|
||||
if (count == 1) vector = (double *) vptr;
|
||||
else array = (double **) vptr;
|
||||
double *dptr = (double *) data;
|
||||
|
||||
if (count == 1) {
|
||||
for (i = 0; i < natoms; i++)
|
||||
if ((m = lmp->atom->map(i+1)) >= 0)
|
||||
vector[m] = dptr[i];
|
||||
int natoms = static_cast<int> (lmp->atom->natoms);
|
||||
|
||||
int i,j,m,offset;
|
||||
void *vptr = lmp->atom->extract(name);
|
||||
|
||||
// copy = Natom length vector of per-atom values
|
||||
// use atom ID to insert each atom's values into copy
|
||||
// MPI_Allreduce with MPI_SUM to merge into data, ordered by atom ID
|
||||
|
||||
if (type == 0) {
|
||||
int *vector = NULL;
|
||||
int **array = NULL;
|
||||
if (count == 1) vector = (int *) vptr;
|
||||
else array = (int **) vptr;
|
||||
int *dptr = (int *) data;
|
||||
|
||||
if (count == 1) {
|
||||
for (i = 0; i < natoms; i++)
|
||||
if ((m = lmp->atom->map(i+1)) >= 0)
|
||||
vector[m] = dptr[i];
|
||||
} else {
|
||||
for (i = 0; i < natoms; i++)
|
||||
if ((m = lmp->atom->map(i+1)) >= 0) {
|
||||
offset = count*i;
|
||||
for (j = 0; j < count; j++)
|
||||
array[m][j] = dptr[offset++];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < natoms; i++) {
|
||||
if ((m = lmp->atom->map(i+1)) >= 0) {
|
||||
offset = count*i;
|
||||
for (j = 0; j < count; j++)
|
||||
array[m][j] = dptr[offset++];
|
||||
double *vector = NULL;
|
||||
double **array = NULL;
|
||||
if (count == 1) vector = (double *) vptr;
|
||||
else array = (double **) vptr;
|
||||
double *dptr = (double *) data;
|
||||
|
||||
if (count == 1) {
|
||||
for (i = 0; i < natoms; i++)
|
||||
if ((m = lmp->atom->map(i+1)) >= 0)
|
||||
vector[m] = dptr[i];
|
||||
} else {
|
||||
for (i = 0; i < natoms; i++) {
|
||||
if ((m = lmp->atom->map(i+1)) >= 0) {
|
||||
offset = count*i;
|
||||
for (j = 0; j < count; j++)
|
||||
array[m][j] = dptr[offset++];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
END_CAPTURE
|
||||
}
|
||||
|
||||
#ifdef LAMMPS_EXCEPTIONS
|
||||
/* ----------------------------------------------------------------------
|
||||
Check if a new error message
|
||||
------------------------------------------------------------------------- */
|
||||
|
@ -613,6 +715,9 @@ int lammps_has_error(void *ptr) {
|
|||
|
||||
/* ----------------------------------------------------------------------
|
||||
Copy the last error message of LAMMPS into a character buffer
|
||||
The return value encodes which type of error it is.
|
||||
1 = normal error (recoverable)
|
||||
2 = abort error (non-recoverable)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int lammps_get_last_error_message(void *ptr, char * buffer, int buffer_size) {
|
||||
|
@ -620,9 +725,11 @@ int lammps_get_last_error_message(void *ptr, char * buffer, int buffer_size) {
|
|||
Error * error = lmp->error;
|
||||
|
||||
if(error->get_last_error()) {
|
||||
int error_type = error->get_last_error_type();
|
||||
strncpy(buffer, error->get_last_error(), buffer_size-1);
|
||||
error->set_last_error(NULL);
|
||||
return 1;
|
||||
error->set_last_error(NULL, ERROR_NONE);
|
||||
return error_type;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -45,8 +45,10 @@ int lammps_get_natoms(void *);
|
|||
void lammps_gather_atoms(void *, char *, int, int, void *);
|
||||
void lammps_scatter_atoms(void *, char *, int, int, void *);
|
||||
|
||||
#ifdef LAMMPS_EXCEPTIONS
|
||||
int lammps_has_error(void *);
|
||||
int lammps_get_last_error_message(void *, char *, int);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
#define LAMMPS_VERSION "20 Sep 2016"
|
||||
#define LAMMPS_VERSION "26 Sep 2016"
|
||||
|
|
|
@ -11,35 +11,40 @@ In this directory, you should find:
|
|||
3) An "example" folder containing an example of how to use these tools.
|
||||
4) An "other" folder containing other potentially useful tools.
|
||||
|
||||
In addition, you will need to provide the following input for
|
||||
In addition, you will need to provide the following input for
|
||||
charmm2lammps.pl:
|
||||
|
||||
1) a CHARMM parameter file (par_<forcefield>.prm)
|
||||
2) a CHARMM topology file (top_<forcefield>.rtf)
|
||||
3) a CHARMM coordinates file or pdb file (<project>.crd or <project>.pdb)
|
||||
(NOTE: a .pdb file is required if the -cmap option is used)
|
||||
4) a CHARMM psf file (<project>.psf)
|
||||
|
||||
To use the charmm2lammps.pl script, type: "perl charmm2lammps.pl
|
||||
[-option[=#]] <forcefield> <project>" where <forcefield> is the name
|
||||
of the CHARMM FF you are using, (i.e. all22_prot), and <project> is
|
||||
the common name of your *.crd and *.psf files. The options for the
|
||||
script are listed below. If the option requires a parameter, the
|
||||
syntax must be [-option[=#]], (i.e. -border=5).
|
||||
<forcefield> <project> [-option=value ...]" where <forcefield> is the
|
||||
name of the CHARMM FF you are using, (i.e. all22_prot), and <project>
|
||||
is the common name of your *.crd and *.psf files. Possible options
|
||||
are listed next. If the option requires a parameter, the syntax
|
||||
should be -option=value (e.g. -border=5).
|
||||
|
||||
-help "display available options",
|
||||
-charmm "add charmm types to LAMMPS data file",
|
||||
-water "add TIP3P water [default: 1 g/cc]",
|
||||
-ions "add (counter)ions using Na+ and Cl- [default: 0 mol/l]",
|
||||
-center "recenter atoms",
|
||||
-quiet "do not print info",
|
||||
-pdb_ctrl "output project_ctrl.pdb",
|
||||
-l "set x-, y-, and z-dimensions simultaneously",
|
||||
-lx "x-dimension of simulation box",
|
||||
-ly "y-dimension of simulation box",
|
||||
-lz "z-dimension of simulation box",
|
||||
-border "add border to all sides of simulation box [default: 0 A]",
|
||||
-ax "rotation around x-axis",
|
||||
-ay "rotation around y-axis",
|
||||
-az "rotation around z-axis"
|
||||
-help display available options
|
||||
-charmm add charmm types to LAMMPS data file
|
||||
-water add TIP3P water [default: 1 g/cc]
|
||||
-ions add (counter)ions using Na+ and Cl- [default: 0 mol/l]
|
||||
-center recenter atoms
|
||||
-quiet do not print info
|
||||
-pdb_ctrl output project_ctrl.pdb
|
||||
-l set x-, y-, and z-dimensions simultaneously
|
||||
-lx x-dimension of simulation box
|
||||
-ly y-dimension of simulation box
|
||||
-lz z-dimension of simulation box
|
||||
-border add border to all sides of simulation box [default: 0 A]
|
||||
-ax rotation around x-axis
|
||||
-ay rotation around y-axis
|
||||
-az rotation around z-axis
|
||||
-cd correction for dihedral for carbohydrate systems
|
||||
-cmap add CMAP section to data file and fix cmap command lines in
|
||||
input script" (NOTE: requires use of *.pdb file)
|
||||
|
||||
In the "example" folder, you will find example files that were created
|
||||
by following the steps below. These steps describe how to take a
|
||||
|
@ -100,7 +105,22 @@ molecule. The -pdb_ctrl option produces the 1ac7_ctrl.pdb file that
|
|||
can be visualized in a standard visualization package such as VMD. The
|
||||
-charmm option put comments into the LAMMPS data file (everything
|
||||
after the # sign is a comment) for user convenience in tracking atom
|
||||
types etc. according to CHARMM nomenclature.
|
||||
types etc. according to CHARMM nomenclature.
|
||||
|
||||
The example molecule provided above (i.e., 1ac7) is a DNA fragment.
|
||||
If instead, a peptide longer than 2 amino acid residues or a protein
|
||||
is to be modeled, the '-cmap' option should be used. This will add a
|
||||
section at the end of the data file with the heading of 'CMAP' that
|
||||
will contain cmap crossterm corrections for the phi-psi dihedrals for
|
||||
the amino acid residues. You will then need to also copy the
|
||||
appropriate file for the cmap crossterms into your directory and be
|
||||
sure that you are using the appropriate cmap crossterms that go with
|
||||
the respective version of the charmm force field that is being used
|
||||
(e.g, cmap22.data or cmap36.data). This is necessary to account for
|
||||
the fact that the CHARMM group has provided updated cmap correction
|
||||
terms for use with the c36 and more recent version of the charmm
|
||||
protein force field. Copies of cmap22.data and cmap36.data are
|
||||
provided in the tools/ch2lmp directory.
|
||||
|
||||
The default timestep in the LAMMPS *.in file is set to 0.5 fs, which
|
||||
can typically be increased to 2 fs after equilibration if the bonds
|
||||
|
@ -109,9 +129,9 @@ delay on neigh_modify can probably increased to 5 or so to improve
|
|||
speed.
|
||||
|
||||
The -ions option allows the user to neutralize the simulation cell
|
||||
with Na+ or Cl- counterions if the molecule has a net
|
||||
charge. Additional salt can be added by increasing the default
|
||||
concentration (i.e. -ions=0.5).
|
||||
with Na+ or Cl- counterions if the molecule has a net charge
|
||||
Additional salt can be added by increasing the default concentration
|
||||
(e.g. -ions=0.5).
|
||||
|
||||
** In the "other" file folder, you will find:
|
||||
|
||||
|
@ -126,5 +146,3 @@ concentration (i.e. -ions=0.5).
|
|||
3) A 3rd party perl script called "crd2pdb.pl"
|
||||
|
||||
4) A 3rd party fortran code called "pdb_to_crd.f"
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue