new Section package and start doc pages and build scripts

This commit is contained in:
Steve Plimpton 2017-05-04 11:22:20 -06:00
parent f5cf1f1314
commit addd87c0f7
115 changed files with 4564 additions and 2516 deletions

View File

@ -158,12 +158,11 @@ END_RST -->
2.1 "What's in the LAMMPS distribution"_start_1 :ulb,b
2.2 "Making LAMMPS"_start_2 :b
2.3 "Making LAMMPS with optional packages"_start_3 :b
2.4 "Building LAMMPS via the Make.py script"_start_4 :b
2.5 "Building LAMMPS as a library"_start_5 :b
2.6 "Running LAMMPS"_start_6 :b
2.7 "Command-line options"_start_7 :b
2.8 "Screen output"_start_8 :b
2.9 "Tips for users of previous versions"_start_9 :ule,b
2.4 "Building LAMMPS as a library"_start_4 :b
2.5 "Running LAMMPS"_start_5 :b
2.6 "Command-line options"_start_6 :b
2.7 "Screen output"_start_7 :b
2.8 "Tips for users of previous versions"_start_8 :ule,b
"Commands"_Section_commands.html :l
3.1 "LAMMPS input script"_cmd_1 :ulb,b
3.2 "Parsing rules"_cmd_2 :b

View File

@ -1052,7 +1052,7 @@ package"_Section_start.html#start_3.
"oxdna2/excv"_pair_oxdna2.html,
"oxdna2/stk"_pair_oxdna2.html,
"quip"_pair_quip.html,
"reax/c (k)"_pair_reax_c.html,
"reax/c (k)"_pair_reaxc.html,
"smd/hertz"_pair_smd_hertz.html,
"smd/tlsph"_pair_smd_tlsph.html,
"smd/triangulated/surface"_pair_smd_triangulated_surface.html,

View File

@ -249,8 +249,12 @@ Pizza.py WWW site"_pizza. :l
Specialized features :h5
These are LAMMPS capabilities which you may not think of as typical
molecular dynamics options:
LAMMPS can be built with optional packages which implement a variety
of additional capabilities. An overview of all the packages is "given
here"_Section_packages.html.
These are some LAMMPS capabilities which you may not think of as
typical classical molecular dynamics options:
"static"_balance.html and "dynamic load-balancing"_fix_balance.html
"generalized aspherical particles"_body.html

File diff suppressed because it is too large Load Diff

View File

