Merge branch 'master' into fft

# Conflicts:
#	doc/txt/kspace_style.txt
This commit is contained in:
Axel Kohlmeyer 2020-01-13 10:53:26 -05:00
commit 2834965e98
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
72 changed files with 446 additions and 1172 deletions

View File

@ -31,7 +31,7 @@ SPHINXEXTRA = -j $(shell $(PYTHON) -c 'import multiprocessing;print(multiprocess
SOURCES=$(filter-out $(wildcard $(TXTDIR)/lammps_commands*.txt) $(TXTDIR)/lammps_support.txt $(TXTDIR)/lammps_tutorials.txt,$(wildcard $(TXTDIR)/*.txt))
OBJECTS=$(SOURCES:$(TXTDIR)/%.txt=$(RSTDIR)/%.rst)
.PHONY: help clean-all clean epub mobi rst html pdf venv spelling anchor_check
.PHONY: help clean-all clean epub mobi rst html pdf venv spelling anchor_check style_check
# ------------------------------------------
@ -46,6 +46,7 @@ help:
@echo " clean remove all intermediate RST files"
@echo " clean-all reset the entire build environment"
@echo " anchor_check scan for duplicate anchor labels"
@echo " style_check check for complete and consistent style lists"
@echo " spelling spell-check the manual"
# ------------------------------------------
@ -69,6 +70,7 @@ html: $(OBJECTS) $(ANCHORCHECK)
echo "############################################" ;\
rst_anchor_check src/*.rst ;\
env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\
python utils/check-styles.py -s ../src -d src ;\
echo "############################################" ;\
deactivate ;\
)
@ -122,24 +124,27 @@ pdf: $(OBJECTS) $(ANCHORCHECK)
cd ../../; \
)
@(\
. $(VENV)/bin/activate ;\
sphinx-build $(SPHINXEXTRA) -b latex -c utils/sphinx-config -d $(BUILDDIR)/doctrees $(RSTDIR) latex ;\
echo "############################################" ;\
rst_anchor_check src/*.rst ;\
echo "############################################" ;\
deactivate ;\
. $(VENV)/bin/activate ;\
sphinx-build $(SPHINXEXTRA) -b latex -c utils/sphinx-config -d $(BUILDDIR)/doctrees $(RSTDIR) latex ;\
echo "############################################" ;\
rst_anchor_check src/*.rst ;\
env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\
python utils/check-styles.py -s ../src -d src ;\
echo "############################################" ;\
deactivate ;\
)
@cd latex && \
sed 's/latexmk -pdf -dvi- -ps-/pdflatex/g' Makefile > temp && \
mv temp Makefile && \
sed 's/\\begin{equation}//g' LAMMPS.tex > tmp.tex && \
mv tmp.tex LAMMPS.tex && \
sed 's/\\end{equation}//g' LAMMPS.tex > tmp.tex && \
mv tmp.tex LAMMPS.tex && \
make && \
make && \
mv LAMMPS.pdf ../Manual.pdf && \
cd ../;
sed 's/latexmk -pdf -dvi- -ps-/pdflatex/g' Makefile > temp && \
mv temp Makefile && \
sed 's/\\begin{equation}//g' LAMMPS.tex > tmp.tex && \
mv tmp.tex LAMMPS.tex && \
sed 's/\\end{equation}//g' LAMMPS.tex > tmp.tex && \
mv tmp.tex LAMMPS.tex && \
make && \
make && \
make && \
mv LAMMPS.pdf ../Manual.pdf && \
cd ../;
@rm -rf latex/_sources
@rm -rf latex/PDF
@rm -rf latex/USER
@ -166,6 +171,13 @@ anchor_check : $(ANCHORCHECK)
deactivate ;\
)
style_check :
@(\
. $(VENV)/bin/activate ;\
python utils/check-styles.py -s ../src -d src ;\
deactivate ;\
)
# ------------------------------------------
$(RSTDIR)/%.rst : $(TXTDIR)/%.txt $(TXT2RST)

View File

@ -55,9 +55,9 @@ the doc dir.
make mobi # generate LAMMPS.mobi in MOBI format using ebook-convert
make clean # remove intermediate RST files created by HTML build
make clean-all # remove entire build folder and any cached data
make anchor\_check # check for duplicate anchor labels
make spelling # spell-check the manual
make anchor_check # check for duplicate anchor labels
style_check # check for complete and consistent style lists
make spelling # spell-check the manual
----------

View File

@ -100,6 +100,7 @@ accelerated styles exist.
* :doc:`nonlinear <bond_nonlinear>` - nonlinear bond
* :doc:`oxdna/fene <bond_oxdna>` - modified FENE bond suitable for DNA modeling
* :doc:`oxdna2/fene <bond_oxdna>` - same as oxdna but used with different pair styles
* :doc:`oxrna2/fene <bond_oxdna>` - modified FENE bond suitable for RNA modeling
* :doc:`quartic <bond_quartic>` - breakable quartic bond
* :doc:`table <bond_table>` - tabulated by bond length

View File

@ -64,16 +64,16 @@ with new settings). This is the same as if an "unfix" command were
first performed on the old fix, except that the new fix is kept in the
same order relative to the existing fixes as the old one originally
was. Note that this operation also wipes out any additional changes
made to the old fix via the :doc:`fix\_modify <fix_modify>` command.
made to the old fix via the :doc:`fix_modify <fix_modify>` command.
The :doc:`fix modify <fix_modify>` command allows settings for some
fixes to be reset. See the doc page for individual fixes for details.
Some fixes store an internal "state" which is written to binary
restart files via the :doc:`restart <restart>` or
:doc:`write\_restart <write_restart>` commands. This allows the fix to
:doc:`write_restart <write_restart>` commands. This allows the fix to
continue on with its calculations in a restarted simulation. See the
:doc:`read\_restart <read_restart>` command for info on how to re-specify
:doc:`read_restart <read_restart>` command for info on how to re-specify
a fix in an input script that reads a restart file. See the doc pages
for individual fixes for info on which ones can be restarted.
@ -133,7 +133,7 @@ various commands explain the details.
In LAMMPS, the values generated by a fix can be used in several ways:
* Global values can be output via the :doc:`thermo\_style custom <thermo_style>` or :doc:`fix ave/time <fix_ave_time>` command.
* Global values can be output via the :doc:`thermo_style custom <thermo_style>` or :doc:`fix ave/time <fix_ave_time>` command.
Or the values can be referenced in a :doc:`variable equal <variable>` or
:doc:`variable atom <variable>` command.
* Per-atom values can be output via the :doc:`dump custom <dump>` command.
@ -257,6 +257,7 @@ accelerated styles exist.
* :doc:`mvv/edpd <fix_mvv_dpd>` - constant energy DPD using the modified velocity-Verlet algorithm
* :doc:`mvv/tdpd <fix_mvv_dpd>` - constant temperature DPD using the modified velocity-Verlet algorithm
* :doc:`neb <fix_neb>` - nudged elastic band (NEB) spring forces
* :doc:`neb/spin <fix_neb_spin>` - nudged elastic band (NEB) spring forces for spins
* :doc:`nph <fix_nh>` - constant NPH time integration via Nose/Hoover
* :doc:`nph/asphere <fix_nph_asphere>` - NPH for aspherical particles
* :doc:`nph/body <fix_nph_body>` - NPH for body particles
@ -339,15 +340,16 @@ accelerated styles exist.
* :doc:`rx <fix_rx>` -
* :doc:`saed/vtk <fix_saed_vtk>` -
* :doc:`setforce <fix_setforce>` - set the force on each atom
* :doc:`setforce/spin <fix_setforce>` - set magnetic precession vectors on each atom
* :doc:`shake <fix_shake>` - SHAKE constraints on bonds and/or angles
* :doc:`shardlow <fix_shardlow>` - integration of DPD equations of motion using the Shardlow splitting
* :doc:`smd <fix_smd>` - applied a steered MD force to a group
* :doc:`smd/adjust\_dt <fix_smd_adjust_dt>` -
* :doc:`smd/integrate\_tlsph <fix_smd_integrate_tlsph>` -
* :doc:`smd/integrate\_ulsph <fix_smd_integrate_ulsph>` -
* :doc:`smd/move\_tri\_surf <fix_smd_move_triangulated_surface>` -
* :doc:`smd/adjust_dt <fix_smd_adjust_dt>` -
* :doc:`smd/integrate_tlsph <fix_smd_integrate_tlsph>` -
* :doc:`smd/integrate_ulsph <fix_smd_integrate_ulsph>` -
* :doc:`smd/move_tri_surf <fix_smd_move_triangulated_surface>` -
* :doc:`smd/setvel <fix_smd_setvel>` -
* :doc:`smd/wall\_surface <fix_smd_wall_surface>` -
* :doc:`smd/wall_surface <fix_smd_wall_surface>` -
* :doc:`spring <fix_spring>` - apply harmonic spring force to group of atoms
* :doc:`spring/chunk <fix_spring_chunk>` - apply harmonic spring force to each chunk of atoms
* :doc:`spring/rg <fix_spring_rg>` - spring on radius of gyration of group of atoms
@ -399,7 +401,7 @@ individual fixes tell if it is part of a package.
Related commands
""""""""""""""""
:doc:`unfix <unfix>`, :doc:`fix\_modify <fix_modify>`
:doc:`unfix <unfix>`, :doc:`fix_modify <fix_modify>`
**Default:** none

View File

@ -12,9 +12,9 @@ Syntax
kspace_style style value
* style = *none* or *ewald* or *ewald/dipole* or *ewald/dipole/spin* or *ewald/disp* or *ewald/omp* or *pppm* or *pppm/cg* or *pppm/disp* or *pppm/tip4p* or *pppm/stagger* or *pppm/disp/tip4p* or *pppm/gpu* or *pppm/intel* or *pppm/disp/intel* or *pppm/kk* or *pppm/omp* or *pppm/cg/omp* or *pppm/disp/tip4p/omp* or *pppm/tip4p/omp* or *msm* or *msm/cg* or *msm/omp* or *msm/cg/omp* or *scafacos*
.. parsed-literal::
*none* value = none
*ewald* value = accuracy
accuracy = desired relative error in forces

View File

@ -247,7 +247,9 @@ or *lj/coul* to change both to the same set of 3 values. The wt1,wt2,wt3
values are numeric weights from 0.0 to 1.0 inclusive, for the 1-2,
1-3, and 1-4 bond topology neighbors, respectively. The *special*
keyword can only be used in conjunction with the *pair* keyword
and has to directly follow it.
and has to directly follow it. This option is not compatible with
pair styles from the GPU or the USER-INTEL package and attempting
it will cause an error.
.. note::
@ -278,10 +280,11 @@ and allows to selectively disable or enable processing of the various
Restrictions
""""""""""""
none
You cannot use *shift* yes with *tail* yes, since those are
conflicting options. You cannot use *tail* yes with 2d simulations.
You cannot use *special* with pair styles from the GPU or
USER-INTEL package.
Related commands
""""""""""""""""

View File

@ -32,7 +32,7 @@ Description
Set the formula(s) LAMMPS uses to compute pairwise interactions. In
LAMMPS, pair potentials are defined between pairs of atoms that are
within a cutoff distance and the set of active interactions typically
changes over time. See the :doc:`bond\_style <bond_style>` command to
changes over time. See the :doc:`bond_style <bond_style>` command to
define potentials between pairs of bonded atoms, which typically
remain in place for the duration of a simulation.
@ -48,11 +48,11 @@ different pair potentials can be setup using the *hybrid* pair style.
The coefficients associated with a pair style are typically set for
each pair of atom types, and are specified by the
:doc:`pair\_coeff <pair_coeff>` command or read from a file by the
:doc:`read\_data <read_data>` or :doc:`read\_restart <read_restart>`
:doc:`pair_coeff <pair_coeff>` command or read from a file by the
:doc:`read_data <read_data>` or :doc:`read_restart <read_restart>`
commands.
The :doc:`pair\_modify <pair_modify>` command sets options for mixing of
The :doc:`pair_modify <pair_modify>` command sets options for mixing of
type I-J interaction coefficients and adding energy offsets or tail
corrections to Lennard-Jones potentials. Details on these options as
they pertain to individual potentials are described on the doc page
@ -70,11 +70,11 @@ cutoffs for all pairs of atom types. The distance(s) can be smaller
or larger than the dimensions of the simulation box.
Typically, the global cutoff value can be overridden for a specific
pair of atom types by the :doc:`pair\_coeff <pair_coeff>` command. The
pair of atom types by the :doc:`pair_coeff <pair_coeff>` command. The
pair style settings (including global cutoffs) can be changed by a
subsequent pair\_style command using the same style. This will reset
the cutoffs for all atom type pairs, including those previously set
explicitly by a :doc:`pair\_coeff <pair_coeff>` command. The exceptions
explicitly by a :doc:`pair_coeff <pair_coeff>` command. The exceptions
to this are that pair\_style *table* and *hybrid* settings cannot be
reset. A new pair\_style command for these styles will wipe out all
previously specified pair\_coeff values.
@ -88,7 +88,7 @@ also listed in more compact form on the :doc:`Commands pair <Commands_pair>` doc
Click on the style to display the formula it computes, any additional
arguments specified in the pair\_style command, and coefficients
specified by the associated :doc:`pair\_coeff <pair_coeff>` command.
specified by the associated :doc:`pair_coeff <pair_coeff>` command.
There are also additional accelerated pair styles included in the
LAMMPS distribution for faster performance on CPUs, GPUs, and KNLs.
@ -170,6 +170,7 @@ accelerated styles exist.
* :doc:`gauss <pair_gauss>` - Gaussian potential
* :doc:`gauss/cut <pair_gauss>` - generalized Gaussian potential
* :doc:`gayberne <pair_gayberne>` - Gay-Berne ellipsoidal potential
* :doc:`granular <pair_granular>` - Generalized granular potential
* :doc:`gran/hertz/history <pair_gran>` - granular potential with Hertzian interactions
* :doc:`gran/hooke <pair_gran>` - granular potential with history effects
* :doc:`gran/hooke/history <pair_gran>` - granular potential without history effects
@ -267,6 +268,12 @@ accelerated styles exist.
* :doc:`oxdna2/hbond <pair_oxdna2>` -
* :doc:`oxdna2/stk <pair_oxdna2>` -
* :doc:`oxdna2/xstk <pair_oxdna2>` -
* :doc:`oxrna2/coaxstk <pair_oxrna2>` -
* :doc:`oxrna2/dh <pair_oxrna2>` -
* :doc:`oxrna2/excv <pair_oxrna2>` -
* :doc:`oxrna2/hbond <pair_oxrna2>` -
* :doc:`oxrna2/stk <pair_oxrna2>` -
* :doc:`oxrna2/xstk <pair_oxrna2>` -
* :doc:`peri/eps <pair_peri>` - peridynamic EPS potential
* :doc:`peri/lps <pair_peri>` - peridynamic LPS potential
* :doc:`peri/pmb <pair_peri>` - peridynamic PMB potential
@ -280,7 +287,7 @@ accelerated styles exist.
* :doc:`sdpd/taitwater/isothermal <pair_sdpd_taitwater_isothermal>` - smoothed dissipative particle dynamics for water at isothermal conditions
* :doc:`smd/hertz <pair_smd_hertz>` -
* :doc:`smd/tlsph <pair_smd_tlsph>` -
* :doc:`smd/tri\_surface <pair_smd_triangulated_surface>` -
* :doc:`smd/tri_surface <pair_smd_triangulated_surface>` -
* :doc:`smd/ulsph <pair_smd_ulsph>` -
* :doc:`smtbq <pair_smtbq>` -
* :doc:`snap <pair_snap>` - SNAP quantum-accurate potential
@ -328,8 +335,8 @@ Restrictions
This command must be used before any coefficients are set by the
:doc:`pair\_coeff <pair_coeff>`, :doc:`read\_data <read_data>`, or
:doc:`read\_restart <read_restart>` commands.
:doc:`pair_coeff <pair_coeff>`, :doc:`read_data <read_data>`, or
:doc:`read_restart <read_restart>` commands.
Some pair styles are part of specific packages. They are only enabled
if LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info. The doc pages for
@ -338,9 +345,9 @@ individual pair potentials tell if it is part of a package.
Related commands
""""""""""""""""
:doc:`pair\_coeff <pair_coeff>`, :doc:`read\_data <read_data>`,
:doc:`pair\_modify <pair_modify>`, :doc:`kspace\_style <kspace_style>`,
:doc:`dielectric <dielectric>`, :doc:`pair\_write <pair_write>`
:doc:`pair_coeff <pair_coeff>`, :doc:`read_data <read_data>`,
:doc:`pair_modify <pair_modify>`, :doc:`kspace_style <kspace_style>`,
:doc:`dielectric <dielectric>`, :doc:`pair_write <pair_write>`
Default
"""""""

View File

@ -1,495 +0,0 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Commands_all.html)
:line
kspace_style command :h3
[Syntax:]
kspace_style style value :pre
style = {none} or {ewald} or {ewald/disp} or {ewald/omp} or {pppm} or {pppm/cg} or {pppm/disp} or {pppm/tip4p} or {pppm/stagger} or {pppm/disp/tip4p} or {pppm/gpu} or {pppm/kk} or {pppm/omp} or {pppm/cg/omp} or {pppm/tip4p/omp} or {msm} or {msm/cg} or {msm/omp} or {msm/cg/omp} or {scafacos} :ulb,l
{none} value = none
{ewald} value = accuracy
accuracy = desired relative error in forces
{ewald/disp} value = accuracy
accuracy = desired relative error in forces
{ewald/omp} value = accuracy
accuracy = desired relative error in forces
{ewald/dipole} value = accuracy
accuracy = desired relative error in forces
{ewald/dipole/spin} value = accuracy
accuracy = desired relative error in forces
{pppm} value = accuracy
accuracy = desired relative error in forces
{pppm/cg} values = accuracy (smallq)
accuracy = desired relative error in forces
smallq = cutoff for charges to be considered (optional) (charge units)
{pppm/disp} value = accuracy
accuracy = desired relative error in forces
{pppm/tip4p} value = accuracy
accuracy = desired relative error in forces
{pppm/disp/tip4p} value = accuracy
accuracy = desired relative error in forces
{pppm/gpu} value = accuracy
accuracy = desired relative error in forces
{pppm/intel} value = accuracy
accuracy = desired relative error in forces
{pppm/kk} value = accuracy
accuracy = desired relative error in forces
{pppm/omp} value = accuracy
accuracy = desired relative error in forces
{pppm/cg/omp} value = accuracy
accuracy = desired relative error in forces
{pppm/disp/intel} value = accuracy
accuracy = desired relative error in forces
{pppm/tip4p/omp} value = accuracy
accuracy = desired relative error in forces
{pppm/stagger} value = accuracy
accuracy = desired relative error in forces
{pppm/dipole} value = accuracy
accuracy = desired relative error in forces
{pppm/dipole/spin} value = accuracy
accuracy = desired relative error in forces
{msm} value = accuracy
accuracy = desired relative error in forces
{msm/cg} value = accuracy (smallq)
accuracy = desired relative error in forces
smallq = cutoff for charges to be considered (optional) (charge units)
{msm/omp} value = accuracy
accuracy = desired relative error in forces
{msm/cg/omp} value = accuracy (smallq)
accuracy = desired relative error in forces
smallq = cutoff for charges to be considered (optional) (charge units)
{scafacos} values = method accuracy
method = fmm or p2nfft or p3m or ewald or direct
accuracy = desired relative error in forces :pre
:ule
[Examples:]
kspace_style pppm 1.0e-4
kspace_style pppm/cg 1.0e-5 1.0e-6
kspace style msm 1.0e-4
kspace style scafacos fmm 1.0e-4
kspace_style none :pre
[Description:]
Define a long-range solver for LAMMPS to use each timestep to compute
long-range Coulombic interactions or long-range 1/r^6 interactions.
Most of the long-range solvers perform their computation in K-space,
hence the name of this command.
When such a solver is used in conjunction with an appropriate pair
style, the cutoff for Coulombic or 1/r^N interactions is effectively
infinite. If the Coulombic case, this means each charge in the system
interacts with charges in an infinite array of periodic images of the
simulation domain.
Note that using a long-range solver requires use of a matching "pair
style"_pair_style.html to perform consistent short-range pairwise
calculations. This means that the name of the pair style contains a
matching keyword to the name of the KSpace style, as in this table:
Pair style : KSpace style
coul/long : ewald or pppm
coul/msm : msm
lj/long or buck/long : disp (for dispersion)
tip4p/long : tip4p :tb(s=:,ea=c)
:line
The {ewald} style performs a standard Ewald summation as described in
any solid-state physics text.
The {ewald/disp} style adds a long-range dispersion sum option for
1/r^6 potentials and is useful for simulation of interfaces
"(Veld)"_#Veld. It also performs standard Coulombic Ewald summations,
but in a more efficient manner than the {ewald} style. The 1/r^6
capability means that Lennard-Jones or Buckingham potentials can be
used without a cutoff, i.e. they become full long-range potentials.
The {ewald/disp} style can also be used with point-dipoles, see
"(Toukmaji)"_#Toukmaji.
The {ewald/dipole} style adds long-range standard Ewald summations
for dipole-dipole interactions, see "(Toukmaji)"_#Toukmaji.
The {ewald/dipole/spin} style adds long-range standard Ewald
summations for magnetic dipole-dipole interactions between
magnetic spins.
:line
The {pppm} style invokes a particle-particle particle-mesh solver
"(Hockney)"_#Hockney which maps atom charge to a 3d mesh, uses 3d FFTs
to solve Poisson's equation on the mesh, then interpolates electric
fields on the mesh points back to the atoms. It is closely related to
the particle-mesh Ewald technique (PME) "(Darden)"_#Darden used in
AMBER and CHARMM. The cost of traditional Ewald summation scales as
N^(3/2) where N is the number of atoms in the system. The PPPM solver
scales as Nlog(N) due to the FFTs, so it is almost always a faster
choice "(Pollock)"_#Pollock.
The {pppm/cg} style is identical to the {pppm} style except that it
has an optimization for systems where most particles are uncharged.
Similarly the {msm/cg} style implements the same optimization for {msm}.
The optional {smallq} argument defines the cutoff for the absolute
charge value which determines whether a particle is considered charged
or not. Its default value is 1.0e-5.
The {pppm/dipole} style invokes a particle-particle particle-mesh solver
for dipole-dipole interactions, following the method of "(Cerda)"_#Cerda2008.
The {pppm/dipole/spin} style invokes a particle-particle particle-mesh solver
for magnetic dipole-dipole interactions between magnetic spins.
The {pppm/tip4p} style is identical to the {pppm} style except that it
adds a charge at the massless 4th site in each TIP4P water molecule.
It should be used with "pair styles"_pair_style.html with a
{tip4p/long} in their style name.
The {pppm/stagger} style performs calculations using two different
meshes, one shifted slightly with respect to the other. This can
reduce force aliasing errors and increase the accuracy of the method
for a given mesh size. Or a coarser mesh can be used for the same
target accuracy, which saves CPU time. However, there is a trade-off
since FFTs on two meshes are now performed which increases the
computation required. See "(Cerutti)"_#Cerutti, "(Neelov)"_#Neelov,
and "(Hockney)"_#Hockney for details of the method.
For high relative accuracy, using staggered PPPM allows the mesh size
to be reduced by a factor of 2 in each dimension as compared to
regular PPPM (for the same target accuracy). This can give up to a 4x
speedup in the KSpace time (8x less mesh points, 2x more expensive).
However, for low relative accuracy, the staggered PPPM mesh size may
be essentially the same as for regular PPPM, which means the method
will be up to 2x slower in the KSpace time (simply 2x more expensive).
For more details and timings, see the "Speed tips"_Speed_tips.html doc
page.
NOTE: Using {pppm/stagger} may not give the same increase in the
accuracy of energy and pressure as it does in forces, so some caution
must be used if energy and/or pressure are quantities of interest,
such as when using a barostat.
:line
The {pppm/disp} and {pppm/disp/tip4p} styles add a mesh-based long-range
dispersion sum option for 1/r^6 potentials "(Isele-Holder)"_#Isele-Holder2012,
similar to the {ewald/disp} style. The 1/r^6 capability means
that Lennard-Jones or Buckingham potentials can be used without a cutoff,
i.e. they become full long-range potentials.
For these styles, you will possibly want to adjust the default choice
of parameters by using the "kspace_modify"_kspace_modify.html command.
This can be done by either choosing the Ewald and grid parameters, or
by specifying separate accuracies for the real and kspace
calculations. When not making any settings, the simulation will stop
with an error message. Further information on the influence of the
parameters and how to choose them is described in
"(Isele-Holder)"_#Isele-Holder2012,
"(Isele-Holder2)"_#Isele-Holder2013 and the "Howto
dispersion"_Howto_dispersion.html doc page.
:line
NOTE: All of the PPPM styles can be used with single-precision FFTs by
using the compiler switch -DFFT_SINGLE for the FFT_INC setting in your
lo-level Makefile. This setting also changes some of the PPPM
operations (e.g. mapping charge to mesh and interpolating electric
fields to particles) to be performed in single precision. This option
can speed-up long-range calculations, particularly in parallel or on
GPUs. The use of the -DFFT_SINGLE flag is discussed on the "Build
settings"_Build_settings.html doc page. MSM does not currently support
the -DFFT_SINGLE compiler switch.
:line
The {msm} style invokes a multi-level summation method MSM solver,
"(Hardy)"_#Hardy2006 or "(Hardy2)"_#Hardy2009, which maps atom charge
to a 3d mesh, and uses a multi-level hierarchy of coarser and coarser
meshes on which direct Coulomb solvers are done. This method does not
use FFTs and scales as N. It may therefore be faster than the other
K-space solvers for relatively large problems when running on large
core counts. MSM can also be used for non-periodic boundary conditions
and for mixed periodic and non-periodic boundaries.
MSM is most competitive versus Ewald and PPPM when only relatively
low accuracy forces, about 1e-4 relative error or less accurate,
are needed. Note that use of a larger Coulombic cutoff (i.e. 15
angstroms instead of 10 angstroms) provides better MSM accuracy for
both the real space and grid computed forces.
Currently calculation of the full pressure tensor in MSM is expensive.
Using the "kspace_modify"_kspace_modify.html {pressure/scalar yes}
command provides a less expensive way to compute the scalar pressure
(Pxx + Pyy + Pzz)/3.0. The scalar pressure can be used, for example,
to run an isotropic barostat. If the full pressure tensor is needed,
then calculating the pressure at every timestep or using a fixed
pressure simulation with MSM will cause the code to run slower.
:line
The {scafacos} style is a wrapper on the "ScaFaCoS Coulomb solver
library"_http://www.scafacos.de which provides a variety of solver
methods which can be used with LAMMPS. The paper by "(Who)"_#Who2012
gives an overview of ScaFaCoS.
ScaFaCoS was developed by a consortium of German research facilities
with a BMBF (German Ministry of Science and Education) funded project
in 2009-2012. Participants of the consortium were the Universities of
Bonn, Chemnitz, Stuttgart, and Wuppertal as well as the
Forschungszentrum Juelich.
The library is available for download at "http://scafacos.de" or can
be cloned from the git-repository
"git://github.com/scafacos/scafacos.git".
In order to use this KSpace style, you must download and build the
ScaFaCoS library, then build LAMMPS with the USER-SCAFACOS package
installed package which links LAMMPS to the ScaFaCoS library.
See details on "this page"_Section_packages.html#USER-SCAFACOS.
NOTE: Unlike other KSpace solvers in LAMMPS, ScaFaCoS computes all
Coulombic interactions, both short- and long-range. Thus you should
NOT use a Coulombic pair style when using kspace_style scafacos. This
also means the total Coulombic energy (short- and long-range) will be
tallied for "thermodynamic output"_thermo_style.html command as part
of the {elong} keyword; the {ecoul} keyword will be zero.
NOTE: See the current restriction below about use of ScaFaCoS in
LAMMPS with molecular charged systems or the TIP4P water model.
The specified {method} determines which ScaFaCoS algorithm is used.
These are the ScaFaCoS methods currently available from LAMMPS:
{fmm} = Fast Multi-Pole method
{p2nfft} = FFT-based Coulomb solver
{ewald} = Ewald summation
{direct} = direct O(N^2) summation
{p3m} = PPPM :ul
We plan to support additional ScaFaCoS solvers from LAMMPS in the
future. For an overview of the included solvers, refer to
"(Sutmann)"_#Sutmann2013
The specified {accuracy} is similar to the accuracy setting for other
LAMMPS KSpace styles, but is passed to ScaFaCoS, which can interpret
it in different ways for different methods it supports. Within the
ScaFaCoS library the {accuracy} is treated as a tolerance level
(either absolute or relative) for the chosen quantity, where the
quantity can be either the Columic field values, the per-atom Columic
energy or the total Columic energy. To select from these options, see
the "kspace_modify scafacos accuracy"_kspace_modify.html doc page.
The "kspace_modify scafacos"_kspace_modify.html command also explains
other ScaFaCoS options currently exposed to LAMMPS.
:line
The specified {accuracy} determines the relative RMS error in per-atom
forces calculated by the long-range solver. It is set as a
dimensionless number, relative to the force that two unit point
charges (e.g. 2 monovalent ions) exert on each other at a distance of
1 Angstrom. This reference value was chosen as representative of the
magnitude of electrostatic forces in atomic systems. Thus an accuracy
value of 1.0e-4 means that the RMS error will be a factor of 10000
smaller than the reference force.
The accuracy setting is used in conjunction with the pairwise cutoff
to determine the number of K-space vectors for style {ewald} or the
grid size for style {pppm} or {msm}.
Note that style {pppm} only computes the grid size at the beginning of
a simulation, so if the length or triclinic tilt of the simulation
cell increases dramatically during the course of the simulation, the
accuracy of the simulation may degrade. Likewise, if the
"kspace_modify slab"_kspace_modify.html option is used with
shrink-wrap boundaries in the z-dimension, and the box size changes
dramatically in z. For example, for a triclinic system with all three
tilt factors set to the maximum limit, the PPPM grid should be
increased roughly by a factor of 1.5 in the y direction and 2.0 in the
z direction as compared to the same system using a cubic orthogonal
simulation cell. One way to handle this issue if you have a long
simulation where the box size changes dramatically, is to break it
into shorter simulations (multiple "run"_run.html commands). This
works because the grid size is re-computed at the beginning of each
run. Another way to ensure the described accuracy requirement is met
is to run a short simulation at the maximum expected tilt or length,
note the required grid size, and then use the
"kspace_modify"_kspace_modify.html {mesh} command to manually set the
PPPM grid size to this value for the long run. The simulation then
will be "too accurate" for some portion of the run.
RMS force errors in real space for {ewald} and {pppm} are estimated
using equation 18 of "(Kolafa)"_#Kolafa, which is also referenced as
equation 9 of "(Petersen)"_#Petersen. RMS force errors in K-space for
{ewald} are estimated using equation 11 of "(Petersen)"_#Petersen,
which is similar to equation 32 of "(Kolafa)"_#Kolafa. RMS force
errors in K-space for {pppm} are estimated using equation 38 of
"(Deserno)"_#Deserno. RMS force errors for {msm} are estimated
using ideas from chapter 3 of "(Hardy)"_#Hardy2006, with equation 3.197
of particular note. When using {msm} with non-periodic boundary
conditions, it is expected that the error estimation will be too
pessimistic. RMS force errors for dipoles when using {ewald/disp}
or {ewald/dipole} are estimated using equations 33 and 46 of
"(Wang)"_#Wang. The RMS force errors for {pppm/dipole} are estimated
using the equations in "(Cerda)"_#Cerda2008.
See the "kspace_modify"_kspace_modify.html command for additional
options of the K-space solvers that can be set, including a {force}
option for setting an absolute RMS error in forces, as opposed to a
relative RMS error.
:line
Styles with a {gpu}, {intel}, {kk}, {omp}, or {opt} 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 on the "Speed packages"_Speed_packages.html doc
page. The accelerated styles take the same arguments and should
produce the same results, except for round-off and precision issues.
More specifically, the {pppm/gpu} style performs charge assignment and
force interpolation calculations on the GPU. These processes are
performed either in single or double precision, depending on whether
the -DFFT_SINGLE setting was specified in your lo-level Makefile, as
discussed above. The FFTs themselves are still calculated on the CPU.
If {pppm/gpu} is used with a GPU-enabled pair style, part of the PPPM
calculation can be performed concurrently on the GPU while other
calculations for non-bonded and bonded force calculation are performed
on the CPU.
The {pppm/kk} style performs charge assignment and force interpolation
calculations, along with the FFTs themselves, on the GPU or threaded
using OpenMP.
These accelerated styles are part of the GPU, USER-INTEL, KOKKOS,
USER-OMP, and OPT packages respectively. They are only enabled if
LAMMPS was built with those packages. See the "Build
package"_Build_package.html doc page for more info.
See the "Speed packages"_Speed_packages.html doc page for more
instructions on how to use the accelerated styles effectively.
:line
[Restrictions:]
Note that the long-range electrostatic solvers in LAMMPS assume conducting
metal (tinfoil) boundary conditions for both charge and dipole
interactions. Vacuum boundary conditions are not currently supported.
The {ewald/disp}, {ewald}, {pppm}, and {msm} styles support
non-orthogonal (triclinic symmetry) simulation boxes. However,
triclinic simulation cells may not yet be supported by suffix versions
of these styles.
All of the kspace styles are part of the KSPACE package. They are
only enabled if LAMMPS was built with that package. See the "Build
package"_Build_package.html doc page for more info.
For MSM, a simulation must be 3d and one can use any combination of
periodic, non-periodic, or shrink-wrapped boundaries (specified using
the "boundary"_boundary.html command).
For Ewald and PPPM, a simulation must be 3d and periodic in all
dimensions. The only exception is if the slab option is set with
"kspace_modify"_kspace_modify.html, in which case the xy dimensions
must be periodic and the z dimension must be non-periodic.
The scafacos KSpace style will only be enabled if LAMMPS is built with
the USER-SCAFACOS package. See the "Build package"_Build_package.html
doc page for more info.
The use of ScaFaCos in LAMMPS does not yet support molecular charged
systems where the short-range Coulombic interactions between atoms in
the same bond/angle/dihedral are weighted by the
"special_bonds"_special_bonds.html command. Likewise it does not
support the "TIP4P water style" where a fictitious charge site is
introduced in each water molecule.
Finally, the methods {p3m} and {ewald} do not support computing the
virial, so this contribution is not included.
[Related commands:]
"kspace_modify"_kspace_modify.html, "pair_style
lj/cut/coul/long"_pair_lj.html, "pair_style
lj/charmm/coul/long"_pair_charmm.html, "pair_style
lj/long/coul/long"_pair_lj_long.html, "pair_style
buck/coul/long"_pair_buck.html
[Default:]
kspace_style none :pre
:line
:link(Darden)
[(Darden)] Darden, York, Pedersen, J Chem Phys, 98, 10089 (1993).
:link(Deserno)
[(Deserno)] Deserno and Holm, J Chem Phys, 109, 7694 (1998).
:link(Hockney)
[(Hockney)] Hockney and Eastwood, Computer Simulation Using Particles,
Adam Hilger, NY (1989).
:link(Kolafa)
[(Kolafa)] Kolafa and Perram, Molecular Simulation, 9, 351 (1992).
:link(Petersen)
[(Petersen)] Petersen, J Chem Phys, 103, 3668 (1995).
:link(Wang)
[(Wang)] Wang and Holm, J Chem Phys, 115, 6277 (2001).
:link(Pollock)
[(Pollock)] Pollock and Glosli, Comp Phys Comm, 95, 93 (1996).
:link(Cerutti)
[(Cerutti)] Cerutti, Duke, Darden, Lybrand, Journal of Chemical Theory
and Computation 5, 2322 (2009)
:link(Neelov)
[(Neelov)] Neelov, Holm, J Chem Phys 132, 234103 (2010)
:link(Veld)
[(Veld)] In 't Veld, Ismail, Grest, J Chem Phys, 127, 144711 (2007).
:link(Toukmaji)
[(Toukmaji)] Toukmaji, Sagui, Board, and Darden, J Chem Phys, 113,
10913 (2000).
:link(Isele-Holder2012)
[(Isele-Holder)] Isele-Holder, Mitchell, Ismail, J Chem Phys, 137,
174107 (2012).
:link(Isele-Holder2013)
[(Isele-Holder2)] Isele-Holder, Mitchell, Hammond, Kohlmeyer, Ismail,
J Chem Theory Comput 9, 5412 (2013).
:link(Hardy2006)
[(Hardy)] David Hardy thesis: Multilevel Summation for the Fast
Evaluation of Forces for the Simulation of Biomolecules, University of
Illinois at Urbana-Champaign, (2006).
:link(Hardy2009)
[(Hardy2)] Hardy, Stone, Schulten, Parallel Computing, 35, 164-177
(2009).
:link(Sutmann2013)
[(Sutmann)] Sutmann, Arnold, Fahrenberger, et. al., Physical review / E 88(6), 063308 (2013)
:link(Cerda2008)
[(Cerda)] Cerda, Ballenegger, Lenz, Holm, J Chem Phys 129, 234104 (2008)
:link(Who2012)
[(Who)] Who, Author2, Author3, J of Long Range Solvers, 35, 164-177
(2012).

View File

@ -1,281 +0,0 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Commands_all.html)
:line
pair_modify command :h3
[Syntax:]
pair_modify keyword values ... :pre
one or more keyword/value pairs may be listed :ulb,l
keyword = {pair} or {shift} or {mix} or {table} or {table/disp} or {tabinner}
or {tabinner/disp} or {tail} or {compute} or {nofdotr} :l
{pair} values = sub-style N {special} which wt1 wt2 wt3
or sub-style N {compute/tally} flag
sub-style = sub-style of "pair hybrid"_pair_hybrid.html
N = which instance of sub-style (only if sub-style is used multiple times)
{special} which wt1 wt2 wt3 = override {special_bonds} settings (optional)
which = {lj/coul} or {lj} or {coul}
w1,w2,w3 = 1-2, 1-3, and 1-4 weights from 0.0 to 1.0 inclusive
{compute/tally} flag = {yes} or {no}
{mix} value = {geometric} or {arithmetic} or {sixthpower}
{shift} value = {yes} or {no}
{table} value = N
2^N = # of values in table
{table/disp} value = N
2^N = # of values in table
{tabinner} value = cutoff
cutoff = inner cutoff at which to begin table (distance units)
{tabinner/disp} value = cutoff
cutoff = inner cutoff at which to begin table (distance units)
{tail} value = {yes} or {no}
{compute} value = {yes} or {no}
{nofdotr} :pre
:ule
[Examples:]
pair_modify shift yes mix geometric
pair_modify tail yes
pair_modify table 12
pair_modify pair lj/cut compute no
pair_modify pair tersoff compute/tally no
pair_modify pair lj/cut/coul/long 1 special lj/coul 0.0 0.0 0.0 :pre
[Description:]
Modify the parameters of the currently defined pair style. Not all
parameters are relevant to all pair styles.
If used, the {pair} keyword must appear first in the list of keywords.
It can only be used with the "hybrid and
hybrid/overlay"_pair_hybrid.html pair styles. It means that all the
following parameters will only be modified for the specified
sub-style. If the sub-style is defined multiple times, then an
additional numeric argument {N} must also be specified, which is a
number from 1 to M where M is the number of times the sub-style was
listed in the "pair_style hybrid"_pair_hybrid.html command. The extra
number indicates which instance of the sub-style the remaining
keywords will be applied to. Note that if the {pair} keyword is not
used, and the pair style is {hybrid} or {hybrid/overlay}, then all the
specified keywords will be applied to all sub-styles.
The {special} and {compute/tally} keywords can [only] be used in
conjunction with the {pair} keyword and must directly follow it.
{special} allows to override the
"special_bonds"_special_bonds.html settings for the specified sub-style.
{compute/tally} allows to disable or enable registering
"compute */tally"_compute_tally.html computes for a given sub-style.
More details are given below.
The {mix} keyword affects pair coefficients for interactions between
atoms of type I and J, when I != J and the coefficients are not
explicitly set in the input script. Note that coefficients for I = J
must be set explicitly, either in the input script via the
"pair_coeff" command or in the "Pair Coeffs" section of the "data
file"_read_data.html. For some pair styles it is not necessary to
specify coefficients when I != J, since a "mixing" rule will create
them from the I,I and J,J settings. The pair_modify {mix} value
determines what formulas are used to compute the mixed coefficients.
In each case, the cutoff distance is mixed the same way as sigma.
Note that not all pair styles support mixing. Also, some mix options
are not available for certain pair styles. See the doc page for
individual pair styles for those restrictions. Note also that the
"pair_coeff"_pair_coeff.html command also can be to directly set
coefficients for a specific I != J pairing, in which case no mixing is
performed.
mix {geometric}
epsilon_ij = sqrt(epsilon_i * epsilon_j)
sigma_ij = sqrt(sigma_i * sigma_j) :pre
mix {arithmetic}
epsilon_ij = sqrt(epsilon_i * epsilon_j)
sigma_ij = (sigma_i + sigma_j) / 2 :pre
mix {sixthpower}
epsilon_ij = (2 * sqrt(epsilon_i*epsilon_j) * sigma_i^3 * sigma_j^3) /
(sigma_i^6 + sigma_j^6)
sigma_ij = ((sigma_i**6 + sigma_j**6) / 2) ^ (1/6) :pre
The {shift} keyword determines whether a Lennard-Jones potential is
shifted at its cutoff to 0.0. If so, this adds an energy term to each
pairwise interaction which will be included in the thermodynamic
output, but does not affect pair forces or atom trajectories. See the
doc page for individual pair styles to see which ones support this
option.
The {table} and {table/disp} keywords apply to pair styles with a
long-range Coulombic term or long-range dispersion term respectively;
see the doc page for individual styles to see which potentials support
these options. If N is non-zero, a table of length 2^N is
pre-computed for forces and energies, which can shrink their
computational cost by up to a factor of 2. The table is indexed via a
bit-mapping technique "(Wolff)"_#Wolff1 and a linear interpolation is
performed between adjacent table values. In our experiments with
different table styles (lookup, linear, spline), this method typically
gave the best performance in terms of speed and accuracy.
The choice of table length is a tradeoff in accuracy versus speed. A
larger N yields more accurate force computations, but requires more
memory which can slow down the computation due to cache misses. A
reasonable value of N is between 8 and 16. The default value of 12
(table of length 4096) gives approximately the same accuracy as the
no-table (N = 0) option. For N = 0, forces and energies are computed
directly, using a polynomial fit for the needed erfc() function
evaluation, which is what earlier versions of LAMMPS did. Values
greater than 16 typically slow down the simulation and will not
improve accuracy; values from 1 to 8 give unreliable results.
The {tabinner} and {tabinner/disp} keywords set an inner cutoff above
which the pairwise computation is done by table lookup (if tables are
invoked), for the corresponding Coulombic and dispersion tables
discussed with the {table} and {table/disp} keywords. The smaller the
cutoff is set, the less accurate the table becomes (for a given number
of table values), which can require use of larger tables. The default
cutoff value is sqrt(2.0) distance units which means nearly all
pairwise interactions are computed via table lookup for simulations
with "real" units, but some close pairs may be computed directly
(non-table) for simulations with "lj" units.
When the {tail} keyword is set to {yes}, certain pair styles will add
a long-range VanderWaals tail "correction" to the energy and pressure.
These corrections are bookkeeping terms which do not affect dynamics,
unless a constant-pressure simulation is being performed. See the doc
page for individual styles to see which support this option. These
corrections are included in the calculation and printing of
thermodynamic quantities (see the "thermo_style"_thermo_style.html
command). Their effect will also be included in constant NPT or NPH
simulations where the pressure influences the simulation box
dimensions (e.g. the "fix npt"_fix_nh.html and "fix nph"_fix_nh.html
commands). The formulas used for the long-range corrections come from
equation 5 of "(Sun)"_#Sun.
NOTE: The tail correction terms are computed at the beginning of each
run, using the current atom counts of each atom type. If atoms are
deleted (or lost) or created during a simulation, e.g. via the "fix
gcmc"_fix_gcmc.html command, the correction factors are not
re-computed. If you expect the counts to change dramatically, you can
break a run into a series of shorter runs so that the correction
factors are re-computed more frequently.
Several additional assumptions are inherent in using tail corrections,
including the following:
The simulated system is a 3d bulk homogeneous liquid. This option
should not be used for systems that are non-liquid, 2d, have a slab
geometry (only 2d periodic), or inhomogeneous. :ulb,l
G(r), the radial distribution function (rdf), is unity beyond the
cutoff, so a fairly large cutoff should be used (i.e. 2.5 sigma for an
LJ fluid), and it is probably a good idea to verify this assumption by
checking the rdf. The rdf is not exactly unity beyond the cutoff for
each pair of interaction types, so the tail correction is necessarily
an approximation. :l
The tail corrections are computed at the beginning of each simulation
run. If the number of atoms changes during the run, e.g. due to atoms
leaving the simulation domain, or use of the "fix gcmc"_fix_gcmc.html
command, then the corrections are not updated to reflect the changed
atom count. If this is a large effect in your simulation, you should
break the long run into several short runs, so that the correction
factors are re-computed multiple times.
Thermophysical properties obtained from calculations with this option
enabled will not be thermodynamically consistent with the truncated
force-field that was used. In other words, atoms do not feel any LJ
pair interactions beyond the cutoff, but the energy and pressure
reported by the simulation include an estimated contribution from
those interactions. :l
:ule
The {compute} keyword allows pairwise computations to be turned off,
even though a "pair_style"_pair_style.html is defined. This is not
useful for running a real simulation, but can be useful for debugging
purposes or for performing a "rerun"_rerun.html simulation, when you
only wish to compute partial forces that do not include the pairwise
contribution.
Two examples are as follows. First, this option allows you to perform
a simulation with "pair_style hybrid"_pair_hybrid.html with only a
subset of the hybrid sub-styles enabled. Second, this option allows
you to perform a simulation with only long-range interactions but no
short-range pairwise interactions. Doing this by simply not defining
a pair style will not work, because the
"kspace_style"_kspace_style.html command requires a Kspace-compatible
pair style be defined.
The {nofdotr} keyword allows to disable an optimization that computes
the global stress tensor from the total forces and atom positions rather
than from summing forces between individual pairs of atoms.
:line
The {special} keyword allows to override the 1-2, 1-3, and 1-4
exclusion settings for individual sub-styles of a
"hybrid pair style"_pair_hybrid.html. It requires 4 arguments similar
to the "special_bonds"_special_bonds.html command, {which} and
wt1,wt2,wt3. The {which} argument can be {lj} to change the
Lennard-Jones settings, {coul} to change the Coulombic settings,
or {lj/coul} to change both to the same set of 3 values. The wt1,wt2,wt3
values are numeric weights from 0.0 to 1.0 inclusive, for the 1-2,
1-3, and 1-4 bond topology neighbors, respectively. The {special}
keyword can only be used in conjunction with the {pair} keyword
and has to directly follow it.
NOTE: The global settings specified by the
"special_bonds"_special_bonds.html command affect the construction of
neighbor lists. Weights of 0.0 (for 1-2, 1-3, or 1-4 neighbors)
exclude those pairs from the neighbor list entirely. Weights of 1.0
store the neighbor with no weighting applied. Thus only global values
different from exactly 0.0 or 1.0 can be overridden and an error is
generated if the requested setting is not compatible with the global
setting. Substituting 1.0e-10 for 0.0 and 0.9999999999 for 1.0 is
usually a sufficient workaround in this case without causing a
significant error.
The {compute/tally} keyword takes exactly 1 argument ({no} or {yes}),
and allows to selectively disable or enable processing of the various
"compute */tally"_compute_tally.html styles for a given
"pair hybrid or hybrid/overlay"_pair_hybrid.html sub-style.
NOTE: Any "pair_modify pair compute/tally" command must be issued
[before] the corresponding compute style is defined.
:line
[Restrictions:] none
You cannot use {shift} yes with {tail} yes, since those are
conflicting options. You cannot use {tail} yes with 2d simulations.
[Related commands:]
"pair_style"_pair_style.html, "pair_style hybrid"_pair_hybrid.html,
pair_coeff"_pair_coeff.html, "thermo_style"_thermo_style.html,
"compute */tally"_compute_tally.html
[Default:]
The option defaults are mix = geometric, shift = no, table = 12,
tabinner = sqrt(2.0), tail = no, and compute = yes.
Note that some pair styles perform mixing, but only a certain style of
mixing. See the doc pages for individual pair styles for details.
:line
:link(Wolff1)
[(Wolff)] Wolff and Rudd, Comp Phys Comm, 120, 200-32 (1999).
:link(Sun)
[(Sun)] Sun, J Phys Chem B, 102, 7338-7364 (1998).

View File

@ -1,338 +0,0 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Commands_all.html)
:line
pair_style command :h3
[Syntax:]
pair_style style args :pre
style = one of the styles from the list below
args = arguments used by a particular style :ul
[Examples:]
pair_style lj/cut 2.5
pair_style eam/alloy
pair_style hybrid lj/charmm/coul/long 10.0 eam
pair_style table linear 1000
pair_style none :pre
[Description:]
Set the formula(s) LAMMPS uses to compute pairwise interactions. In
LAMMPS, pair potentials are defined between pairs of atoms that are
within a cutoff distance and the set of active interactions typically
changes over time. See the "bond_style"_bond_style.html command to
define potentials between pairs of bonded atoms, which typically
remain in place for the duration of a simulation.
In LAMMPS, pairwise force fields encompass a variety of interactions,
some of which include many-body effects, e.g. EAM, Stillinger-Weber,
Tersoff, REBO potentials. They are still classified as "pairwise"
potentials because the set of interacting atoms changes with time
(unlike molecular bonds) and thus a neighbor list is used to find
nearby interacting atoms.
Hybrid models where specified pairs of atom types interact via
different pair potentials can be setup using the {hybrid} pair style.
The coefficients associated with a pair style are typically set for
each pair of atom types, and are specified by the
"pair_coeff"_pair_coeff.html command or read from a file by the
"read_data"_read_data.html or "read_restart"_read_restart.html
commands.
The "pair_modify"_pair_modify.html command sets options for mixing of
type I-J interaction coefficients and adding energy offsets or tail
corrections to Lennard-Jones potentials. Details on these options as
they pertain to individual potentials are described on the doc page
for the potential. Likewise, info on whether the potential
information is stored in a "restart file"_write_restart.html is listed
on the potential doc page.
In the formulas listed for each pair style, {E} is the energy of a
pairwise interaction between two atoms separated by a distance {r}.
The force between the atoms is the negative derivative of this
expression.
If the pair_style command has a cutoff argument, it sets global
cutoffs for all pairs of atom types. The distance(s) can be smaller
or larger than the dimensions of the simulation box.
Typically, the global cutoff value can be overridden for a specific
pair of atom types by the "pair_coeff"_pair_coeff.html command. The
pair style settings (including global cutoffs) can be changed by a
subsequent pair_style command using the same style. This will reset
the cutoffs for all atom type pairs, including those previously set
explicitly by a "pair_coeff"_pair_coeff.html command. The exceptions
to this are that pair_style {table} and {hybrid} settings cannot be
reset. A new pair_style command for these styles will wipe out all
previously specified pair_coeff values.
:line
Here is an alphabetic list of pair styles defined in LAMMPS. They are
also listed in more compact form on the "Commands
pair"_Commands_pair.html doc page.
Click on the style to display the formula it computes, any additional
arguments specified in the pair_style command, and coefficients
specified by the associated "pair_coeff"_pair_coeff.html command.
There are also additional accelerated pair styles included in the
LAMMPS distribution for faster performance on CPUs, GPUs, and KNLs.
The individual style names on the "Commands pair"_Commands_pair.html
doc page are followed by one or more of (g,i,k,o,t) to indicate which
accelerated styles exist.
"none"_pair_none.html - turn off pairwise interactions
"hybrid"_pair_hybrid.html - multiple styles of pairwise interactions
"hybrid/overlay"_pair_hybrid.html - multiple styles of superposed pairwise interactions
"zero"_pair_zero.html - neighbor list but no interactions :ul
"adp"_pair_adp.html - angular dependent potential (ADP) of Mishin
"agni"_pair_agni.html - machine learned potential mapping atomic environment to forces
"airebo"_pair_airebo.html - AIREBO potential of Stuart
"airebo/morse"_pair_airebo.html - AIREBO with Morse instead of LJ
"atm"_pair_atm.html - Axilrod-Teller-Muto potential
"awpmd/cut"_pair_awpmd.html - Antisymmetrized Wave Packet MD potential for atoms and electrons
"beck"_pair_beck.html - Beck potential
"body/nparticle"_pair_body_nparticle.html - interactions between body particles
"body/rounded/polygon"_pair_body_rounded_polygon.html - granular-style 2d polygon potential
"body/rounded/polyhedron"_pair_body_rounded_polyhedron.html - granular-style 3d polyhedron potential
"bop"_pair_bop.html - BOP potential of Pettifor
"born"_pair_born.html - Born-Mayer-Huggins potential
"born/coul/dsf"_pair_born.html - Born with damped-shifted-force model
"born/coul/dsf/cs"_pair_cs.html - Born with damped-shifted-force and core/shell model
"born/coul/long"_pair_born.html - Born with long-range Coulombics
"born/coul/long/cs"_pair_cs.html - Born with long-range Coulombics and core/shell
"born/coul/msm"_pair_born.html - Born with long-range MSM Coulombics
"born/coul/wolf"_pair_born.html - Born with Wolf potential for Coulombics
"born/coul/wolf/cs"_pair_cs.html - Born with Wolf potential for Coulombics and core/shell model
"brownian"_pair_brownian.html - Brownian potential for Fast Lubrication Dynamics
"brownian/poly"_pair_brownian.html - Brownian potential for Fast Lubrication Dynamics with polydispersity
"buck"_pair_buck.html - Buckingham potential
"buck/coul/cut"_pair_buck.html - Buckingham with cutoff Coulomb
"buck/coul/long"_pair_buck.html - Buckingham with long-range Coulombics
"buck/coul/long/cs"_pair_cs.html - Buckingham with long-range Coulombics and core/shell
"buck/coul/msm"_pair_buck.html - Buckingham with long-range MSM Coulombics
"buck/long/coul/long"_pair_buck_long.html - long-range Buckingham with long-range Coulombics
"buck/mdf"_pair_mdf.html - Buckingham with a taper function
"buck6d/coul/gauss/dsf"_pair_buck6d_coul_gauss.html - dispersion-damped Buckingham with damped-shift-force model
"buck6d/coul/gauss/long"_pair_buck6d_coul_gauss.html - dispersion-damped Buckingham with long-range Coulombics
"colloid"_pair_colloid.html - integrated colloidal potential
"comb"_pair_comb.html - charge-optimized many-body (COMB) potential
"comb3"_pair_comb.html - charge-optimized many-body (COMB3) potential
"cosine/squared"_pair_cosine_squared.html - Cooke-Kremer-Deserno membrane model potential
"coul/cut"_pair_coul.html - cutoff Coulombic potential
"coul/cut/soft"_pair_fep_soft.html - Coulombic potential with a soft core
"coul/debye"_pair_coul.html - cutoff Coulombic potential with Debye screening
"coul/diel"_pair_coul_diel.html - Coulomb potential with dielectric permittivity
"coul/dsf"_pair_coul.html - Coulombics with damped-shifted-force model
"coul/long"_pair_coul.html - long-range Coulombic potential
"coul/long/cs"_pair_cs.html - long-range Coulombic potential and core/shell
"coul/long/soft"_pair_fep_soft.html - long-range Coulombic potential with a soft core
"coul/msm"_pair_coul.html - long-range MSM Coulombics
"coul/shield"_pair_coul_shield.html - Coulombics for boron nitride for use with "ilp/graphene/hbn"_pair_ilp_graphene_hbn.html potential
"coul/streitz"_pair_coul.html - Coulombics via Streitz/Mintmire Slater orbitals
"coul/wolf"_pair_coul.html - Coulombics via Wolf potential
"coul/wolf/cs"_pair_cs.html - ditto with core/shell adjustments
"dpd"_pair_dpd.html - dissipative particle dynamics (DPD)
"dpd/fdt"_pair_dpd_fdt.html - DPD for constant temperature and pressure
"dpd/fdt/energy"_pair_dpd_fdt.html - DPD for constant energy and enthalpy
"dpd/tstat"_pair_dpd.html - pair-wise DPD thermostatting
"dsmc"_pair_dsmc.html - Direct Simulation Monte Carlo (DSMC)
"e3b"_pair_e3b.html - Explicit-three body (E3B) water model
"drip"_pair_drip.html - Dihedral-angle-corrected registry-dependent interlayer potential (DRIP)
"eam"_pair_eam.html - embedded atom method (EAM)
"eam/alloy"_pair_eam.html - alloy EAM
"eam/cd"_pair_eam.html - concentration-dependent EAM
"eam/cd/old"_pair_eam.html - older two-site model for concentration-dependent EAM
"eam/fs"_pair_eam.html - Finnis-Sinclair EAM
"edip"_pair_edip.html - three-body EDIP potential
"edip/multi"_pair_edip.html - multi-element EDIP potential
"edpd"_pair_meso.html - eDPD particle interactions
"eff/cut"_pair_eff.html - electron force field with a cutoff
"eim"_pair_eim.html - embedded ion method (EIM)
"exp6/rx"_pair_exp6_rx.html - reactive DPD potential
"extep"_pair_extep.html - extended Tersoff potential
"gauss"_pair_gauss.html - Gaussian potential
"gauss/cut"_pair_gauss.html - generalized Gaussian potential
"gayberne"_pair_gayberne.html - Gay-Berne ellipsoidal potential
"gran/hertz/history"_pair_gran.html - granular potential with Hertzian interactions
"gran/hooke"_pair_gran.html - granular potential with history effects
"gran/hooke/history"_pair_gran.html - granular potential without history effects
"gw"_pair_gw.html - Gao-Weber potential
"gw/zbl"_pair_gw.html - Gao-Weber potential with a repulsive ZBL core
"hbond/dreiding/lj"_pair_hbond_dreiding.html - DREIDING hydrogen bonding LJ potential
"hbond/dreiding/morse"_pair_hbond_dreiding.html - DREIDING hydrogen bonding Morse potential
"ilp/graphene/hbn"_pair_ilp_graphene_hbn.html - registry-dependent interlayer potential (ILP)
"kim"_pair_kim.html - interface to potentials provided by KIM project
"kolmogorov/crespi/full"_pair_kolmogorov_crespi_full.html - Kolmogorov-Crespi (KC) potential with no simplifications
"kolmogorov/crespi/z"_pair_kolmogorov_crespi_z.html - Kolmogorov-Crespi (KC) potential with normals along z-axis
"lcbop"_pair_lcbop.html - long-range bond-order potential (LCBOP)
"lebedeva/z"_pair_lebedeva_z.html - Lebedeva interlayer potential for graphene with normals along z-axis
"lennard/mdf"_pair_mdf.html - LJ potential in A/B form with a taper function
"line/lj"_pair_line_lj.html - LJ potential between line segments
"list"_pair_list.html - potential between pairs of atoms explicitly listed in an input file
"lj/charmm/coul/charmm"_pair_charmm.html - CHARMM potential with cutoff Coulomb
"lj/charmm/coul/charmm/implicit"_pair_charmm.html - CHARMM for implicit solvent
"lj/charmm/coul/long"_pair_charmm.html - CHARMM with long-range Coulomb
"lj/charmm/coul/long/soft"_pair_fep_soft.html - CHARMM with long-range Coulomb and a soft core
"lj/charmm/coul/msm"_pair_charmm.html - CHARMM with long-range MSM Coulombics
"lj/charmmfsw/coul/charmmfsh"_pair_charmm.html - CHARMM with force switching and shifting
"lj/charmmfsw/coul/long"_pair_charmm.html - CHARMM with force switching and long-rnage Coulombics
"lj/class2"_pair_class2.html - COMPASS (class 2) force field with no Coulomb
"lj/class2/coul/cut"_pair_class2.html - COMPASS with cutoff Coulomb
"lj/class2/coul/cut/soft"_pair_fep_soft.html - COMPASS with cutoff Coulomb with a soft core
"lj/class2/coul/long"_pair_class2.html - COMPASS with long-range Coulomb
"lj/class2/coul/long/soft"_pair_fep_soft.html - COMPASS with long-range Coulomb with a soft core
"lj/class2/soft"_pair_fep_soft.html - COMPASS (class 2) force field with no Coulomb with a soft core
"lj/cubic"_pair_lj_cubic.html - LJ with cubic after inflection point
"lj/cut"_pair_lj.html - cutoff Lennard-Jones potential with no Coulomb
"lj/cut/coul/cut"_pair_lj.html - LJ with cutoff Coulomb
"lj/cut/coul/cut/soft"_pair_fep_soft.html - LJ with cutoff Coulomb with a soft core
"lj/cut/coul/debye"_pair_lj.html - LJ with Debye screening added to Coulomb
"lj/cut/coul/dsf"_pair_lj.html - LJ with Coulombics via damped shifted forces
"lj/cut/coul/long"_pair_lj.html - LJ with long-range Coulombics
"lj/cut/coul/long/cs"_pair_cs.html - ditto with core/shell adjustments
"lj/cut/coul/long/soft"_pair_fep_soft.html - LJ with long-range Coulombics with a soft core
"lj/cut/coul/msm"_pair_lj.html - LJ with long-range MSM Coulombics
"lj/cut/coul/wolf"_pair_lj.html - LJ with Coulombics via Wolf potential
"lj/cut/dipole/cut"_pair_dipole.html - point dipoles with cutoff
"lj/cut/dipole/long"_pair_dipole.html - point dipoles with long-range Ewald
"lj/cut/soft"_pair_fep_soft.html - LJ with a soft core
"lj/cut/thole/long"_pair_thole.html - LJ with Coulombics with thole damping
"lj/cut/tip4p/cut"_pair_lj.html - LJ with cutoff Coulomb for TIP4P water
"lj/cut/tip4p/long"_pair_lj.html - LJ with long-range Coulomb for TIP4P water
"lj/cut/tip4p/long/soft"_pair_fep_soft.html - LJ with cutoff Coulomb for TIP4P water with a soft core
"lj/expand"_pair_lj_expand.html - Lennard-Jones for variable size particles
"lj/expand/coul/long"_pair_lj_expand.html - Lennard-Jones for variable size particles with long-range Coulombics
"lj/gromacs"_pair_gromacs.html - GROMACS-style Lennard-Jones potential
"lj/gromacs/coul/gromacs"_pair_gromacs.html - GROMACS-style LJ and Coulombic potential
"lj/long/coul/long"_pair_lj_long.html - long-range LJ and long-range Coulombics
"lj/long/dipole/long"_pair_dipole.html - long-range LJ and long-range point dipoles
"lj/long/tip4p/long"_pair_lj_long.html - long-range LJ and long-range Coulombics for TIP4P water
"lj/mdf"_pair_mdf.html - LJ potential with a taper function
"lj/sdk"_pair_sdk.html - LJ for SDK coarse-graining
"lj/sdk/coul/long"_pair_sdk.html - LJ for SDK coarse-graining with long-range Coulombics
"lj/sdk/coul/msm"_pair_sdk.html - LJ for SDK coarse-graining with long-range Coulombics via MSM
"lj/sf/dipole/sf"_pair_dipole.html - LJ with dipole interaction with shifted forces
"lj/smooth"_pair_lj_smooth.html - smoothed Lennard-Jones potential
"lj/smooth/linear"_pair_lj_smooth_linear.html - linear smoothed LJ potential
"lj/switch3/coulgauss"_pair_lj_switch3_coulgauss - smoothed LJ vdW potential with Gaussian electrostatics
"lj96/cut"_pair_lj96.html - Lennard-Jones 9/6 potential
"local/density"_pair_local_density.html - generalized basic local density potential
"lubricate"_pair_lubricate.html - hydrodynamic lubrication forces
"lubricate/poly"_pair_lubricate.html - hydrodynamic lubrication forces with polydispersity
"lubricateU"_pair_lubricateU.html - hydrodynamic lubrication forces for Fast Lubrication Dynamics
"lubricateU/poly"_pair_lubricateU.html - hydrodynamic lubrication forces for Fast Lubrication with polydispersity
"mdpd"_pair_meso.html - mDPD particle interactions
"mdpd/rhosum"_pair_meso.html - mDPD particle interactions for mass density
"meam/c"_pair_meamc.html - modified embedded atom method (MEAM) in C
"meam/spline"_pair_meam_spline.html - splined version of MEAM
"meam/sw/spline"_pair_meam_sw_spline.html - splined version of MEAM with a Stillinger-Weber term
"mgpt"_pair_mgpt.html - simplified model generalized pseudopotential theory (MGPT) potential
"mie/cut"_pair_mie.html - Mie potential
"mm3/switch3/coulgauss"_pair_mm3_switch3_coulgauss - smoothed MM3 vdW potential with Gaussian electrostatics
"momb"_pair_momb.html - Many-Body Metal-Organic (MOMB) force field
"morse"_pair_morse.html - Morse potential
"morse/smooth/linear"_pair_morse.html - linear smoothed Morse potential
"morse/soft"_pair_morse.html - Morse potential with a soft core
"multi/lucy"_pair_multi_lucy.html - DPD potential with density-dependent force
"multi/lucy/rx"_pair_multi_lucy_rx.html - reactive DPD potential with density-dependent force
"nb3b/harmonic"_pair_nb3b_harmonic.html - non-bonded 3-body harmonic potential
"nm/cut"_pair_nm.html - N-M potential
"nm/cut/coul/cut"_pair_nm.html - N-M potential with cutoff Coulomb
"nm/cut/coul/long"_pair_nm.html - N-M potential with long-range Coulombics
"oxdna/coaxstk"_pair_oxdna.html -
"oxdna/excv"_pair_oxdna.html -
"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/hbond"_pair_oxdna2.html -
"oxdna2/stk"_pair_oxdna2.html -
"oxdna2/xstk"_pair_oxdna2.html -
"peri/eps"_pair_peri.html - peridynamic EPS potential
"peri/lps"_pair_peri.html - peridynamic LPS potential
"peri/pmb"_pair_peri.html - peridynamic PMB potential
"peri/ves"_pair_peri.html - peridynamic VES potential
"polymorphic"_pair_polymorphic.html - polymorphic 3-body potential
"python"_pair_python.html -
"quip"_pair_quip.html -
"reax/c"_pair_reaxc.html - ReaxFF potential in C
"rebo"_pair_airebo.html - 2nd generation REBO potential of Brenner
"resquared"_pair_resquared.html - Everaers RE-Squared ellipsoidal potential
"sdpd/taitwater/isothermal"_pair_sdpd_taitwater_isothermal.html - smoothed dissipative particle dynamics for water at isothermal conditions
"smd/hertz"_pair_smd_hertz.html -
"smd/tlsph"_pair_smd_tlsph.html -
"smd/tri_surface"_pair_smd_triangulated_surface.html -
"smd/ulsph"_pair_smd_ulsph.html -
"smtbq"_pair_smtbq.html -
"snap"_pair_snap.html - SNAP quantum-accurate potential
"soft"_pair_soft.html - Soft (cosine) potential
"sph/heatconduction"_pair_sph_heatconduction.html -
"sph/idealgas"_pair_sph_idealgas.html -
"sph/lj"_pair_sph_lj.html -
"sph/rhosum"_pair_sph_rhosum.html -
"sph/taitwater"_pair_sph_taitwater.html -
"sph/taitwater/morris"_pair_sph_taitwater_morris.html -
"spin/dipole/cut"_pair_spin_dipole.html -
"spin/dipole/long"_pair_spin_dipole.html -
"spin/dmi"_pair_spin_dmi.html -
"spin/exchange"_pair_spin_exchange.html -
"spin/magelec"_pair_spin_magelec.html -
"spin/neel"_pair_spin_neel.html -
"srp"_pair_srp.html -
"sw"_pair_sw.html - Stillinger-Weber 3-body potential
"table"_pair_table.html - tabulated pair potential
"table/rx"_pair_table_rx.html -
"tdpd"_pair_meso.html - tDPD particle interactions
"tersoff"_pair_tersoff.html - Tersoff 3-body potential
"tersoff/mod"_pair_tersoff_mod.html - modified Tersoff 3-body potential
"tersoff/mod/c"_pair_tersoff_mod.html -
"tersoff/table"_pair_tersoff.html -
"tersoff/zbl"_pair_tersoff_zbl.html - Tersoff/ZBL 3-body potential
"thole"_pair_thole.html - Coulomb interactions with thole damping
"tip4p/cut"_pair_coul.html - Coulomb for TIP4P water w/out LJ
"tip4p/long"_pair_coul.html - long-range Coulombics for TIP4P water w/out LJ
"tip4p/long/soft"_pair_fep_soft.html -
"tri/lj"_pair_tri_lj.html - LJ potential between triangles
"ufm"_pair_ufm.html -
"vashishta"_pair_vashishta.html - Vashishta 2-body and 3-body potential
"vashishta/table"_pair_vashishta.html -
"yukawa"_pair_yukawa.html - Yukawa potential
"yukawa/colloid"_pair_yukawa_colloid.html - screened Yukawa potential for finite-size particles
"zbl"_pair_zbl.html - Ziegler-Biersack-Littmark potential :ul
:line
[Restrictions:]
This command must be used before any coefficients are set by the
"pair_coeff"_pair_coeff.html, "read_data"_read_data.html, or
"read_restart"_read_restart.html commands.
Some pair styles are part of specific packages. They are only enabled
if LAMMPS was built with that package. See the "Build
package"_Build_package.html doc page for more info. The doc pages for
individual pair potentials tell if it is part of a package.
[Related commands:]
"pair_coeff"_pair_coeff.html, "read_data"_read_data.html,
"pair_modify"_pair_modify.html, "kspace_style"_kspace_style.html,
"dielectric"_dielectric.html, "pair_write"_pair_write.html
[Default:]
pair_style none :pre

244
doc/utils/check-styles.py Executable file
View File

@ -0,0 +1,244 @@
#!/usr/bin/env python3
from __future__ import print_function
from glob import glob
from argparse import ArgumentParser
import os, re, sys
parser = ArgumentParser(prog='check-styles.py',
description="Check style table completeness")
parser.add_argument("-v", "--verbose",
action='store_const',
const=True, default=False,
help="Enable verbose output")
parser.add_argument("-d", "--doc",
help="Path to LAMMPS documentation sources")
parser.add_argument("-s", "--src",
help="Path to LAMMPS sources")
args = parser.parse_args()
verbose = args.verbose
src = args.src
doc = args.doc
if not args.src or not args.doc:
parser.print_help()
sys.exit(1)
if not os.path.isdir(src):
sys.exit("LAMMPS source path %s does not exist" % src)
if not os.path.isdir(doc):
sys.exit("LAMMPS documentation source path %s does not exist" % doc)
headers = glob(os.path.join(src, '*', '*.h'))
headers += glob(os.path.join(src, '*.h'))
angle = {}
atom = {}
body = {}
bond = {}
command = {}
compute = {}
dihedral = {}
dump = {}
fix = {}
improper = {}
integrate = {}
kspace = {}
minimize = {}
pair = {}
reader = {}
region = {}
upper = re.compile("[A-Z]+")
gpu = re.compile("(.+)/gpu$")
intel = re.compile("(.+)/intel$")
kokkos = re.compile("(.+)/kk$")
kokkos_skip = re.compile("(.+)/kk/(host|device)$")
omp = re.compile("(.+)/omp$")
opt = re.compile("(.+)/opt$")
removed = re.compile("(.+)Deprecated$")
def register_style(list,style,info):
if style in list.keys():
list[style]['gpu'] += info['gpu']
list[style]['intel'] += info['intel']
list[style]['kokkos'] += info['kokkos']
list[style]['omp'] += info['omp']
list[style]['opt'] += info['opt']
list[style]['removed'] += info['removed']
else:
list[style] = info
def add_suffix(list,style):
suffix = ""
if list[style]['gpu']:
suffix += 'g'
if list[style]['intel']:
suffix += 'i'
if list[style]['kokkos']:
suffix += 'k'
if list[style]['omp']:
suffix += 'o'
if list[style]['opt']:
suffix += 't'
if suffix:
return style + ' (' + suffix + ')'
else:
return style
def check_style(file,dir,pattern,list,name,suffix=False,skip=()):
f = os.path.join(dir, file)
fp = open(f)
text = fp.read()
fp.close()
matches = re.findall(pattern,text,re.MULTILINE)
counter = 0
for c in list.keys():
# known undocumented aliases we need to skip
if c in skip: continue
s = c
if suffix: s = add_suffix(list,c)
if not s in matches:
if not list[c]['removed']:
print("%s style entry %s" % (name,s),
"is missing or incomplete in %s" % file)
counter += 1
return counter
for h in headers:
if verbose: print("Checking ", h)
fp = open(h)
text = fp.read()
fp.close()
matches = re.findall("(.+)Style\((.+),(.+)\)",text,re.MULTILINE)
for m in matches:
# skip over internal styles w/o explicit documentation
style = m[1]
if upper.match(style):
continue
# detect, process, and flag suffix styles:
info = { 'kokkos': 0, 'gpu': 0, 'intel': 0, \
'omp': 0, 'opt': 0, 'removed': 0 }
suffix = kokkos_skip.match(style)
if suffix:
continue
suffix = gpu.match(style)
if suffix:
style = suffix.groups()[0]
info['gpu'] = 1
suffix = intel.match(style)
if suffix:
style = suffix.groups()[0]
info['intel'] = 1
suffix = kokkos.match(style)
if suffix:
style = suffix.groups()[0]
info['kokkos'] = 1
suffix = omp.match(style)
if suffix:
style = suffix.groups()[0]
info['omp'] = 1
suffix = opt.match(style)
if suffix:
style = suffix.groups()[0]
info['opt'] = 1
deprecated = removed.match(m[2])
if deprecated:
info['removed'] = 1
# register style and suffix flags
if m[0] == 'Angle':
register_style(angle,style,info)
elif m[0] == 'Atom':
register_style(atom,style,info)
elif m[0] == 'Body':
register_style(body,style,info)
elif m[0] == 'Bond':
register_style(bond,style,info)
elif m[0] == 'Command':
register_style(command,style,info)
elif m[0] == 'Compute':
register_style(compute,style,info)
elif m[0] == 'Dihedral':
register_style(dihedral,style,info)
elif m[0] == 'Dump':
register_style(dump,style,info)
elif m[0] == 'Fix':
register_style(fix,style,info)
elif m[0] == 'Improper':
register_style(improper,style,info)
elif m[0] == 'Integrate':
register_style(integrate,style,info)
elif m[0] == 'KSpace':
register_style(kspace,style,info)
elif m[0] == 'Minimize':
register_style(minimize,style,info)
elif m[0] == 'Pair':
register_style(pair,style,info)
elif m[0] == 'Reader':
register_style(reader,style,info)
elif m[0] == 'Region':
register_style(region,style,info)
else:
print("Skipping over: ",m)
print("""Parsed style names w/o suffixes from C++ tree in %s:
Angle styles: %3d Atom styles: %3d
Body styles: %3d Bond styles: %3d
Command styles: %3d Compute styles: %3d
Dihedral styles: %3d Dump styles: %3d
Fix styles: %3d Improper styles: %3d
Integrate styles: %3d Kspace styles: %3d
Minimize styles: %3d Pair styles: %3d
Reader styles: %3d Region styles: %3d""" \
% (src, len(angle), len(atom), len(body), len(bond), \
len(command), len(compute), len(dihedral), len(dump), \
len(fix), len(improper), len(integrate), len(kspace), \
len(minimize), len(pair), len(reader), len(region)))
counter = 0
counter += check_style('Commands_all.rst',doc,":doc:`(.+) <.+>`",
command,'Command',suffix=False)
counter += check_style('Commands_compute.rst',doc,":doc:`(.+) <compute.+>`",
compute,'Compute',suffix=True)
counter += check_style('compute.rst',doc,":doc:`(.+) <compute.+>` -",
compute,'Compute',suffix=False)
counter += check_style('Commands_fix.rst',doc,":doc:`(.+) <fix.+>`",
fix,'Fix',skip=('python'),suffix=True)
counter += check_style('fix.rst',doc,":doc:`(.+) <fix.+>` -",
fix,'Fix',skip=('python'),suffix=False)
counter += check_style('Commands_pair.rst',doc,":doc:`(.+) <pair.+>`",
pair,'Pair',skip=('meam','lj/sf'),suffix=True)
counter += check_style('pair_style.rst',doc,":doc:`(.+) <pair.+>` -",
pair,'Pair',skip=('meam','lj/sf'),suffix=False)
counter += check_style('Commands_bond.rst',doc,":doc:`(.+) <bond.+>`",
bond,'Bond',suffix=True)
counter += check_style('bond_style.rst',doc,":doc:`(.+) <bond.+>` -",
bond,'Bond',suffix=False)
counter += check_style('Commands_bond.rst',doc,":doc:`(.+) <angle.+>`",
angle,'Angle',suffix=True)
counter += check_style('angle_style.rst',doc,":doc:`(.+) <angle.+>` -",
angle,'Angle',suffix=False)
counter += check_style('Commands_bond.rst',doc,":doc:`(.+) <dihedral.+>`",
dihedral,'Dihedral',suffix=True)
counter += check_style('dihedral_style.rst',doc,":doc:`(.+) <dihedral.+>` -",
dihedral,'Dihedral',suffix=False)
counter += check_style('Commands_bond.rst',doc,":doc:`(.+) <improper.+>`",
improper,'Improper',suffix=True)
counter += check_style('improper_style.rst',doc,":doc:`(.+) <improper.+>` -",
improper,'Improper',suffix=False)
counter += check_style('Commands_kspace.rst',doc,":doc:`(.+) <kspace_style>`",
kspace,'KSpace',suffix=True)
if counter:
print("Found %d issue(s) with style lists" % counter)

View File

@ -42,7 +42,7 @@ def main():
else:
anchors[label] = [(filename, line_number+1)]
print("found %d anchor labels" % len(anchors))
print("Found %d anchor labels" % len(anchors))
count = 0

View File

@ -35,6 +35,7 @@
#include "domain.h"
#include "gpu_extra.h"
#include "math_special.h"
#include "suffix.h"
using namespace LAMMPS_NS;
using namespace MathSpecial;
@ -68,6 +69,7 @@ PairBeckGPU::PairBeckGPU(LAMMPS *lmp) : PairBeck(lmp), gpu_mode(GPU_FORCE)
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -36,6 +36,7 @@
#include "domain.h"
#include "kspace.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
using namespace MathConst;
@ -90,6 +91,7 @@ PairBornCoulLongCSGPU::PairBornCoulLongCSGPU(LAMMPS *lmp) :
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -36,6 +36,7 @@
#include "domain.h"
#include "kspace.h"
#include "gpu_extra.h"
#include "suffix.h"
#define EWALD_F 1.12837917
#define EWALD_P 0.3275911
@ -85,6 +86,7 @@ PairBornCoulLongGPU::PairBornCoulLongGPU(LAMMPS *lmp) :
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -35,6 +35,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
using namespace MathConst;
@ -78,6 +79,7 @@ PairBornCoulWolfCSGPU::PairBornCoulWolfCSGPU(LAMMPS *lmp) : PairBornCoulWolfCS(l
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -35,6 +35,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
using namespace MathConst;
@ -76,6 +77,7 @@ PairBornCoulWolfGPU::PairBornCoulWolfGPU(LAMMPS *lmp) : PairBornCoulWolf(lmp),
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -71,6 +72,7 @@ PairBornGPU::PairBornGPU(LAMMPS *lmp) : PairBorn(lmp), gpu_mode(GPU_FORCE)
{
respa_enable = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -72,6 +73,7 @@ PairBuckCoulCutGPU::PairBuckCoulCutGPU(LAMMPS *lmp) : PairBuckCoulCut(lmp),
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -35,6 +35,7 @@
#include "domain.h"
#include "kspace.h"
#include "gpu_extra.h"
#include "suffix.h"
#define EWALD_F 1.12837917
#define EWALD_P 0.3275911
@ -81,6 +82,7 @@ PairBuckCoulLongGPU::PairBuckCoulLongGPU(LAMMPS *lmp) :
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -69,6 +70,7 @@ PairBuckGPU::PairBuckGPU(LAMMPS *lmp) : PairBuck(lmp), gpu_mode(GPU_FORCE)
{
respa_enable = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -69,6 +70,7 @@ PairColloidGPU::PairColloidGPU(LAMMPS *lmp) : PairColloid(lmp), gpu_mode(GPU_FOR
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -69,6 +70,7 @@ PairCoulCutGPU::PairCoulCutGPU(LAMMPS *lmp) : PairCoulCut(lmp), gpu_mode(GPU_FOR
{
respa_enable = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -70,6 +71,7 @@ PairCoulDebyeGPU::PairCoulDebyeGPU(LAMMPS *lmp) :
{
respa_enable = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
#define MY_PIS 1.77245385090551602729
#define EWALD_F 1.12837917
@ -81,6 +82,7 @@ PairCoulDSFGPU::PairCoulDSFGPU(LAMMPS *lmp) : PairCoulDSF(lmp),
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -35,6 +35,7 @@
#include "domain.h"
#include "kspace.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -83,6 +84,7 @@ PairCoulLongCSGPU::PairCoulLongCSGPU(LAMMPS *lmp) :
{
respa_enable = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -35,6 +35,7 @@
#include "domain.h"
#include "kspace.h"
#include "gpu_extra.h"
#include "suffix.h"
#define EWALD_F 1.12837917
#define EWALD_P 0.3275911
@ -78,6 +79,7 @@ PairCoulLongGPU::PairCoulLongGPU(LAMMPS *lmp) :
{
respa_enable = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -35,6 +35,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -209,6 +210,7 @@ PairDPDGPU::PairDPDGPU(LAMMPS *lmp) : PairDPD(lmp), gpu_mode(GPU_FORCE)
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -35,6 +35,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -212,6 +213,7 @@ PairDPDTstatGPU::PairDPDTstatGPU(LAMMPS *lmp) : PairDPDTstat(lmp),
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -30,7 +30,7 @@
#include "gpu_extra.h"
#include "domain.h"
#include "utils.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -72,6 +72,7 @@ PairEAMAlloyGPU::PairEAMAlloyGPU(LAMMPS *lmp) : PairEAM(lmp), gpu_mode(GPU_FORCE
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -29,6 +29,7 @@
#include "neigh_request.h"
#include "gpu_extra.h"
#include "domain.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -70,6 +71,7 @@ PairEAMFSGPU::PairEAMFSGPU(LAMMPS *lmp) : PairEAM(lmp), gpu_mode(GPU_FORCE)
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -30,6 +30,7 @@
#include "error.h"
#include "neigh_request.h"
#include "gpu_extra.h"
#include "suffix.h"
#define MAXLINE 1024
@ -71,6 +72,7 @@ PairEAMGPU::PairEAMGPU(LAMMPS *lmp) : PairEAM(lmp), gpu_mode(GPU_FORCE)
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -66,6 +67,7 @@ PairGaussGPU::PairGaussGPU(LAMMPS *lmp) : PairGauss(lmp), gpu_mode(GPU_FORCE)
{
respa_enable = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -36,6 +36,7 @@
#include "domain.h"
#include "update.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -74,6 +75,7 @@ PairGayBerneGPU::PairGayBerneGPU(LAMMPS *lmp) : PairGayBerne(lmp),
quat_nmax = 0;
reinitflag = 0;
quat = NULL;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -66,6 +67,7 @@ PairLJ96CutGPU::PairLJ96CutGPU(LAMMPS *lmp) : PairLJ96Cut(lmp), gpu_mode(GPU_FOR
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -35,6 +35,7 @@
#include "domain.h"
#include "kspace.h"
#include "gpu_extra.h"
#include "suffix.h"
#define EWALD_F 1.12837917
#define EWALD_P 0.3275911
@ -83,6 +84,7 @@ PairLJCharmmCoulLongGPU::PairLJCharmmCoulLongGPU(LAMMPS *lmp) :
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -35,6 +35,7 @@
#include "domain.h"
#include "kspace.h"
#include "gpu_extra.h"
#include "suffix.h"
#define EWALD_F 1.12837917
#define EWALD_P 0.3275911
@ -80,6 +81,7 @@ PairLJClass2CoulLongGPU::PairLJClass2CoulLongGPU(LAMMPS *lmp) :
{
cpu_time = 0.0;
reinitflag = 0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -65,6 +66,7 @@ PairLJClass2GPU::PairLJClass2GPU(LAMMPS *lmp) : PairLJClass2(lmp), gpu_mode(GPU_
{
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
using namespace PairLJCubicConstants;
@ -70,6 +71,7 @@ PairLJCubicGPU::PairLJCubicGPU(LAMMPS *lmp) : PairLJCubic(lmp),
respa_enable = 0;
cpu_time = 0.0;
reinitflag = 0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -71,6 +72,7 @@ PairLJCutCoulCutGPU::PairLJCutCoulCutGPU(LAMMPS *lmp) : PairLJCutCoulCut(lmp), g
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -73,6 +74,7 @@ PairLJCutCoulDebyeGPU::PairLJCutCoulDebyeGPU(LAMMPS *lmp) :
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
#define MY_PIS 1.77245385090551602729
#define EWALD_F 1.12837917
@ -82,6 +83,7 @@ PairLJCutCoulDSFGPU::PairLJCutCoulDSFGPU(LAMMPS *lmp) : PairLJCutCoulDSF(lmp), g
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -35,6 +35,7 @@
#include "domain.h"
#include "kspace.h"
#include "gpu_extra.h"
#include "suffix.h"
#define EWALD_F 1.12837917
#define EWALD_P 0.3275911
@ -83,6 +84,7 @@ PairLJCutCoulLongGPU::PairLJCutCoulLongGPU(LAMMPS *lmp) :
{
respa_enable = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -35,6 +35,7 @@
#include "domain.h"
#include "kspace.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -72,6 +73,7 @@ PairLJCutCoulMSMGPU::PairLJCutCoulMSMGPU(LAMMPS *lmp) :
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -73,6 +74,7 @@ PairLJCutDipoleCutGPU::PairLJCutDipoleCutGPU(LAMMPS *lmp) : PairLJCutDipoleCut(l
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -36,6 +36,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
#define EWALD_F 1.12837917
#define EWALD_P 0.3275911
@ -84,6 +85,7 @@ PairLJCutDipoleLongGPU::PairLJCutDipoleLongGPU(LAMMPS *lmp) : PairLJCutDipoleLon
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -70,6 +71,7 @@ PairLJCutGPU::PairLJCutGPU(LAMMPS *lmp) : PairLJCut(lmp), gpu_mode(GPU_FORCE)
{
respa_enable = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -37,6 +37,7 @@
#include "angle.h"
#include "bond.h"
#include "gpu_extra.h"
#include "suffix.h"
#define EWALD_F 1.12837917
#define EWALD_P 0.3275911
@ -91,6 +92,7 @@ PairLJCutTIP4PLongGPU::PairLJCutTIP4PLongGPU(LAMMPS *lmp)
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -35,6 +35,7 @@
#include "domain.h"
#include "kspace.h"
#include "gpu_extra.h"
#include "suffix.h"
#define EWALD_F 1.12837917
#define EWALD_P 0.3275911
@ -83,6 +84,7 @@ PairLJExpandCoulLongGPU::PairLJExpandCoulLongGPU(LAMMPS *lmp) :
{
respa_enable = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -69,6 +70,7 @@ PairLJExpandGPU::PairLJExpandGPU(LAMMPS *lmp) : PairLJExpand(lmp), gpu_mode(GPU_
{
respa_enable = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -35,6 +35,7 @@
#include "domain.h"
#include "kspace.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -71,6 +72,7 @@ PairLJGromacsGPU::PairLJGromacsGPU(LAMMPS *lmp) :
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -35,6 +35,7 @@
#include "domain.h"
#include "kspace.h"
#include "gpu_extra.h"
#include "suffix.h"
#define EWALD_F 1.12837917
#define EWALD_P 0.3275911
@ -86,6 +87,7 @@ PairLJSDKCoulLongGPU::PairLJSDKCoulLongGPU(LAMMPS *lmp) :
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -71,6 +72,7 @@ PairLJSDKGPU::PairLJSDKGPU(LAMMPS *lmp) : PairLJSDK(lmp), gpu_mode(GPU_FORCE)
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -72,6 +73,7 @@ PairLJSFDipoleSFGPU::PairLJSFDipoleSFGPU(LAMMPS *lmp) : PairLJSFDipoleSF(lmp),
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -67,6 +68,7 @@ PairMIECutGPU::PairMIECutGPU(LAMMPS *lmp) : PairMIECut(lmp), gpu_mode(GPU_FORCE)
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -65,6 +66,7 @@ PairMorseGPU::PairMorseGPU(LAMMPS *lmp) : PairMorse(lmp), gpu_mode(GPU_FORCE)
{
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -36,6 +36,7 @@
#include "domain.h"
#include "update.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -76,6 +77,7 @@ PairRESquaredGPU::PairRESquaredGPU(LAMMPS *lmp) : PairRESquared(lmp),
error->all(FLERR,"Pair resquared/gpu requires atom style ellipsoid");
quat_nmax = 0;
quat = NULL;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -35,6 +35,7 @@
#include "domain.h"
#include "gpu_extra.h"
#include "math_const.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -70,6 +71,7 @@ PairSoftGPU::PairSoftGPU(LAMMPS *lmp) : PairSoft(lmp), gpu_mode(GPU_FORCE)
{
respa_enable = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -32,6 +32,7 @@
#include "error.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -72,6 +73,7 @@ PairSWGPU::PairSWGPU(LAMMPS *lmp) : PairSW(lmp), gpu_mode(GPU_FORCE)
{
cpu_time = 0.0;
reinitflag = 0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
cutghost = NULL;

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
#define LOOKUP 0
#define LINEAR 1
@ -73,6 +74,7 @@ PairTableGPU::PairTableGPU(LAMMPS *lmp) : PairTable(lmp),
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -32,6 +32,7 @@
#include "error.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -76,6 +77,7 @@ extern double lmp_gpu_forces(double **f, double **tor, double *eatom,
PairTersoffGPU::PairTersoffGPU(LAMMPS *lmp) : PairTersoff(lmp), gpu_mode(GPU_FORCE)
{
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
cutghost = NULL;

View File

@ -32,6 +32,7 @@
#include "error.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -69,6 +70,7 @@ PairTersoffMODGPU::PairTersoffMODGPU(LAMMPS *lmp) : PairTersoffMOD(lmp),
gpu_mode(GPU_FORCE)
{
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
cutghost = NULL;

View File

@ -32,6 +32,7 @@
#include "error.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -77,6 +78,7 @@ PairTersoffZBLGPU::PairTersoffZBLGPU(LAMMPS *lmp) : PairTersoffZBL(lmp),
gpu_mode(GPU_FORCE)
{
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
cutghost = NULL;

View File

@ -36,6 +36,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -72,6 +73,7 @@ PairUFMGPU::PairUFMGPU(LAMMPS *lmp) : PairUFM(lmp), gpu_mode(GPU_FORCE)
{
respa_enable = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -32,6 +32,7 @@
#include "error.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -73,6 +74,7 @@ PairVashishtaGPU::PairVashishtaGPU(LAMMPS *lmp) : PairVashishta(lmp), gpu_mode(G
cpu_time = 0.0;
reinitflag = 0;
gpu_allocated = false;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
cutghost = NULL;

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -68,6 +69,7 @@ PairYukawaColloidGPU::PairYukawaColloidGPU(LAMMPS *lmp) : PairYukawaColloid(lmp)
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -34,6 +34,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -67,6 +68,7 @@ PairYukawaGPU::PairYukawaGPU(LAMMPS *lmp) : PairYukawa(lmp),
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -35,6 +35,7 @@
#include "update.h"
#include "domain.h"
#include "gpu_extra.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -70,6 +71,7 @@ PairZBLGPU::PairZBLGPU(LAMMPS *lmp) : PairZBL(lmp), gpu_mode(GPU_FORCE)
respa_enable = 0;
reinitflag = 0;
cpu_time = 0.0;
suffix_flag |= Suffix::GPU;
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
}

View File

@ -33,7 +33,7 @@ using namespace FixConst;
FixBondBreak::FixBondBreak(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg),
partner(NULL), finalpartner(NULL), distsq(NULL), probability(NULL),
partner(NULL), finalpartner(NULL), distsq(NULL), probability(NULL),
broken(NULL), copy(NULL), random(NULL)
{
if (narg < 6) error->all(FLERR,"Illegal fix bond/break command");

View File

@ -226,7 +226,7 @@ void FixBondCreate::init()
if (strcmp(modify->fix[i]->style,"bond/create") == 0) count++;
if (strcmp(modify->fix[i]->style,"bond/break") == 0) count++;
}
if (count > 1 && me == 0)
if (count > 1 && me == 0)
error->warning(FLERR,"Fix bond/create is used multiple times "
" or with fix bond/break - may not work as expected");

View File

@ -27,6 +27,7 @@
#include "error.h"
#include "respa.h"
#include "utils.h"
#include "suffix.h"
using namespace LAMMPS_NS;
@ -919,6 +920,12 @@ void PairHybrid::modify_special(int m, int /*narg*/, char **arg)
special[2] = force->numeric(FLERR,arg[2]);
special[3] = force->numeric(FLERR,arg[3]);
// have to cast to PairHybrid to work around C++ access restriction
if (((PairHybrid *)styles[m])->suffix_flag & (Suffix::INTEL|Suffix::GPU))
error->all(FLERR,"Pair_modify special is not compatible with "
"suffix version of hybrid substyle");
if (strcmp(arg[0],"lj/coul") == 0) {
if (!special_lj[m]) special_lj[m] = new double[4];
if (!special_coul[m]) special_coul[m] = new double[4];

View File

@ -16,13 +16,14 @@
namespace LAMMPS_NS {
namespace Suffix {
static const int NONE = 0;
static const int OPT = 1<<0;
static const int GPU = 1<<1;
static const int OMP = 1<<2;
static const int INTEL = 1<<3;
}
enum Suffix {
NONE = 0,
OPT = 1<<0,
GPU = 1<<1,
OMP = 1<<2,
INTEL = 1<<3,
KOKKOS = 1<<4
};
}