Commit a31134a1 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

Merge branch 'master' into coulomb-refactoring

parents a89246fb ae56b9ad
......@@ -6,6 +6,7 @@ BUILDDIR = /tmp/lammps-docs-$(SHA1)
RSTDIR = $(BUILDDIR)/rst
VENV = $(BUILDDIR)/docenv
TXT2RST = $(VENV)/bin/txt2rst
ANCHORCHECK = $(VENV)/bin/doc_anchor_check
PYTHON = $(shell which python3)
HAS_PYTHON3 = NO
......@@ -22,7 +23,7 @@ endif
SOURCES=$(wildcard src/*.txt)
OBJECTS=$(SOURCES:src/%.txt=$(RSTDIR)/%.rst)
.PHONY: help clean-all clean epub html pdf old venv spelling
.PHONY: help clean-all clean epub html pdf old venv spelling anchor_check
# ------------------------------------------
......@@ -36,6 +37,7 @@ help:
@echo " clean remove all intermediate RST files"
@echo " clean-all reset the entire build environment"
@echo " txt2html build txt2html tool"
@echo " anchor_check scan for duplicate anchor labels"
# ------------------------------------------
......@@ -49,11 +51,14 @@ clean:
clean-spelling:
rm -rf spelling
html: $(OBJECTS)
html: $(OBJECTS) $(ANCHORCHECK)
@(\
. $(VENV)/bin/activate ;\
cp -r src/* $(RSTDIR)/ ;\
sphinx-build -j 8 -b html -c utils/sphinx-config -d $(BUILDDIR)/doctrees $(RSTDIR) html ;\
echo "############################################" ;\
doc_anchor_check src/*.txt ;\
echo "############################################" ;\
deactivate ;\
)
-rm html/searchindex.js
......@@ -127,6 +132,13 @@ fetch:
txt2html: utils/txt2html/txt2html.exe
anchor_check : $(ANCHORCHECK)
@(\
. $(VENV)/bin/activate ;\
doc_anchor_check src/*.txt ;\
deactivate ;\
)
# ------------------------------------------
utils/txt2html/txt2html.exe: utils/txt2html/txt2html.cpp
......@@ -151,7 +163,7 @@ $(VENV):
deactivate;\
)
$(TXT2RST): $(VENV)
$(TXT2RST) $(ANCHORCHECK): $(VENV)
@( \
. $(VENV)/bin/activate; \
(cd utils/converters;\
......
\documentclass[12pt]{article}
\begin{document}
\begin{eqnarray*}
\mu &=&\mu^{id} + \mu^{ex}
\end{eqnarray*}
\end{document}
\ No newline at end of file
\documentclass[12pt]{article}
\begin{document}
\begin{eqnarray*}
\mu^{id} &=& k T \ln{\rho \Lambda^3} \\
&=& k T \ln{\frac{\phi P \Lambda^3}{k T}}
\end{eqnarray*}
\end{document}
\ No newline at end of file
\documentclass[12pt]{article}
\begin{document}
\begin{eqnarray*}
\Lambda &=& \sqrt{ \frac{h^2}{2 \pi m k T}}
\end{eqnarray*}
\end{document}
\ No newline at end of file
\documentclass[12pt,fleqn]{article}
\usepackage{amsmath}
\thispagestyle{empty}
\begin{document}
\setlength{\jot}{2ex}
\begin{gather*}
E = D_0 [\exp^{-2 \alpha (r-r_0)} - 2\exp^{-\alpha (r-r_0)}] - s_6 \frac{C_6}{r^6} f_{damp}(r,R_r) \\
f_{damp}(r,R_r) = \frac{1}{1 + \exp^{-d(r/R_r - 1)}}
\end{gather*}
\end{document}
\ No newline at end of file
<!-- HTML_ONLY -->
<HEAD>
<TITLE>LAMMPS Users Manual</TITLE>
<META NAME="docnumber" CONTENT="10 Mar 2017 version">
<META NAME="docnumber" CONTENT="31 Mar 2017 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
10 Mar 2017 version :c,h4
31 Mar 2017 version :c,h4
Version info: :h4
......@@ -39,7 +39,7 @@ directory name created when you unpack a tarball, and at the top of
the first page of the manual (this page).
If you browse the HTML doc pages on the LAMMPS WWW site, they always
describe the most current version of LAMMPS. :ulb,l
describe the most current [development] version of LAMMPS. :ulb,l
If you browse the HTML doc pages included in your tarball, they
describe the version you have. :l
......@@ -67,7 +67,7 @@ Labs and Temple University:
"Steve Plimpton"_sjp, sjplimp at sandia.gov :ulb,l
Aidan Thompson, athomps at sandia.gov :l
Stan Moore, stamoore at sandia.gov :l
Stan Moore, stamoor at sandia.gov :l
"Axel Kohlmeyer"_ako, akohlmey at gmail.com :l
:ule
......
......@@ -687,6 +687,7 @@ package"_Section_start.html#start_3.
"eos/cv"_fix_eos_cv.html,
"eos/table"_fix_eos_table.html,
"eos/table/rx"_fix_eos_table_rx.html,
"filter/corotate"_fix_filter_corotate.html,
"flow/gauss"_fix_flow_gauss.html,
"gle"_fix_gle.html,
"grem"_fix_grem.html,
......@@ -939,6 +940,8 @@ KOKKOS, o = USER-OMP, t = OPT.
"lj/charmm/coul/charmm/implicit (ko)"_pair_charmm.html,
"lj/charmm/coul/long (giko)"_pair_charmm.html,
"lj/charmm/coul/msm"_pair_charmm.html,
"lj/charmmfsw/coul/charmmfsh"_pair_charmm.html,
"lj/charmmfsw/coul/long"_pair_charmm.html,
"lj/class2 (gko)"_pair_class2.html,
"lj/class2/coul/cut (ko)"_pair_class2.html,
"lj/class2/coul/long (gko)"_pair_class2.html,
......@@ -1034,6 +1037,7 @@ package"_Section_start.html#start_3.
"meam/spline (o)"_pair_meam_spline.html,
"meam/sw/spline"_pair_meam_sw_spline.html,
"mgpt"_pair_mgpt.html,
"momb"_pair_momb.html,
"morse/smooth/linear"_pair_morse.html,
"morse/soft"_pair_morse.html,
"multi/lucy"_pair_multi_lucy.html,
......@@ -1043,6 +1047,10 @@ package"_Section_start.html#start_3.
"oxdna/hbond"_pair_oxdna.html,
"oxdna/stk"_pair_oxdna.html,
"oxdna/xstk"_pair_oxdna.html,
"oxdna2/coaxstk"_pair_oxdna2.html,
"oxdna2/dh"_pair_oxdna2.html,
"oxdna2/excv"_pair_oxdna2.html,
"oxdna2/stk"_pair_oxdna2.html,
"quip"_pair_quip.html,
"reax/c (k)"_pair_reax_c.html,
"smd/hertz"_pair_smd_hertz.html,
......@@ -1060,7 +1068,7 @@ package"_Section_start.html#start_3.
"table/rx"_pair_table_rx.html,
"tersoff/table (o)"_pair_tersoff.html,
"thole"_pair_thole.html,
"tip4p/long/soft (o)"_pair_lj_soft.html :tb(c=4,ea=c)
"tip4p/long/soft (o)"_pair_lj_soft.html :tb(c=4,ea=c)
:line
......@@ -1092,7 +1100,8 @@ package"_Section_start.html#start_3.
"harmonic/shift (o)"_bond_harmonic_shift.html,
"harmonic/shift/cut (o)"_bond_harmonic_shift_cut.html,
"oxdna/fene"_bond_oxdna.html :tb(c=4,ea=c)
"oxdna/fene"_bond_oxdna.html,
"oxdna2/fene"_bond_oxdna.html :tb(c=4,ea=c)
:line
......@@ -1146,6 +1155,7 @@ USER-OMP, t = OPT.
"zero"_dihedral_zero.html,
"hybrid"_dihedral_hybrid.html,
"charmm (ko)"_dihedral_charmm.html,
"charmmfsh"_dihedral_charmm.html,
"class2 (ko)"_dihedral_class2.html,
"harmonic (io)"_dihedral_harmonic.html,
"helix (o)"_dihedral_helix.html,
......
......@@ -25,9 +25,7 @@ files and image files.
If you uncomment the "dump"_dump.html command in the input script, a
text dump file will be produced, which can be animated by various
"visualization programs"_http://lammps.sandia.gov/viz.html. It can
also be animated using the xmovie tool described in the "Additional
Tools"_Section_tools.html section of the LAMMPS documentation.
"visualization programs"_http://lammps.sandia.gov/viz.html.
If you uncomment the "dump image"_dump.html command in the input
script, and assuming you have built LAMMPS with a JPG library, JPG
......@@ -53,9 +51,11 @@ Lowercase directories :h4
accelerate: run with various acceleration options (OpenMP, GPU, Phi)
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
comb: models using the COMB potential
coreshell: core/shell model using CORESHELL package
controller: use of fix controller as a thermostat
crack: crack propagation in a 2d solid
deposit: deposit atoms and molecules on a surface
dipole: point dipolar particles, 2d system
......@@ -64,6 +64,8 @@ eim: NaCl using the EIM potential
ellipse: ellipsoidal particles in spherical solvent, 2d system
flow: Couette and Poiseuille flow in a 2d channel
friction: frictional contact of spherical asperities between 2d surfaces
gcmc: Grand Canonical Monte Carlo (GCMC) via the fix gcmc command
granregion: use of fix wall/region/gran as boundary on granular particles
hugoniostat: Hugoniostat shock dynamics
indent: spherical indenter into a 2d solid
kim: use of potentials in Knowledge Base for Interatomic Models (KIM)
......@@ -71,6 +73,7 @@ meam: MEAM test for SiC and shear (same as shear examples)
melt: rapid melt of 3d LJ system
micelle: self-assembly of small lipid-like molecules into 2d bilayers
min: energy minimization of 2d LJ melt
mscg: parameterize a multi-scale coarse-graining (MSCG) model
msst: MSST shock dynamics
nb3b: use of nonbonded 3-body harmonic pair style
neb: nudged elastic band (NEB) calculation for barrier finding
......@@ -89,7 +92,8 @@ snap: NVE dynamics for BCC tantalum crystal using SNAP potential
srd: stochastic rotation dynamics (SRD) particles as solvent
streitz: use of Streitz/Mintmire potential with charge equilibration
tad: temperature-accelerated dynamics of vacancy diffusion in bulk Si
vashishta: use of the Vashishta potential :tb(s=:)
vashishta: use of the Vashishta potential
voronoi: Voronoi tesselation via compute voronoi/atom command :tb(s=:)
Here is how you can run and visualize one of the sample problems:
......
......@@ -165,9 +165,16 @@ Many of the example input scripts included in the LAMMPS distribution
are for 2d models.
NOTE: Some models in LAMMPS treat particles as finite-size spheres, as
opposed to point particles. In 2d, the particles will still be
spheres, not disks, meaning their moment of inertia will be the same
as in 3d.
opposed to point particles. See the "atom_style
sphere"_atom_style.html and "fix nve/sphere"_fix_nve_sphere.html
commands for details. By default, for 2d simulations, such particles
will still be modeled as 3d spheres, not 2d discs (circles), meaning
their moment of inertia will be that of a sphere. If you wish to
model them as 2d discs, see the "set density/disc"_set.html command
and the {disc} option for the "fix nve/sphere"_fix_nve_sphere.html,
"fix nvt/sphere"_fix_nvt_sphere.html, "fix
nph/sphere"_fix_nph_sphere.html, "fix npt/sphere"_fix_npt_sphere.html
commands.
:line
......@@ -197,7 +204,10 @@ documentation for the formula it computes.
"bond_style"_bond_harmonic.html harmonic
"angle_style"_angle_charmm.html charmm
"dihedral_style"_dihedral_charmm.html charmmfsh
"dihedral_style"_dihedral_charmm.html charmm
"pair_style"_pair_charmm.html lj/charmmfsw/coul/charmmfsh
"pair_style"_pair_charmm.html lj/charmmfsw/coul/long
"pair_style"_pair_charmm.html lj/charmm/coul/charmm
"pair_style"_pair_charmm.html lj/charmm/coul/charmm/implicit
"pair_style"_pair_charmm.html lj/charmm/coul/long :ul
......@@ -205,6 +215,12 @@ documentation for the formula it computes.
"special_bonds"_special_bonds.html charmm
"special_bonds"_special_bonds.html amber :ul
NOTE: For CHARMM, the newer {charmmfsw} or {charmmfsh} styles were
released in March 2017. We recommend they be used instead of the
older {charmm} styles. See discussion of the differences on the "pair
charmm"_pair_charmm.html and "dihedral charmm"_dihedral_charmm.html
doc pages.
DREIDING is a generic force field developed by the "Goddard
group"_http://www.wag.caltech.edu at Caltech and is useful for
predicting structures and dynamics of organic, biological and
......@@ -434,6 +450,12 @@ computations between frozen atoms by using this command:
"neigh_modify"_neigh_modify.html exclude :ul
NOTE: By default, for 2d systems, granular particles are still modeled
as 3d spheres, not 2d discs (circles), meaning their moment of inertia
will be the same as in 3d. If you wish to model granular particles in
2d as 2d discs, see the note on this topic in "Section
6.2"_Section_howto.html#howto_2, where 2d simulations are disussed.
:line
6.7 TIP3P water model :link(howto_7),h4
......@@ -451,7 +473,7 @@ atoms and the water molecule to run a rigid TIP3P-CHARMM model with a
cutoff. The K values can be used if a flexible TIP3P model (without
fix shake) is desired. If the LJ epsilon and sigma for HH and OH are
set to 0.0, it corresponds to the original 1983 TIP3P model
"(Jorgensen)"_#Jorgensen.
"(Jorgensen)"_#Jorgensen1.
O mass = 15.9994
H mass = 1.008
......@@ -469,7 +491,7 @@ K of HOH angle = 55
theta of HOH angle = 104.52 :all(b),p
These are the parameters to use for TIP3P with a long-range Coulombic
solver (e.g. Ewald or PPPM in LAMMPS), see "(Price)"_#Price for
solver (e.g. Ewald or PPPM in LAMMPS), see "(Price)"_#Price1 for
details:
O mass = 15.9994
......@@ -513,7 +535,7 @@ using the "fix shake"_fix_shake.html command.
These are the additional parameters (in real units) to set for O and H
atoms and the water molecule to run a rigid TIP4P model with a cutoff
"(Jorgensen)"_#Jorgensen. Note that the OM distance is specified in
"(Jorgensen)"_#Jorgensen1. Note that the OM distance is specified in
the "pair_style"_pair_style.html command, not as part of the pair
coefficients.
......@@ -737,23 +759,14 @@ LAMMPS itself does not do visualization, but snapshots from LAMMPS
simulations can be visualized (and analyzed) in a variety of ways.
LAMMPS snapshots are created by the "dump"_dump.html command which can
create files in several formats. The native LAMMPS dump format is a
create files in several formats. The native LAMMPS dump format is a
text file (see "dump atom" or "dump custom") which can be visualized
by the "xmovie"_Section_tools.html#xmovie program, included with the
LAMMPS package. This produces simple, fast 2d projections of 3d
systems, and can be useful for rapid debugging of simulation geometry
and atom trajectories.
by several popular visualization tools. The "dump image"_dump_image.html
and "dump movie"_dump_image.html styles can output internally rendered
images and convert a sequence of them to a movie during the MD run.
Several programs included with LAMMPS as auxiliary tools can convert
native LAMMPS dump files to other formats. See the
"Section 9"_Section_tools.html doc page for details. The first is
the "ch2lmp tool"_Section_tools.html#charmm, which contains a
lammps2pdb Perl script which converts LAMMPS dump files into PDB
files. The second is the "lmp2arc tool"_Section_tools.html#arc which
converts LAMMPS dump files into Accelrys' Insight MD program files.
The third is the "lmp2cfg tool"_Section_tools.html#cfg which converts
LAMMPS dump files into CFG files which can be read into the
"AtomEye"_atomeye visualizer.
between LAMMPS format files and other formats.
See the "Section 9"_Section_tools.html doc page for details.
A Python-based toolkit distributed by our group can read native LAMMPS
dump files, including custom dump files with additional columns of
......@@ -766,22 +779,7 @@ RasMol visualization programs. Pizza.py has tools that do interactive
3d OpenGL visualization and one that creates SVG images of dump file
snapshots.
LAMMPS can create XYZ files directly (via "dump xyz") which is a
simple text-based file format used by many visualization programs
including "VMD"_vmd.
LAMMPS can create DCD files directly (via "dump dcd") which can be
read by "VMD"_vmd in conjunction with a CHARMM PSF file. Using this
form of output avoids the need to convert LAMMPS snapshots to PDB
files. See the "dump"_dump.html command for more information on DCD
files.
LAMMPS can create XTC files directly (via "dump xtc") which is GROMACS
file format which can also be read by "VMD"_vmd for visualization.
See the "dump"_dump.html command for more information on XTC files.
:link(pizza,http://www.sandia.gov/~sjplimp/pizza.html)
:link(vmd,http://www.ks.uiuc.edu/Research/vmd)
:link(ensight,http://www.ensight.com)
:link(atomeye,http://mt.seas.upenn.edu/Archive/Graphics/A)
......@@ -1032,6 +1030,10 @@ profile consistent with the applied shear strain rate.
An alternative method for calculating viscosities is provided via the
"fix viscosity"_fix_viscosity.html command.
NEMD simulations can also be used to measure transport properties of a fluid
through a pore or channel. Simulations of steady-state flow can be performed
using the "fix flow/gauss"_fix_flow_gauss.html command.
:line
6.14 Finite-size spherical and aspherical particles :link(howto_14),h4
......@@ -1684,7 +1686,7 @@ nph) and Berendsen:
The "fix npt"_fix_nh.html commands include a Nose-Hoover thermostat
and barostat. "Fix nph"_fix_nh.html is just a Nose/Hoover barostat;
it does no thermostatting. Both "fix nph"_fix_nh.html and "fix
press/bernendsen"_fix_press_berendsen.html can be used in conjunction
press/berendsen"_fix_press_berendsen.html can be used in conjunction
with any of the thermostatting fixes.
As with the thermostats, "fix npt"_fix_nh.html and "fix
......@@ -1834,7 +1836,7 @@ the deformation must be chosen judiciously, and care must be taken to
fully equilibrate the deformed cell before sampling the stress
tensor. Another approach is to sample the triclinic cell fluctuations
that occur in an NPT simulation. This method can also be slow to
converge and requires careful post-processing "(Shinoda)"_#Shinoda
converge and requires careful post-processing "(Shinoda)"_#Shinoda1
:line
......@@ -1957,9 +1959,12 @@ The extract functions return a pointer to various global or per-atom
quantities stored in LAMMPS or to values calculated by a compute, fix,
or variable. The pointer returned by the extract_global() function
can be used as a permanent reference to a value which may change. For
the other extract functions, the underlying storage may be reallocated
as LAMMPS runs, so you need to re-call the function to assure a
current pointer or returned value(s).
the extract_atom() method, see the extract() method in the
src/atom.cpp file for a list of valid per-atom properties. New names
could easily be added if the property you want is not listed. For the
other extract functions, the underlying storage may be reallocated as
LAMMPS runs, so you need to re-call the function to assure a current
pointer or returned value(s).
The lammps_reset_box() function resets the size and shape of the
simulation box, e.g. as part of restoring a previously extracted and
......@@ -1975,11 +1980,20 @@ keyword as a double precision value.
The lammps_get_natoms() function returns the total number of atoms in
the system and can be used by the caller to allocate space for the
lammps_gather_atoms() and lammps_scatter_atoms() functions. The
gather function collects atom info of the requested type (atom coords,
types, forces, etc) from all processors, orders them by atom ID, and
returns a full list to each calling processor. The scatter function
does the inverse. It distributes the same kinds of values,
gather function collects peratom info of the requested type (atom
coords, types, forces, etc) from all processors, orders them by atom
ID, and returns a full list to each calling processor. The scatter
function does the inverse. It distributes the same peratom values,
passed by the caller, to each atom owned by individual processors.
Both methods are thus a means to extract or assign (overwrite) any
peratom quantities within LAMMPS. See the extract() method in the
src/atom.cpp file for a list of valid per-atom properties. New names
could easily be added if the property you want is not listed.
A special treatment is applied for accessing image flags via the
"image" property. Image flags are stored in a packed format with all
three image flags stored in a single integer. When signaling to access
the image flags as 3 individual values per atom instead of 1, the data
is transparently packed or unpacked by the library interface.
The lammps_create_atoms() function takes a list of N atoms as input
with atom types and coords (required), an optionally atom IDs and
......@@ -2899,14 +2913,14 @@ Fischer, Gao, Guo, Ha, et al, J Phys Chem, 102, 3586 (1998).
[(Mayo)] Mayo, Olfason, Goddard III, J Phys Chem, 94, 8897-8909
(1990).
:link(Jorgensen)
:link(Jorgensen1)
[(Jorgensen)] Jorgensen, Chandrasekhar, Madura, Impey, Klein, J Chem
Phys, 79, 926 (1983).
:link(Price)
:link(Price1)
[(Price)] Price and Brooks, J Chem Phys, 121, 10096 (2004).
:link(Shinoda)
:link(Shinoda1)
[(Shinoda)] Shinoda, Shiga, and Mikami, Phys Rev B, 69, 134103 (2004).
:link(MitchellFincham)
......
......@@ -338,15 +338,13 @@ dynamics timestepping, particularly if the computations are not
parallel, so it is often better to leave such analysis to
post-processing codes.
A very simple (yet fast) visualizer is provided with the LAMMPS
package - see the "xmovie"_Section_tools.html#xmovie tool in "this
section"_Section_tools.html. It creates xyz projection views of
atomic coordinates and animates them. We find it very useful for
debugging purposes. For high-quality visualization we recommend the
For high-quality visualization we recommend the
following packages:
"VMD"_http://www.ks.uiuc.edu/Research/vmd
"AtomEye"_http://mt.seas.upenn.edu/Archive/Graphics/A
"OVITO"_http://www.ovito.org/
"ParaView"_http://www.paraview.org/
"PyMol"_http://www.pymol.org
"Raster3d"_http://www.bmsc.washington.edu/raster3d/raster3d.html
"RasMol"_http://www.openrasmol.org :ul
......
......@@ -1140,7 +1140,7 @@ Package, Description, Author(s), Doc page, Example, Pic/movie, Library
"USER-ATC"_#USER-ATC, atom-to-continuum coupling, Jones & Templeton & Zimmerman (1), "fix atc"_fix_atc.html, USER/atc, "atc"_atc, lib/atc
"USER-AWPMD"_#USER-AWPMD, wave-packet MD, Ilya Valuev (JIHT), "pair_style awpmd/cut"_pair_awpmd.html, USER/awpmd, -, lib/awpmd
"USER-CG-CMM"_#USER-CG-CMM, coarse-graining model, Axel Kohlmeyer (Temple U), "pair_style lj/sdk"_pair_sdk.html, USER/cg-cmm, "cg"_cg, -
"USER-CGDNA"_#USER-CGDNA, coarse-grained DNA force fields, Oliver Henrich (U Edinburgh), src/USER-CGDNA/README, USER/cgdna, -, -
"USER-CGDNA"_#USER-CGDNA, coarse-grained DNA force fields, Oliver Henrich (U Strathclyde Glasgow), src/USER-CGDNA/README, USER/cgdna, -, -
"USER-COLVARS"_#USER-COLVARS, collective variables, Fiorin & Henin & Kohlmeyer (2), "fix colvars"_fix_colvars.html, USER/colvars, "colvars"_colvars, lib/colvars
"USER-DIFFRACTION"_#USER-DIFFRACTION, virutal x-ray and electron diffraction, Shawn Coleman (ARL),"compute xrd"_compute_xrd.html, USER/diffraction, -, -
"USER-DPD"_#USER-DPD, reactive dissipative particle dynamics (DPD), Larentzos & Mattox & Brennan (5), src/USER-DPD/README, USER/dpd, -, -
......@@ -1288,25 +1288,29 @@ him directly if you have questions.
USER-CGDNA package :link(USER-CGDNA),h5
Contents: The CGDNA package implements coarse-grained force fields for
single- and double-stranded DNA. This is at the moment mainly the
oxDNA model, developed by Doye, Louis and Ouldridge at the University
single- and double-stranded DNA. These are at the moment mainly the
oxDNA and oxDNA2 models, developed by Doye, Louis and Ouldridge at the University
of Oxford. The package also contains Langevin-type rigid-body
integrators with improved stability.
See these doc pages to get started:
"bond_style oxdna/fene"_bond_oxdna.html
"bond_style oxdna2/fene"_bond_oxdna.html
"pair_style oxdna/..."_pair_oxdna.html
"pair_style oxdna2/..."_pair_oxdna2.html
"fix nve/dotc/langevin"_fix_nve_dotc_langevin.html :ul
Supporting info: /src/USER-CGDNA/README, "bond_style
oxdna/fene"_bond_oxdna.html, "pair_style
oxdna/..."_pair_oxdna.html, "fix
oxdna/fene"_bond_oxdna.html, "bond_style
oxdna2/fene"_bond_oxdna.html, "pair_style
oxdna/..."_pair_oxdna.html, "pair_style
oxdna2/..."_pair_oxdna2.html, "fix
nve/dotc/langevin"_fix_nve_dotc_langevin.html
Author: Oliver Henrich at the University of Edinburgh, UK (o.henrich
at epcc.ed.ac.uk or ohenrich at ph.ed.ac.uk). Contact him directly if
you have any questions.
Author: Oliver Henrich at the University of Strathclyde, Glasgow, UK and
University of Edinburgh (ohenrich@ph.ed.ac.uk).
Contact him directly if you have any questions.
:line
......
......@@ -594,10 +594,10 @@ flag = lmp.set_variable(name,value) # set existing named string-style vari
value = lmp.get_thermo(name) # return current value of a thermo keyword
natoms = lmp.get_natoms() # total # of atoms as int
data = lmp.gather_atoms(name,type,count) # return atom attribute of all atoms gathered into data, ordered by atom ID
data = lmp.gather_atoms(name,type,count) # return per-atom property of all atoms gathered into data, ordered by atom ID
# name = "x", "charge", "type", etc
# count = # of per-atom values, 1 or 3, etc
lmp.scatter_atoms(name,type,count,data) # scatter atom attribute of all atoms from data, ordered by atom ID
lmp.scatter_atoms(name,type,count,data) # scatter per-atom property to all atoms from data, ordered by atom ID
# name = "x", "charge", "type", etc
# count = # of per-atom values, 1 or 3, etc :pre
......@@ -656,10 +656,10 @@ argument.
For extract_atom(), a pointer to internal LAMMPS atom-based data is
returned, which you can use via normal Python subscripting. See the
extract() method in the src/atom.cpp file for a list of valid names.
Again, new names could easily be added. A pointer to a vector of
doubles or integers, or a pointer to an array of doubles (double **)
or integers (int **) is returned. You need to specify the appropriate
data type via the type argument.
Again, new names could easily be added if the property you want is not
listed. A pointer to a vector of doubles or integers, or a pointer to
an array of doubles (double **) or integers (int **) is returned. You
need to specify the appropriate data type via the type argument.
For extract_compute() and extract_fix(), the global, per-atom, or
local data calculated by the compute or fix can be accessed. What is
......@@ -689,12 +689,21 @@ specified group.
The get_natoms() method returns the total number of atoms in the
simulation, as an int.
The gather_atoms() method returns a ctypes vector of ints or doubles
as specified by type, of length count*natoms, for the property of all
the atoms in the simulation specified by name, ordered by count and
then by atom ID. The vector can be used via normal Python
subscripting. If atom IDs are not consecutively ordered within
LAMMPS, a None is returned as indication of an error.
The gather_atoms() method allows any per-atom property (coordinates,
velocities, etc) to be extracted from LAMMPS. It returns a ctypes
vector of ints or doubles as specified by type, of length
count*natoms, for the named property for all atoms in the simulation.
The data is ordered by count and then by atom ID. See the extract()
method in the src/atom.cpp file for a list of valid names. Again, new
names could easily be added if the property you want is missing. The
vector can be used via normal Python subscripting. If atom IDs are
not consecutively ordered within LAMMPS, a None is returned as
indication of an error. A special treatment is applied for image flags
stored in the "image" property. All three image flags are stored in
a packed format in a single integer, so count would be 1 to retrieve
that integer, however also a count value of 3 can be used and then
the image flags will be unpacked into 3 individual integers, ordered
in a similar fashion as coordinates.
Note that the data structure gather_atoms("x") returns is different
from the data structure returned by extract_atom("x") in four ways.
......@@ -711,14 +720,22 @@ assigning a new values to the extract_atom() array. To do this with
the gather_atoms() vector, you need to change values in the vector,
then invoke the scatter_atoms() method.
The scatter_atoms() method takes a vector of ints or doubles as
specified by type, of length count*natoms, for the property of all the
atoms in the simulation specified by name, ordered by bount and then
by atom ID. It uses the vector of data to overwrite the corresponding
properties for each atom inside LAMMPS. This requires LAMMPS to have
its "map" option enabled; see the "atom_modify"_atom_modify.html
command for details. If it is not, or if atom IDs are not
consecutively ordered, no coordinates are reset.
The scatter_atoms() method allows any per-atom property (coordinates,
velocities, etc) to be inserted into LAMMPS, overwriting the current
property. It takes a vector of ints or doubles as specified by type,
of length count*natoms, for the named property for all atoms in the
simulation. The data should be ordered by count and then by atom ID.
See the extract() method in the src/atom.cpp file for a list of valid
names. Again, new names could easily be added if the property you
want is missing. It uses the vector of data to overwrite the
corresponding properties for each atom inside LAMMPS. This requires
LAMMPS to have its "map" option enabled; see the
"atom_modify"_atom_modify.html command for details. If it is not, or
if atom IDs are not consecutively ordered, no coordinates are reset.
Similar as for gather_atoms() a special treatment is applied for image
flags, which can be provided in packed (count = 1) or unpacked (count = 3)
format and in the latter case, they will be packed before applied to
atoms.
The array of coordinates passed to scatter_atoms() must be a ctypes
vector of ints or doubles, allocated and initialized something like
......@@ -734,7 +751,7 @@ x\[2\] = z coord of atom with ID 1
x\[3\] = x coord of atom with ID 2
...
x\[n3-1\] = z coord of atom with ID natoms
lmp.scatter_coords("x",1,3,x) :pre
lmp.scatter_atoms("x",1,3,x) :pre
Alternatively, you can just change values in the vector returned by
gather_atoms("x",1,3), since it is a ctypes vector of doubles.
......
......@@ -12,9 +12,12 @@ Section"_Section_modify.html :c
LAMMPS is designed to be a computational kernel for performing
molecular dynamics computations. Additional pre- and post-processing