@ -14,12 +14,11 @@ experienced users.
2.1 "What's in the LAMMPS distribution"_#start_1
2.2 "Making LAMMPS"_#start_2
2.3 "Making LAMMPS with optional packages"_#start_3
2.4 "Building LAMMPS via the Make.py script"_#start_4
2.5 "Building LAMMPS as a library"_#start_5
2.6 "Running LAMMPS"_#start_6
2.7 "Command-line options"_#start_7
2.8 "Screen output"_#start_8
2.9 "Tips for users of previous versions"_#start_9 :all(b)
2.5 "Building LAMMPS as a library"_#start_4
2.6 "Running LAMMPS"_#start_5
2.7 "Command-line options"_#start_6
2.8 "Screen output"_#start_7
2.9 "Tips for users of previous versions"_#start_8 :all(b)
:line
@ -80,7 +79,7 @@ This section has the following sub-sections:
Read this first :h5,link(start_2_1)
If you want to avoid building LAMMPS yourself, read the preceding
If you want to avoid building LAMMPS yourself, read the preceeding
section about options available for downloading and installing
executables. Details are discussed on the "download"_download page.
@ -96,7 +95,7 @@ make serial :pre
Note that on a facility supercomputer, there are often "modules"
loaded in your environment that provide the compilers and MPI you
should use. In this case, the "mpicxx" compile/link command in
Makefile.mpi should just work by accessing those modules.
Makefile.mpi should simply work by accessing those modules.
It may be the case that one of the other Makefile.machine files in the
src/MAKE sub-directories is a better match to your system (type "make"
@ -107,33 +106,35 @@ make stampede :pre
If any of these builds (with an existing Makefile.machine) works on
your system, then you're done!
If you need to install an optional package with a LAMMPS command you
want to use, and the package does not depend on an extra library, you
can simply type
make name :pre
before invoking (or re-invoking) the above steps. "Name" is the
lower-case name of the package, e.g. replica or user-misc.
If you want to do one of the following:
use optional LAMMPS features that require additional libraries
use optional packages that require additional libraries
use optional accelerator packages that require special compiler/linker settings
run on a specialized platform that has its own compilers, settings, or other libs to use :ul
use a LAMMPS command that requires an extra library (e.g. "dump image"_dump_image.html)
build with a package that requires an extra library
build with an accelerator package that requires special compiler/linker settings
run on a machine that has its own compilers, settings, or libraries :ul
then building LAMMPS is more complicated. You may need to find where
auxiliary libraries exist on your machine or install them if they
don't. You may need to build additional libraries that are part of
the LAMMPS package, before building LAMMPS. You may need to edit a
extra libraries exist on your machine or install them if they don't.
You may need to build extra libraries that are included in the LAMMPS
distribution, before building LAMMPS itself. You may need to edit a
Makefile.machine file to make it compatible with your system.
Note that there is a Make.py tool in the src directory that automates
several of these steps, but you still have to know what you are doing.
"Section 2.4"_#start_4 below describes the tool. It is a convenient
way to work with installing/un-installing various packages, the
Makefile.machine changes required by some packages, and the auxiliary
libraries some of them use.
Please read the following sections carefully. If you are not
comfortable with makefiles, or building codes on a Unix platform, or
running an MPI job on your machine, please find a local expert to help
you. Many compilation, linking, and run problems that users have are
often not really LAMMPS issues - they are peculiar to the user's
system, compilers, libraries, etc. Such questions are better answered
by a local expert.
you. Many compilation, linking, and run problems users experience are
often not LAMMPS issues - they are peculiar to the user's system,
compilers, libraries, etc. Such questions are better answered by a
local expert.
If you have a build problem that you are convinced is a LAMMPS issue
(e.g. the compiler complains about a line of LAMMPS source code), then
@ -251,7 +252,7 @@ re-compile, after typing "make clean" (which will describe different
clean options).
The LMP_INC variable is used to include options that turn on ifdefs
within the LAMMPS code. The options that are currently recognized are:
within the LAMMPS code. The options that are currently recogized are:
-DLAMMPS_GZIP
-DLAMMPS_JPEG
@ -362,7 +363,7 @@ installed on your platform. If MPI is installed on your system in the
usual place (under /usr/local), you also may not need to specify these
3 variables, assuming /usr/local is in your path. On some large
parallel machines which use "modules" for their compile/link
environments, you may simply need to include the correct module in
environements, you may simply need to include the correct module in
your build environment, before building LAMMPS. Or the parallel
machine may have a vendor-provided MPI which the compiler has no
trouble finding.
@ -430,7 +431,7 @@ use the KISS library described above.
You may also need to set the FFT_INC, FFT_PATH, and FFT_LIB variables,
so the compiler and linker can find the needed FFT header and library
files. Note that on some large parallel machines which use "modules"
for their compile/link environments, you may simply need to include
for their compile/link environements, you may simply need to include
the correct module in your build environment. Or the parallel machine
may have a vendor-provided FFT library which the compiler has no
trouble finding.
@ -450,12 +451,13 @@ you must also manually specify the correct library, namely -lsfftw or
The FFT_INC variable also allows for a -DFFT_SINGLE setting that will
use single-precision FFTs with PPPM, which can speed-up long-range
calculations, particularly in parallel or on GPUs. Fourier transform
calulations, particularly in parallel or on GPUs. Fourier transform
and related PPPM operations are somewhat insensitive to floating point
truncation errors and thus do not always need to be performed in
double precision. Using the -DFFT_SINGLE setting trades off a little
accuracy for reduced memory use and parallel communication costs for
transposing 3d FFT data.
transposing 3d FFT data. Note that single precision FFTs have only
been tested with the FFTW3, FFTW2, MKL, and KISS FFT options.
Step 7 :h6
@ -507,13 +509,13 @@ You should get the executable lmp_foo when the build is complete.
Errors that can occur when making LAMMPS: h5 :link(start_2_3)
NOTE: If an error occurs when building LAMMPS, the compiler or linker
will state very explicitly what the problem is. The error message
should give you a hint as to which of the steps above has failed, and
what you need to do in order to fix it. Building a code with a
Makefile is a very logical process. The compiler and linker need to
find the appropriate files and those files need to be compatible with
LAMMPS source files. When a make fails, there is usually a very
If an error occurs when building LAMMPS, the compiler or linker will
state very explicitly what the problem is. The error message should
give you a hint as to which of the steps above has failed, and what
you need to do in order to fix it. Building a code with a Makefile is
a very logical process. The compiler and linker need to find the
appropriate files and those files need to be compatible with LAMMPS
settings and source files. When a make fails, there is usually a very
simple reason, which you or a local expert will need to fix.
Here are two non-obvious errors that can occur:
@ -556,7 +558,8 @@ Typing "make clean-all" or "make clean-machine" will delete *.o object
files created when LAMMPS is built, for either all builds or for a
particular machine.
Changing the LAMMPS size limits via -DLAMMPS_SMALLBIG or -DLAMMPS_BIGBIG or -DLAMMPS_SMALLSMALL :h6
Changing the LAMMPS size limits via -DLAMMPS_SMALLBIG or
-DLAMMPS_BIGBIG or -DLAMMPS_SMALLSMALL :h6
As explained above, any of these 3 settings can be specified on the
LMP_INC line in your low-level src/MAKE/Makefile.foo.
@ -655,11 +658,6 @@ This section has the following sub-sections:
2.3.3 "Packages that require extra libraries"_#start_3_3
2.3.4 "Packages that require Makefile.machine settings"_#start_3_4 :all(b)
Note that the following "Section 2.4"_#start_4 describes the Make.py
tool which can be used to install/un-install packages and build the
auxiliary libraries which some of them use. It can also auto-edit a
Makefile.machine to add settings needed by some packages.
:line
Package basics: :h5,link(start_3_1)
@ -669,235 +667,221 @@ are always included, plus optional packages. Packages are groups of
files that enable a specific set of features. For example, force
fields for molecular systems or granular systems are in packages.
"Section 4"_Section_packages.html in the manual has details
about all the packages, including specific instructions for building
LAMMPS with each package, which are covered in a more general manner
"Section 4"_Section_packages.html in the manual has details about all
the packages, which come in two flavors: [standard] and [user]
packages. It also has specific instructions for building LAMMPS with
any package which requires an extra library. General instructions are
below.
You can see the list of all packages by typing "make package" from
within the src directory of the LAMMPS distribution. This also lists
various make commands that can be used to manipulate packages.
within the src directory of the LAMMPS distribution. It will also
list various make commands that can be used to manage packages.
If you use a command in a LAMMPS input script that is part of a
package, you must have built LAMMPS with that package, else you will
get an error that the style is invalid or the command is unknown.
Every command's doc page specifies if it is part of a package. You can
also type
Every command's doc page specfies if it is part of a package. You can
type
lmp_machine -h :pre
to run your executable with the optional "-h command-line
switch"_#start_7 for "help", which will simply list the styles and
commands known to your executable, and immediately exit.
There are two kinds of packages in LAMMPS, standard and user packages.
More information about the contents of standard and user packages is
given in "Section 4"_Section_packages.html of the manual. The
difference between standard and user packages is as follows:
Standard packages, such as molecule or kspace, are supported by the
LAMMPS developers and are written in a syntax and style consistent
with the rest of LAMMPS. This means we will answer questions about
them, debug and fix them if necessary, and keep them compatible with
future changes to LAMMPS.
User packages, such as user-atc or user-omp, have been contributed by
users, and always begin with the user prefix. If they are a single
command (single file), they are typically in the user-misc package.
Otherwise, they are a set of files grouped together which add a
specific functionality to the code.
User packages don't necessarily meet the requirements of the standard
packages. If you have problems using a feature provided in a user
package, you may need to contact the contributor directly to get help.
Information on how to submit additions you make to LAMMPS as single
files or either a standard or user-contributed package are given in
"this section"_Section_modify.html#mod_15 of the documentation.
switch"_#start_7 for "help", which will list the styles and commands
known to your executable, and immediately exit.
:line
Including/excluding packages :h5,link(start_3_2)
To use (or not use) a package you must include it (or exclude it)
before building LAMMPS. From the src directory, this is typically as
simple as:
To use (or not use) a package you must install it (or un-install it)
before building LAMMPS. From the src directory, this is as simple as:
make yes-colloid
make mpi :pre
or
make no-manybody
make no-user-omp
make mpi :pre
NOTE: You should NOT include/exclude packages and build LAMMPS in a
NOTE: You should NOT install/un-install packages and build LAMMPS in a
single make command using multiple targets, e.g. make yes-colloid mpi.
This is because the make procedure creates a list of source files that
will be out-of-date for the build if the package configuration changes
within the same command.
Some packages have individual files that depend on other packages
being included. LAMMPS checks for this and does the right thing.
I.e. individual files are only included if their dependencies are
already included. Likewise, if a package is excluded, other files
Any package can be installed or not in a LAMMPS build, independent of
all other packages. However, some packages include files derived from
files in other packages. LAMMPS checks for this and does the right
thing. I.e. individual files are only included if their dependencies
are already included. Likewise, if a package is excluded, other files
dependent on that package are also excluded.
NOTE: The one exception is that we do not recommend building with both
the KOKKOS package installed and any of the other acceleration
packages (GPU, OPT, USER-INTEL, USER-OMP) also installed. This is
because of how Kokkos sometimes builds using a wrapper compiler which
can make it difficult to invoke all the compile/link flags correctly
for both Kokkos and non-Kokkos files.
If you will never run simulations that use the features in a
particular packages, there is no reason to include it in your build.
For some packages, this will keep you from having to build auxiliary
libraries (see below), and will also produce a smaller executable
which may run a bit faster.
For some packages, this will keep you from having to build extra
libraries, and will also produce a smaller executable which may run a
bit faster.
When you download a LAMMPS tarball, these packages are pre-installed
in the src directory: KSPACE, MANYBODY,MOLECULE, because they are so
commonly used. When you download LAMMPS source files from the SVN or
Git repositories, no packages are pre-installed.
When you download a LAMMPS tarball, three packages are pre-installed
in the src directory -- KSPACE, MANYBODY, MOLECULE -- because they are
so commonly used. When you download LAMMPS source files from the SVN
or Git repositories, no packages are pre-installed.
Packages are included or excluded by typing "make yes-name" or "make
no-name", where "name" is the name of the package in lower-case, e.g.
name = kspace for the KSPACE package or name = user-atc for the
USER-ATC package. You can also type "make yes-standard", "make
no-standard", "make yes-std", "make no-std", "make yes-user", "make
no-user", "make yes-lib", "make no-lib", "make yes-all", or "make
no-all" to include/exclude various sets of packages. Type "make
package" to see all of the package-related make options.
Packages are installed or un-installed by typing
NOTE: Inclusion/exclusion of a package works by simply moving files
back and forth between the main src directory and sub-directories with
the package name (e.g. src/KSPACE, src/USER-ATC), so that the files
are seen or not seen when LAMMPS is built. After you have included or
excluded a package, you must re-build LAMMPS.
make yes-name
make no-name :pre
Additional package-related make options exist to help manage LAMMPS
files that exist in both the src directory and in package
sub-directories. You do not normally need to use these commands
unless you are editing LAMMPS files or have downloaded a patch from
the LAMMPS WWW site.
where "name" is the name of the package in lower-case, e.g. name =
kspace for the KSPACE package or name = user-atc for the USER-ATC
package. You can also type any of these commands:
Typing "make package-update" or "make pu" will overwrite src files
with files from the package sub-directories if the package has been
included. It should be used after a patch is installed, since patches
only update the files in the package sub-directory, but not the src
files. Typing "make package-overwrite" will overwrite files in the
package sub-directories with src files.
make yes-all | install all packages
make no-all | un-install all packages
make yes-standard or make yes-std | install standard packages
make no-standard or make no-std| un-install standard packages
make yes-user | install user packages
make no-user | un-install user packages
make yes-lib | install packages that require extra libraries
make no-lib | un-install packages that require extra libraries
make yes-ext | install packages that require external libraries
make no-ext | un-install packages that require external libraries :tb(s=|)
which install/un-install various sets of packages. Typing "make
package" will list all the these commands.
NOTE: Installing or un-installing a package works by simply moving
files back and forth between the main src directory and
sub-directories with the package name (e.g. src/KSPACE, src/USER-ATC),
so that the files are included or excluded when LAMMPS is built.
After you have installed or un-installed a package, you must re-build
LAMMPS for the action to take effect.
The following make commands help manage files that exist in both the
src directory and in package sub-directories. You do not normally
need to use these commands unless you are editing LAMMPS files or have
downloaded a patch from the LAMMPS web site.
Typing "make package-status" or "make ps" will show which packages are
currently included. For those that are included, it will list any
currently installed. For those that are installed, it will list any
files that are different in the src directory and package
sub-directory. Typing "make package-diff" lists all differences
between these files. Again, type "make package" to see all of the
package-related make options.
sub-directory.
Typing "make package-update" or "make pu" will overwrite src files
with files from the package sub-directories if the package is
installed. It should be used after a patch has been applied, since
patches only update the files in the package sub-directory, but not
the src files.
Typing "make package-overwrite" will overwrite files in the package
sub-directories with src files.
Typing "make package-diff" lists all differences between these files.
Again, just type "make package" to see all of the package-related make
options.
:line
Packages that require extra libraries :h5,link(start_3_3)
A few of the standard and user packages require additional auxiliary
libraries. Many of them are provided with LAMMPS, in which case they
must be compiled first, before LAMMPS is built, if you wish to include
that package. If you get a LAMMPS build error about a missing
library, this is likely the reason. See the
"Section 4"_Section_packages.html doc page for a list of
packages that have these kinds of auxiliary libraries.
A few of the standard and user packages require extra libraries. See
"Section 4"_Section_packages.html for two tables of packages which
indicate which ones require libraries. For each such package, the
Section 4 doc page gives details on how to build the extra library,
including how to download it if necessary. The basic ideas are
summarized here.
The lib directory in the distribution has sub-directories with package
names that correspond to the needed auxiliary libs, e.g. lib/gpu.
Each sub-directory has a README file that gives more details. Code
for most of the auxiliary libraries is included in that directory.
Examples are the USER-ATC and MEAM packages.
[System libraries:]
A few of the lib sub-directories do not include code, but do include
instructions (and sometimes scripts) that automate the process of
downloading the auxiliary library and installing it so LAMMPS can link
to it. Examples are the KIM, VORONOI, USER-MOLFILE, and USER-SMD
packages.
Packages in the tables "Section 4"_Section_packages.html with a "sys"
in the last column link to system libraries that typically already
exist on your machine. E.g. the python package links to a system
Python library. If your machine does not have the required library,
you will have to download and install it on your machine, in either
the system or user space.
The lib/python directory (for the PYTHON package) contains only a
choice of Makefile.lammps.* files. This is because no auxiliary code
or libraries are needed, only the Python library and other system libs
that should already available on your system. However, the
Makefile.lammps file is needed to tell LAMMPS which libs to use and
where to find them.
[Internal libraries:]
For libraries with provided code, the sub-directory README file
(e.g. lib/atc/README) has instructions on how to build that library.
This information is also summarized in "Section
4"_Section_packages.html. Typically this is done by typing
something like:
Packages in the tables "Section 4"_Section_packages.html with an "int"
in the last column link to internal libraries whose source code is
included with LAMMPS, in the lib/name directory where name is the
package name. You must first build the library in that directory
before building LAMMPS with that package installed. E.g. the gpu
package links to a library you build in the lib/gpu dir. You can
often do the build in one step by typing "make lib-name args=..."
from the src dir, with appropriate arguments. You can leave off the
args to see a help message. See "Section 4"_Section_packages.html for
details for each package.
make -f Makefile.g++ :pre
[External libraries:]
If one of the provided Makefiles is not appropriate for your system
you will need to edit or add one. Note that all the Makefiles have a
setting for EXTRAMAKE at the top that specifies a Makefile.lammps.*
file.
Packages in the tables "Section 4"_Section_packages.html with an "ext"
in the last column link to exernal libraries whose source code is not
included with LAMMPS. You must first download and install the library
before building LAMMPS with that package installed. E.g. the voronoi
package links to the freely available "Voro++ library"_voronoi. You
can often do the download/build in one step by typing "make lib-name
args=..." from the src dir, with appropriate arguments. You can leave
off the args to see a help message. See "Section
4"_Section_packages.html for details for each package.
If the library build is successful, it will produce 2 files in the lib
directory:
:link(voronoi,http://math.lbl.gov/voro++)
libpackage.a
Makefile.lammps :pre
[Possible errors:]
The Makefile.lammps file will typically be a copy of one of the
Makefile.lammps.* files in the library directory.
There are various common errors which can occur when building extra
libraries or when building LAMMPS with packages that require the extra
libraries.
Note that you must insure that the settings in Makefile.lammps are
appropriate for your system. If they are not, the LAMMPS build may
fail. To fix this, you can edit or create a new Makefile.lammps.*
file for your system, and copy it to Makefile.lammps.
If you cannot build the extra library itself successfully, you may
need to edit or create an appropriate Makefile for your machine, e.g.
with appropriate compiler or system settings. Provided makefiles are
typically in the lib/name directory. E.g. see the Makefile.* files in
lib/gpu.
As explained in the lib/package/README files, the settings in
Makefile.lammps are used to specify additional system libraries and
their locations so that LAMMPS can build with the auxiliary library.
For example, if the MEAM package is used, the auxiliary library
consists of F90 code, built with a Fortran complier. To link that
library with LAMMPS (a C++ code) via whatever C++ compiler LAMMPS is
built with, typically requires additional Fortran-to-C libraries be
included in the link. Another example are the BLAS and LAPACK
libraries needed to use the USER-ATC or USER-AWPMD packages.
The LAMMPS build often uses settings in a lib/name/Makefile.lammps
file which either exists in the LAMMPS distribution or is created or
copied from a lib/name/Makefile.lammps.* file when the library is
built. If those settings are not correct for your machine you will
need to edit or create an appropriate Makefile.lammps file.
For libraries without provided code, the sub-directory README file has
information on where to download the library and how to build it,
e.g. lib/voronoi/README and lib/smd/README. The README files also
describe how you must either (a) create soft links, via the "ln"
command, in those directories to point to where you built or installed
the packages, or (b) check or edit the Makefile.lammps file in the
same directory to provide that information.
Package-specific details for these steps are given in "Section
4"_Section_packages.html an in README files in the lib/name
directories.
Some of the sub-directories, e.g. lib/voronoi, also have an install.py
script which can be used to automate the process of
downloading/building/installing the auxiliary library, and setting the
needed soft links. Type "python install.py" for further instructions.
[Compiler options needed for accelerator packages:]
As with the sub-directories containing library code, if the soft links
or settings in the lib/package/Makefile.lammps files are not correct,
the LAMMPS build will typically fail.
Several packages contain code that is optimized for specific hardware,
e.g. CPU, KNL, or GPU. These are the OPT, GPU, KOKKOS, USER-INTEL,
and USER-OMP packages. Compiling and linking the source files in
these accelerator packages for optimal performance requires specific
settings in the Makefile.machine file you use.
:line
Packages that require Makefile.machine settings :h5,link(start_3_4)
A few packages require specific settings in Makefile.machine, to
either build or use the package effectively. These are the
USER-INTEL, KOKKOS, USER-OMP, and OPT packages, used for accelerating
code performance on CPUs or other hardware, as discussed in "Section
5.3"_Section_accelerate.html#acc_3.
A summary of what Makefile.machine changes are needed for each of
these packages is given in "Section 4"_Section_packages.html.
The details are given on the doc pages that describe each of these
accelerator packages in detail:
A summary of the Makefile.machine settings needed for each of these
packages is given in "Section 4"_Section_packages.html. More info is
given on the doc pages that describe each package in detail:
5.3.1 "USER-INTEL package"_accelerate_intel.html
5.3.2 "GPU package"_accelerate_intel.html
5.3.3 "KOKKOS package"_accelerate_kokkos.html
5.3.4 "USER-OMP package"_accelerate_omp.html
5.3.5 "OPT package"_accelerate_opt.html :all(b)
You can also look at the following machine Makefiles in
src/MAKE/OPTIONS, which include the changes. Note that the USER-INTEL
and KOKKOS packages allow for settings that build LAMMPS for different
hardware. The USER-INTEL package builds for CPU and the Xeon Phi, the
KOKKOS package builds for OpenMP, GPUs (Cuda), and the Xeon Phi.
You can also use or examine the following machine Makefiles in
src/MAKE/OPTIONS, which include the settings. Note that the
USER-INTEL and KOKKOS packages can use settings that build LAMMPS for
different hardware. The USER-INTEL package can be compiled for Intel
CPUs and KNLs; the KOKKOS package builds for CPUs (OpenMP), GPUs
(Cuda), and Intel KNLs.
Makefile.intel_cpu
Makefile.intel_phi
@ -907,127 +891,9 @@ Makefile.kokkos_phi
Makefile.omp
Makefile.opt :ul
Also note that the Make.py tool, described in the next "Section
2.4"_#start_4 can automatically add the needed info to an existing
machine Makefile, using simple command-line arguments.
:line
2.4 Building LAMMPS via the Make.py tool :h4,link(start_4)
The src directory includes a Make.py script, written in Python, which
can be used to automate various steps of the build process. It is
particularly useful for working with the accelerator packages, as well
as other packages which require auxiliary libraries to be built.
The goal of the Make.py tool is to allow any complex multi-step LAMMPS
build to be performed as a single Make.py command. And you can
archive the commands, so they can be re-invoked later via the -r
(redo) switch. If you find some LAMMPS build procedure that can't be
done in a single Make.py command, let the developers know, and we'll
see if we can augment the tool.
You can run Make.py from the src directory by typing either:
Make.py -h
python Make.py -h :pre
which will give you help info about the tool. For the former to work,
you may need to edit the first line of Make.py to point to your local
Python. And you may need to insure the script is executable:
chmod +x Make.py :pre
Here are examples of build tasks you can perform with Make.py:
Install/uninstall packages: Make.py -p no-lib kokkos omp intel
Build specific auxiliary libs: Make.py -a lib-atc lib-meam
Build libs for all installed packages: Make.py -p cuda gpu -gpu mode=double arch=31 -a lib-all
Create a Makefile from scratch with compiler and MPI settings: Make.py -m none -cc g++ -mpi mpich -a file
Augment Makefile.serial with settings for installed packages: Make.py -p intel -intel cpu -m serial -a file
Add JPG and FFTW support to Makefile.mpi: Make.py -m mpi -jpg -fft fftw -a file
Build LAMMPS with a parallel make using Makefile.mpi: Make.py -j 16 -m mpi -a exe
Build LAMMPS and libs it needs using Makefile.serial with accelerator settings: Make.py -p gpu intel -intel cpu -a lib-all file serial :tb(s=:)
The bench and examples directories give Make.py commands that can be
used to build LAMMPS with the various packages and options needed to
run all the benchmark and example input scripts. See these files for
more details:
bench/README
bench/FERMI/README
bench/KEPLER/README
bench/PHI/README
examples/README
examples/accelerate/README
examples/accelerate/make.list :ul
All of the Make.py options and syntax help can be accessed by using
the "-h" switch.
E.g. typing "Make.py -h" gives
Syntax: Make.py switch args ...
switches can be listed in any order
help switch:
-h prints help and syntax for all other specified switches
switch for actions:
-a lib-all, lib-dir, clean, file, exe or machine
list one or more actions, in any order
machine is a Makefile.machine suffix, must be last if used
one-letter switches:
-d (dir), -j (jmake), -m (makefile), -o (output),
-p (packages), -r (redo), -s (settings), -v (verbose)
switches for libs:
-atc, -awpmd, -colvars, -cuda
-gpu, -meam, -poems, -qmmm, -reax
switches for build and makefile options:
-intel, -kokkos, -cc, -mpi, -fft, -jpg, -png :pre
Using the "-h" switch with other switches and actions gives additional
info on all the other specified switches or actions. The "-h" can be
anywhere in the command-line and the other switches do not need their
arguments. E.g. type "Make.py -h -d -atc -intel" will print:
-d dir
dir = LAMMPS home dir
if -d not specified, working dir must be lammps/src :pre
-atc make=suffix lammps=suffix2
all args are optional and can be in any order
make = use Makefile.suffix (def = g++)
lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) :pre
-intel mode
mode = cpu or phi (def = cpu)
build Intel package for CPU or Xeon Phi :pre
Note that Make.py never overwrites an existing Makefile.machine.
Instead, it creates src/MAKE/MINE/Makefile.auto, which you can save or
rename if desired. Likewise it creates an executable named
src/lmp_auto, which you can rename using the -o switch if desired.
The most recently executed Make.py command is saved in
src/Make.py.last. You can use the "-r" switch (for redo) to re-invoke
the last command, or you can save a sequence of one or more Make.py
commands to a file and invoke the file of commands using "-r". You
can also label the commands in the file and invoke one or more of them
by name.
A typical use of Make.py is to start with a valid Makefile.machine for
your system, that works for a vanilla LAMMPS build, i.e. when optional
packages are not installed. You can then use Make.py to add various
settings (FFT, JPG, PNG) to the Makefile.machine as well as change its
compiler and MPI options. You can also add additional packages to the
build, as well as build the needed supporting libraries.
You can also use Make.py to create a new Makefile.machine from
scratch, using the "-m none" switch, if you also specify what compiler
and MPI options to use, via the "-cc" and "-mpi" switches.
:line
2.5 Building LAMMPS as a library :h4,link(start_5)
2.4 Building LAMMPS as a library :h4,link(start_4)
LAMMPS can be built as either a static or shared library, which can
then be called from another application or a scripting language. See
@ -1063,7 +929,7 @@ src/MAKE/Makefile.foo and perform the build in the directory
Obj_shared_foo. This is so that each file can be compiled with the
-fPIC flag which is required for inclusion in a shared library. The
build will create the file liblammps_foo.so which another application
can link to dynamically. It will also create a soft link liblammps.so,
can link to dyamically. It will also create a soft link liblammps.so,
which will point to the most recently built shared library. This is
the file the Python wrapper loads by default.
@ -1149,7 +1015,7 @@ interface and how to extend it for your needs.
:line
2.6 Running LAMMPS :h4,link(start_6)
2.5 Running LAMMPS :h4,link(start_5)
By default, LAMMPS runs by reading commands from standard input. Thus
if you run the LAMMPS executable by itself, e.g.
@ -1281,7 +1147,7 @@ more processors or setup a smaller problem.
:line
2.7 Command-line options :h4,link(start_7)
2.6 Command-line options :h4,link(start_6)
At run time, LAMMPS recognizes several optional command-line switches
which may be used in any order. Either the full word or a one-or-two
@ -1415,8 +1281,8 @@ LAMMPS is compiled with CUDA=yes.
numa Nm :pre
This option is only relevant when using pthreads with hwloc support.
In this case Nm defines the number of NUMA regions (typically sockets)
on a node which will be utilized by a single MPI rank. By default Nm
In this case Nm defines the number of NUMA regions (typicaly sockets)
on a node which will be utilizied by a single MPI rank. By default Nm
= 1. If this option is used the total number of worker-threads per
MPI rank is threads*numa. Currently it is always almost better to
assign at least one MPI rank per NUMA region, and leave numa set to
@ -1480,7 +1346,7 @@ replica runs on on one or a few processors. Note that with MPI
installed on a machine (e.g. your desktop), you can run on more
(virtual) processors than you have physical processors.
To run multiple independent simulations from one input script, using
To run multiple independent simulatoins from one input script, using
multiple partitions, see "Section 6.4"_Section_howto.html#howto_4
of the manual. World- and universe-style "variables"_variable.html
are useful in this context.
@ -1711,7 +1577,7 @@ negative numeric value. It is OK if the first value1 starts with a
:line
2.8 LAMMPS screen output :h4,link(start_8)
2.7 LAMMPS screen output :h4,link(start_7)
As LAMMPS reads an input script, it prints information to both the
screen and a log file about significant actions it takes to setup a
@ -1759,7 +1625,7 @@ The first section provides a global loop timing summary. The {loop time}
is the total wall time for the section. The {Performance} line is
provided for convenience to help predicting the number of loop
continuations required and for comparing performance with other,
similar MD codes. The {CPU use} line provides the CPU utilization per
similar MD codes. The {CPU use} line provides the CPU utilzation per
MPI task; it should be close to 100% times the number of OpenMP
threads (or 1 of no OpenMP). Lower numbers correspond to delays due
to file I/O or insufficient thread utilization.
@ -1867,7 +1733,7 @@ communication, roughly 75% in the example above.
:line
2.9 Tips for users of previous LAMMPS versions :h4,link(start_9)
2.8 Tips for users of previous LAMMPS versions :h4,link(start_8)
The current C++ began with a complete rewrite of LAMMPS 2001, which
was written in F90. Features of earlier versions of LAMMPS are listed

View File

@ -24,7 +24,7 @@ twojmax = band limit for bispectrum components (non-negative integer) :l
R_1, R_2,... = list of cutoff radii, one for each type (distance units) :l
w_1, w_2,... = list of neighbor weights, one for each type :l
zero or more keyword/value pairs may be appended :l
keyword = {diagonal} or {rmin0} or {switchflag} or {bzeroflag} :l
keyword = {diagonal} or {rmin0} or {switchflag} or {bzeroflag} or {quadraticflag}:l
{diagonal} value = {0} or {1} or {2} or {3}
{0} = all j1, j2, j <= twojmax, j2 <= j1
{1} = subset satisfying j1 == j2
@ -36,7 +36,10 @@ keyword = {diagonal} or {rmin0} or {switchflag} or {bzeroflag} :l
{1} = use switching function
{bzeroflag} value = {0} or {1}
{0} = do not subtract B0
{1} = subtract B0 :pre
{1} = subtract B0
{quadraticflag} value = {0} or {1}
{0} = do not generate quadratic terms
{1} = generate quadratic terms :pre
:ule
[Examples:]
@ -151,7 +154,7 @@ linear mapping from radial distance to polar angle {theta0} on the
The argument {twojmax} and the keyword {diagonal} define which
bispectrum components are generated. See section below on output for a
detailed explanation of the number of bispectrum components and the
ordered in which they are listed
ordered in which they are listed.
The keyword {switchflag} can be used to turn off the switching
function.
@ -162,6 +165,14 @@ the calculated bispectrum components. This optional keyword is only
available for compute {sna/atom}, as {snad/atom} and {snav/atom}
are unaffected by the removal of constant terms.
The keyword {quadraticflag} determines whether or not the
quadratic analogs to the bispectrum quantities are generated.
These are formed by taking the outer product of the vector
of bispectrum components with itself.
See section below on output for a
detailed explanation of the number of quadratic terms and the
ordered in which they are listed.
NOTE: If you have a bonded system, then the settings of
"special_bonds"_special_bonds.html command can remove pairwise
interactions between atoms in the same bond, angle, or dihedral. This
@ -180,7 +191,7 @@ command that includes all pairs in the neighbor list.
Compute {sna/atom} calculates a per-atom array, each column
corresponding to a particular bispectrum component. The total number
of columns and the identities of the bispectrum component contained in
of columns and the identity of the bispectrum component contained in
each column depend on the values of {twojmax} and {diagonal}, as
described by the following piece of python code:
@ -213,6 +224,19 @@ block contains six sub-blocks corresponding to the {xx}, {yy}, {zz},
notation. Each of these sub-blocks contains one column for each
bispectrum component, the same as for compute {sna/atom}
For example, if {K}=30 and ntypes=1, the number of columns in the per-atom
arrays generated by {sna/atom}, {snad/atom}, and {snav/atom}
are 30, 90, and 180, respectively. With {quadratic} value=1,
the numbers of columns are 930, 2790, and 5580, respectively.
If the {quadratic} keyword value is set to 1, then additional
columns are appended to each per-atom array, corresponding to
a matrix of quantities that are products of two bispectrum components. If the
number of bispectrum components is {K}, then the number of matrix elements
is {K}^2. These are output in subblocks of {K}^2 columns, using the same
ordering of columns and sub-blocks as was used for the bispectrum
components.
These values can be accessed by any command that uses per-atom values
from a compute as input. See "Section
6.15"_Section_howto.html#howto_15 for an overview of LAMMPS output
@ -231,7 +255,7 @@ LAMMPS"_Section_start.html#start_3 section for more info.
[Default:]
The optional keyword defaults are {diagonal} = 0, {rmin0} = 0,
{switchflag} = 1, {bzeroflag} = 0.
{switchflag} = 1, {bzeroflag} = 1, {quadraticflag} = 0,
:line

View File

@ -7,12 +7,12 @@
:line
dump command :h3
"dump custom/vtk"_dump_custom_vtk.html command :h3
"dump vtk"_dump_vtk.html command :h3
"dump h5md"_dump_h5md.html command :h3
"dump molfile"_dump_molfile.html command :h3
"dump netcdf"_dump_netcdf.html command :h3
"dump image"_dump_image.html command :h3
"dump movie"_dump_image.html command :h3
"dump molfile"_dump_molfile.html command :h3
"dump nc"_dump_nc.html command :h3
[Syntax:]
@ -20,7 +20,7 @@ dump ID group-ID style N file args :pre
ID = user-assigned name for the dump :ulb,l
group-ID = ID of the group of atoms to be dumped :l
style = {atom} or {atom/gz} or {atom/mpiio} or {cfg} or {cfg/gz} or {cfg/mpiio} or {dcd} or {xtc} or {xyz} or {xyz/gz} or {xyz/mpiio} or {h5md} or {image} or {movie} or {molfile} or {local} or {custom} or {custom/gz} or {custom/mpiio} :l
style = {atom} or {atom/gz} or {atom/mpiio} or {cfg} or {cfg/gz} or {cfg/mpiio} or {custom} or {custom/gz} or {custom/mpiio} or {dcd} or {h5md} or {image} or or {local} or {molfile} or {movie} or {netcdf} or {netcdf/mpiio} or {vtk} or {xtc} or {xyz} or {xyz/gz} or {xyz/mpiio} :l
N = dump every this many timesteps :l
file = name of file to write dump info to :l
args = list of arguments for a particular style :l
@ -30,33 +30,22 @@ args = list of arguments for a particular style :l
{cfg} args = same as {custom} args, see below
{cfg/gz} args = same as {custom} args, see below
{cfg/mpiio} args = same as {custom} args, see below
{custom}, {custom/gz}, {custom/mpiio} args = see below
{dcd} args = none
{h5md} args = discussed on "dump h5md"_dump_h5md.html doc page
{image} args = discussed on "dump image"_dump_image.html doc page
{local} args = see below
{molfile} args = discussed on "dump molfile"_dump_molfile.html doc page
{movie} args = discussed on "dump image"_dump_image.html doc page
{netcdf} args = discussed on "dump netcdf"_dump_netcdf.html doc page
{netcdf/mpiio} args = discussed on "dump netcdf"_dump_netcdf.html doc page
{vtk} args = same as {custom} args, see below, also "dump vtk"_dump_vtk.html doc page
{xtc} args = none
{xyz} args = none :pre
{xyz/gz} args = none :pre
{xyz} args = none
{xyz/gz} args = none
{xyz/mpiio} args = none :pre
{custom/vtk} args = similar to custom args below, discussed on "dump custom/vtk"_dump_custom_vtk.html doc page :pre
{h5md} args = discussed on "dump h5md"_dump_h5md.html doc page :pre
{image} args = discussed on "dump image"_dump_image.html doc page :pre
{movie} args = discussed on "dump image"_dump_image.html doc page :pre
{molfile} args = discussed on "dump molfile"_dump_molfile.html doc page
{nc} args = discussed on "dump nc"_dump_nc.html doc page :pre
{local} args = list of local attributes
possible attributes = index, c_ID, c_ID\[I\], f_ID, f_ID\[I\]
index = enumeration of local values
c_ID = local vector calculated by a compute with ID
c_ID\[I\] = Ith column of local array calculated by a compute with ID, I can include wildcard (see below)
f_ID = local vector calculated by a fix with ID
f_ID\[I\] = Ith column of local array calculated by a fix with ID, I can include wildcard (see below) :pre
{custom} or {custom/gz} or {custom/mpiio} args = list of atom attributes
{custom} or {custom/gz} or {custom/mpiio} args = list of atom attributes :l
possible attributes = id, mol, proc, procp1, type, element, mass,
x, y, z, xs, ys, zs, xu, yu, zu,
xsu, ysu, zsu, ix, iy, iz,
@ -94,6 +83,15 @@ args = list of arguments for a particular style :l
v_name = per-atom vector calculated by an atom-style variable with name
d_name = per-atom floating point vector with name, managed by fix property/atom
i_name = per-atom integer vector with name, managed by fix property/atom :pre
{local} args = list of local attributes :l
possible attributes = index, c_ID, c_ID\[I\], f_ID, f_ID\[I\]
index = enumeration of local values
c_ID = local vector calculated by a compute with ID
c_ID\[I\] = Ith column of local array calculated by a compute with ID, I can include wildcard (see below)
f_ID = local vector calculated by a fix with ID
f_ID\[I\] = Ith column of local array calculated by a fix with ID, I can include wildcard (see below) :pre
:ule
[Examples:]

View File

@ -1,347 +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,Section_commands.html#comm)
:line
dump custom/vtk command :h3
[Syntax:]
dump ID group-ID style N file args :pre
ID = user-assigned name for the dump :ulb,l
group-ID = ID of the group of atoms to be dumped :l
style = {custom/vtk} :l
N = dump every this many timesteps :l
file = name of file to write dump info to :l
args = list of arguments for a particular style :l
{custom/vtk} args = list of atom attributes
possible attributes = id, mol, proc, procp1, type, element, mass,
x, y, z, xs, ys, zs, xu, yu, zu,
xsu, ysu, zsu, ix, iy, iz,
vx, vy, vz, fx, fy, fz,
q, mux, muy, muz, mu,
radius, diameter, omegax, omegay, omegaz,
angmomx, angmomy, angmomz, tqx, tqy, tqz,
c_ID, c_ID\[N\], f_ID, f_ID\[N\], v_name :pre
id = atom ID
mol = molecule ID
proc = ID of processor that owns atom
procp1 = ID+1 of processor that owns atom
type = atom type
element = name of atom element, as defined by "dump_modify"_dump_modify.html command
mass = atom mass
x,y,z = unscaled atom coordinates
xs,ys,zs = scaled atom coordinates
xu,yu,zu = unwrapped atom coordinates
xsu,ysu,zsu = scaled unwrapped atom coordinates
ix,iy,iz = box image that the atom is in
vx,vy,vz = atom velocities
fx,fy,fz = forces on atoms
q = atom charge
mux,muy,muz = orientation of dipole moment of atom
mu = magnitude of dipole moment of atom
radius,diameter = radius,diameter of spherical particle
omegax,omegay,omegaz = angular velocity of spherical particle
angmomx,angmomy,angmomz = angular momentum of aspherical particle
tqx,tqy,tqz = torque on finite-size particles
c_ID = per-atom vector calculated by a compute with ID
c_ID\[I\] = Ith column of per-atom array calculated by a compute with ID, I can include wildcard (see below)
f_ID = per-atom vector calculated by a fix with ID
f_ID\[I\] = Ith column of per-atom array calculated by a fix with ID, I can include wildcard (see below)
v_name = per-atom vector calculated by an atom-style variable with name
d_name = per-atom floating point vector with name, managed by fix property/atom
i_name = per-atom integer vector with name, managed by fix property/atom :pre
:ule
[Examples:]
dump dmpvtk all custom/vtk 100 dump*.myforce.vtk id type vx fx
dump dmpvtp flow custom/vtk 100 dump*.%.displace.vtp id type c_myD\[1\] c_myD\[2\] c_myD\[3\] v_ke :pre
The style {custom/vtk} is similar to the "custom"_dump.html style but
uses the VTK library to write data to VTK simple legacy or XML format
depending on the filename extension specified. This can be either
{*.vtk} for the legacy format or {*.vtp} and {*.vtu}, respectively,
for the XML format; see the "VTK
homepage"_http://www.vtk.org/VTK/img/file-formats.pdf for a detailed
description of these formats. Since this naming convention conflicts
with the way binary output is usually specified (see below),
"dump_modify binary"_dump_modify.html allows to set the binary
flag for this dump style explicitly.
[Description:]
Dump a snapshot of atom quantities to one or more files every N
timesteps in a format readable by the "VTK visualization
toolkit"_http://www.vtk.org or other visualization tools that use it,
e.g. "ParaView"_http://www.paraview.org. The timesteps on which dump
output is written can also be controlled by a variable; see the
"dump_modify every"_dump_modify.html command for details.
Only information for atoms in the specified group is dumped. The
"dump_modify thresh and region"_dump_modify.html commands can also
alter what atoms are included; see details below.
As described below, special characters ("*", "%") in the filename
determine the kind of output.
IMPORTANT NOTE: Because periodic boundary conditions are enforced only
on timesteps when neighbor lists are rebuilt, the coordinates of an
atom written to a dump file may be slightly outside the simulation
box.
IMPORTANT NOTE: Unless the "dump_modify sort"_dump_modify.html
option is invoked, the lines of atom information written to dump files
will be in an indeterminate order for each snapshot. This is even
true when running on a single processor, if the "atom_modify
sort"_atom_modify.html option is on, which it is by default. In this
case atoms are re-ordered periodically during a simulation, due to
spatial sorting. It is also true when running in parallel, because
data for a single snapshot is collected from multiple processors, each
of which owns a subset of the atoms.
For the {custom/vtk} style, sorting is off by default. See the
"dump_modify"_dump_modify.html doc page for details.
:line
The dimensions of the simulation box are written to a separate file
for each snapshot (either in legacy VTK or XML format depending on
the format of the main dump file) with the suffix {_boundingBox}
appended to the given dump filename.
For an orthogonal simulation box this information is saved as a
rectilinear grid (legacy .vtk or .vtr XML format).
Triclinic simulation boxes (non-orthogonal) are saved as
hexahedrons in either legacy .vtk or .vtu XML format.
Style {custom/vtk} allows you to specify a list of atom attributes
to be written to the dump file for each atom. Possible attributes
are listed above. In contrast to the {custom} style, the attributes
are rearranged to ensure correct ordering of vector components
(except for computes and fixes - these have to be given in the right
order) and duplicate entries are removed.
You cannot specify a quantity that is not defined for a particular
simulation - such as {q} for atom style {bond}, since that atom style
doesn't assign charges. Dumps occur at the very end of a timestep,
so atom attributes will include effects due to fixes that are applied
during the timestep. An explanation of the possible dump custom/vtk attributes
is given below. Since position data is required to write VTK files "x y z"
do not have to be specified explicitly.
The VTK format uses a single snapshot of the system per file, thus
a wildcard "*" must be included in the filename, as discussed below.
Otherwise the dump files will get overwritten with the new snapshot
each time.
:line
Dumps are performed on timesteps that are a multiple of N (including
timestep 0) and on the last timestep of a minimization if the
minimization converges. Note that this means a dump will not be
performed on the initial timestep after the dump command is invoked,
if the current timestep is not a multiple of N. This behavior can be
changed via the "dump_modify first"_dump_modify.html command, which
can also be useful if the dump command is invoked after a minimization
ended on an arbitrary timestep. N can be changed between runs by
using the "dump_modify every"_dump_modify.html command.
The "dump_modify every"_dump_modify.html command
also allows a variable to be used to determine the sequence of
timesteps on which dump files are written. In this mode a dump on the
first timestep of a run will also not be written unless the
"dump_modify first"_dump_modify.html command is used.
Dump filenames can contain two wildcard characters. If a "*"
character appears in the filename, then one file per snapshot is
written and the "*" character is replaced with the timestep value.
For example, tmp.dump*.vtk becomes tmp.dump0.vtk, tmp.dump10000.vtk,
tmp.dump20000.vtk, etc. Note that the "dump_modify pad"_dump_modify.html
command can be used to insure all timestep numbers are the same length
(e.g. 00010), which can make it easier to read a series of dump files
in order with some post-processing tools.
If a "%" character appears in the filename, then each of P processors
writes a portion of the dump file, and the "%" character is replaced
with the processor ID from 0 to P-1 preceded by an underscore character.
For example, tmp.dump%.vtp becomes tmp.dump_0.vtp, tmp.dump_1.vtp, ...
tmp.dump_P-1.vtp, etc. This creates smaller files and can be a fast
mode of output on parallel machines that support parallel I/O for output.
By default, P = the number of processors meaning one file per
processor, but P can be set to a smaller value via the {nfile} or
{fileper} keywords of the "dump_modify"_dump_modify.html command.
These options can be the most efficient way of writing out dump files
when running on large numbers of processors.
For the legacy VTK format "%" is ignored and P = 1, i.e., only
processor 0 does write files.
Note that using the "*" and "%" characters together can produce a
large number of small dump files!
If {dump_modify binary} is used, the dump file (or files, if "*" or
"%" is also used) is written in binary format. A binary dump file
will be about the same size as a text version, but will typically
write out much faster.
:line
This section explains the atom attributes that can be specified as
part of the {custom/vtk} style.
The {id}, {mol}, {proc}, {procp1}, {type}, {element}, {mass}, {vx},
{vy}, {vz}, {fx}, {fy}, {fz}, {q} attributes are self-explanatory.
{Id} is the atom ID. {Mol} is the molecule ID, included in the data
file for molecular systems. {Proc} is the ID of the processor (0 to
Nprocs-1) that currently owns the atom. {Procp1} is the proc ID+1,
which can be convenient in place of a {type} attribute (1 to Ntypes)
for coloring atoms in a visualization program. {Type} is the atom
type (1 to Ntypes). {Element} is typically the chemical name of an
element, which you must assign to each type via the "dump_modify
element"_dump_modify.html command. More generally, it can be any
string you wish to associated with an atom type. {Mass} is the atom
mass. {Vx}, {vy}, {vz}, {fx}, {fy}, {fz}, and {q} are components of
atom velocity and force and atomic charge.
There are several options for outputting atom coordinates. The {x},
{y}, {z} attributes write atom coordinates "unscaled", in the
appropriate distance "units"_units.html (Angstroms, sigma, etc). Use
{xs}, {ys}, {zs} if you want the coordinates "scaled" to the box size,
so that each value is 0.0 to 1.0. If the simulation box is triclinic
(tilted), then all atom coords will still be between 0.0 and 1.0.
I.e. actual unscaled (x,y,z) = xs*A + ys*B + zs*C, where (A,B,C) are
the non-orthogonal vectors of the simulation box edges, as discussed
in "Section 6.12"_Section_howto.html#howto_12.
Use {xu}, {yu}, {zu} if you want the coordinates "unwrapped" by the
image flags for each atom. Unwrapped means that if the atom has
passed thru a periodic boundary one or more times, the value is
printed for what the coordinate would be if it had not been wrapped
back into the periodic box. Note that using {xu}, {yu}, {zu} means
that the coordinate values may be far outside the box bounds printed
with the snapshot. Using {xsu}, {ysu}, {zsu} is similar to using
{xu}, {yu}, {zu}, except that the unwrapped coordinates are scaled by
the box size. Atoms that have passed through a periodic boundary will
have the corresponding coordinate increased or decreased by 1.0.
The image flags can be printed directly using the {ix}, {iy}, {iz}
attributes. For periodic dimensions, they specify which image of the
simulation box the atom is considered to be in. An image of 0 means
it is inside the box as defined. A value of 2 means add 2 box lengths
to get the true value. A value of -1 means subtract 1 box length to
get the true value. LAMMPS updates these flags as atoms cross
periodic boundaries during the simulation.
The {mux}, {muy}, {muz} attributes are specific to dipolar systems
defined with an atom style of {dipole}. They give the orientation of
the atom's point dipole moment. The {mu} attribute gives the
magnitude of the atom's dipole moment.
The {radius} and {diameter} attributes are specific to spherical
particles that have a finite size, such as those defined with an atom
style of {sphere}.
The {omegax}, {omegay}, and {omegaz} attributes are specific to
finite-size spherical particles that have an angular velocity. Only
certain atom styles, such as {sphere} define this quantity.
The {angmomx}, {angmomy}, and {angmomz} attributes are specific to
finite-size aspherical particles that have an angular momentum. Only
the {ellipsoid} atom style defines this quantity.
The {tqx}, {tqy}, {tqz} attributes are for finite-size particles that
can sustain a rotational torque due to interactions with other
particles.
The {c_ID} and {c_ID\[I\]} attributes allow per-atom vectors or arrays
calculated by a "compute"_compute.html to be output. The ID in the
attribute should be replaced by the actual ID of the compute that has
been defined previously in the input script. See the
"compute"_compute.html command for details. There are computes for
calculating the per-atom energy, stress, centro-symmetry parameter,
and coordination number of individual atoms.
Note that computes which calculate global or local quantities, as
opposed to per-atom quantities, cannot be output in a dump custom/vtk
command. Instead, global quantities can be output by the
"thermo_style custom"_thermo_style.html command, and local quantities
can be output by the dump local command.
If {c_ID} is used as a attribute, then the per-atom vector calculated
by the compute is printed. If {c_ID\[I\]} is used, then I must be in
the range from 1-M, which will print the Ith column of the per-atom
array with M columns calculated by the compute. See the discussion
above for how I can be specified with a wildcard asterisk to
effectively specify multiple values.
The {f_ID} and {f_ID\[I\]} attributes allow vector or array per-atom
quantities calculated by a "fix"_fix.html to be output. The ID in the
attribute should be replaced by the actual ID of the fix that has been
defined previously in the input script. The "fix
ave/atom"_fix_ave_atom.html command is one that calculates per-atom
quantities. Since it can time-average per-atom quantities produced by
any "compute"_compute.html, "fix"_fix.html, or atom-style
"variable"_variable.html, this allows those time-averaged results to
be written to a dump file.
If {f_ID} is used as a attribute, then the per-atom vector calculated
by the fix is printed. If {f_ID\[I\]} is used, then I must be in the
range from 1-M, which will print the Ith column of the per-atom array
with M columns calculated by the fix. See the discussion above for
how I can be specified with a wildcard asterisk to effectively specify
multiple values.
The {v_name} attribute allows per-atom vectors calculated by a
"variable"_variable.html to be output. The name in the attribute
should be replaced by the actual name of the variable that has been
defined previously in the input script. Only an atom-style variable
can be referenced, since it is the only style that generates per-atom
values. Variables of style {atom} can reference individual atom
attributes, per-atom atom attributes, thermodynamic keywords, or
invoke other computes, fixes, or variables when they are evaluated, so
this is a very general means of creating quantities to output to a
dump file.
The {d_name} and {i_name} attributes allow to output custom per atom
floating point or integer properties that are managed by
"fix property/atom"_fix_property_atom.html.
See "Section 10"_Section_modify.html of the manual for information
on how to add new compute and fix styles to LAMMPS to calculate
per-atom quantities which could then be output into dump files.
:line
[Restrictions:]
The {custom/vtk} style does not support writing of gzipped dump files.
The {custom/vtk} dump style is part of the USER-VTK package. It is
only enabled if LAMMPS was built with that package. See the "Making
LAMMPS"_Section_start.html#start_3 section for more info.
To use this dump style, you also must link to the VTK library. See
the info in lib/vtk/README and insure the Makefile.lammps file in that
directory is appropriate for your machine.
The {custom/vtk} dump style neither supports buffering nor custom
format strings.
[Related commands:]
"dump"_dump.html, "dump image"_dump_image.html,
"dump_modify"_dump_modify.html, "undump"_undump.html
[Default:]
By default, files are written in ASCII format. If the file extension
is not one of .vtk, .vtp or .vtu, the legacy VTK file format is used.

View File

@ -17,9 +17,7 @@ group-ID = ID of the group of atoms to be imaged :l
h5md = style of dump command (other styles {atom} or {cfg} or {dcd} or {xtc} or {xyz} or {local} or {custom} are discussed on the "dump"_dump.html doc page) :l
N = dump every this many timesteps :l
file.h5 = name of file to write to :l
args = list of data elements to dump, with their dump "subintervals".
At least one element must be given and image may only be present if
position is specified first. :l
args = list of data elements to dump, with their dump "subintervals"
position options
image
velocity options
@ -29,15 +27,17 @@ position is specified first. :l
box value = {yes} or {no}
create_group value = {yes} or {no}
author value = quoted string :pre
:ule
For the elements {position}, {velocity}, {force} and {species}, one
may specify a sub-interval to write the data only every N_element
Note that at least one element must be specified and image may only be
present if position is specified first.
For the elements {position}, {velocity}, {force} and {species}, a
sub-interval may be specified to write the data only every N_element
iterations of the dump (i.e. every N*N_element time steps). This is
specified by the option
specified by this option directly following the element declaration:
every N_element :pre
that follows directly the element declaration.
every N_element :pre
:ule

View File

@ -1,66 +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,Section_commands.html#comm)
:line
dump nc command :h3
dump nc/mpiio command :h3
[Syntax:]
dump ID group-ID nc N file.nc args
dump ID group-ID nc/mpiio N file.nc args :pre
ID = user-assigned name for the dump :ulb,l
group-ID = ID of the group of atoms to be imaged :l
{nc} or {nc/mpiio} = style of dump command (other styles {atom} or {cfg} or {dcd} or {xtc} or {xyz} or {local} or {custom} are discussed on the "dump"_dump.html doc page) :l
N = dump every this many timesteps :l
file.nc = name of file to write to :l
args = list of per atom data elements to dump, same as for the 'custom' dump style. :l,ule
[Examples:]
dump 1 all nc 100 traj.nc type x y z vx vy vz
dump_modify 1 append yes at -1 global c_thermo_pe c_thermo_temp c_thermo_press :pre
dump 1 all nc/mpiio 1000 traj.nc id type x y z :pre
[Description:]
Dump a snapshot of atom coordinates every N timesteps in Amber-style
NetCDF file format. NetCDF files are binary, portable and
self-describing. This dump style will write only one file on the root
node. The dump style {nc} uses the "standard NetCDF
library"_netcdf-home all data is collected on one processor and then
written to the dump file. Dump style {nc/mpiio} used the "parallel
NetCDF library"_pnetcdf-home and MPI-IO; it has better performance on
a larger number of processors. Note that 'nc' outputs all atoms sorted
by atom tag while 'nc/mpiio' outputs in order of the MPI rank.
In addition to per-atom data, also global (i.e. not per atom, but per
frame) quantities can be included in the dump file. This can be
variables, output from computes or fixes data prefixed with v_, c_ and
f_, respectively. These properties are included via
"dump_modify"_dump_modify.html {global}.
:link(netcdf-home,http://www.unidata.ucar.edu/software/netcdf/)
:link(pnetcdf-home,http://trac.mcs.anl.gov/projects/parallel-netcdf/)
:line
[Restrictions:]
The {nc} and {nc/mpiio} dump styles are part of the USER-NC-DUMP
package. It is only enabled if LAMMPS was built with that
package. See the "Making LAMMPS"_Section_start.html#start_3 section
for more info.
:line
[Related commands:]
"dump"_dump.html, "dump_modify"_dump_modify.html, "undump"_undump.html

82
doc/src/dump_netcdf.txt Normal file
View File

@ -0,0 +1,82 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
dump netcdf command :h3
dump netcdf/mpiio command :h3
[Syntax:]
dump ID group-ID netcdf N file args
dump ID group-ID netcdf/mpiio N file args :pre
ID = user-assigned name for the dump :ulb,l
group-ID = ID of the group of atoms to be imaged :l
{netcdf} or {netcdf/mpiio} = style of dump command (other styles {atom} or {cfg} or {dcd} or {xtc} or {xyz} or {local} or {custom} are discussed on the "dump"_dump.html doc page) :l
N = dump every this many timesteps :l
file = name of file to write dump info to :l
args = list of atom attributes, same as for "dump_style custom"_dump.html :l,ule
[Examples:]
dump 1 all netcdf 100 traj.nc type x y z vx vy vz
dump_modify 1 append yes at -1 global c_thermo_pe c_thermo_temp c_thermo_press
dump 1 all netcdf/mpiio 1000 traj.nc id type x y z :pre
[Description:]
Dump a snapshot of atom coordinates every N timesteps in Amber-style
NetCDF file format. NetCDF files are binary, portable and
self-describing. This dump style will write only one file on the root
node. The dump style {netcdf} uses the "standard NetCDF
library"_netcdf-home. All data is collected on one processor and then
written to the dump file. Dump style {netcdf/mpiio} uses the
"parallel NetCDF library"_pnetcdf-home and MPI-IO to write to the dump
file in parallel; it has better performance on a larger number of
processors. Note that style {netcdf} outputs all atoms sorted by atom
tag while style {netcdf/mpiio} outputs atoms in order of their MPI
rank.
NetCDF files can be directly visualized via the following tools:
Ovito (http://www.ovito.org/). Ovito supports the AMBER convention and
all of the above extensions. :ule,b
VMD (http://www.ks.uiuc.edu/Research/vmd/). :l
AtomEye (http://www.libatoms.org/). The libAtoms version of AtomEye
contains a NetCDF reader that is not present in the standard
distribution of AtomEye. :l,ule
In addition to per-atom data, global data can be included in the dump
file, which are the kinds of values output by the
"thermo_style"_thermo_style.html command . See "Section howto
6.15"_Section_howto.html#howto_15 for an explanation of per-atom
versus global data. The global output written into the dump file can
be from computes, fixes, or variables, by prefixing the compute/fix ID
or variable name with "c_" or "f_" or "v_" respectively, as in the
example above. These global values are specified via the "dump_modify
global"_dump_modify.html command.
:link(netcdf-home,http://www.unidata.ucar.edu/software/netcdf/)
:link(pnetcdf-home,http://trac.mcs.anl.gov/projects/parallel-netcdf/)
:line
[Restrictions:]
The {netcdf} and {netcdf/mpiio} dump styles are part of the
USER-NETCDF package. They are only enabled if LAMMPS was built with
that package. See the "Making LAMMPS"_Section_start.html#start_3
section for more info.
:line
[Related commands:]
"dump"_dump.html, "dump_modify"_dump_modify.html, "undump"_undump.html

179
doc/src/dump_vtk.txt Normal file
View File

@ -0,0 +1,179 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
dump vtk command :h3
[Syntax:]
dump ID group-ID vtk N file args :pre
ID = user-assigned name for the dump
group-ID = ID of the group of atoms to be dumped
vtk = style of dump command (other styles {atom} or {cfg} or {dcd} or {xtc} or {xyz} or {local} or {custom} are discussed on the "dump"_dump.html doc page)
N = dump every this many timesteps
file = name of file to write dump info to
args = same as arguments for "dump_style custom"_dump.html :ul
[Examples:]
dump dmpvtk all vtk 100 dump*.myforce.vtk id type vx fx
dump dmpvtp flow vtk 100 dump*.%.displace.vtp id type c_myD\[1\] c_myD\[2\] c_myD\[3\] v_ke :pre
[Description:]
Dump a snapshot of atom quantities to one or more files every N
timesteps in a format readable by the "VTK visualization
toolkit"_http://www.vtk.org or other visualization tools that use it,
e.g. "ParaView"_http://www.paraview.org. The timesteps on which dump
output is written can also be controlled by a variable; see the
"dump_modify every"_dump_modify.html command for details.
This dump style is similar to "dump_style custom"_dump.html but uses
the VTK library to write data to VTK simple legacy or XML format
depending on the filename extension specified for the dump file. This
can be either {*.vtk} for the legacy format or {*.vtp} and {*.vtu},
respectively, for XML format; see the "VTK
homepage"_http://www.vtk.org/VTK/img/file-formats.pdf for a detailed
description of these formats. Since this naming convention conflicts
with the way binary output is usually specified (see below), the
"dump_modify binary"_dump_modify.html command allows setting of a
binary option for this dump style explicitly.
Only information for atoms in the specified group is dumped. The
"dump_modify thresh and region"_dump_modify.html commands can also
alter what atoms are included; see details below.
As described below, special characters ("*", "%") in the filename
determine the kind of output.
IMPORTANT NOTE: Because periodic boundary conditions are enforced only
on timesteps when neighbor lists are rebuilt, the coordinates of an
atom written to a dump file may be slightly outside the simulation
box.
IMPORTANT NOTE: Unless the "dump_modify sort"_dump_modify.html option
is invoked, the lines of atom information written to dump files will
be in an indeterminate order for each snapshot. This is even true
when running on a single processor, if the "atom_modify
sort"_atom_modify.html option is on, which it is by default. In this
case atoms are re-ordered periodically during a simulation, due to
spatial sorting. It is also true when running in parallel, because
data for a single snapshot is collected from multiple processors, each
of which owns a subset of the atoms.
For the {vtk} style, sorting is off by default. See the
"dump_modify"_dump_modify.html doc page for details.
:line
The dimensions of the simulation box are written to a separate file
for each snapshot (either in legacy VTK or XML format depending on the
format of the main dump file) with the suffix {_boundingBox} appended
to the given dump filename.
For an orthogonal simulation box this information is saved as a
rectilinear grid (legacy .vtk or .vtr XML format).
Triclinic simulation boxes (non-orthogonal) are saved as
hexahedrons in either legacy .vtk or .vtu XML format.
Style {vtk} allows you to specify a list of atom attributes to be
written to the dump file for each atom. The list of possible attributes
is the same as for the "dump_style custom"_dump.html command; see
its doc page for a listing and an explanation of each attribute.
NOTE: Since position data is required to write VTK files the atom
attributes "x y z" do not have to be specified explicitly; they will
be included in the dump file regardless. Also, in contrast to the
{custom} style, the specified {vtk} attributes are rearranged to
ensure correct ordering of vector components (except for computes and
fixes - these have to be given in the right order) and duplicate
entries are removed.
The VTK format uses a single snapshot of the system per file, thus
a wildcard "*" must be included in the filename, as discussed below.
Otherwise the dump files will get overwritten with the new snapshot
each time.
:line
Dumps are performed on timesteps that are a multiple of N (including
timestep 0) and on the last timestep of a minimization if the
minimization converges. Note that this means a dump will not be
performed on the initial timestep after the dump command is invoked,
if the current timestep is not a multiple of N. This behavior can be
changed via the "dump_modify first"_dump_modify.html command, which
can also be useful if the dump command is invoked after a minimization
ended on an arbitrary timestep. N can be changed between runs by
using the "dump_modify every"_dump_modify.html command.
The "dump_modify every"_dump_modify.html command
also allows a variable to be used to determine the sequence of
timesteps on which dump files are written. In this mode a dump on the
first timestep of a run will also not be written unless the
"dump_modify first"_dump_modify.html command is used.
Dump filenames can contain two wildcard characters. If a "*"
character appears in the filename, then one file per snapshot is
written and the "*" character is replaced with the timestep value.
For example, tmp.dump*.vtk becomes tmp.dump0.vtk, tmp.dump10000.vtk,
tmp.dump20000.vtk, etc. Note that the "dump_modify pad"_dump_modify.html
command can be used to insure all timestep numbers are the same length
(e.g. 00010), which can make it easier to read a series of dump files
in order with some post-processing tools.
If a "%" character appears in the filename, then each of P processors
writes a portion of the dump file, and the "%" character is replaced
with the processor ID from 0 to P-1 preceded by an underscore character.
For example, tmp.dump%.vtp becomes tmp.dump_0.vtp, tmp.dump_1.vtp, ...
tmp.dump_P-1.vtp, etc. This creates smaller files and can be a fast
mode of output on parallel machines that support parallel I/O for output.
By default, P = the number of processors meaning one file per
processor, but P can be set to a smaller value via the {nfile} or
{fileper} keywords of the "dump_modify"_dump_modify.html command.
These options can be the most efficient way of writing out dump files
when running on large numbers of processors.
For the legacy VTK format "%" is ignored and P = 1, i.e., only
processor 0 does write files.
Note that using the "*" and "%" characters together can produce a
large number of small dump files!
If {dump_modify binary} is used, the dump file (or files, if "*" or
"%" is also used) is written in binary format. A binary dump file
will be about the same size as a text version, but will typically
write out much faster.
:line
[Restrictions:]
The {vtk} style does not support writing of gzipped dump files.
The {vtk} dump style is part of the USER-VTK package. It is
only enabled if LAMMPS was built with that package. See the "Making
LAMMPS"_Section_start.html#start_3 section for more info.
To use this dump style, you also must link to the VTK library. See
the info in lib/vtk/README and insure the Makefile.lammps file in that
directory is appropriate for your machine.
The {vtk} dump style supports neither buffering or custom format
strings.
[Related commands:]
"dump"_dump.html, "dump image"_dump_image.html,
"dump_modify"_dump_modify.html, "undump"_undump.html
[Default:]
By default, files are written in ASCII format. If the file extension
is not one of .vtk, .vtp or .vtu, the legacy VTK file format is used.

View File

@ -87,8 +87,11 @@ the note below about how to include the CMAP energy when performing an
[Restart, fix_modify, output, run start/stop, minimize info:]
No information about this fix is written to "binary restart
files"_restart.html.
This fix writes the list of CMAP crossterms to "binary restart
files"_restart.html. See the "read_restart"_read_restart.html command
for info on how to re-specify a fix in an input script that reads a
restart file, so that the operation of the fix continues in an
uninterrupted fashion.
The "fix_modify"_fix_modify.html {energy} option is supported by this
fix to add the potential "energy" of the CMAP interactions system's

View File

@ -317,7 +317,7 @@ solution is to start a new simulation after the equilibrium density
has been reached.
With some pair_styles, such as "Buckingham"_pair_buck.html,
"Born-Mayer-Huggins"_pair_born.html and "ReaxFF"_pair_reax_c.html, two
"Born-Mayer-Huggins"_pair_born.html and "ReaxFF"_pair_reaxc.html, two
atoms placed close to each other may have an arbitrary large, negative
potential energy due to the functional form of the potential. While
these unphysical configurations are inaccessible to typical dynamical

View File

@ -74,7 +74,7 @@ NOTE: The "fix qeq/comb"_fix_qeq_comb.html command must still be used
to perform charge equilibration with the "COMB
potential"_pair_comb.html. The "fix qeq/reax"_fix_qeq_reax.html
command can be used to perform charge equilibration with the "ReaxFF
force field"_pair_reax_c.html, although fix qeq/shielded yields the
force field"_pair_reaxc.html, although fix qeq/shielded yields the
same results as fix qeq/reax if {Nevery}, {cutoff}, and {tolerance}
are the same. Eventually the fix qeq/reax command will be deprecated.
@ -116,7 +116,7 @@ the shielded Coulomb is given by equation (13) of the "ReaxFF force
field"_#vanDuin paper. The shielding accounts for charge overlap
between charged particles at small separation. This style is the same
as "fix qeq/reax"_fix_qeq_reax.html, and can be used with "pair_style
reax/c"_pair_reax_c.html. Only the {chi}, {eta}, and {gamma}
reax/c"_pair_reaxc.html. Only the {chi}, {eta}, and {gamma}
parameters from the {qfile} file are used. This style solves partial
charges on atoms via the matrix inversion method. A tolerance of
1.0e-6 is usually a good number.

View File

@ -30,7 +30,7 @@ fix 1 all qeq/reax 1 0.0 10.0 1.0e-6 param.qeq :pre
Perform the charge equilibration (QEq) method as described in "(Rappe
and Goddard)"_#Rappe2 and formulated in "(Nakano)"_#Nakano2. It is
typically used in conjunction with the ReaxFF force field model as
implemented in the "pair_style reax/c"_pair_reax_c.html command, but
implemented in the "pair_style reax/c"_pair_reaxc.html command, but
it can be used with any potential in LAMMPS, so long as it defines and
uses charges on each atom. The "fix qeq/comb"_fix_qeq_comb.html
command should be used to perform charge equilibration with the "COMB
@ -42,7 +42,7 @@ The QEq method minimizes the electrostatic energy of the system by
adjusting the partial charge on individual atoms based on interactions
with their neighbors. It requires some parameters for each atom type.
If the {params} setting above is the word "reax/c", then these are
extracted from the "pair_style reax/c"_pair_reax_c.html command and
extracted from the "pair_style reax/c"_pair_reaxc.html command and
the ReaxFF force field file it reads in. If a file name is specified
for {params}, then the parameters are taken from the specified file
and the file must contain one line for each atom type. The latter
@ -106,7 +106,7 @@ be used for periodic cell dimensions less than 10 angstroms.
[Related commands:]
"pair_style reax/c"_pair_reax_c.html
"pair_style reax/c"_pair_reaxc.html
[Default:] none

View File

@ -28,7 +28,7 @@ fix 1 all reax/c/bonds 100 bonds.reaxc :pre
Write out the bond information computed by the ReaxFF potential
specified by "pair_style reax"_pair_reax.html or "pair_style
reax/c"_pair_reax_c.html in the exact same format as the original
reax/c"_pair_reaxc.html in the exact same format as the original
stand-alone ReaxFF code of Adri van Duin. The bond information is
written to {filename} on timesteps that are multiples of {Nevery},
including timestep 0. For time-averaged chemical species analysis,
@ -80,7 +80,7 @@ reax"_pair_reax.html be invoked. This fix is part of the REAX
package. It is only enabled if LAMMPS was built with that package,
which also requires the REAX library be built and linked with LAMMPS.
The fix reax/c/bonds command requires that the "pair_style
reax/c"_pair_reax_c.html be invoked. This fix is part of the
reax/c"_pair_reaxc.html be invoked. This fix is part of the
USER-REAXC package. It is only enabled if LAMMPS was built with that
package. See the "Making LAMMPS"_Section_start.html#start_3 section
for more info.
@ -88,6 +88,6 @@ for more info.
[Related commands:]
"pair_style reax"_pair_reax.html, "pair_style
reax/c"_pair_reax_c.html, "fix reax/c/species"_fix_reaxc_species.html
reax/c"_pair_reaxc.html, "fix reax/c/species"_fix_reaxc_species.html
[Default:] none

View File

@ -41,7 +41,7 @@ fix 1 all reax/c/species 1 100 100 species.out element Au O H position 1000 AuOH
[Description:]
Write out the chemical species information computed by the ReaxFF
potential specified by "pair_style reax/c"_pair_reax_c.html.
potential specified by "pair_style reax/c"_pair_reaxc.html.
Bond-order values (either averaged or instantaneous, depending on
value of {Nrepeat}) are used to determine chemical bonds. Every
{Nfreq} timesteps, chemical species information is written to
@ -65,7 +65,7 @@ symbol printed for each LAMMPS atom type. The number of symbols must
match the number of LAMMPS atom types and each symbol must consist of
1 or 2 alphanumeric characters. Normally, these symbols should be
chosen to match the chemical identity of each LAMMPS atom type, as
specified using the "reax/c pair_coeff"_pair_reax_c.html command and
specified using the "reax/c pair_coeff"_pair_reaxc.html command and
the ReaxFF force field file.
The optional keyword {position} writes center-of-mass positions of
@ -158,8 +158,8 @@ more instructions on how to use the accelerated styles effectively.
[Restrictions:]
The fix species currently only works with
"pair_style reax/c"_pair_reax_c.html and it requires that the "pair_style
reax/c"_pair_reax_c.html be invoked. This fix is part of the
"pair_style reax/c"_pair_reaxc.html and it requires that the "pair_style
reax/c"_pair_reaxc.html be invoked. This fix is part of the
USER-REAXC package. It is only enabled if LAMMPS was built with that
package. See the "Making LAMMPS"_Section_start.html#start_3 section
for more info.
@ -170,7 +170,7 @@ It should be possible to extend it to other reactive pair_styles (such as
[Related commands:]
"pair_style reax/c"_pair_reax_c.html, "fix
"pair_style reax/c"_pair_reaxc.html, "fix
reax/bonds"_fix_reax_bonds.html
[Default:]

View File

@ -469,7 +469,7 @@ pair_peri.html
pair_polymorphic.html
pair_quip.html
pair_reax.html
pair_reax_c.html
pair_reaxc.html
pair_resquared.html
pair_sdk.html
pair_smd_hertz.html

View File

@ -73,7 +73,7 @@ pair_coeff command to assign parameters for the different type pairs.
NOTE: There are two exceptions to this option to list an individual
pair style multiple times. The first is for pair styles implemented
as Fortran libraries: "pair_style meam"_pair_meam.html and "pair_style
reax"_pair_reax.html ("pair_style reax/c"_pair_reax_c.html is OK).
reax"_pair_reax.html ("pair_style reax/c"_pair_reaxc.html is OK).
This is because unlike a C++ class, they can not be instantiated
multiple times, due to the manner in which they were coded in Fortran.
The second is for GPU-enabled pair styles in the GPU package. This is

View File

@ -36,7 +36,7 @@ supplemental information of the following paper:
the most up-to-date version of ReaxFF as of summer 2010.
WARNING: pair style reax is now deprecated and will soon be retired. Users
should switch to "pair_style reax/c"_pair_reax_c.html. The {reax} style
should switch to "pair_style reax/c"_pair_reaxc.html. The {reax} style
differs from the {reax/c} style in the lo-level implementation details.
The {reax} style is a
Fortran library, linked to LAMMPS. The {reax/c} style was initially
@ -82,7 +82,7 @@ be specified.
Two examples using {pair_style reax} are provided in the examples/reax
sub-directory, along with corresponding examples for
"pair_style reax/c"_pair_reax_c.html. Note that while the energy and force
"pair_style reax/c"_pair_reaxc.html. Note that while the energy and force
calculated by both of these pair styles match very closely, the
contributions due to the valence angles differ slightly due to
the fact that with {pair_style reax/c} the default value of {thb_cutoff_sq}
@ -201,7 +201,7 @@ appropriate units if your simulation doesn't use "real" units.
[Related commands:]
"pair_coeff"_pair_coeff.html, "pair_style reax/c"_pair_reax_c.html,
"pair_coeff"_pair_coeff.html, "pair_style reax/c"_pair_reaxc.html,
"fix_reax_bonds"_fix_reax_bonds.html
[Default:]

View File

@ -17,6 +17,7 @@ cfile = NULL or name of a control file :ulb,l
zero or more keyword/value pairs may be appended :l
keyword = {checkqeq} or {lgvdw} or {safezone} or {mincap}
{checkqeq} value = {yes} or {no} = whether or not to require qeq/reax fix
{enobonds} value = {yes} or {no} = whether or not to tally energy of atoms with no bonds
{lgvdw} value = {yes} or {no} = whether or not to use a low gradient vdW correction
{safezone} = factor used for array allocation
{mincap} = minimum size for array allocation :pre
@ -127,6 +128,13 @@ recommended value for parameter {thb} is 0.01, which can be set in the
control file. Note: Force field files are different for the original
or lg corrected pair styles, using wrong ffield file generates an error message.
Using the optional keyword {enobonds} with the value {yes}, the energy
of atoms with no bonds (i.e. isolated atoms) is included in the total
potential energy and the per-atom energy of that atom. If the value
{no} is specified then the energy of atoms with no bonds is set to zero.
The latter behavior is usual not desired, as it causes discontinuities
in the potential energy when the bonding of an atom drops to zero.
Optional keywords {safezone} and {mincap} are used for allocating
reax/c arrays. Increasing these values can avoid memory problems, such
as segmentation faults and bondchk failed errors, that could occur under
@ -331,7 +339,7 @@ reax"_pair_reax.html
[Default:]
The keyword defaults are checkqeq = yes, lgvdw = no, safezone = 1.2,
The keyword defaults are checkqeq = yes, enobonds = yes, lgvdw = no, safezone = 1.2,
mincap = 50.
:line

View File

@ -73,7 +73,7 @@ Pair Styles :h1
pair_polymorphic
pair_quip
pair_reax
pair_reax_c
pair_reaxc
pair_resquared
pair_sdk
pair_smd_hertz

View File

@ -0,0 +1,145 @@
LAMMPS (13 Apr 2017)
units real
atom_style full
pair_style zero 10.0
read_data data.meoh
orthogonal box = (-20.6917 -20.6917 -20.6917) to (20.6917 20.6917 20.6917)
1 by 1 by 1 MPI processor grid
reading atoms ...
1000 atoms
0 = max # of 1-2 neighbors
0 = max # of 1-3 neighbors
0 = max # of 1-4 neighbors
1 = max # of special neighbors
pair_coeff * *
thermo 1
thermo_style custom step
# Test 1a: range finder functionality
fix 1 all mscg 1 range on
rerun dump.meoh first 0 last 4500 every 250 dump x y z fx fy fz
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 12
ghost atom cutoff = 12
binsize = 6, bins = 7 7 7
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair zero, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d/newton
bin: standard
Per MPI rank memory allocation (min/avg/max) = 5.794 | 5.794 | 5.794 Mbytes
Step
0
250
500
750
1000
1250
1500
1750
2000
2250
2500
2750
3000
3250
3500
3750
4000
4250
4500
Loop time of 0.581537 on 1 procs for 19 steps with 1000 atoms
Performance: 2.823 ns/day, 8.502 hours/ns, 32.672 timesteps/s
99.2% CPU use with 1 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0 | 0 | 0 | 0.0 | 0.00
Bond | 0 | 0 | 0 | 0.0 | 0.00
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0 | 0 | 0 | 0.0 | 0.00
Output | 0 | 0 | 0 | 0.0 | 0.00
Modify | 0 | 0 | 0 | 0.0 | 0.00
Other | | 0.5815 | | |100.00
Nlocal: 1000 ave 1000 max 1000 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 2934 ave 2934 max 2934 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 50654 ave 50654 max 50654 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 50654
Ave neighs/atom = 50.654
Ave special neighs/atom = 0
Neighbor list builds = 0
Dangerous builds = 0
print "TEST_1a mscg range finder"
TEST_1a mscg range finder
unfix 1
# Test 1b: force matching functionality
fix 1 all mscg 1
rerun dump.meoh first 0 last 4500 every 250 dump x y z fx fy fz
Per MPI rank memory allocation (min/avg/max) = 5.794 | 5.794 | 5.794 Mbytes
Step
0
250
500
750
1000
1250
1500
1750
2000
2250
2500
2750
3000
3250
3500
3750
4000
4250
4500
Loop time of 0.841917 on 1 procs for 19 steps with 1000 atoms
Performance: 1.950 ns/day, 12.309 hours/ns, 22.568 timesteps/s
99.8% CPU use with 1 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0 | 0 | 0 | 0.0 | 0.00
Bond | 0 | 0 | 0 | 0.0 | 0.00
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0 | 0 | 0 | 0.0 | 0.00
Output | 0 | 0 | 0 | 0.0 | 0.00
Modify | 0 | 0 | 0 | 0.0 | 0.00
Other | | 0.8419 | | |100.00
Nlocal: 1000 ave 1000 max 1000 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 2934 ave 2934 max 2934 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 50654 ave 50654 max 50654 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 50654
Ave neighs/atom = 50.654
Ave special neighs/atom = 0
Neighbor list builds = 0
Dangerous builds = 0
print "TEST_1b mscg force matching"
TEST_1b mscg force matching
print TEST_DONE
TEST_DONE
Total wall time: 0:00:01

82
lib/Install.py Normal file
View File

@ -0,0 +1,82 @@
#!/usr/bin/env python
# install.py tool to do a generic build of a library
# soft linked to by many of the lib/Install.py files
# used to automate the steps described in the corresponding lib/README
import sys,commands,os
# help message
help = """
Syntax: python Install.py -m machine -e suffix
specify -m and optionally -e, order does not matter
-m = peform a clean followed by "make -f Makefile.machine"
machine = suffix of a lib/Makefile.* file
-e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix
does not alter existing Makefile.machine
"""
# print error message or help
def error(str=None):
if not str: print help
else: print "ERROR",str
sys.exit()
# parse args
args = sys.argv[1:]
nargs = len(args)
if nargs == 0: error()
machine = None
extraflag = 0
iarg = 0
while iarg < nargs:
if args[iarg] == "-m":
if iarg+2 > nargs: error()
machine = args[iarg+1]
iarg += 2
elif args[iarg] == "-e":
if iarg+2 > nargs: error()
extraflag = 1
suffix = args[iarg+1]
iarg += 2
else: error()
# set lib from working dir
cwd = os.getcwd()
lib = os.path.basename(cwd)
# create Makefile.auto as copy of Makefile.machine
# reset EXTRAMAKE if requested
if not os.path.exists("Makefile.%s" % machine):
error("lib/%s/Makefile.%s does not exist" % (lib,machine))
lines = open("Makefile.%s" % machine,'r').readlines()
fp = open("Makefile.auto",'w')
for line in lines:
words = line.split()
if len(words) == 3 and extraflag and \
words[0] == "EXTRAMAKE" and words[1] == '=':
line = line.replace(words[2],"Makefile.lammps.%s" % suffix)
print >>fp,line,
fp.close()
# make the library via Makefile.auto
print "Building lib%s.a ..." % lib
cmd = "make -f Makefile.auto clean; make -f Makefile.auto"
txt = commands.getoutput(cmd)
print txt
if os.path.exists("lib%s.a" % lib): print "Build was successful"
else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib))
if not os.path.exists("Makefile.lammps"):
print "lib/%s/Makefile.lammps was NOT created" % lib

View File

@ -33,14 +33,16 @@ kokkos Kokkos package for GPU and many-core acceleration
from Kokkos development team (Sandia)
linalg set of BLAS and LAPACK routines needed by USER-ATC package
from Axel Kohlmeyer (Temple U)
poems POEMS rigid-body integration package, POEMS package
from Rudranarayan Mukherjee (RPI)
meam modified embedded atom method (MEAM) potential, MEAM package
from Greg Wagner (Sandia)
molfile hooks to VMD molfile plugins, used by the USER-MOLFILE package
from Axel Kohlmeyer (Temple U) and the VMD development team
mscg hooks to the MSCG library, used by fix_mscg command
from Jacob Wagner and Greg Voth group (U Chicago)
netcdf hooks to a NetCDF library installed on your system
from Lars Pastewka (Karlsruhe Institute of Technology)
poems POEMS rigid-body integration package, POEMS package
from Rudranarayan Mukherjee (RPI)
python hooks to the system Python library, used by the PYTHON package
from the LAMMPS development team
qmmm quantum mechanics/molecular mechanics coupling interface

82
lib/atc/Install.py Normal file
View File

@ -0,0 +1,82 @@
#!/usr/bin/env python
# install.py tool to do a generic build of a library
# soft linked to by many of the lib/Install.py files
# used to automate the steps described in the corresponding lib/README
import sys,commands,os
# help message
help = """
Syntax: python Install.py -m machine -e suffix
specify -m and optionally -e, order does not matter
-m = peform a clean followed by "make -f Makefile.machine"
machine = suffix of a lib/Makefile.* file
-e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix
does not alter existing Makefile.machine
"""
# print error message or help
def error(str=None):
if not str: print help
else: print "ERROR",str
sys.exit()
# parse args
args = sys.argv[1:]
nargs = len(args)
if nargs == 0: error()
machine = None
extraflag = 0
iarg = 0
while iarg < nargs:
if args[iarg] == "-m":
if iarg+2 > nargs: error()
machine = args[iarg+1]
iarg += 2
elif args[iarg] == "-e":
if iarg+2 > nargs: error()
extraflag = 1
suffix = args[iarg+1]
iarg += 2
else: error()
# set lib from working dir
cwd = os.getcwd()
lib = os.path.basename(cwd)
# create Makefile.auto as copy of Makefile.machine
# reset EXTRAMAKE if requested
if not os.path.exists("Makefile.%s" % machine):
error("lib/%s/Makefile.%s does not exist" % (lib,machine))
lines = open("Makefile.%s" % machine,'r').readlines()
fp = open("Makefile.auto",'w')
for line in lines:
words = line.split()
if len(words) == 3 and extraflag and \
words[0] == "EXTRAMAKE" and words[1] == '=':
line = line.replace(words[2],"Makefile.lammps.%s" % suffix)
print >>fp,line,
fp.close()
# make the library via Makefile.auto
print "Building lib%s.a ..." % lib
cmd = "make -f Makefile.auto clean; make -f Makefile.auto"
txt = commands.getoutput(cmd)
print txt
if os.path.exists("lib%s.a" % lib): print "Build was successful"
else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib))
if not os.path.exists("Makefile.lammps"):
print "lib/%s/Makefile.lammps was NOT created" % lib

View File

@ -15,6 +15,11 @@ links against when using the USER-ATC package.
This library must be built with a C++ compiler, before LAMMPS is
built, so LAMMPS can link against it.
You can type "make lib-atc" from the src directory to see help on how
to build this library via make commands, or you can do the same thing
by typing "python Install.py" from within this directory, or you can
do it manually by following the instructions below.
Build the library using one of the provided Makefile.* files or create
your own, specific to your compiler and system. For example:
@ -44,16 +49,16 @@ user-atc_SYSINC = leave blank for this package
user-atc_SYSLIB = BLAS and LAPACK libraries needed by this package
user-atc_SYSPATH = path(s) to where those libraries are
You have several choices for these settings:
You have 3 choices for these settings:
If the 2 libraries are already installed on your system, the settings
in Makefile.lammps.installed should work.
a) If the 2 libraries are already installed on your system, the
settings in Makefile.lammps.installed should work.
If they are not, you can install them yourself, and speficy the
appropriate settings accordingly.
b) If they are not, you can install them yourself, and specify the
appropriate settings accordingly in a Makefile.lammps.* file
and set the EXTRAMAKE setting in Makefile.* to that file.
If you want to use the minimalist version of these libraries provided
with LAMMPS in lib/linalg, then the settings in Makefile.lammps.linalg
should work. Note that in this case you also need to build the
linear-algebra in lib/linalg; see the lib/linalg/README for more
details.
c) Use the minimalist version of these libraries provided with LAMMPS
in lib/linalg, by using Makefile.lammps.linalg. In this case you also
need to build the library in lib/linalg; see the lib/linalg/README
file for more details.

82
lib/awpmd/Install.py Normal file
View File

@ -0,0 +1,82 @@
#!/usr/bin/env python
# install.py tool to do a generic build of a library
# soft linked to by many of the lib/Install.py files
# used to automate the steps described in the corresponding lib/README
import sys,commands,os
# help message
help = """
Syntax: python Install.py -m machine -e suffix
specify -m and optionally -e, order does not matter
-m = peform a clean followed by "make -f Makefile.machine"
machine = suffix of a lib/Makefile.* file
-e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix
does not alter existing Makefile.machine
"""
# print error message or help
def error(str=None):
if not str: print help
else: print "ERROR",str
sys.exit()
# parse args
args = sys.argv[1:]
nargs = len(args)
if nargs == 0: error()
machine = None
extraflag = 0
iarg = 0
while iarg < nargs:
if args[iarg] == "-m":
if iarg+2 > nargs: error()
machine = args[iarg+1]
iarg += 2
elif args[iarg] == "-e":
if iarg+2 > nargs: error()
extraflag = 1
suffix = args[iarg+1]
iarg += 2
else: error()
# set lib from working dir
cwd = os.getcwd()
lib = os.path.basename(cwd)
# create Makefile.auto as copy of Makefile.machine
# reset EXTRAMAKE if requested
if not os.path.exists("Makefile.%s" % machine):
error("lib/%s/Makefile.%s does not exist" % (lib,machine))
lines = open("Makefile.%s" % machine,'r').readlines()
fp = open("Makefile.auto",'w')
for line in lines:
words = line.split()
if len(words) == 3 and extraflag and \
words[0] == "EXTRAMAKE" and words[1] == '=':
line = line.replace(words[2],"Makefile.lammps.%s" % suffix)
print >>fp,line,
fp.close()
# make the library via Makefile.auto
print "Building lib%s.a ..." % lib
cmd = "make -f Makefile.auto clean; make -f Makefile.auto"
txt = commands.getoutput(cmd)
print txt
if os.path.exists("lib%s.a" % lib): print "Build was successful"
else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib))
if not os.path.exists("Makefile.lammps"):
print "lib/%s/Makefile.lammps was NOT created" % lib

View File

@ -19,6 +19,11 @@ links against when using the USER-AWPMD package.
This library must be built with a C++ compiler, before LAMMPS is
built, so LAMMPS can link against it.
You can type "make lib-awpmd" from the src directory to see help on
how to build this library via make commands, or you can do the same
thing by typing "python Install.py" from within this directory, or you
can do it manually by following the instructions below.
Build the library using one of the provided Makefile.* files or create
your own, specific to your compiler and system. For example:
@ -47,16 +52,16 @@ user-awpmd_SYSINC = leave blank for this package
user-awpmd_SYSLIB = BLAS and LAPACK libraries needed by this package
user-awpmd_SYSPATH = path(s) to where those libraries are
You have several choices for these settings:
You have 3 choices for these settings:
If the 2 libraries are already installed on your system, the settings
in Makefile.lammps.installed should work.
a) If the 2 libraries are already installed on your system, the
settings in Makefile.lammps.installed should work.
If they are not, you can install them yourself, and speficy the
appropriate settings accordingly.
b) If they are not, you can install them yourself, and specify the
appropriate settings accordingly in a Makefile.lammps.* file
and set the EXTRAMAKE setting in Makefile.* to that file.
If you want to use the minimalist version of these libraries provided
with LAMMPS in lib/linalg, then the settings in Makefile.lammps.linalg
should work. Note that in this case you also need to build the
linear-algebra in lib/linalg; see the lib/linalg/README for more
details.
c) Use the minimalist version of these libraries provided with LAMMPS
in lib/linalg, by using Makefile.lammps.linalg. In this case you also
need to build the library in lib/linalg; see the lib/linalg/README
file for more details.

82
lib/colvars/Install.py Normal file
View File

@ -0,0 +1,82 @@
#!/usr/bin/env python
# install.py tool to do a generic build of a library
# soft linked to by many of the lib/Install.py files
# used to automate the steps described in the corresponding lib/README
import sys,commands,os
# help message
help = """
Syntax: python Install.py -m machine -e suffix
specify -m and optionally -e, order does not matter
-m = peform a clean followed by "make -f Makefile.machine"
machine = suffix of a lib/Makefile.* file
-e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix
does not alter existing Makefile.machine
"""
# print error message or help
def error(str=None):
if not str: print help
else: print "ERROR",str
sys.exit()
# parse args
args = sys.argv[1:]
nargs = len(args)
if nargs == 0: error()
machine = None
extraflag = 0
iarg = 0
while iarg < nargs:
if args[iarg] == "-m":
if iarg+2 > nargs: error()
machine = args[iarg+1]
iarg += 2
elif args[iarg] == "-e":
if iarg+2 > nargs: error()
extraflag = 1
suffix = args[iarg+1]
iarg += 2
else: error()
# set lib from working dir
cwd = os.getcwd()
lib = os.path.basename(cwd)
# create Makefile.auto as copy of Makefile.machine
# reset EXTRAMAKE if requested
if not os.path.exists("Makefile.%s" % machine):
error("lib/%s/Makefile.%s does not exist" % (lib,machine))
lines = open("Makefile.%s" % machine,'r').readlines()
fp = open("Makefile.auto",'w')
for line in lines:
words = line.split()
if len(words) == 3 and extraflag and \
words[0] == "EXTRAMAKE" and words[1] == '=':
line = line.replace(words[2],"Makefile.lammps.%s" % suffix)
print >>fp,line,
fp.close()
# make the library via Makefile.auto
print "Building lib%s.a ..." % lib
cmd = "make -f Makefile.auto clean; make -f Makefile.auto"
txt = commands.getoutput(cmd)
print txt
if os.path.exists("lib%s.a" % lib): print "Build was successful"
else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib))
if not os.path.exists("Makefile.lammps"):
print "lib/%s/Makefile.lammps was NOT created" % lib

View File

@ -35,6 +35,11 @@ links against when using the USER-COLVARS package.
This library must be built with a C++ compiler, before LAMMPS is
built, so LAMMPS can link against it.
You can type "make lib-colvars" from the src directory to see help on
how to build this library via make commands, or you can do the same
thing by typing "python Install.py" from within this directory, or you
can do it manually by following the instructions below.
Build the library using one of the provided Makefile.* files or create
your own, specific to your compiler and system. For example:

146
lib/gpu/Install.py Normal file
View File

@ -0,0 +1,146 @@
#!/usr/bin/env python
# Install.py tool to build the GPU library
# used to automate the steps described in the README file in this dir
import sys,os,re,commands
# help message
help = """
Syntax: python Install.py -i isuffix -h hdir -a arch -p precision -e esuffix -m -o osuffix
specify one or more options, order does not matter
copies an existing Makefile.isuffix in lib/gpu to Makefile.auto
optionally edits these variables in Makefile.auto:
CUDA_HOME, CUDA_ARCH, CUDA_PRECISION, EXTRAMAKE
optionally uses Makefile.auto to build the GPU library -> libgpu.a
and to copy a Makefile.lammps.esuffix -> Makefile.lammps
optionally copies Makefile.auto to a new Makefile.osuffix
-i = use Makefile.isuffix as starting point, copy to Makefile.auto
default isuffix = linux
-h = set CUDA_HOME variable in Makefile.auto to hdir
hdir = path to NVIDIA Cuda software, e.g. /usr/local/cuda
-a = set CUDA_ARCH variable in Makefile.auto to arch
use arch = ?? for K40 (Tesla)
use arch = 37 for dual K80 (Tesla)
use arch = 60 for P100 (Pascal)
-p = set CUDA_PRECISION variable in Makefile.auto to precision
use precision = double or mixed or single
-e = set EXTRAMAKE variable in Makefile.auto to Makefile.lammps.esuffix
-m = make the GPU library using Makefile.auto
first performs a "make clean"
produces libgpu.a if successful
also copies EXTRAMAKE file -> Makefile.lammps
-e can set which Makefile.lammps.esuffix file is copied
-o = copy final Makefile.auto to Makefile.osuffix
"""
# print error message or help
def error(str=None):
if not str: print help
else: print "ERROR",str
sys.exit()
# parse args
args = sys.argv[1:]
nargs = len(args)
if nargs == 0: error()
isuffix = "linux"
hflag = aflag = pflag = eflag = 0
makeflag = 0
outflag = 0
iarg = 0
while iarg < nargs:
if args[iarg] == "-i":
if iarg+2 > nargs: error()
isuffix = args[iarg+1]
iarg += 2
elif args[iarg] == "-h":
if iarg+2 > nargs: error()
hflag = 1
hdir = args[iarg+1]
iarg += 2
elif args[iarg] == "-a":
if iarg+2 > nargs: error()
aflag = 1
arch = args[iarg+1]
iarg += 2
elif args[iarg] == "-p":
if iarg+2 > nargs: error()
pflag = 1
precision = args[iarg+1]
iarg += 2
elif args[iarg] == "-e":
if iarg+2 > nargs: error()
eflag = 1
lmpsuffix = args[iarg+1]
iarg += 2
elif args[iarg] == "-m":
makeflag = 1
iarg += 1
elif args[iarg] == "-o":
if iarg+2 > nargs: error()
outflag = 1
osuffix = args[iarg+1]
iarg += 2
else: error()
if pflag:
if precision == "double": precstr = "-D_DOUBLE_DOUBLE"
elif precision == "mixed": precstr = "-D_SINGLE_DOUBLE"
elif precision == "single": precstr = "-D_SINGLE_SINGLE"
else: error("Invalid precision setting")
# create Makefile.auto
# reset EXTRAMAKE, CUDA_HOME, CUDA_ARCH, CUDA_PRECISION if requested
if not os.path.exists("Makefile.%s" % isuffix):
error("lib/gpu/Makefile.%s does not exist" % isuffix)
lines = open("Makefile.%s" % isuffix,'r').readlines()
fp = open("Makefile.auto",'w')
for line in lines:
words = line.split()
if len(words) != 3:
print >>fp,line,
continue
if hflag and words[0] == "CUDA_HOME" and words[1] == '=':
line = line.replace(words[2],hdir)
if aflag and words[0] == "CUDA_ARCH" and words[1] == '=':
line = line.replace(words[2],"-arch=sm_%s" % arch)
if pflag and words[0] == "CUDA_PRECISION" and words[1] == '=':
line = line.replace(words[2],precstr)
if eflag and words[0] == "EXTRAMAKE" and words[1] == '=':
line = line.replace(words[2],"Makefile.lammps.%s" % lmpsuffix)
print >>fp,line,
fp.close()
# perform make
# make operations copies EXTRAMAKE file to Makefile.lammps
if makeflag:
print "Building libgpu.a ..."
cmd = "rm -f libgpu.a"
commands.getoutput(cmd)
cmd = "make -f Makefile.auto clean; make -f Makefile.auto"
commands.getoutput(cmd)
if not os.path.exists("libgpu.a"):
error("Build of lib/gpu/libgpu.a was NOT successful")
if not os.path.exists("Makefile.lammps"):
error("lib/gpu/Makefile.lammps was NOT created")
# copy new Makefile.auto to Makefile.osuffix
if outflag:
print "Creating new Makefile.%s" % osuffix
cmd = "cp Makefile.auto Makefile.%s" % osuffix
commands.getoutput(cmd)

View File

@ -17,6 +17,11 @@ links against when using the GPU package.
This library must be built with a C++ compiler, before LAMMPS is
built, so LAMMPS can link against it.
You can type "make lib-gpu" from the src directory to see help on how
to build this library via make commands, or you can do the same thing
by typing "python Install.py" from within this directory, or you can
do it manually by following the instructions below.
Build the library using one of the provided Makefile.* files or create
your own, specific to your compiler and system. For example:
@ -164,9 +169,9 @@ this directory).
The gpu library supports 3 precision modes as determined by
the CUDA_PRECISION variable:
CUDA_PREC = -D_SINGLE_SINGLE # Single precision for all calculations
CUDA_PREC = -D_DOUBLE_DOUBLE # Double precision for all calculations
CUDA_PREC = -D_SINGLE_DOUBLE # Accumulation of forces, etc. in double
CUDA_PRECISION = -D_SINGLE_SINGLE # Single precision for all calculations
CUDA_PRECISION = -D_DOUBLE_DOUBLE # Double precision for all calculations
CUDA_PRECISION = -D_SINGLE_DOUBLE # Accumulation of forces, etc. in double
NOTE: PPPM acceleration can only be run on GPUs with compute capability>=1.1.
You will get the error "GPU library not compiled for this accelerator."

82
lib/h5md/Install.py Normal file
View File

@ -0,0 +1,82 @@
#!/usr/bin/env python
# install.py tool to do a generic build of a library
# soft linked to by many of the lib/Install.py files
# used to automate the steps described in the corresponding lib/README
import sys,commands,os
# help message
help = """
Syntax: python Install.py -m machine -e suffix
specify -m and optionally -e, order does not matter
-m = peform a clean followed by "make -f Makefile.machine"
machine = suffix of a lib/Makefile.* file
-e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix
does not alter existing Makefile.machine
"""
# print error message or help
def error(str=None):
if not str: print help
else: print "ERROR",str
sys.exit()
# parse args
args = sys.argv[1:]
nargs = len(args)
if nargs == 0: error()
machine = None
extraflag = 0
iarg = 0
while iarg < nargs:
if args[iarg] == "-m":
if iarg+2 > nargs: error()
machine = args[iarg+1]
iarg += 2
elif args[iarg] == "-e":
if iarg+2 > nargs: error()
extraflag = 1
suffix = args[iarg+1]
iarg += 2
else: error()
# set lib from working dir
cwd = os.getcwd()
lib = os.path.basename(cwd)
# create Makefile.auto as copy of Makefile.machine
# reset EXTRAMAKE if requested
if not os.path.exists("Makefile.%s" % machine):
error("lib/%s/Makefile.%s does not exist" % (lib,machine))
lines = open("Makefile.%s" % machine,'r').readlines()
fp = open("Makefile.auto",'w')
for line in lines:
words = line.split()
if len(words) == 3 and extraflag and \
words[0] == "EXTRAMAKE" and words[1] == '=':
line = line.replace(words[2],"Makefile.lammps.%s" % suffix)
print >>fp,line,
fp.close()
# make the library via Makefile.auto
print "Building lib%s.a ..." % lib
cmd = "make -f Makefile.auto clean; make -f Makefile.auto"
txt = commands.getoutput(cmd)
print txt
if os.path.exists("lib%s.a" % lib): print "Build was successful"
else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib))
if not os.path.exists("Makefile.lammps"):
print "lib/%s/Makefile.lammps was NOT created" % lib

View File

@ -19,7 +19,7 @@ build/ch5md.o: src/ch5md.c | build
$(CC) $(INC) $(CFLAGS) -c $< -o $@
Makefile.lammps:
cp Makefile.lammps.empty $@
cp $(EXTRAMAKE) $@
.PHONY: all lib clean

View File

@ -3,6 +3,11 @@ LAMMPS under its own BSD license; see below. This library is used
when the USER-H5MD package is included in a LAMMPS build and the dump
h5md command is invoked in a LAMMPS input script.
You can type "make lib-h5md" from the src directory to see help on how
to build this library via make commands, or you can do the same thing
by typing "python Install.py" from within this directory, or you can
do it manually by following the instructions below.
---------------------
ch5md : Read and write H5MD files in C
@ -17,8 +22,14 @@ molecular data, whose development is found at <http://nongnu.org/h5md/>.
ch5md is developped by Pierre de Buyl and is released under the 3-clause BSD
license that can be found in the file LICENSE.
To use the h5md dump style in lammps, execute make in this directory then 'make
yes-user-h5md' in the src directory of lammps. Rebuild lammps.
To use the h5md dump style in lammps, execute
make -f Makefile.h5cc
in this directory then
make yes-user-h5md
in the src directory of LAMMPS to rebuild LAMMPS.
Note that you must have the h5cc compiler installed to use
Makefile.h5cc. It should be part
If HDF5 is not in a standard system location, edit Makefile.lammps accordingly.

52
lib/linalg/Install.py Normal file
View File

@ -0,0 +1,52 @@
#!/usr/bin/env python
# install.py tool to do build of the linear algebra library
# used to automate the steps described in the README file in this dir
import sys,commands,os
# help message
help = """
Syntax: python Install.py -m machine
-m = peform a clean followed by "make -f Makefile.machine"
machine = suffix of a lib/Makefile.* file
"""
# print error message or help
def error(str=None):
if not str: print help
else: print "ERROR",str
sys.exit()
# parse args
args = sys.argv[1:]
nargs = len(args)
if nargs == 0: error()
machine = None
iarg = 0
while iarg < nargs:
if args[iarg] == "-m":
if iarg+2 > nargs: error()
machine = args[iarg+1]
iarg += 2
else: error()
# set lib from working dir
cwd = os.getcwd()
lib = os.path.basename(cwd)
# make the library
print "Building lib%s.a ..." % lib
cmd = "make -f Makefile.%s clean; make -f Makefile.%s" % (machine,machine)
txt = commands.getoutput(cmd)
print txt
if os.path.exists("lib%s.a" % lib): print "Build was successful"
else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib))

View File

@ -3,11 +3,16 @@ USER-AWPMD packages, and possibly by other packages in the future.
Note that this is an *incomplete* subset of full BLAS/LAPACK.
You should only need to build and use the resulting library in this
directory if you want to build LAMMPS with the USER-ATC and/or
USER-AWPMD packages AND you do not have any other suitable BLAS and
LAPACK libraries installed on your system. E.g. ATLAS, GOTO-BLAS,
OpenBLAS, ACML, or MKL.
You should only need to build and use the library in this directory if
you want to build LAMMPS with the USER-ATC and/or USER-AWPMD packages
AND you do not have any other suitable BLAS and LAPACK libraries
installed on your system. E.g. ATLAS, GOTO-BLAS, OpenBLAS, ACML, or
MKL.
You can type "make lib-linalg" from the src directory to see help on
how to build this library via make commands, or you can do the same
thing by typing "python Install.py" from within this directory, or you
can do it manually by following the instructions below.
Build the library using one of the provided Makefile.* files or create
your own, specific to your compiler and system. For example:
@ -20,4 +25,5 @@ directory:
liblinalg.a the library LAMMPS will link against
You can then include this library and its path in the Makefile.lammps
file of any packages that need it, e.g. in lib/atc/Makefile.lammps.
file of any packages that need it. As an example, see the
lib/atc/Makefile.lammps.linalg file.

82
lib/meam/Install.py Normal file
View File

@ -0,0 +1,82 @@
#!/usr/bin/env python
# install.py tool to do a generic build of a library
# soft linked to by many of the lib/Install.py files
# used to automate the steps described in the corresponding lib/README
import sys,commands,os
# help message
help = """
Syntax: python Install.py -m machine -e suffix
specify -m and optionally -e, order does not matter
-m = peform a clean followed by "make -f Makefile.machine"
machine = suffix of a lib/Makefile.* file
-e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix
does not alter existing Makefile.machine
"""
# print error message or help
def error(str=None):
if not str: print help
else: print "ERROR",str
sys.exit()
# parse args
args = sys.argv[1:]
nargs = len(args)
if nargs == 0: error()
machine = None
extraflag = 0
iarg = 0
while iarg < nargs:
if args[iarg] == "-m":
if iarg+2 > nargs: error()
machine = args[iarg+1]
iarg += 2
elif args[iarg] == "-e":
if iarg+2 > nargs: error()
extraflag = 1
suffix = args[iarg+1]
iarg += 2
else: error()
# set lib from working dir
cwd = os.getcwd()
lib = os.path.basename(cwd)
# create Makefile.auto as copy of Makefile.machine
# reset EXTRAMAKE if requested
if not os.path.exists("Makefile.%s" % machine):
error("lib/%s/Makefile.%s does not exist" % (lib,machine))
lines = open("Makefile.%s" % machine,'r').readlines()
fp = open("Makefile.auto",'w')
for line in lines:
words = line.split()
if len(words) == 3 and extraflag and \
words[0] == "EXTRAMAKE" and words[1] == '=':
line = line.replace(words[2],"Makefile.lammps.%s" % suffix)
print >>fp,line,
fp.close()
# make the library via Makefile.auto
print "Building lib%s.a ..." % lib
cmd = "make -f Makefile.auto clean; make -f Makefile.auto"
txt = commands.getoutput(cmd)
print txt
if os.path.exists("lib%s.a" % lib): print "Build was successful"
else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib))
if not os.path.exists("Makefile.lammps"):
print "lib/%s/Makefile.lammps was NOT created" % lib

View File

@ -15,6 +15,11 @@ links against when using the MEAM package.
This library must be built with a F90 compiler, before LAMMPS is
built, so LAMMPS can link against it.
You can type "make lib-meam" from the src directory to see help on how
to build this library via make commands, or you can do the same thing
by typing "python Install.py" from within this directory, or you can
do it manually by following the instructions below.
Build the library using one of the provided Makefile.* files or create
your own, specific to your compiler and system. For example:

122
lib/mscg/Install.py Normal file
View File

@ -0,0 +1,122 @@
#!/usr/bin/env python
# Install.py tool to download, unpack, build, and link to the MS-CG library
# used to automate the steps described in the README file in this dir
import sys,os,re,commands
# help message
help = """
Syntax: python Install.py -h hpath hdir -g -b [suffix] -l
specify one or more options, order does not matter
-h = set home dir of MS-CG to be hpath/hdir
hpath can be full path, contain '~' or '.' chars
default hpath = . = lib/mscg
default hdir = MSCG-release-master = what GitHub zipfile unpacks to
-g = grab (download) zipfile from MS-CG GitHub website
unpack it to hpath/hdir
hpath must already exist
if hdir already exists, it will be deleted before unpack
-b = build MS-CG library in its src dir
optional suffix specifies which src/Make/Makefile.suffix to use
default suffix = g++_simple
-l = create 2 softlinks (includelink,liblink) in lib/mscg to MS-CG src dir
"""
# settings
url = "https://github.com/uchicago-voth/MSCG-release/archive/master.zip"
zipfile = "MS-CG-master.zip"
zipdir = "MSCG-release-master"
# print error message or help
def error(str=None):
if not str: print help
else: print "ERROR",str
sys.exit()
# expand to full path name
# process leading '~' or relative path
def fullpath(path):
return os.path.abspath(os.path.expanduser(path))
# parse args
args = sys.argv[1:]
nargs = len(args)
if nargs == 0: error()
homepath = "."
homedir = zipdir
grabflag = 0
buildflag = 0
msuffix = "g++_simple"
linkflag = 0
iarg = 0
while iarg < nargs:
if args[iarg] == "-h":
if iarg+3 > nargs: error()
homepath = args[iarg+1]
homedir = args[iarg+2]
iarg += 3
elif args[iarg] == "-g":
grabflag = 1
iarg += 1
elif args[iarg] == "-b":
buildflag = 1
if iarg+1 < nargs and args[iarg+1][0] != '-':
msuffix = args[iarg+1]
iarg += 1
iarg += 1
elif args[iarg] == "-l":
linkflag = 1
iarg += 1
else: error()
homepath = fullpath(homepath)
if not os.path.isdir(homepath): error("MS-CG path does not exist")
homedir = "%s/%s" % (homepath,homedir)
# download and unpack MS-CG zipfile
if grabflag:
print "Downloading MS-CG ..."
cmd = "curl -L %s > %s/%s" % (url,homepath,zipfile)
print cmd
print commands.getoutput(cmd)
print "Unpacking MS-CG zipfile ..."
if os.path.exists("%s/%s" % (homepath,zipdir)):
commands.getoutput("rm -rf %s/%s" % (homepath,zipdir))
cmd = "cd %s; unzip %s" % (homepath,zipfile)
commands.getoutput(cmd)
if os.path.basename(homedir) != zipdir:
if os.path.exists(homedir): commands.getoutput("rm -rf %s" % homedir)
os.rename("%s/%s" % (homepath,zipdir),homedir)
# build MS-CG
if buildflag:
print "Building MS-CG ..."
cmd = "cd %s/src; cp Make/Makefile.%s .; make -f Makefile.%s" % \
(homedir,msuffix,msuffix)
txt = commands.getoutput(cmd)
print txt
# create 2 links in lib/mscg to MS-CG src dir
if linkflag:
print "Creating links to MS-CG include and lib files"
if os.path.isfile("includelink") or os.path.islink("includelink"):
os.remove("includelink")
if os.path.isfile("liblink") or os.path.islink("liblink"):
os.remove("liblink")
cmd = "ln -s %s/src includelink" % homedir
commands.getoutput(cmd)
cmd = "ln -s %s/src liblink" % homedir
commands.getoutput(cmd)

View File

@ -1,5 +1,5 @@
# Settings that the LAMMPS build will import when this package library is used
mscg_SYSINC =
mscg_SYSLIB = -lm -lgsl -llapack -lcblas
mscg_SYSINC = -std=c++11
mscg_SYSLIB = -lm -lgsl -llapack -lgslcblas
mscg_SYSPATH =

View File

@ -6,6 +6,15 @@ The MS-CG library is available at
https://github.com/uchicago-voth/MSCG-release and was developed by
Jacob Wagner in Greg Voth's group at the University of Chicago.
This library requires a compiler with C++11 support (e.g., g++ v4.9+),
LAPACK, and the GNU scientific library (GSL v 2.1+).
You can type "make lib-mscg" from the src directory to see help on how
to download and build this library via make commands, or you can do
the same thing by typing "python Install.py" from within this
directory, or you can do it manually by following the instructions
below.
-----------------
You must perform the following steps yourself.
@ -14,16 +23,21 @@ You must perform the following steps yourself.
either as a tarball or via SVN, and unpack the tarball either in
this /lib/mscg directory or somewhere else on your system.
2. Compile MS-CG from within its home directory using your makefile choice:
2. Ensure that you have LAPACK and GSL (or Intel MKL) as well as a compiler
with support for C++11.
3. Compile MS-CG from within its home directory using your makefile of choice:
% make -f Makefile."name" libmscg.a
It is recommended that you start with Makefile.g++_simple
for most machines
3. There is no need to install MS-CG if you only wish
4. There is no need to install MS-CG if you only wish
to use it from LAMMPS.
4. Create two soft links in this dir (lib/mscg) to the MS-CG src
5. Create two soft links in this dir (lib/mscg) to the MS-CG src
directory. E.g if you built MS-CG in this dir:
% ln -s mscgfm-master/src includelink
% ln -s mscgfm-master/src liblink
% ln -s src includelink
% ln -s src liblink
These links could instead be set to the include and lib
directories created by a MS-CG install, e.g.
% ln -s /usr/local/include includelink
@ -46,8 +60,8 @@ somewhere else, you will also need to repeat steps 1,2,3.
The Makefile.lammps file in this directory is there for compatibility
with the way other libraries under the lib dir are linked with by
LAMMPS. MS-CG requires the GSL, LAPACK, and BLAS libraries as listed
in Makefile.lammps. If they are not in default locations where your
LAMMPS. MS-CG requires the GSL and LAPACK libraries as listed in
Makefile.lammps. If they are not in default locations where your
LD_LIBRARY_PATH environment settings can find them, then you should
add the approrpriate -L paths to the mscg_SYSPATH variable in
Makefile.lammps.

View File

@ -1,6 +1,9 @@
The Makefile.lammps file in this directory is used when building
LAMMPS with packages that make use of the NetCDF library or its
parallel version. The file has several settings needed to compile
parallel version. For example, the USER-NETCDF package which adds
dump netcdf and dump netcdf/mpiio commands.
The file has several settings needed to compile
and link LAMMPS with the NetCDF and parallel NetCDF support.
For any regular NetCDF installation, all required flags should be
autodetected. Please note that parallel NetCDF support is

82
lib/poems/Install.py Normal file
View File

@ -0,0 +1,82 @@
#!/usr/bin/env python
# install.py tool to do a generic build of a library
# soft linked to by many of the lib/Install.py files
# used to automate the steps described in the corresponding lib/README
import sys,commands,os
# help message
help = """
Syntax: python Install.py -m machine -e suffix
specify -m and optionally -e, order does not matter
-m = peform a clean followed by "make -f Makefile.machine"
machine = suffix of a lib/Makefile.* file
-e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix
does not alter existing Makefile.machine
"""
# print error message or help
def error(str=None):
if not str: print help
else: print "ERROR",str
sys.exit()
# parse args
args = sys.argv[1:]
nargs = len(args)
if nargs == 0: error()
machine = None
extraflag = 0
iarg = 0
while iarg < nargs:
if args[iarg] == "-m":
if iarg+2 > nargs: error()
machine = args[iarg+1]
iarg += 2
elif args[iarg] == "-e":
if iarg+2 > nargs: error()
extraflag = 1
suffix = args[iarg+1]
iarg += 2
else: error()
# set lib from working dir
cwd = os.getcwd()
lib = os.path.basename(cwd)
# create Makefile.auto as copy of Makefile.machine
# reset EXTRAMAKE if requested
if not os.path.exists("Makefile.%s" % machine):
error("lib/%s/Makefile.%s does not exist" % (lib,machine))
lines = open("Makefile.%s" % machine,'r').readlines()
fp = open("Makefile.auto",'w')
for line in lines:
words = line.split()
if len(words) == 3 and extraflag and \
words[0] == "EXTRAMAKE" and words[1] == '=':
line = line.replace(words[2],"Makefile.lammps.%s" % suffix)
print >>fp,line,
fp.close()
# make the library via Makefile.auto
print "Building lib%s.a ..." % lib
cmd = "make -f Makefile.auto clean; make -f Makefile.auto"
txt = commands.getoutput(cmd)
print txt
if os.path.exists("lib%s.a" % lib): print "Build was successful"
else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib))
if not os.path.exists("Makefile.lammps"):
print "lib/%s/Makefile.lammps was NOT created" % lib

View File

@ -40,6 +40,11 @@ links against when using the POEMA package.
This library must be built with a C++ compiler, before LAMMPS is
built, so LAMMPS can link against it.
You can type "make lib-poems" from the src directory to see help on
how to build this library via make commands, or you can do the same
thing by typing "python Install.py" from within this directory, or you
can do it manually by following the instructions below.
Build the library using one of the provided Makefile.* files or create
your own, specific to your compiler and system. For example:

82
lib/qmmm/Install.py Normal file
View File

@ -0,0 +1,82 @@
#!/usr/bin/env python
# install.py tool to do a generic build of a library
# soft linked to by many of the lib/Install.py files
# used to automate the steps described in the corresponding lib/README
import sys,commands,os
# help message
help = """
Syntax: python Install.py -m machine -e suffix
specify -m and optionally -e, order does not matter
-m = peform a clean followed by "make -f Makefile.machine"
machine = suffix of a lib/Makefile.* file
-e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix
does not alter existing Makefile.machine
"""
# print error message or help
def error(str=None):
if not str: print help
else: print "ERROR",str
sys.exit()
# parse args
args = sys.argv[1:]
nargs = len(args)
if nargs == 0: error()
machine = None
extraflag = 0
iarg = 0
while iarg < nargs:
if args[iarg] == "-m":
if iarg+2 > nargs: error()
machine = args[iarg+1]
iarg += 2
elif args[iarg] == "-e":
if iarg+2 > nargs: error()
extraflag = 1
suffix = args[iarg+1]
iarg += 2
else: error()
# set lib from working dir
cwd = os.getcwd()
lib = os.path.basename(cwd)
# create Makefile.auto as copy of Makefile.machine
# reset EXTRAMAKE if requested
if not os.path.exists("Makefile.%s" % machine):
error("lib/%s/Makefile.%s does not exist" % (lib,machine))
lines = open("Makefile.%s" % machine,'r').readlines()
fp = open("Makefile.auto",'w')
for line in lines:
words = line.split()
if len(words) == 3 and extraflag and \
words[0] == "EXTRAMAKE" and words[1] == '=':
line = line.replace(words[2],"Makefile.lammps.%s" % suffix)
print >>fp,line,
fp.close()
# make the library via Makefile.auto
print "Building lib%s.a ..." % lib
cmd = "make -f Makefile.auto clean; make -f Makefile.auto"
txt = commands.getoutput(cmd)
print txt
if os.path.exists("lib%s.a" % lib): print "Build was successful"
else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib))
if not os.path.exists("Makefile.lammps"):
print "lib/%s/Makefile.lammps was NOT created" % lib

View File

@ -18,6 +18,15 @@ the only option. Adding support for a different QM code will require
to write a new version of the top-level wrapper code, pwqmmm.c, and
also an interface layer into the QM code similar to the one in QE.
You can type "make lib-qmmm" from the src directory to see help on how
to build this library (steps 1 and 2 below) via make commands, or you
can do the same thing by typing "python Install.py" from within this
directory, or you can do it manually by following the instructions
below.
However you perform steps 1 and 2, you will need to perform steps 3
and 4 manually, as outlined below.
-------------------------------------------------
WARNING: This is experimental code under developement and is provided

82
lib/reax/Install.py Normal file
View File

@ -0,0 +1,82 @@
#!/usr/bin/env python
# install.py tool to do a generic build of a library
# soft linked to by many of the lib/Install.py files
# used to automate the steps described in the corresponding lib/README
import sys,commands,os
# help message
help = """
Syntax: python Install.py -m machine -e suffix
specify -m and optionally -e, order does not matter
-m = peform a clean followed by "make -f Makefile.machine"
machine = suffix of a lib/Makefile.* file
-e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix
does not alter existing Makefile.machine
"""
# print error message or help
def error(str=None):
if not str: print help
else: print "ERROR",str
sys.exit()
# parse args
args = sys.argv[1:]
nargs = len(args)
if nargs == 0: error()
machine = None
extraflag = 0
iarg = 0
while iarg < nargs:
if args[iarg] == "-m":
if iarg+2 > nargs: error()
machine = args[iarg+1]
iarg += 2
elif args[iarg] == "-e":
if iarg+2 > nargs: error()
extraflag = 1
suffix = args[iarg+1]
iarg += 2
else: error()
# set lib from working dir
cwd = os.getcwd()
lib = os.path.basename(cwd)
# create Makefile.auto as copy of Makefile.machine
# reset EXTRAMAKE if requested
if not os.path.exists("Makefile.%s" % machine):
error("lib/%s/Makefile.%s does not exist" % (lib,machine))
lines = open("Makefile.%s" % machine,'r').readlines()
fp = open("Makefile.auto",'w')
for line in lines:
words = line.split()
if len(words) == 3 and extraflag and \
words[0] == "EXTRAMAKE" and words[1] == '=':
line = line.replace(words[2],"Makefile.lammps.%s" % suffix)
print >>fp,line,
fp.close()
# make the library via Makefile.auto
print "Building lib%s.a ..." % lib
cmd = "make -f Makefile.auto clean; make -f Makefile.auto"
txt = commands.getoutput(cmd)
print txt
if os.path.exists("lib%s.a" % lib): print "Build was successful"
else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib))
if not os.path.exists("Makefile.lammps"):
print "lib/%s/Makefile.lammps was NOT created" % lib

View File

@ -17,6 +17,11 @@ links against when using the REAX package.
This library must be built with a F90 compiler, before LAMMPS is
built, so LAMMPS can link against it.
You can type "make lib-reax" from the src directory to see help on how
to build this library via make commands, or you can do the same thing
by typing "python Install.py" from within this directory, or you can
do it manually by following the instructions below.
Build the library using one of the provided Makefile.* files or create
your own, specific to your compiler and system. For example:

103
lib/smd/Install.py Normal file
View File

@ -0,0 +1,103 @@
#!/usr/bin/env python
# Install.py tool to download, unpack, and point to the Eigen library
# used to automate the steps described in the README file in this dir
import sys,os,re,glob,commands
# help message
help = """
Syntax: python Install.py -h hpath hdir -g -l
specify one or more options, order does not matter
-h = set home dir of Eigen to be hpath/hdir
hpath can be full path, contain '~' or '.' chars
default hpath = . = lib/smd
default hdir = "ee" = what tarball unpacks to (eigen-eigen-*)
-g = grab (download) tarball from http://eigen.tuxfamily.org website
unpack it to hpath/hdir
hpath must already exist
if hdir already exists, it will be deleted before unpack
-l = create softlink (includelink) in lib/smd to Eigen src dir
"""
# settings
url = "http://bitbucket.org/eigen/eigen/get/3.3.3.tar.gz"
tarball = "eigen.tar.gz"
# print error message or help
def error(str=None):
if not str: print help
else: print "ERROR",str
sys.exit()
# expand to full path name
# process leading '~' or relative path
def fullpath(path):
return os.path.abspath(os.path.expanduser(path))
# parse args
args = sys.argv[1:]
nargs = len(args)
if nargs == 0: error()
homepath = "."
homedir = "ee"
grabflag = 0
linkflag = 0
iarg = 0
while iarg < nargs:
if args[iarg] == "-h":
if iarg+3 > nargs: error()
homepath = args[iarg+1]
homedir = args[iarg+2]
iarg += 3
elif args[iarg] == "-g":
grabflag = 1
iarg += 1
elif args[iarg] == "-l":
linkflag = 1
iarg += 1
else: error()
homepath = fullpath(homepath)
if not os.path.isdir(homepath): error("Eigen path does not exist")
# download and unpack Eigen tarball
# glob to find name of dir it unpacks to
if grabflag:
print "Downloading Eigen ..."
cmd = "curl -L %s > %s/%s" % (url,homepath,tarball)
print cmd
print commands.getoutput(cmd)
print "Unpacking Eigen tarball ..."
edir = glob.glob("%s/eigen-eigen-*" % homepath)
for one in edir:
if os.path.isdir(one): commands.getoutput("rm -rf %s" % one)
cmd = "cd %s; tar zxvf %s" % (homepath,tarball)
commands.getoutput(cmd)
if homedir != "ee":
if os.path.exists(homedir): commands.getoutput("rm -rf %s" % homedir)
edir = glob.glob("%s/eigen-eigen-*" % homepath)
os.rename(edir[0],"%s/%s" % (homepath,homedir))
# create link in lib/smd to Eigen src dir
if linkflag:
print "Creating link to Eigen files"
if os.path.isfile("includelink") or os.path.islink("includelink"):
os.remove("includelink")
if homedir == "ee":
edir = glob.glob("%s/eigen-eigen-*" % homepath)
linkdir = edir[0]
else: linkdir = "%s/%s" % (homepath,homedir)
cmd = "ln -s %s includelink" % linkdir
commands.getoutput(cmd)

View File

@ -4,9 +4,12 @@ to use the USER-SMD package in a LAMMPS input script.
The Eigen library is available at http://eigen.tuxfamily.org. It's
a general C++ template library for linear algebra.
You must perform the following steps yourself, or you can use the
install.py Python script to automate any or all steps of the process.
Type "python install.py" for instructions.
You can type "make lib-smd" from the src directory to see help on how
to download build this library via make commands, or you can do the
same thing by typing "python Install.py" from within this directory,
or you can do it manually by following the instructions below.
Instructions:
1. Download the Eigen tarball at http://eigen.tuxfamily.org and
unpack the tarball either in this /lib/smd directory or somewhere

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
# install.py tool to download, unpack, build, and link to the Voro++ library
# Install.py tool to download, unpack, build, and link to the Voro++ library
# used to automate the steps described in the README file in this dir
import sys,os,re,urllib,commands
@ -8,19 +8,20 @@ import sys,os,re,urllib,commands
# help message
help = """
Syntax: install.py -v version -g gdir [gname] -b bdir -l ldir
Syntax: python Install.py -v version -h hpath hdir -g -b -l
specify one or more options, order does not matter
gdir,bdir,ldir can be paths relative to lib/latte, full paths, or contain ~
-v = version of Voro++ to download and build
default = voro++-0.4.6 (current as of Jan 2015)
-g = grab (download) from math.lbl.gov/voro++ website
unpack tarfile in gdir to produce version dir (e.g. voro++-0.4.6)
if optional gname specified, rename version dir to gname within gdir
-b = build Voro++, bdir = Voro++ home directory
note that bdir must include the version suffix unless renamed
-l = create 2 softlinks (includelink,liblink)
in lib/voronoi to src dir of ldir = Voro++ home directory
note that ldir must include the version suffix unless renamed
default version = voro++-0.4.6 (current as of Jan 2015)
-h = set home dir of Voro++ to be hpath/hdir
hpath can be full path, contain '~' or '.' chars
default hpath = . = lib/voronoi
default hdir = voro++-0.4.6 = what tarball unpacks to
-g = grab (download) tarball from math.lbl.gov/voro++ website
unpack it to hpath/hdir
hpath must already exist
if hdir already exists, it will be deleted before unpack
-b = build Voro++ library in its src dir
-l = create 2 softlinks (includelink,liblink) in lib/voronoi to Voro++ src dir
"""
# settings
@ -47,6 +48,9 @@ args = sys.argv[1:]
nargs = len(args)
if nargs == 0: error()
homepath = "."
homedir = version
grabflag = 0
buildflag = 0
linkflag = 0
@ -56,49 +60,47 @@ while iarg < nargs:
if args[iarg] == "-v":
if iarg+2 > nargs: error()
version = args[iarg+1]
iarg += 2
iarg += 2
elif args[iarg] == "-h":
if iarg+3 > nargs: error()
homepath = args[iarg+1]
homedir = args[iarg+2]
iarg += 3
elif args[iarg] == "-g":
if iarg+2 > nargs: error()
grabflag = 1
grabdir = args[iarg+1]
grabname = None
if iarg+2 < nargs and args[iarg+2][0] != '-':
grabname = args[iarg+2]
iarg += 1
iarg += 2
iarg += 1
elif args[iarg] == "-b":
if iarg+2 > nargs: error()
buildflag = 1
builddir = args[iarg+1]
iarg += 2
iarg += 1
elif args[iarg] == "-l":
if iarg+2 > nargs: error()
linkflag = 1
linkdir = args[iarg+1]
iarg += 2
iarg += 1
else: error()
homepath = fullpath(homepath)
if not os.path.isdir(homepath): error("Voro++ path does not exist")
homedir = "%s/%s" % (homepath,homedir)
# download and unpack Voro++ tarball
if grabflag:
print "Downloading Voro++ ..."
grabdir = fullpath(grabdir)
if not os.path.isdir(grabdir): error("Grab directory does not exist")
urllib.urlretrieve(url,"%s/%s.tar.gz" % (grabdir,version))
urllib.urlretrieve(url,"%s/%s.tar.gz" % (homepath,version))
print "Unpacking Voro++ tarball ..."
tardir = "%s/%s" % (grabdir,version)
if os.path.exists(tardir): commands.getoutput("rm -rf %s" % tardir)
cmd = "cd %s; tar zxvf %s.tar.gz" % (grabdir,version)
txt = commands.getoutput(cmd)
print tardir,grabdir,grabname
if grabname: os.rename(tardir,"%s/%s" % (grabdir,grabname))
if os.path.exists("%s/%s" % (homepath,version)):
commands.getoutput("rm -rf %s/%s" % (homepath,version))
cmd = "cd %s; tar zxvf %s.tar.gz" % (homepath,version)
commands.getoutput(cmd)
if os.path.basename(homedir) != version:
if os.path.exists(homedir): commands.getoutput("rm -rf %s" % homedir)
os.rename("%s/%s" % (homepath,version),homedir)
# build Voro++
if buildflag:
print "Building Voro++ ..."
cmd = "cd %s; make" % builddir
cmd = "cd %s; make" % homedir
txt = commands.getoutput(cmd)
print txt
@ -110,7 +112,7 @@ if linkflag:
os.remove("includelink")
if os.path.isfile("liblink") or os.path.islink("liblink"):
os.remove("liblink")
cmd = "ln -s %s/src includelink" % linkdir
cmd = "ln -s %s/src includelink" % homedir
commands.getoutput(cmd)
cmd = "ln -s %s/src liblink" % linkdir
cmd = "ln -s %s/src liblink" % homedir
commands.getoutput(cmd)

View File

@ -6,11 +6,15 @@ The Voro++ library is available at http://math.lbl.gov/voro++ and was
developed by Chris H. Rycroft while at UC Berkeley / Lawrence Berkeley
Laboratory.
You can type "make lib-voronoi" from the src directory to see help on
how to download and build this library via make commands, or you can
do the same thing by typing "python Install.py" from within this
directory, or you can do it manually by following the instructions
below.
-----------------
You must perform the following steps yourself, or you can use the
Install.py Python script to automate any or all steps of the process.
Type "python Install.py" for instructions.
Instructions:
1. Download Voro++ at http://math.lbl.gov/voro++/download
either as a tarball or via SVN, and unpack the

View File

@ -1,13 +1,12 @@
# Settings that the LAMMPS build will import when this package library is used
#
# settings for VTK-5.8.0 on RHEL/CentOS 6.x
vtk_SYSINC = -I/usr/include/vtk
vtk_SYSLIB = -lvtkCommon -lvtkIO
vtk_SYSPATH = -L/usr/lib64/vtk
#
# settings for VTK 6.2.0 on Fedora 23
#vtk_SYSINC = -I/usr/include/vtk
#vtk_SYSLIB = -lvtkCommonCore -lvtkIOCore -lvtkCommonDataModel -lvtkIOXML -lvtkIOLegacy -lvtkIOParallelXML
#vtk_SYSPATH = -L/usr/lib64/vtk
#

View File

@ -1,14 +1,15 @@
The Makefile.lammps file in this directory is used when building LAMMPS with
its USER-VTK package installed. The file has several settings needed to
compile and link LAMMPS with the VTK library. You should choose a
Makefile.lammps.* file compatible with your system and your version of VTK, and
copy it to Makefile.lammps before building LAMMPS itself. You may need to edit
one of the provided files to match your system.
The Makefile.lammps file in this directory is used when building
LAMMPS with its USER-VTK package installed. The file has several
settings needed to compile and link LAMMPS with the VTK library. You
should choose a Makefile.lammps.* file compatible with your system and
your version of VTK, and copy it to Makefile.lammps before building
LAMMPS itself. You may need to edit one of the provided files to
match your system.
If you create a new Makefile.lammps file suitable for some version of VTK on
some system, that is not a match to one of the provided Makefile.lammps.*
files, you can send it to the developers, and we can include it in the
distribution for others to use.
If you create a new Makefile.lammps file suitable for some version of
VTK on some system, that is not a match to one of the provided
Makefile.lammps.* files, you can send it to the developers, and we can
include it in the distribution for others to use.
To illustrate, these are example settings from the
Makefile.lammps.ubuntu14.04_vtk6 file:
@ -19,10 +20,11 @@ vtk_SYSPATH =
vtk_SYSINC refers to the include directory of the installed VTK library
vtk_SYSLIB refers to the libraries needed to link to from an application
(LAMMPS in this case) to "embed" VTK in the application. VTK consists of
multiple shared libraries which are needed when using the USER-VTK package.
vtk_SYSLIB refers to the libraries needed to link to from an
application (LAMMPS in this case) to "embed" VTK in the
application. VTK consists of multiple shared libraries which are
needed when using the USER-VTK package.
vtk_SYSPATH = refers to the path (e.g. -L/usr/local/lib) where the VTK library
can be found. You may not need this setting if the path is already included in
your LD_LIBRARY_PATH environment variable.
vtk_SYSPATH = refers to the path (e.g. -L/usr/local/lib) where the VTK
library can be found. You may not need this setting if the path is
already included in your LD_LIBRARY_PATH environment variable.

View File

@ -2294,12 +2294,12 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxComputeMulti2<NEIGHFLAG,EVF
int numbonds = d_bo_num[i];
e_lp = 0.0;
if (numbonds > 0)
if (numbonds > 0 || control->enobondsflag)
e_lp = p_lp2 * d_Delta_lp[i] * inv_expvd2;
const F_FLOAT dElp = p_lp2 * inv_expvd2 + 75.0 * p_lp2 * d_Delta_lp[i] * expvd2 * inv_expvd2*inv_expvd2;
const F_FLOAT CElp = dElp * d_dDelta_lp[i];
if (numbonds > 0)
if (numbonds > 0 || control->enobondsflag)
a_CdDelta[i] += CElp;
if (eflag) ev.ereax[0] += e_lp;
@ -2336,7 +2336,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxComputeMulti2<NEIGHFLAG,EVF
const F_FLOAT inv_exp_ovun8 = 1.0 / (1.0 + exp_ovun8);
e_un = 0;
if (numbonds > 0)
if (numbonds > 0 || control->enobondsflag)
e_un = -p_ovun5 * (1.0 - exp_ovun6) * inv_exp_ovun2n * inv_exp_ovun8;
if (eflag) ev.ereax[2] += e_un;
@ -2356,7 +2356,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxComputeMulti2<NEIGHFLAG,EVF
// multibody forces
a_CdDelta[i] += CEover3;
if (numbonds > 0)
if (numbonds > 0 || control->enobondsflag)
a_CdDelta[i] += CEunder3;
const int j_start = d_bo_first[i];

View File

@ -57,6 +57,10 @@ PairLJCharmmfswCoulLong::PairLJCharmmfswCoulLong(LAMMPS *lmp) : Pair(lmp)
implicit = 0;
mix_flag = ARITHMETIC;
writedata = 1;
// short-range/long-range flag accessed by DihedralCharmmfsw
dihedflag = 1;
}
/* ---------------------------------------------------------------------- */
@ -669,10 +673,6 @@ void PairLJCharmmfswCoulLong::settings(int narg, char **arg)
cut_lj = force->numeric(FLERR,arg[1]);
if (narg == 2) cut_coul = cut_lj;
else cut_coul = force->numeric(FLERR,arg[2]);
// indicates pair_style being used for dihedral_charmm
dihedflag = 1;
}
/* ----------------------------------------------------------------------

View File

@ -42,6 +42,10 @@ PairLJCharmmfswCoulCharmmfsh::PairLJCharmmfswCoulCharmmfsh(LAMMPS *lmp) :
implicit = 0;
mix_flag = ARITHMETIC;
writedata = 1;
// short-range/long-range flag accessed by DihedralCharmmfsw
dihedflag = 0;
}
/* ---------------------------------------------------------------------- */
@ -235,10 +239,6 @@ void PairLJCharmmfswCoulCharmmfsh::settings(int narg, char **arg)
} else {
cut_coul = force->numeric(FLERR,arg[2]);
}
// indicates pair_style being used for dihedral_charmm
dihedflag = 0;
}
/* ----------------------------------------------------------------------
@ -535,7 +535,7 @@ void *PairLJCharmmfswCoulCharmmfsh::extract(const char *str, int &dim)
dim = 0;
if (strcmp(str,"implicit") == 0) return (void *) &implicit;
// info extracted by dihedral_charmmf
// info extracted by dihedral_charmmfsw
if (strcmp(str,"cut_coul") == 0) return (void *) &cut_coul;
if (strcmp(str,"cut_lj_inner") == 0) return (void *) &cut_lj_inner;

View File

@ -46,39 +46,37 @@ endif
# PACKAGE = standard packages
# PACKUSER = user packagse
# PACKLIB = all packages that require an additional lib
# should be PACKSYS + PACKINT + PACKEXT
# PACKSYS = subset that reqiure a common system library
# include MPIIO and LB b/c require full MPI, not just STUBS
# PACKINT = subset that require an internal (provided) library
# PACKEXT = subset that require an external (downloaded) library
# PACKLIB = PACKSYS + PACKING + PACKEXT
# PACKSCRIPT = libs under lammps/lib that have an Install.py script
PACKAGE = asphere body class2 colloid compress coreshell dipole gpu \
granular kim kokkos kspace manybody mc meam misc molecule \
mpiio mscg opt peri poems \
python qeq reax replica rigid shock snap srd voronoi
PACKUSER = user-atc user-awpmd user-cgsdk user-cgdna user-colvars \
PACKUSER = user-atc user-awpmd user-cgdna user-cgsdk user-colvars \
user-diffraction user-dpd user-drude user-eff user-fep user-h5md \
user-intel user-lb user-manifold user-mgpt user-misc user-molfile \
user-nc-dump user-omp user-phonon user-qmmm user-qtb \
user-netcdf user-omp user-phonon user-qmmm user-qtb \
user-quip user-reaxc user-smd user-smtbq user-sph user-tally \
user-vtk
PACKLIB = compress gpu kim kokkos meam mpiio mscg poems \
python reax voronoi \
user-atc user-awpmd user-colvars user-h5md user-molfile \
user-nc-dump user-qmmm user-quip user-smd user-vtk
user-atc user-awpmd user-colvars user-h5md user-lb user-molfile \
user-netcdf user-qmmm user-quip user-smd user-vtk
PACKSYS = compress mpiio python
PACKSYS = compress mpiio python user-lb
PACKINT = gpu kokkos meam poems reax user-atc user-awpmd user-colvars
PACKEXT = kim mscg voronoi \
user-h5md user-molfile user-nc-dump user-qmmm user-quip \
user-h5md user-molfile user-netcdf user-qmmm user-quip \
user-smd user-vtk
PACKSCRIPT = voronoi
PACKALL = $(PACKAGE) $(PACKUSER)
PACKAGEUC = $(shell echo $(PACKAGE) | tr a-z A-Z)
@ -87,6 +85,7 @@ PACKUSERUC = $(shell echo $(PACKUSER) | tr a-z A-Z)
YESDIR = $(shell echo $(@:yes-%=%) | tr a-z A-Z)
NODIR = $(shell echo $(@:no-%=%) | tr a-z A-Z)
LIBDIR = $(shell echo $(@:lib-%=%))
LIBUSERDIR = $(shell echo $(@:lib-user-%=%))
# List of all targets
@ -108,7 +107,7 @@ help:
@echo 'make no-standard (no-std) remove all standard pkgs'
@echo 'make yes-user install all user pkgs'
@echo 'make no-user remove all user pkgs'
@echo 'make yes-lib install all pkgs with libs (incldued or ext)'
@echo 'make yes-lib install all pkgs with libs (included or ext)'
@echo 'make no-lib remove all pkgs with libs (included or ext)'
@echo 'make yes-ext install all pkgs with external libs'
@echo 'make no-ext remove all pkgs with external libs'
@ -273,7 +272,7 @@ package:
@echo 'make package-overwrite replace package files with src files'
@echo 'make package-diff (pd) diff src files against package file'
@echo ''
@echo 'make lib-package download/build/install a package library'
@echo 'make lib-package build and/or download a package library'
yes-all:
@for p in $(PACKALL); do $(MAKE) yes-$$p; done
@ -338,11 +337,14 @@ no-%:
# download/build/install a package library
lib-%:
@if [ ! -e ../lib/$(LIBDIR)/Install.py ]; then \
echo "Install script for lib $(@:lib-%=%) does not exist"; \
else \
echo "Installing lib for package $(@:lib-%=%)"; \
@if [ -e ../lib/$(LIBDIR)/Install.py ]; then \
echo "Installing lib $(@:lib-%=%)"; \
cd ../lib/$(LIBDIR); python Install.py $(args); \
elif [ -e ../lib/$(LIBUSERDIR)/Install.py ]; then \
echo "Installing lib $(@:lib-user-%=%)"; \
cd ../lib/$(LIBUSERDIR); python Install.py $(args); \
else \
echo "Install script for lib $(@:lib-%=%) does not exist"; \
fi;
# status = list src files that differ from package files

View File

@ -1419,12 +1419,14 @@ void FixShake::shake(int m)
domain->minimum_image(r01);
// s01 = distance vec after unconstrained update, with PBC
// use Domain::minimum_image_once(), not minimum_image()
// b/c xshake values might be huge, due to e.g. fix gcmc
double s01[3];
s01[0] = xshake[i0][0] - xshake[i1][0];
s01[1] = xshake[i0][1] - xshake[i1][1];
s01[2] = xshake[i0][2] - xshake[i1][2];
domain->minimum_image(s01);
domain->minimum_image_once(s01);
// scalar distances between atoms
@ -1526,18 +1528,20 @@ void FixShake::shake3(int m)
domain->minimum_image(r02);
// s01,s02 = distance vec after unconstrained update, with PBC
// use Domain::minimum_image_once(), not minimum_image()
// b/c xshake values might be huge, due to e.g. fix gcmc
double s01[3];
s01[0] = xshake[i0][0] - xshake[i1][0];
s01[1] = xshake[i0][1] - xshake[i1][1];
s01[2] = xshake[i0][2] - xshake[i1][2];
domain->minimum_image(s01);
domain->minimum_image_once(s01);
double s02[3];
s02[0] = xshake[i0][0] - xshake[i2][0];
s02[1] = xshake[i0][1] - xshake[i2][1];
s02[2] = xshake[i0][2] - xshake[i2][2];
domain->minimum_image(s02);
domain->minimum_image_once(s02);
// scalar distances between atoms
@ -1699,24 +1703,26 @@ void FixShake::shake4(int m)
domain->minimum_image(r03);
// s01,s02,s03 = distance vec after unconstrained update, with PBC
// use Domain::minimum_image_once(), not minimum_image()
// b/c xshake values might be huge, due to e.g. fix gcmc
double s01[3];
s01[0] = xshake[i0][0] - xshake[i1][0];
s01[1] = xshake[i0][1] - xshake[i1][1];
s01[2] = xshake[i0][2] - xshake[i1][2];
domain->minimum_image(s01);
domain->minimum_image_once(s01);
double s02[3];
s02[0] = xshake[i0][0] - xshake[i2][0];
s02[1] = xshake[i0][1] - xshake[i2][1];
s02[2] = xshake[i0][2] - xshake[i2][2];
domain->minimum_image(s02);
domain->minimum_image_once(s02);
double s03[3];
s03[0] = xshake[i0][0] - xshake[i3][0];
s03[1] = xshake[i0][1] - xshake[i3][1];
s03[2] = xshake[i0][2] - xshake[i3][2];
domain->minimum_image(s03);
domain->minimum_image_once(s03);
// scalar distances between atoms
@ -1941,24 +1947,26 @@ void FixShake::shake3angle(int m)
domain->minimum_image(r12);
// s01,s02,s12 = distance vec after unconstrained update, with PBC
// use Domain::minimum_image_once(), not minimum_image()
// b/c xshake values might be huge, due to e.g. fix gcmc
double s01[3];
s01[0] = xshake[i0][0] - xshake[i1][0];
s01[1] = xshake[i0][1] - xshake[i1][1];
s01[2] = xshake[i0][2] - xshake[i1][2];
domain->minimum_image(s01);
domain->minimum_image_once(s01);
double s02[3];
s02[0] = xshake[i0][0] - xshake[i2][0];
s02[1] = xshake[i0][1] - xshake[i2][1];
s02[2] = xshake[i0][2] - xshake[i2][2];
domain->minimum_image(s02);
domain->minimum_image_once(s02);
double s12[3];
s12[0] = xshake[i1][0] - xshake[i2][0];
s12[1] = xshake[i1][1] - xshake[i2][1];
s12[2] = xshake[i1][2] - xshake[i2][2];
domain->minimum_image(s12);
domain->minimum_image_once(s12);
// scalar distances between atoms
@ -2055,6 +2063,7 @@ void FixShake::shake3angle(int m)
double quad1,quad2,quad3,b1,b2,b3,lamda01_new,lamda02_new,lamda12_new;
while (!done && niter < max_iter) {
quad1 = quad1_0101 * lamda01*lamda01 +
quad1_0202 * lamda02*lamda02 +
quad1_1212 * lamda12*lamda12 +

View File

@ -48,7 +48,8 @@ ComputeSNAAtom::ComputeSNAAtom(LAMMPS *lmp, int narg, char **arg) :
diagonalstyle = 0;
rmin0 = 0.0;
switchflag = 1;
bzeroflag = 0;
bzeroflag = 1;
quadraticflag = 0;
// offset by 1 to match up with types
@ -106,6 +107,11 @@ ComputeSNAAtom::ComputeSNAAtom(LAMMPS *lmp, int narg, char **arg) :
error->all(FLERR,"Illegal compute sna/atom command");
bzeroflag = atoi(arg[iarg+1]);
iarg += 2;
} else if (strcmp(arg[iarg],"quadraticflag") == 0) {
if (iarg+2 > narg)
error->all(FLERR,"Illegal compute sna/atom command");
quadraticflag = atoi(arg[iarg+1]);
iarg += 2;
} else error->all(FLERR,"Illegal compute sna/atom command");
}
@ -122,8 +128,9 @@ ComputeSNAAtom::ComputeSNAAtom(LAMMPS *lmp, int narg, char **arg) :
}
ncoeff = snaptr[0]->ncoeff;
peratom_flag = 1;
size_peratom_cols = ncoeff;
if (quadraticflag) size_peratom_cols += ncoeff*ncoeff;
peratom_flag = 1;
nmax = 0;
njmax = 0;
@ -264,8 +271,16 @@ void ComputeSNAAtom::compute_peratom()
snaptr[tid]->copy_bi2bvec();
for (int icoeff = 0; icoeff < ncoeff; icoeff++)
sna[i][icoeff] = snaptr[tid]->bvec[icoeff];
if (quadraticflag) {
int ncount = ncoeff;
for (int icoeff = 0; icoeff < ncoeff; icoeff++) {
double bi = snaptr[tid]->bvec[icoeff];
for (int jcoeff = 0; jcoeff < ncoeff; jcoeff++)
sna[i][ncount++] = bi*snaptr[tid]->bvec[jcoeff];
}
}
} else {
for (int icoeff = 0; icoeff < ncoeff; icoeff++)
for (int icoeff = 0; icoeff < size_peratom_cols; icoeff++)
sna[i][icoeff] = 0.0;
}
}

View File

@ -44,7 +44,7 @@ class ComputeSNAAtom : public Compute {
double *wjelem;
class SNA** snaptr;
double cutmax;
int quadraticflag;
};
}

View File

@ -48,9 +48,11 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) :
diagonalstyle = 0;
rmin0 = 0.0;
switchflag = 1;
bzeroflag = 0;
bzeroflag = 1;
quadraticflag = 0;
// process required arguments
memory->create(radelem,ntypes+1,"sna/atom:radelem"); // offset by 1 to match up with types
memory->create(wjelem,ntypes+1,"sna/atom:wjelem");
rcutfac = atof(arg[3]);
@ -60,11 +62,15 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) :
radelem[i+1] = atof(arg[6+i]);
for(int i = 0; i < ntypes; i++)
wjelem[i+1] = atof(arg[6+ntypes+i]);
// construct cutsq
double cut;
cutmax = 0.0;
memory->create(cutsq,ntypes+1,ntypes+1,"sna/atom:cutsq");
for(int i = 1; i <= ntypes; i++) {
cut = 2.0*radelem[i]*rcutfac;
if (cut > cutmax) cutmax = cut;
cutsq[i][i] = cut*cut;
for(int j = i+1; j <= ntypes; j++) {
cut = (radelem[i]+radelem[j])*rcutfac;
@ -94,6 +100,11 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) :
error->all(FLERR,"Illegal compute snad/atom command");
switchflag = atoi(arg[iarg+1]);
iarg += 2;
} else if (strcmp(arg[iarg],"quadraticflag") == 0) {
if (iarg+2 > narg)
error->all(FLERR,"Illegal compute snad/atom command");
quadraticflag = atoi(arg[iarg+1]);
iarg += 2;
} else error->all(FLERR,"Illegal compute snad/atom command");
}
@ -110,9 +121,19 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) :
}
ncoeff = snaptr[0]->ncoeff;
peratom_flag = 1;
size_peratom_cols = 3*ncoeff*atom->ntypes;
twoncoeff = 2*ncoeff;
threencoeff = 3*ncoeff;
size_peratom_cols = threencoeff*atom->ntypes;
if (quadraticflag) {
ncoeffsq = ncoeff*ncoeff;
twoncoeffsq = 2*ncoeffsq;
threencoeffsq = 3*ncoeffsq;
size_peratom_cols +=
threencoeffsq*atom->ntypes;
}
comm_reverse = size_peratom_cols;
peratom_flag = 1;
nmax = 0;
njmax = 0;
snad = NULL;
@ -136,10 +157,9 @@ void ComputeSNADAtom::init()
{
if (force->pair == NULL)
error->all(FLERR,"Compute snad/atom requires a pair style be defined");
// TODO: Not sure what to do with this error check since cutoff radius is not
// a single number
//if (sqrt(cutsq) > force->pair->cutforce)
//error->all(FLERR,"Compute snad/atom cutoff is longer than pairwise cutoff");
if (cutmax > force->pair->cutforce)
error->all(FLERR,"Compute sna/atom cutoff is longer than pairwise cutoff");
// need an occasional full neighbor list
@ -228,7 +248,9 @@ void ComputeSNADAtom::compute_peratom()
const int* const jlist = firstneigh[i];
const int jnum = numneigh[i];
const int typeoffset = 3*ncoeff*(atom->type[i]-1);
const int typeoffset = threencoeff*(atom->type[i]-1);
const int quadraticoffset = threencoeff*atom->ntypes +
threencoeffsq*(atom->type[i]-1);
// insure rij, inside, and typej are of size jnum
@ -262,7 +284,11 @@ void ComputeSNADAtom::compute_peratom()
snaptr[tid]->compute_ui(ninside);
snaptr[tid]->compute_zi();
if (quadraticflag) {
snaptr[tid]->compute_bi();
snaptr[tid]->copy_bi2bvec();
}
for (int jj = 0; jj < ninside; jj++) {
const int j = snaptr[tid]->inside[jj];
snaptr[tid]->compute_duidrj(snaptr[tid]->rij[jj],
@ -279,11 +305,38 @@ void ComputeSNADAtom::compute_peratom()
for (int icoeff = 0; icoeff < ncoeff; icoeff++) {
snadi[icoeff] += snaptr[tid]->dbvec[icoeff][0];
snadi[icoeff+ncoeff] += snaptr[tid]->dbvec[icoeff][1];
snadi[icoeff+2*ncoeff] += snaptr[tid]->dbvec[icoeff][2];
snadi[icoeff+twoncoeff] += snaptr[tid]->dbvec[icoeff][2];
snadj[icoeff] -= snaptr[tid]->dbvec[icoeff][0];
snadj[icoeff+ncoeff] -= snaptr[tid]->dbvec[icoeff][1];
snadj[icoeff+2*ncoeff] -= snaptr[tid]->dbvec[icoeff][2];
snadj[icoeff+twoncoeff] -= snaptr[tid]->dbvec[icoeff][2];
}
if (quadraticflag) {
double *snadi = snad[i]+quadraticoffset;
double *snadj = snad[j]+quadraticoffset;
int ncount = 0;
for (int icoeff = 0; icoeff < ncoeff; icoeff++) {
double bi = snaptr[tid]->bvec[icoeff];
double bix = snaptr[tid]->dbvec[icoeff][0];
double biy = snaptr[tid]->dbvec[icoeff][1];
double biz = snaptr[tid]->dbvec[icoeff][2];
for (int jcoeff = 0; jcoeff < ncoeff; jcoeff++) {
double dbxtmp = bi*snaptr[tid]->dbvec[jcoeff][0]
+ bix*snaptr[tid]->bvec[jcoeff];
double dbytmp = bi*snaptr[tid]->dbvec[jcoeff][1]
+ biy*snaptr[tid]->bvec[jcoeff];
double dbztmp = bi*snaptr[tid]->dbvec[jcoeff][2]
+ biz*snaptr[tid]->bvec[jcoeff];
snadi[ncount] += dbxtmp;
snadi[ncount+ncoeffsq] += dbytmp;
snadi[ncount+twoncoeffsq] += dbztmp;
snadj[ncount] -= dbxtmp;
snadj[ncount+ncoeffsq] -= dbytmp;
snadj[ncount+twoncoeffsq] -= dbztmp;
ncount++;
}
}
}
}
}
}
@ -331,7 +384,8 @@ double ComputeSNADAtom::memory_usage()
double bytes = nmax*size_peratom_cols * sizeof(double);
bytes += 3*njmax*sizeof(double);
bytes += njmax*sizeof(int);
bytes += ncoeff*3;
bytes += threencoeff*atom->ntypes;
if (quadraticflag) bytes += threencoeffsq*atom->ntypes;
bytes += snaptr[0]->memory_usage()*comm->nthreads;
return bytes;
}

View File

@ -37,7 +37,7 @@ class ComputeSNADAtom : public Compute {
private:
int nmax, njmax, diagonalstyle;
int ncoeff;
int ncoeff, twoncoeff, threencoeff, ncoeffsq, twoncoeffsq, threencoeffsq;
double **cutsq;
class NeighList *list;
double **snad;
@ -45,7 +45,8 @@ class ComputeSNADAtom : public Compute {
double *radelem;
double *wjelem;
class SNA** snaptr;
double cutmax;
int quadraticflag;
};
}

View File

@ -38,8 +38,6 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) :
radelem = NULL;
wjelem = NULL;
nvirial = 6;
int ntypes = atom->ntypes;
int nargmin = 6+2*ntypes;
@ -50,9 +48,11 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) :
diagonalstyle = 0;
rmin0 = 0.0;
switchflag = 1;
bzeroflag = 0;
bzeroflag = 1;
quadraticflag = 0;
// process required arguments
memory->create(radelem,ntypes+1,"sna/atom:radelem"); // offset by 1 to match up with types
memory->create(wjelem,ntypes+1,"sna/atom:wjelem");
rcutfac = atof(arg[3]);
@ -96,6 +96,11 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) :
error->all(FLERR,"Illegal compute snav/atom command");
switchflag = atoi(arg[iarg+1]);
iarg += 2;
} else if (strcmp(arg[iarg],"quadraticflag") == 0) {
if (iarg+2 > narg)
error->all(FLERR,"Illegal compute snav/atom command");
quadraticflag = atoi(arg[iarg+1]);
iarg += 2;
} else error->all(FLERR,"Illegal compute snav/atom command");
}
@ -112,9 +117,24 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) :
}
ncoeff = snaptr[0]->ncoeff;
peratom_flag = 1;
size_peratom_cols = nvirial*ncoeff*atom->ntypes;
twoncoeff = 2*ncoeff;
threencoeff = 3*ncoeff;
fourncoeff = 4*ncoeff;
fivencoeff = 5*ncoeff;
sixncoeff = 6*ncoeff;
size_peratom_cols = sixncoeff*atom->ntypes;
if (quadraticflag) {
ncoeffsq = ncoeff*ncoeff;
twoncoeffsq = 2*ncoeffsq;
threencoeffsq = 3*ncoeffsq;
fourncoeffsq = 4*ncoeffsq;
fivencoeffsq = 5*ncoeffsq;
sixncoeffsq = 6*ncoeffsq;
size_peratom_cols +=
sixncoeffsq*atom->ntypes;
}
comm_reverse = size_peratom_cols;
peratom_flag = 1;
nmax = 0;
njmax = 0;
@ -231,7 +251,9 @@ void ComputeSNAVAtom::compute_peratom()
const int* const jlist = firstneigh[i];
const int jnum = numneigh[i];
const int typeoffset = nvirial*ncoeff*(atom->type[i]-1);
const int typeoffset = sixncoeff*(atom->type[i]-1);
const int quadraticoffset = sixncoeff*atom->ntypes +
sixncoeffsq*(atom->type[i]-1);
// insure rij, inside, and typej are of size jnum
@ -265,6 +287,10 @@ void ComputeSNAVAtom::compute_peratom()
snaptr[tid]->compute_ui(ninside);
snaptr[tid]->compute_zi();
if (quadraticflag) {
snaptr[tid]->compute_bi();
snaptr[tid]->copy_bi2bvec();
}
for (int jj = 0; jj < ninside; jj++) {
const int j = snaptr[tid]->inside[jj];
@ -281,19 +307,52 @@ void ComputeSNAVAtom::compute_peratom()
double *snavj = snav[j]+typeoffset;
for (int icoeff = 0; icoeff < ncoeff; icoeff++) {
snavi[icoeff] += snaptr[tid]->dbvec[icoeff][0]*xtmp;
snavi[icoeff+ncoeff] += snaptr[tid]->dbvec[icoeff][1]*ytmp;
snavi[icoeff+2*ncoeff] += snaptr[tid]->dbvec[icoeff][2]*ztmp;
snavi[icoeff+3*ncoeff] += snaptr[tid]->dbvec[icoeff][1]*ztmp;
snavi[icoeff+4*ncoeff] += snaptr[tid]->dbvec[icoeff][0]*ztmp;
snavi[icoeff+5*ncoeff] += snaptr[tid]->dbvec[icoeff][0]*ytmp;
snavj[icoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][0];
snavj[icoeff+ncoeff] -= snaptr[tid]->dbvec[icoeff][1]*x[j][1];
snavj[icoeff+2*ncoeff] -= snaptr[tid]->dbvec[icoeff][2]*x[j][2];
snavj[icoeff+3*ncoeff] -= snaptr[tid]->dbvec[icoeff][1]*x[j][2];
snavj[icoeff+4*ncoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][2];
snavj[icoeff+5*ncoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][1];
snavi[icoeff] += snaptr[tid]->dbvec[icoeff][0]*xtmp;
snavi[icoeff+ncoeff] += snaptr[tid]->dbvec[icoeff][1]*ytmp;
snavi[icoeff+twoncoeff] += snaptr[tid]->dbvec[icoeff][2]*ztmp;
snavi[icoeff+threencoeff] += snaptr[tid]->dbvec[icoeff][1]*ztmp;
snavi[icoeff+fourncoeff] += snaptr[tid]->dbvec[icoeff][0]*ztmp;
snavi[icoeff+fivencoeff] += snaptr[tid]->dbvec[icoeff][0]*ytmp;
snavj[icoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][0];
snavj[icoeff+ncoeff] -= snaptr[tid]->dbvec[icoeff][1]*x[j][1];
snavj[icoeff+twoncoeff] -= snaptr[tid]->dbvec[icoeff][2]*x[j][2];
snavj[icoeff+threencoeff] -= snaptr[tid]->dbvec[icoeff][1]*x[j][2];
snavj[icoeff+fourncoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][2];
snavj[icoeff+fivencoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][1];
}
if (quadraticflag) {
double *snavi = snav[i]+quadraticoffset;
double *snavj = snav[j]+quadraticoffset;
int ncount = 0;
for (int icoeff = 0; icoeff < ncoeff; icoeff++) {
double bi = snaptr[tid]->bvec[icoeff];
double bix = snaptr[tid]->dbvec[icoeff][0];
double biy = snaptr[tid]->dbvec[icoeff][1];
double biz = snaptr[tid]->dbvec[icoeff][2];
for (int jcoeff = 0; jcoeff < ncoeff; jcoeff++) {
double dbxtmp = bi*snaptr[tid]->dbvec[jcoeff][0]
+ bix*snaptr[tid]->bvec[jcoeff];
double dbytmp = bi*snaptr[tid]->dbvec[jcoeff][1]
+ biy*snaptr[tid]->bvec[jcoeff];
double dbztmp = bi*snaptr[tid]->dbvec[jcoeff][2]
+ biz*snaptr[tid]->bvec[jcoeff];
snavi[ncount] += dbxtmp*xtmp;
snavi[ncount+ncoeffsq] += dbytmp*ytmp;
snavi[ncount+twoncoeffsq] += dbztmp*ztmp;
snavi[ncount+threencoeffsq] += dbytmp*ztmp;
snavi[ncount+fourncoeffsq] += dbxtmp*ztmp;
snavi[ncount+fivencoeffsq] += dbxtmp*ytmp;
snavj[ncount] -= dbxtmp*x[j][0];
snavj[ncount+ncoeffsq] -= dbytmp*x[j][1];
snavj[ncount+twoncoeffsq] -= dbztmp*x[j][2];
snavj[ncount+threencoeffsq] -= dbytmp*x[j][2];
snavj[ncount+fourncoeffsq] -= dbxtmp*x[j][2];
snavj[ncount+fivencoeffsq] -= dbxtmp*x[j][1];
ncount++;
}
}
}
}
}
}
@ -341,7 +400,8 @@ double ComputeSNAVAtom::memory_usage()
double bytes = nmax*size_peratom_cols * sizeof(double);
bytes += 3*njmax*sizeof(double);
bytes += njmax*sizeof(int);
bytes += ncoeff*nvirial;
bytes += sixncoeff*atom->ntypes;
if (quadraticflag) bytes += sixncoeffsq*atom->ntypes;
bytes += snaptr[0]->memory_usage()*comm->nthreads;
return bytes;
}

View File

@ -37,16 +37,17 @@ class ComputeSNAVAtom : public Compute {
private:
int nmax, njmax, diagonalstyle;
int ncoeff,nvirial;
int ncoeff, twoncoeff, threencoeff, fourncoeff, fivencoeff, sixncoeff;
int ncoeffsq, twoncoeffsq, threencoeffsq, fourncoeffsq, fivencoeffsq, sixncoeffsq;
double **cutsq;
class NeighList *list;
double **snav;
double rcutfac;
double *radelem;
double *wjelem;
class SNA** snaptr;
double cutmax;
int quadraticflag;
};
}

View File

@ -1635,7 +1635,8 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename)
rmin0 = 0.0;
diagonalstyle = 3;
switchflag = 1;
bzeroflag = 0;
bzeroflag = 1;
// open SNAP parameter file on proc 0
FILE *fpparam;

View File

@ -1,7 +1,7 @@
USER-NC-DUMP
USER-NETCDF
============
This package provides the nc and (optionally) the nc/mpiio dump styles.
This package provides the netcf and netcdf/mpiio dump styles.
See the doc page for dump nc or dump nc/mpiio command for how to use them.
Compiling these dump styles requires having the netCDF library installed
on your system. See lib/netcdf/README for additional details.

View File

@ -32,14 +32,14 @@
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#if defined(LMP_HAS_NETCDF)
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <netcdf.h>
#include "dump_netcdf.h"
#include "atom.h"
#include "comm.h"
#include "compute.h"
@ -56,8 +56,6 @@
#include "variable.h"
#include "force.h"
#include "dump_nc.h"
using namespace LAMMPS_NS;
using namespace MathConst;
@ -91,7 +89,7 @@ const int THIS_IS_A_BIGINT = -4;
/* ---------------------------------------------------------------------- */
DumpNC::DumpNC(LAMMPS *lmp, int narg, char **arg) :
DumpNetCDF::DumpNetCDF(LAMMPS *lmp, int narg, char **arg) :
DumpCustom(lmp, narg, arg)
{
// arrays for data rearrangement
@ -224,7 +222,7 @@ DumpNC::DumpNC(LAMMPS *lmp, int narg, char **arg) :
/* ---------------------------------------------------------------------- */
DumpNC::~DumpNC()
DumpNetCDF::~DumpNetCDF()
{
closefile();
@ -238,7 +236,7 @@ DumpNC::~DumpNC()
/* ---------------------------------------------------------------------- */
void DumpNC::openfile()
void DumpNetCDF::openfile()
{
// now the computes and fixes have been initialized, so we can query
// for the size of vector quantities
@ -594,12 +592,12 @@ void DumpNC::openfile()
/* ---------------------------------------------------------------------- */
void DumpNC::closefile()
void DumpNetCDF::closefile()
{
if (filewriter && singlefile_opened) {
NCERR( nc_close(ncid) );
singlefile_opened = 0;
// append next time DumpNC::openfile is called
// append next time DumpNetCDF::openfile is called
append_flag = 1;
// write to next frame upon next open
framei++;
@ -608,7 +606,7 @@ void DumpNC::closefile()
/* ---------------------------------------------------------------------- */
void DumpNC::write()
void DumpNetCDF::write()
{
// open file
@ -678,7 +676,7 @@ void DumpNC::write()
/* ---------------------------------------------------------------------- */
void DumpNC::write_header(bigint n)
void DumpNetCDF::write_header(bigint n)
{
size_t start[2];
@ -753,7 +751,7 @@ void DumpNC::write_header(bigint n)
write head of block (mass & element name) only if has atoms of the type
------------------------------------------------------------------------- */
void DumpNC::write_data(int n, double *mybuf)
void DumpNetCDF::write_data(int n, double *mybuf)
{
size_t start[NC_MAX_VAR_DIMS], count[NC_MAX_VAR_DIMS];
ptrdiff_t stride[NC_MAX_VAR_DIMS];
@ -761,18 +759,17 @@ void DumpNC::write_data(int n, double *mybuf)
if (!int_buffer) {
n_buffer = n;
int_buffer = (int *)
memory->smalloc(n*sizeof(int), "DumpNC::int_buffer");
memory->smalloc(n*sizeof(int),"dump::int_buffer");
double_buffer = (double *)
memory->smalloc(n*sizeof(double), "DumpNC::double_buffer");
memory->smalloc(n*sizeof(double),"dump::double_buffer");
}
if (n > n_buffer) {
n_buffer = n;
int_buffer = (int *)
memory->srealloc(int_buffer, n*sizeof(int), "DumpNC::int_buffer");
memory->srealloc(int_buffer, n*sizeof(int),"dump::int_buffer");
double_buffer = (double *)
memory->srealloc(double_buffer, n*sizeof(double),
"DumpNC::double_buffer");
memory->srealloc(double_buffer, n*sizeof(double),"dump::double_buffer");
}
start[0] = framei-1;
@ -887,7 +884,7 @@ void DumpNC::write_data(int n, double *mybuf)
/* ---------------------------------------------------------------------- */
int DumpNC::modify_param(int narg, char **arg)
int DumpNetCDF::modify_param(int narg, char **arg)
{
int iarg = 0;
if (strcmp(arg[iarg],"double") == 0) {
@ -925,17 +922,17 @@ int DumpNC::modify_param(int narg, char **arg)
if (!strcmp(arg[iarg],"step")) {
perframe[i].type = THIS_IS_A_BIGINT;
perframe[i].compute = &DumpNC::compute_step;
perframe[i].compute = &DumpNetCDF::compute_step;
strcpy(perframe[i].name, arg[iarg]);
}
else if (!strcmp(arg[iarg],"elapsed")) {
perframe[i].type = THIS_IS_A_BIGINT;
perframe[i].compute = &DumpNC::compute_elapsed;
perframe[i].compute = &DumpNetCDF::compute_elapsed;
strcpy(perframe[i].name, arg[iarg]);
}
else if (!strcmp(arg[iarg],"elaplong")) {
perframe[i].type = THIS_IS_A_BIGINT;
perframe[i].compute = &DumpNC::compute_elapsed_long;
perframe[i].compute = &DumpNetCDF::compute_elapsed_long;
strcpy(perframe[i].name, arg[iarg]);
}
else {
@ -1036,7 +1033,7 @@ int DumpNC::modify_param(int narg, char **arg)
/* ---------------------------------------------------------------------- */
void DumpNC::write_prmtop()
void DumpNetCDF::write_prmtop()
{
char fn[1024];
char tmp[81];
@ -1098,7 +1095,7 @@ void DumpNC::write_prmtop()
/* ---------------------------------------------------------------------- */
void DumpNC::ncerr(int err, const char *descr, int line)
void DumpNetCDF::ncerr(int err, const char *descr, int line)
{
if (err != NC_NOERR) {
char errstr[1024];
@ -1122,21 +1119,21 @@ void DumpNC::ncerr(int err, const char *descr, int line)
customize a new keyword by adding a method
------------------------------------------------------------------------- */
void DumpNC::compute_step(void *r)
void DumpNetCDF::compute_step(void *r)
{
*((bigint *) r) = update->ntimestep;
}
/* ---------------------------------------------------------------------- */
void DumpNC::compute_elapsed(void *r)
void DumpNetCDF::compute_elapsed(void *r)
{
*((bigint *) r) = update->ntimestep - update->firststep;
}
/* ---------------------------------------------------------------------- */
void DumpNC::compute_elapsed_long(void *r)
void DumpNetCDF::compute_elapsed_long(void *r)
{
*((bigint *) r) = update->ntimestep - update->beginstep;
}

View File

@ -32,16 +32,17 @@
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#if defined(LMP_HAS_NETCDF)
#ifdef DUMP_CLASS
DumpStyle(nc,DumpNC)
DumpStyle(netcdf,DumpNetCDF)
#else
#ifndef LMP_DUMP_NC_H
#define LMP_DUMP_NC_H
#ifndef LMP_DUMP_NETCDF_H
#define LMP_DUMP_NETCDFC_H
#include "dump_custom.h"
@ -50,10 +51,10 @@ namespace LAMMPS_NS {
const int NC_FIELD_NAME_MAX = 100;
const int DUMP_NC_MAX_DIMS = 100;
class DumpNC : public DumpCustom {
class DumpNetCDF : public DumpCustom {
public:
DumpNC(class LAMMPS *, int, char **);
virtual ~DumpNC();
DumpNetCDF(class LAMMPS *, int, char **);
virtual ~DumpNetCDF();
virtual void write();
private:
@ -68,7 +69,7 @@ class DumpNC : public DumpCustom {
int ndumped; // number of enties written for this prop.
};
typedef void (DumpNC::*funcptr_t)(void *);
typedef void (DumpNetCDF::*funcptr_t)(void *);
// per-frame quantities (variables, fixes or computes)
struct nc_perframe_t {

View File

@ -32,14 +32,14 @@
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#if defined(LMP_HAS_PNETCDF)
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <pnetcdf.h>
#include "dump_netcdf_mpiio.h"
#include "atom.h"
#include "comm.h"
#include "compute.h"
@ -56,8 +56,6 @@
#include "variable.h"
#include "force.h"
#include "dump_nc_mpiio.h"
using namespace LAMMPS_NS;
using namespace MathConst;
@ -91,7 +89,7 @@ const int THIS_IS_A_BIGINT = -4;
/* ---------------------------------------------------------------------- */
DumpNCMPIIO::DumpNCMPIIO(LAMMPS *lmp, int narg, char **arg) :
DumpNetCDFMPIIO::DumpNetCDFMPIIO(LAMMPS *lmp, int narg, char **arg) :
DumpCustom(lmp, narg, arg)
{
// arrays for data rearrangement
@ -217,7 +215,7 @@ DumpNCMPIIO::DumpNCMPIIO(LAMMPS *lmp, int narg, char **arg) :
/* ---------------------------------------------------------------------- */
DumpNCMPIIO::~DumpNCMPIIO()
DumpNetCDFMPIIO::~DumpNetCDFMPIIO()
{
closefile();
@ -231,7 +229,7 @@ DumpNCMPIIO::~DumpNCMPIIO()
/* ---------------------------------------------------------------------- */
void DumpNCMPIIO::openfile()
void DumpNetCDFMPIIO::openfile()
{
// now the computes and fixes have been initialized, so we can query
// for the size of vector quantities
@ -570,12 +568,12 @@ void DumpNCMPIIO::openfile()
/* ---------------------------------------------------------------------- */
void DumpNCMPIIO::closefile()
void DumpNetCDFMPIIO::closefile()
{
if (singlefile_opened) {
NCERR( ncmpi_close(ncid) );
singlefile_opened = 0;
// append next time DumpNCMPIIO::openfile is called
// append next time DumpNetCDFMPIIO::openfile is called
append_flag = 1;
// write to next frame upon next open
framei++;
@ -584,7 +582,7 @@ void DumpNCMPIIO::closefile()
/* ---------------------------------------------------------------------- */
void DumpNCMPIIO::write()
void DumpNetCDFMPIIO::write()
{
// open file
@ -687,7 +685,7 @@ void DumpNCMPIIO::write()
/* ---------------------------------------------------------------------- */
void DumpNCMPIIO::write_time_and_cell()
void DumpNetCDFMPIIO::write_time_and_cell()
{
MPI_Offset start[2];
@ -759,7 +757,7 @@ void DumpNCMPIIO::write_time_and_cell()
write head of block (mass & element name) only if has atoms of the type
------------------------------------------------------------------------- */
void DumpNCMPIIO::write_data(int n, double *mybuf)
void DumpNetCDFMPIIO::write_data(int n, double *mybuf)
{
MPI_Offset start[NC_MAX_VAR_DIMS], count[NC_MAX_VAR_DIMS];
MPI_Offset stride[NC_MAX_VAR_DIMS];
@ -767,19 +765,18 @@ void DumpNCMPIIO::write_data(int n, double *mybuf)
if (!int_buffer) {
n_buffer = std::max(1, n);
int_buffer = (int *)
memory->smalloc(n_buffer*sizeof(int), "DumpNCMPIIO::int_buffer");
memory->smalloc(n_buffer*sizeof(int),"dump::int_buffer");
double_buffer = (double *)
memory->smalloc(n_buffer*sizeof(double), "DumpNCMPIIO::double_buffer");
memory->smalloc(n_buffer*sizeof(double),"dump::double_buffer");
}
if (n > n_buffer) {
n_buffer = std::max(1, n);
int_buffer = (int *)
memory->srealloc(int_buffer, n_buffer*sizeof(int),
"DumpNCMPIIO::int_buffer");
memory->srealloc(int_buffer, n_buffer*sizeof(int),"dump::int_buffer");
double_buffer = (double *)
memory->srealloc(double_buffer, n_buffer*sizeof(double),
"DumpNCMPIIO::double_buffer");
"dump::double_buffer");
}
start[0] = framei-1;
@ -882,7 +879,7 @@ void DumpNCMPIIO::write_data(int n, double *mybuf)
/* ---------------------------------------------------------------------- */
int DumpNCMPIIO::modify_param(int narg, char **arg)
int DumpNetCDFMPIIO::modify_param(int narg, char **arg)
{
int iarg = 0;
if (strcmp(arg[iarg],"double") == 0) {
@ -920,17 +917,17 @@ int DumpNCMPIIO::modify_param(int narg, char **arg)
if (!strcmp(arg[iarg],"step")) {
perframe[i].type = THIS_IS_A_BIGINT;
perframe[i].compute = &DumpNCMPIIO::compute_step;
perframe[i].compute = &DumpNetCDFMPIIO::compute_step;
strcpy(perframe[i].name, arg[iarg]);
}
else if (!strcmp(arg[iarg],"elapsed")) {
perframe[i].type = THIS_IS_A_BIGINT;
perframe[i].compute = &DumpNCMPIIO::compute_elapsed;
perframe[i].compute = &DumpNetCDFMPIIO::compute_elapsed;
strcpy(perframe[i].name, arg[iarg]);
}
else if (!strcmp(arg[iarg],"elaplong")) {
perframe[i].type = THIS_IS_A_BIGINT;
perframe[i].compute = &DumpNCMPIIO::compute_elapsed_long;
perframe[i].compute = &DumpNetCDFMPIIO::compute_elapsed_long;
strcpy(perframe[i].name, arg[iarg]);
}
else {
@ -1031,7 +1028,7 @@ int DumpNCMPIIO::modify_param(int narg, char **arg)
/* ---------------------------------------------------------------------- */
void DumpNCMPIIO::ncerr(int err, const char *descr, int line)
void DumpNetCDFMPIIO::ncerr(int err, const char *descr, int line)
{
if (err != NC_NOERR) {
char errstr[1024];
@ -1055,21 +1052,21 @@ void DumpNCMPIIO::ncerr(int err, const char *descr, int line)
customize a new keyword by adding a method
------------------------------------------------------------------------- */
void DumpNCMPIIO::compute_step(void *r)
void DumpNetCDFMPIIO::compute_step(void *r)
{
*((bigint *) r) = update->ntimestep;
}
/* ---------------------------------------------------------------------- */
void DumpNCMPIIO::compute_elapsed(void *r)
void DumpNetCDFMPIIO::compute_elapsed(void *r)
{
*((bigint *) r) = update->ntimestep - update->firststep;
}
/* ---------------------------------------------------------------------- */
void DumpNCMPIIO::compute_elapsed_long(void *r)
void DumpNetCDFMPIIO::compute_elapsed_long(void *r)
{
*((bigint *) r) = update->ntimestep - update->beginstep;
}

View File

@ -32,16 +32,17 @@
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#if defined(LMP_HAS_PNETCDF)
#ifdef DUMP_CLASS
DumpStyle(nc/mpiio,DumpNCMPIIO)
DumpStyle(netcdf/mpiio,DumpNetCDFMPIIO)
#else
#ifndef LMP_DUMP_NC_MPIIO_H
#define LMP_DUMP_NC_MPIIO_H
#ifndef LMP_DUMP_NETCDF_MPIIO_H
#define LMP_DUMP_NETCDF_MPIIO_H
#include "dump_custom.h"
@ -50,10 +51,10 @@ namespace LAMMPS_NS {
const int NC_MPIIO_FIELD_NAME_MAX = 100;
const int DUMP_NC_MPIIO_MAX_DIMS = 100;
class DumpNCMPIIO : public DumpCustom {
class DumpNetCDFMPIIO : public DumpCustom {
public:
DumpNCMPIIO(class LAMMPS *, int, char **);
virtual ~DumpNCMPIIO();
DumpNetCDFMPIIO(class LAMMPS *, int, char **);
virtual ~DumpNetCDFMPIIO();
virtual void write();
private:

View File

@ -24,7 +24,7 @@
#include "reaxc_defs.h"
#include "reaxc_types.h"
#include "pair_reax_c.h"
#include "pair_reaxc.h"
using namespace LAMMPS_NS;
@ -71,7 +71,7 @@ ComputeSpecAtom::ComputeSpecAtom(LAMMPS *lmp, int narg, char **arg) :
} else if (strcmp(arg[iarg],"vz") == 0) {
pack_choice[i] = &ComputeSpecAtom::pack_vz;
// from pair_reax_c
// from pair_reaxc
} else if (strcmp(arg[iarg],"abo01") == 0) {
pack_choice[i] = &ComputeSpecAtom::pack_abo01;
} else if (strcmp(arg[iarg],"abo02") == 0) {

View File

@ -23,7 +23,7 @@
#include <stdlib.h>
#include <string.h>
#include "fix_qeq_reax.h"
#include "pair_reax_c.h"
#include "pair_reaxc.h"
#include "atom.h"
#include "comm.h"
#include "domain.h"

View File

@ -21,7 +21,7 @@
Algorithmic Techniques", Parallel Computing, in press.
------------------------------------------------------------------------- */
#include "fix_reax_c.h"
#include "fix_reaxc.h"
#include "atom.h"
#include "pair.h"
#include "comm.h"

View File

@ -21,7 +21,7 @@
#include "fix_reaxc_bonds.h"
#include "atom.h"
#include "update.h"
#include "pair_reax_c.h"
#include "pair_reaxc.h"
#include "modify.h"
#include "neighbor.h"
#include "neigh_list.h"

View File

@ -24,7 +24,7 @@
#include "fix_reaxc_species.h"
#include "domain.h"
#include "update.h"
#include "pair_reax_c.h"
#include "pair_reaxc.h"
#include "modify.h"
#include "neighbor.h"
#include "neigh_list.h"

View File

@ -23,7 +23,7 @@ FixStyle(reax/c/species,FixReaxCSpecies)
#include "fix.h"
#include "pointers.h"
#include "pair_reax_c.h"
#include "pair_reaxc.h"
#include "reaxc_types.h"
#include "reaxc_defs.h"

View File

@ -20,7 +20,7 @@
Hybrid and hybrid/overlay compatibility added by Ray Shan (Sandia)
------------------------------------------------------------------------- */
#include "pair_reax_c.h"
#include "pair_reaxc.h"
#include "atom.h"
#include "update.h"
#include "force.h"
@ -30,7 +30,7 @@
#include "neigh_request.h"
#include "modify.h"
#include "fix.h"
#include "fix_reax_c.h"
#include "fix_reaxc.h"
#include "citeme.h"
#include "memory.h"
#include "error.h"
@ -223,10 +223,11 @@ void PairReaxC::settings(int narg, char **arg)
qeqflag = 1;
control->lgflag = 0;
control->enobondsflag = 1;
system->mincap = MIN_CAP;
system->safezone = SAFE_ZONE;
system->saferzone = SAFER_ZONE;
// process optional keywords
int iarg = 1;
@ -238,7 +239,13 @@ void PairReaxC::settings(int narg, char **arg)
else if (strcmp(arg[iarg+1],"no") == 0) qeqflag = 0;
else error->all(FLERR,"Illegal pair_style reax/c command");
iarg += 2;
} else if (strcmp(arg[iarg],"lgvdw") == 0) {
} else if (strcmp(arg[iarg],"enobonds") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal pair_style reax/c command");
if (strcmp(arg[iarg+1],"yes") == 0) control->enobondsflag = 1;
else if (strcmp(arg[iarg+1],"no") == 0) control->enobondsflag = 0;
else error->all(FLERR,"Illegal pair_style reax/c command");
iarg += 2;
} else if (strcmp(arg[iarg],"lgvdw") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal pair_style reax/c command");
if (strcmp(arg[iarg+1],"yes") == 0) control->lgflag = 1;
else if (strcmp(arg[iarg+1],"no") == 0) control->lgflag = 0;

View File

@ -24,7 +24,7 @@
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
#include "pair_reax_c.h"
#include "pair_reaxc.h"
#include "reaxc_allocate.h"
#include "reaxc_list.h"
#include "reaxc_reset_tools.h"

View File

@ -24,7 +24,7 @@
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
#include "pair_reax_c.h"
#include "pair_reaxc.h"
#include "reaxc_types.h"
#include "reaxc_bond_orders.h"
#include "reaxc_list.h"

View File

@ -24,7 +24,7 @@
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
#include "pair_reax_c.h"
#include "pair_reaxc.h"
#include "reaxc_bonds.h"
#include "reaxc_bond_orders.h"
#include "reaxc_list.h"

View File

@ -24,7 +24,7 @@
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
#include "pair_reax_c.h"
#include "pair_reaxc.h"
#include "reaxc_control.h"
#include "reaxc_tool_box.h"

View File

@ -116,8 +116,8 @@
#define MAX_BOND 20
#define MAXREAXBOND 24 /* used in fix_reaxc_bonds.cpp and pair_reax_c.cpp */
#define MAXSPECBOND 24 /* used in fix_reaxc_species.cpp and pair_reax_c.cpp */
#define MAXREAXBOND 24 /* used in fix_reaxc_bonds.cpp and pair_reaxc.cpp */
#define MAXSPECBOND 24 /* used in fix_reaxc_species.cpp and pair_reaxc.cpp */
/******************* ENUMERATIONS *************************/
enum geo_formats { CUSTOM, PDB, ASCII_RESTART, BINARY_RESTART, GF_N };

View File

@ -24,7 +24,7 @@
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
#include "pair_reax_c.h"
#include "pair_reaxc.h"
#include "error.h"
#include "reaxc_ffield.h"
#include "reaxc_tool_box.h"

View File

@ -24,7 +24,7 @@
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
#include "pair_reax_c.h"
#include "pair_reaxc.h"
#include "reaxc_forces.h"
#include "reaxc_bond_orders.h"
#include "reaxc_bonds.h"

View File

@ -24,7 +24,7 @@
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
#include "pair_reax_c.h"
#include "pair_reaxc.h"
#include "reaxc_hydrogen_bonds.h"
#include "reaxc_bond_orders.h"
#include "reaxc_list.h"

View File

@ -24,7 +24,7 @@
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
#include "pair_reax_c.h"
#include "pair_reaxc.h"
#include "reaxc_init_md.h"
#include "reaxc_allocate.h"
#include "reaxc_forces.h"

View File

@ -24,7 +24,7 @@
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
#include "pair_reax_c.h"
#include "pair_reaxc.h"
#include "update.h"
#include "reaxc_io_tools.h"
#include "reaxc_list.h"

View File

@ -24,7 +24,7 @@
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
#include "pair_reax_c.h"
#include "pair_reaxc.h"
#include "reaxc_list.h"
#include "reaxc_tool_box.h"

View File

@ -24,7 +24,7 @@
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
#include "pair_reax_c.h"
#include "pair_reaxc.h"
#include "reaxc_lookup.h"
#include "reaxc_nonbonded.h"
#include "reaxc_tool_box.h"

View File

@ -24,7 +24,7 @@
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
#include "pair_reax_c.h"
#include "pair_reaxc.h"
#include "reaxc_multi_body.h"
#include "reaxc_bond_orders.h"
#include "reaxc_list.h"
@ -79,7 +79,7 @@ void Atom_Energy( reax_system *system, control_params *control,
numbonds ++;
/* calculate the energy */
if (numbonds > 0)
if (numbonds > 0 || control->enobondsflag)
data->my_en.e_lp += e_lp =
p_lp2 * workspace->Delta_lp[i] * inv_expvd2;
@ -87,7 +87,8 @@ void Atom_Energy( reax_system *system, control_params *control,
75 * p_lp2 * workspace->Delta_lp[i] * expvd2 * SQR(inv_expvd2);
CElp = dElp * workspace->dDelta_lp[i];
if (numbonds > 0) workspace->CdDelta[i] += CElp; // lp - 1st term
if (numbonds > 0 || control->enobondsflag)
workspace->CdDelta[i] += CElp; // lp - 1st term
/* tally into per-atom energy */
if( system->pair_ptr->evflag)
@ -187,7 +188,7 @@ void Atom_Energy( reax_system *system, control_params *control,
for( pj = Start_Index(i, bonds); pj < End_Index(i, bonds); ++pj )
numbonds ++;
if (numbonds > 0)
if (numbonds > 0 || control->enobondsflag)
data->my_en.e_un += e_un =
-p_ovun5 * (1.0 - exp_ovun6) * inv_exp_ovun2n * inv_exp_ovun8;
@ -202,13 +203,15 @@ void Atom_Energy( reax_system *system, control_params *control,
/* tally into per-atom energy */
if( system->pair_ptr->evflag) {
eng_tmp = e_ov;
if (numbonds > 0) eng_tmp += e_un;
if (numbonds > 0 || control->enobondsflag)
eng_tmp += e_un;
system->pair_ptr->ev_tally(i,i,system->n,1,eng_tmp,0.0,0.0,0.0,0.0,0.0);
}
/* forces */
workspace->CdDelta[i] += CEover3; // OvCoor - 2nd term
if (numbonds > 0) workspace->CdDelta[i] += CEunder3; // UnCoor - 1st term
if (numbonds > 0 || control->enobondsflag)
workspace->CdDelta[i] += CEunder3; // UnCoor - 1st term
for( pj = Start_Index(i, bonds); pj < End_Index(i, bonds); ++pj ) {
pbond = &(bonds->select.bond_list[pj]);

View File

@ -24,7 +24,7 @@
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
#include "pair_reax_c.h"
#include "pair_reaxc.h"
#include "reaxc_types.h"
#include "reaxc_nonbonded.h"
#include "reaxc_bond_orders.h"

Some files were not shown because too many files have changed in this diff Show More