forked from lijiext/lammps
Merge remote-tracking branch 'origin/master' into collected_small_changes
This commit is contained in:
commit
025489ec2c
|
@ -269,6 +269,7 @@ endif()
|
|||
set(ENABLE_IWYU OFF CACHE BOOL "Add 'iwyu' build target to call the include-what-you-use tool")
|
||||
mark_as_advanced(ENABLE_IWYU)
|
||||
if(ENABLE_IWYU)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
find_program(IWYU_EXE NAMES include-what-you-use iwyu)
|
||||
find_program(IWYU_TOOL NAMES iwyu_tool iwyu-tool iwyu_tool.py)
|
||||
if (IWYU_EXE AND IWYU_TOOL)
|
||||
|
@ -730,7 +731,7 @@ get_target_property(DEFINES lammps COMPILE_DEFINITIONS)
|
|||
include(FeatureSummary)
|
||||
feature_summary(DESCRIPTION "The following tools and libraries have been found and configured:" WHAT PACKAGES_FOUND)
|
||||
message(STATUS "<<< Build configuration >>>
|
||||
Operating System: ${CMAKE_SYSTEM_NAME}
|
||||
Operating System: ${CMAKE_SYSTEM_NAME} ${CMAKE_LINUX_DISTRO} ${CMAKE_DISTRO_VERSION}
|
||||
Build type: ${CMAKE_BUILD_TYPE}
|
||||
Install path: ${CMAKE_INSTALL_PREFIX}
|
||||
Generator: ${CMAKE_GENERATOR} using ${CMAKE_MAKE_PROGRAM}")
|
||||
|
|
|
@ -104,3 +104,13 @@ function(FetchPotentials pkgfolder potfolder)
|
|||
endforeach()
|
||||
endif()
|
||||
endfunction(FetchPotentials)
|
||||
|
||||
# set CMAKE_LINUX_DISTRO and CMAKE_DISTRO_VERSION on Linux
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL Linux) AND (EXISTS /etc/os-release))
|
||||
file(STRINGS /etc/os-release distro REGEX "^NAME=")
|
||||
string(REGEX REPLACE "NAME=\"?([^\"]*)\"?" "\\1" distro "${distro}")
|
||||
file(STRINGS /etc/os-release disversion REGEX "^VERSION_ID=")
|
||||
string(REGEX REPLACE "VERSION_ID=\"?([^\"]*)\"?" "\\1" disversion "${disversion}")
|
||||
set(CMAKE_LINUX_DISTRO ${distro})
|
||||
set(CMAKE_DISTRO_VERSION ${disversion})
|
||||
endif()
|
||||
|
|
|
@ -54,8 +54,9 @@ if(DOWNLOAD_PLUMED)
|
|||
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/libplumedWrapper.a")
|
||||
endif()
|
||||
|
||||
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.7.0/plumed-src-2.7.0.tgz" CACHE STRING "URL for PLUMED tarball")
|
||||
set(PLUMED_MD5 "95f29dd0c067577f11972ff90dfc7d12" CACHE STRING "MD5 checksum of PLUMED tarball")
|
||||
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.7.1/plumed-src-2.7.1.tgz" CACHE STRING "URL for PLUMED tarball")
|
||||
set(PLUMED_MD5 "4eac6a462ec84dfe0cec96c82421b8e8" CACHE STRING "MD5 checksum of PLUMED tarball")
|
||||
|
||||
mark_as_advanced(PLUMED_URL)
|
||||
mark_as_advanced(PLUMED_MD5)
|
||||
|
||||
|
|
|
@ -16,11 +16,14 @@ if(ENABLE_TESTING)
|
|||
set(MEMORYCHECK_COMMAND "${VALGRIND_BINARY}" CACHE FILEPATH "Memory Check Command")
|
||||
set(MEMORYCHECK_COMMAND_OPTIONS "${VALGRIND_DEFAULT_OPTIONS}" CACHE STRING "Memory Check Command Options")
|
||||
|
||||
# check if a faster linker is available.
|
||||
# only verified with GNU and Clang compilers and new CMake
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
|
||||
if((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
||||
OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
|
||||
# we need to build and link a LOT of tester executables, so it is worth checking if
|
||||
# a faster linker is available. requires GNU or Clang compiler, newer CMake.
|
||||
# also only verified with Fedora Linux > 30 and Ubuntu <= 18.04 (Ubuntu 20.04 fails)
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL Linux) AND (CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
|
||||
AND ((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
||||
OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")))
|
||||
if (((CMAKE_LINUX_DISTRO STREQUAL Ubuntu) AND (CMAKE_DISTRO_VERSION VERSION_LESS_EQUAL 18.04))
|
||||
OR ((CMAKE_LINUX_DISTRO STREQUAL Fedora) AND (CMAKE_DISTRO_VERSION VERSION_GREATER 30)))
|
||||
include(CheckCXXCompilerFlag)
|
||||
set(CMAKE_CUSTOM_LINKER_DEFAULT default)
|
||||
check_cxx_compiler_flag(-fuse-ld=lld HAVE_LLD_LINKER_FLAG)
|
||||
|
|
|
@ -18,8 +18,8 @@ digraph lammps {
|
|||
Up [shape=box label="Update" color=blue]
|
||||
Un [shape=box label="Universe" color=blue]
|
||||
Ti [shape=box label="Timer" color=blue]
|
||||
Lt [label="Lattice"]
|
||||
Rg [label="Region" color=red]
|
||||
Lt [label="Lattice"]
|
||||
Rb [shape=box label="RegionBlock"]
|
||||
Rs [shape=box label="RegionSphere"]
|
||||
Av [label="AtomVec" color=red]
|
||||
|
@ -34,6 +34,7 @@ digraph lammps {
|
|||
Du [label="Dump" color=red]
|
||||
Fi [label="Fix" color=red]
|
||||
Cp [label="Compute" color=red]
|
||||
Cm [label="Command" color=red]
|
||||
Th [label="Thermo"]
|
||||
Va [label="Variable"]
|
||||
Ew [shape=box label="Ewald"]
|
||||
|
@ -71,16 +72,19 @@ digraph lammps {
|
|||
Dg [shape=box label="DumpCFG"]
|
||||
Ve [shape=box label="Verlet"]
|
||||
Rr [shape=box label="Respa"]
|
||||
Ru [shape=box label="Run"]
|
||||
Se [shape=box label="Set"]
|
||||
Pt [shape=box label="PPPMTIP4P"]
|
||||
Vs [shape=box label="VerletSplit"]
|
||||
Ro [shape=box label="RespaOMP"]
|
||||
Mc [shape=box label="MinCG"]
|
||||
Mf [shape=box label="MinFire"]
|
||||
La -> {At Ci Co Do Er Fo Gr In Me Mo Ne Ou Ti Up Un} [penwidth=2]
|
||||
Do -> {Lt Rg} [penwidth=2]
|
||||
Do -> {Rg Lt} [penwidth=2]
|
||||
Rg -> {Rb Rs} [style=dashed penwidth=2]
|
||||
Co -> {Cb Ct} [style=dashed penwidth=2]
|
||||
In -> Va [penwidth=2]
|
||||
In -> {Va Cm} [penwidth=2]
|
||||
Cm -> {Ru Se} [style=dashed penwidth=2]
|
||||
Mo -> {Fi Cp} [penwidth=2]
|
||||
Fo -> {Pa Bo An Di Im Ks} [penwidth=2]
|
||||
Ks -> {Ew Pp} [style=dashed penwidth=2]
|
||||
|
|
|
@ -1253,8 +1253,8 @@ be built for the most part with all major versions of the C++ language.
|
|||
USER-PACE package
|
||||
-----------------------------
|
||||
|
||||
This package requires a library that can be downloaded and built
|
||||
in lib/pace or somewhere else, which must be done before building
|
||||
This package requires a library that can be downloaded and built
|
||||
in lib/pace or somewhere else, which must be done before building
|
||||
LAMMPS with this package. The code for the library can be found
|
||||
at: `https://github.com/ICAMS/lammps-user-pace/ <https://github.com/ICAMS/lammps-user-pace/>`_
|
||||
|
||||
|
@ -1276,8 +1276,8 @@ at: `https://github.com/ICAMS/lammps-user-pace/ <https://github.com/ICAMS/lammps
|
|||
.. tab:: Traditional make
|
||||
|
||||
You can download and build the USER-PACE library
|
||||
in one step from the ``lammps/src`` dir, using these commands,
|
||||
which invoke the ``lib/pace/Install.py`` script.
|
||||
in one step from the ``lammps/src`` dir, using these commands,
|
||||
which invoke the ``lib/pace/Install.py`` script.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
|
|
@ -49,8 +49,8 @@ underscore character '_' to separate words. Outside of bundled libraries
|
|||
which may have different conventions, all C and C++ header files have a
|
||||
``.h`` extension, all C++ files have a ``.cpp`` extension, and C files a
|
||||
``.c`` extension. A small number of C++ classes and utility functions
|
||||
are implemented with only a ``.h`` file. Examples are the Pointer class
|
||||
or the MathVec functions.
|
||||
are implemented with only a ``.h`` file. Examples are the Pointers and
|
||||
Commands classes or the MathVec functions.
|
||||
|
||||
Class topology
|
||||
--------------
|
||||
|
@ -144,7 +144,7 @@ implement specific commands that can be invoked before, after, or in
|
|||
between runs. For these an instance of the class is created, its
|
||||
command() method called and then, after completion, the class instance
|
||||
deleted. Examples for this are the create_box, create_atoms, minimize,
|
||||
run, or velocity command styles.
|
||||
run, set, or velocity command styles.
|
||||
|
||||
For all those ``styles`` certain naming conventions are employed: for
|
||||
the fix nve command the class is called FixNVE and the source files are
|
||||
|
@ -175,11 +175,11 @@ follows:
|
|||
- The Input class reads and processes input input strings and files,
|
||||
stores variables, and invokes :doc:`commands <Commands_all>`.
|
||||
|
||||
- As discussed above, command style classes are directly derived from
|
||||
the Pointers class. They provide input script commands that perform
|
||||
one-time operations before/after/between simulations or which invoke a
|
||||
simulation. They are instantiated from within the Input class,
|
||||
invoked, then immediately destructed.
|
||||
- Command style classes are derived from the Command class. They provide
|
||||
input script commands that perform one-time operations
|
||||
before/after/between simulations or which invoke a simulation. They
|
||||
are usually instantiated from within the Input class, its ``command``
|
||||
method invoked, and then immediately destructed.
|
||||
|
||||
- The Finish class is instantiated to print statistics to the screen
|
||||
after a simulation is performed, by commands like run and minimize.
|
||||
|
|
|
@ -59,31 +59,25 @@ Members of ``lammpsplugin_t``
|
|||
* - author
|
||||
- String with the name and email of the author
|
||||
* - creator.v1
|
||||
- Pointer to factory function for pair, bond, angle, dihedral, or improper styles
|
||||
- Pointer to factory function for pair, bond, angle, dihedral, improper or command styles
|
||||
* - creator.v2
|
||||
- Pointer to factory function for compute, fix, or region styles
|
||||
* - creator.v3
|
||||
- Pointer to factory function for command styles
|
||||
* - handle
|
||||
- Pointer to the open DSO file handle
|
||||
|
||||
Only one of the three alternate creator entries can be used at a time
|
||||
and which of those is determined by the style of plugin. The "creator.v1"
|
||||
element is for factory functions of supported styles computing forces (i.e.
|
||||
pair, bond, angle, dihedral, or improper styles) and the function takes
|
||||
as single argument the pointer to the LAMMPS instance. The factory function
|
||||
is cast to the ``lammpsplugin_factory1`` type before assignment. The
|
||||
"creator.v2" element is for factory functions creating an instance of
|
||||
a fix, compute, or region style and takes three arguments: a pointer to
|
||||
the LAMMPS instance, an integer with the length of the argument list and
|
||||
a ``char **`` pointer to the list of arguments. The factory function pointer
|
||||
needs to be cast to the ``lammpsplugin_factory2`` type before assignment.
|
||||
The "creator.v3" element takes the same arguments as "creator.v3" but is
|
||||
specific to creating command styles: the factory function has to instantiate
|
||||
the command style locally passing the LAMMPS pointer as argument and then
|
||||
call its "command" member function with the number and list of arguments.
|
||||
The factory function pointer needs to be cast to the
|
||||
``lammpsplugin_factory3`` type before assignment.
|
||||
and which of those is determined by the style of plugin. The
|
||||
"creator.v1" element is for factory functions of supported styles
|
||||
computing forces (i.e. command, pair, bond, angle, dihedral, or
|
||||
improper styles) and the function takes as single argument the pointer
|
||||
to the LAMMPS instance. The factory function is cast to the
|
||||
``lammpsplugin_factory1`` type before assignment. The "creator.v2"
|
||||
element is for factory functions creating an instance of a fix, compute,
|
||||
or region style and takes three arguments: a pointer to the LAMMPS
|
||||
instance, an integer with the length of the argument list and a ``char
|
||||
**`` pointer to the list of arguments. The factory function pointer
|
||||
needs to be cast to the ``lammpsplugin_factory2`` type before
|
||||
assignment.
|
||||
|
||||
Pair style example
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
@ -123,12 +117,12 @@ function would look like this:
|
|||
|
||||
The factory function in this example is called ``morse2creator()``. It
|
||||
receives a pointer to the LAMMPS class as only argument and thus has to
|
||||
be assigned to the *creator.v1* member of the plugin struct and cast to the
|
||||
``lammpsplugin_factory1`` pointer type. It returns a
|
||||
be assigned to the *creator.v1* member of the plugin struct and cast to
|
||||
the ``lammpsplugin_factory1`` function pointer type. It returns a
|
||||
pointer to the allocated class instance derived from the ``Pair`` class.
|
||||
This function may be declared static to avoid clashes with other plugins.
|
||||
The name of the derived class, ``PairMorse2``, must be unique inside
|
||||
the entire LAMMPS executable.
|
||||
This function may be declared static to avoid clashes with other
|
||||
plugins. The name of the derived class, ``PairMorse2``, however must be
|
||||
unique inside the entire LAMMPS executable.
|
||||
|
||||
Fix style example
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
@ -169,9 +163,9 @@ Below is an example for that:
|
|||
|
||||
Command style example
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
For command styles there is a third variant of factory function as
|
||||
Command styles also use the first variant of factory function as
|
||||
demonstrated in the following example, which also shows that the
|
||||
implementation of the plugin class may also be within the same
|
||||
implementation of the plugin class may be within the same source
|
||||
file as the plugin interface code:
|
||||
|
||||
.. code-block:: C++
|
||||
|
@ -180,15 +174,15 @@ file as the plugin interface code:
|
|||
|
||||
#include "comm.h"
|
||||
#include "error.h"
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
class Hello : protected Pointers {
|
||||
class Hello : public Command {
|
||||
public:
|
||||
Hello(class LAMMPS *lmp) : Pointers(lmp) {};
|
||||
Hello(class LAMMPS *lmp) : Command(lmp) {};
|
||||
void command(int, char **);
|
||||
};
|
||||
}
|
||||
|
@ -202,10 +196,9 @@ file as the plugin interface code:
|
|||
utils::logmesg(lmp,fmt::format("Hello, {}!\n",argv[0]));
|
||||
}
|
||||
|
||||
static void hellocreator(LAMMPS *lmp, int argc, char **argv)
|
||||
static void hellocreator(LAMMPS *lmp)
|
||||
{
|
||||
Hello hello(lmp);
|
||||
hello.command(argc,argv);
|
||||
return new Hello(lmp);
|
||||
}
|
||||
|
||||
extern "C" void lammpsplugin_init(void *lmp, void *handle, void *regfunc)
|
||||
|
@ -216,9 +209,9 @@ file as the plugin interface code:
|
|||
plugin.version = LAMMPS_VERSION;
|
||||
plugin.style = "command";
|
||||
plugin.name = "hello";
|
||||
plugin.info = "Hello world command v1.0";
|
||||
plugin.info = "Hello world command v1.1";
|
||||
plugin.author = "Axel Kohlmeyer (akohlmey@gmail.com)";
|
||||
plugin.creator.v3 = (lammpsplugin_factory3 *) &hellocreator;
|
||||
plugin.creator.v1 = (lammpsplugin_factory1 *) &hellocreator;
|
||||
plugin.handle = handle;
|
||||
(*register_plugin)(&plugin,lmp);
|
||||
}
|
||||
|
|
|
@ -21,8 +21,8 @@ orientations and their associated inter-atomic distances.
|
|||
|
||||
The command :doc:`fix precession/spin <fix_precession_spin>` allows to
|
||||
apply a constant magnetic torque on all the spins in the system. This
|
||||
torque can be an external magnetic field (Zeeman interaction), or an
|
||||
uniaxial magnetic anisotropy.
|
||||
torque can be an external magnetic field (Zeeman interaction), and an
|
||||
uniaxial or cubic magnetic anisotropy.
|
||||
|
||||
A Langevin thermostat can be applied to those magnetic spins using
|
||||
:doc:`fix langevin/spin <fix_langevin_spin>`. Typically, this thermostat
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 286 KiB |
|
@ -1,14 +1,15 @@
|
|||
Input script command style
|
||||
==========================
|
||||
|
||||
New commands can be added to LAMMPS input scripts by adding new
|
||||
classes that have a "command" method. For example, the create_atoms,
|
||||
read_data, velocity, and run commands are all implemented in this
|
||||
fashion. When such a command is encountered in the LAMMPS input
|
||||
script, LAMMPS simply creates a class with the corresponding name,
|
||||
invokes the "command" method of the class, and passes it the arguments
|
||||
from the input script. The command method can perform whatever
|
||||
operations it wishes on LAMMPS data structures.
|
||||
New commands can be added to LAMMPS input scripts by adding new classes
|
||||
that are derived from the Command class and thus must have a "command"
|
||||
method. For example, the create_atoms, read_data, velocity, and run
|
||||
commands are all implemented in this fashion. When such a command is
|
||||
encountered in the LAMMPS input script, LAMMPS simply creates a class
|
||||
instance with the corresponding name, invokes the "command" method of
|
||||
the class, and passes it the arguments from the input script. The
|
||||
command method can perform whatever operations it wishes on LAMMPS data
|
||||
structures.
|
||||
|
||||
The single method your new class must define is as follows:
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Syntax
|
|||
template-ID = ID of molecule template specified in a separate :doc:`molecule <molecule>` command
|
||||
*hybrid* args = list of one or more sub-styles, each with their args
|
||||
|
||||
* accelerated styles (with same args) = *angle/kk* or *atomic/kk* or *bond/kk* or *charge/kk* or *full/kk* or *molecular/kk*
|
||||
* accelerated styles (with same args) = *angle/kk* or *atomic/kk* or *bond/kk* or *charge/kk* or *full/kk* or *molecular/kk* or *spin/kk*
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
|
|
@ -56,27 +56,28 @@ Examples
|
|||
Description
|
||||
"""""""""""
|
||||
|
||||
Perform the charge equilibration (QEq) method as described in :ref:`(Rappe and Goddard) <Rappe1>` and formulated in :ref:`(Nakano) <Nakano1>` (also known
|
||||
as the matrix inversion method) and in :ref:`(Rick and Stuart) <Rick1>` (also
|
||||
known as the extended Lagrangian method) based on the
|
||||
electronegativity equilization principle.
|
||||
Perform the charge equilibration (QEq) method as described in
|
||||
:ref:`(Rappe and Goddard) <Rappe1>` and formulated in :ref:`(Nakano)
|
||||
<Nakano1>` (also known as the matrix inversion method) and in
|
||||
:ref:`(Rick and Stuart) <Rick1>` (also known as the extended Lagrangian
|
||||
method) based on the electronegativity equilization principle.
|
||||
|
||||
These fixes can be used with any :doc:`pair style <pair_style>` in
|
||||
LAMMPS, so long as per-atom charges are defined. The most typical
|
||||
use-case is in conjunction with a :doc:`pair style <pair_style>` that
|
||||
performs charge equilibration periodically (e.g. every timestep), such
|
||||
as the ReaxFF or Streitz-Mintmire potential.
|
||||
But these fixes can also be used with
|
||||
potentials that normally assume per-atom charges are fixed, e.g. a
|
||||
:doc:`Buckingham <pair_buck>` or :doc:`LJ/Coulombic <pair_lj>` potential.
|
||||
as the ReaxFF or Streitz-Mintmire potential. But these fixes can also
|
||||
be used with potentials that normally assume per-atom charges are fixed,
|
||||
e.g. a :doc:`Buckingham <pair_buck>` or :doc:`LJ/Coulombic <pair_lj>`
|
||||
potential.
|
||||
|
||||
Because the charge equilibration calculation is effectively
|
||||
independent of the pair style, these fixes can also be used to perform
|
||||
a one-time assignment of charges to atoms. For example, you could
|
||||
define the QEq fix, perform a zero-timestep run via the :doc:`run <run>`
|
||||
command without any pair style defined which would set per-atom
|
||||
charges (based on the current atom configuration), then remove the fix
|
||||
via the :doc:`unfix <unfix>` command before performing further dynamics.
|
||||
Because the charge equilibration calculation is effectively independent
|
||||
of the pair style, these fixes can also be used to perform a one-time
|
||||
assignment of charges to atoms. For example, you could define the QEq
|
||||
fix, perform a zero-timestep run via the :doc:`run <run>` command
|
||||
without any pair style defined which would set per-atom charges (based
|
||||
on the current atom configuration), then remove the fix via the
|
||||
:doc:`unfix <unfix>` command before performing further dynamics.
|
||||
|
||||
.. note::
|
||||
|
||||
|
@ -87,11 +88,14 @@ via the :doc:`unfix <unfix>` command before performing further dynamics.
|
|||
|
||||
.. note::
|
||||
|
||||
The :doc:`fix qeq/comb <fix_qeq_comb>` command must still be used
|
||||
to perform charge equilibration with the :doc:`COMB potential <pair_comb>`. The :doc:`fix qeq/reax <fix_qeq_reax>`
|
||||
command can be used to perform charge equilibration with the :doc:`ReaxFF force field <pair_reaxc>`, 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.
|
||||
The :doc:`fix qeq/comb <fix_qeq_comb>` command must still be used to
|
||||
perform charge equilibration with the :doc:`COMB potential
|
||||
<pair_comb>`. The :doc:`fix qeq/reax <fix_qeq_reax>` command can be
|
||||
used to perform charge equilibration with the :doc:`ReaxFF force
|
||||
field <pair_reaxc>`, 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.
|
||||
|
||||
The QEq method minimizes the electrostatic energy of the system (or
|
||||
equalizes the derivative of energy with respect to charge of all the
|
||||
|
@ -134,55 +138,57 @@ usually a good number.
|
|||
The *qeq/shielded* style describes partial charges on atoms also as
|
||||
point charges, but uses a shielded Coulomb potential to describe the
|
||||
interaction between a pair of charged particles. Interaction through
|
||||
the shielded Coulomb is given by equation (13) of the :ref:`ReaxFF force field <vanDuin>` paper. The shielding accounts for charge overlap
|
||||
the shielded Coulomb is given by equation (13) of the :ref:`ReaxFF force
|
||||
field <vanDuin>` paper. The shielding accounts for charge overlap
|
||||
between charged particles at small separation. This style is the same
|
||||
as :doc:`fix qeq/reax <fix_qeq_reax>`, and can be used with :doc:`pair_style reax/c <pair_reaxc>`. Only the *chi*\ , *eta*\ , and *gamma*
|
||||
parameters from the *qfile* file are used. When using the string
|
||||
*reax/c* as filename, these parameters are extracted directly from
|
||||
an active *reax/c* pair style. This style solves partial
|
||||
charges on atoms via the matrix inversion method. A tolerance of
|
||||
1.0e-6 is usually a good number.
|
||||
as :doc:`fix qeq/reax <fix_qeq_reax>`, and can be used with
|
||||
:doc:`pair_style reax/c <pair_reaxc>`. Only the *chi*\ , *eta*\ , and
|
||||
*gamma* parameters from the *qfile* file are used. When using the string
|
||||
*reax/c* as filename, these parameters are extracted directly from an
|
||||
active *reax/c* pair style. This style solves partial charges on atoms
|
||||
via the matrix inversion method. A tolerance of 1.0e-6 is usually a
|
||||
good number.
|
||||
|
||||
The *qeq/slater* style describes partial charges on atoms as spherical
|
||||
charge densities centered around atoms via the Slater 1\ *s* orbital, so
|
||||
that the interaction between a pair of charged particles is the
|
||||
product of two Slater 1\ *s* orbitals. The expression for the Slater
|
||||
1\ *s* orbital is given under equation (6) of the
|
||||
:ref:`Streitz-Mintmire <Streitz1>` paper. Only the *chi*\ , *eta*\ , *zeta*\ , and
|
||||
*qcore* parameters from the *qfile* file are used. When using the string
|
||||
that the interaction between a pair of charged particles is the product
|
||||
of two Slater 1\ *s* orbitals. The expression for the Slater 1\ *s*
|
||||
orbital is given under equation (6) of the :ref:`Streitz-Mintmire
|
||||
<Streitz1>` paper. Only the *chi*\ , *eta*\ , *zeta*\ , and *qcore*
|
||||
parameters from the *qfile* file are used. When using the string
|
||||
*coul/streitz* as filename, these parameters are extracted directly from
|
||||
an active *coul/streitz* pair style. This style solves
|
||||
partial charges on atoms via the matrix inversion method. A tolerance
|
||||
of 1.0e-6 is usually a good number. Keyword *alpha* can be used to
|
||||
change the Slater type orbital exponent.
|
||||
an active *coul/streitz* pair style. This style solves partial charges
|
||||
on atoms via the matrix inversion method. A tolerance of 1.0e-6 is
|
||||
usually a good number. Keyword *alpha* can be used to change the Slater
|
||||
type orbital exponent.
|
||||
|
||||
The *qeq/dynamic* style describes partial charges on atoms as point
|
||||
charges that interact through 1/r, but the extended Lagrangian method
|
||||
is used to solve partial charges on atoms. Only the *chi* and *eta*
|
||||
charges that interact through 1/r, but the extended Lagrangian method is
|
||||
used to solve partial charges on atoms. Only the *chi* and *eta*
|
||||
parameters from the *qfile* file are used. Note that Coulomb
|
||||
catastrophe can occur if repulsion between the pair of charged
|
||||
particles is too weak. A tolerance of 1.0e-3 is usually a good
|
||||
number. Keyword *qdamp* can be used to change the damping factor, while
|
||||
keyword *qstep* can be used to change the time step size.
|
||||
catastrophe can occur if repulsion between the pair of charged particles
|
||||
is too weak. A tolerance of 1.0e-3 is usually a good number. Keyword
|
||||
*qdamp* can be used to change the damping factor, while keyword *qstep*
|
||||
can be used to change the time step size.
|
||||
|
||||
The :ref:`\ *qeq/fire*\ <Shan>` style describes the same charge model and charge
|
||||
solver as the *qeq/dynamic* style, but employs a FIRE minimization
|
||||
algorithm to solve for equilibrium charges.
|
||||
Keyword *qdamp* can be used to change the damping factor, while
|
||||
keyword *qstep* can be used to change the time step size.
|
||||
The :ref:`\ *qeq/fire*\ <Shan>` style describes the same charge model
|
||||
and charge solver as the *qeq/dynamic* style, but employs a FIRE
|
||||
minimization algorithm to solve for equilibrium charges. Keyword
|
||||
*qdamp* can be used to change the damping factor, while keyword *qstep*
|
||||
can be used to change the time step size.
|
||||
|
||||
Note that *qeq/point*\ , *qeq/shielded*\ , and *qeq/slater* describe
|
||||
different charge models, whereas the matrix inversion method and the
|
||||
extended Lagrangian method (\ *qeq/dynamic* and *qeq/fire*\ ) are
|
||||
different solvers.
|
||||
|
||||
Note that *qeq/point*\ , *qeq/dynamic* and *qeq/fire* styles all describe
|
||||
charges as point charges that interact through 1/r relationship, but
|
||||
solve partial charges on atoms using different solvers. These three
|
||||
styles should yield comparable results if
|
||||
the QEq parameters and *Nevery*\ , *cutoff*\ , and *tolerance* are the
|
||||
same. Style *qeq/point* is typically faster, *qeq/dynamic* scales
|
||||
better on larger sizes, and *qeq/fire* is faster than *qeq/dynamic*\ .
|
||||
Note that *qeq/point*\ , *qeq/dynamic* and *qeq/fire* styles all
|
||||
describe charges as point charges that interact through 1/r
|
||||
relationship, but solve partial charges on atoms using different
|
||||
solvers. These three styles should yield comparable results if the QEq
|
||||
parameters and *Nevery*\ , *cutoff*\ , and *tolerance* are the same.
|
||||
Style *qeq/point* is typically faster, *qeq/dynamic* scales better on
|
||||
larger sizes, and *qeq/fire* is faster than *qeq/dynamic*\ .
|
||||
|
||||
.. note::
|
||||
|
||||
|
@ -200,9 +206,11 @@ better on larger sizes, and *qeq/fire* is faster than *qeq/dynamic*\ .
|
|||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
No information about these fixes is written to :doc:`binary restart files <restart>`. No global scalar or vector or per-atom
|
||||
quantities are stored by these fixes for access by various :doc:`output commands <Howto_output>`. No parameter of these fixes can be used
|
||||
with the *start/stop* keywords of the :doc:`run <run>` command.
|
||||
No information about these fixes is written to :doc:`binary restart
|
||||
files <restart>`. No global scalar or vector or per-atom quantities are
|
||||
stored by these fixes for access by various :doc:`output commands
|
||||
<Howto_output>`. No parameter of these fixes can be used with the
|
||||
*start/stop* keywords of the :doc:`run <run>` command.
|
||||
|
||||
Thexe fixes are invoked during :doc:`energy minimization <minimize>`.
|
||||
|
||||
|
@ -210,7 +218,8 @@ Restrictions
|
|||
""""""""""""
|
||||
|
||||
These fixes are part of the QEQ package. They are only enabled if
|
||||
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
|
||||
LAMMPS was built with that package. See the :doc:`Build package
|
||||
<Build_package>` doc page for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
|
|
@ -6,7 +6,7 @@ import matplotlib.pyplot as plt
|
|||
import mpmath as mp
|
||||
|
||||
hbar=0.658212 # Planck's constant (eV.fs/rad)
|
||||
# J0=0.05 # per-neighbor exchange interaction (eV)
|
||||
J0=0.05 # per-neighbor exchange interaction (eV)
|
||||
|
||||
# exchange interaction parameters
|
||||
J1 = 11.254 # in eV
|
||||
|
|
|
@ -3,9 +3,15 @@
|
|||
# clean old res
|
||||
rm res_*.dat
|
||||
|
||||
# compute Lammps
|
||||
# test standard Lammps
|
||||
./../../../../src/lmp_serial \
|
||||
-in test-spin-precession.in
|
||||
|
||||
# test spin/kk with Kokkos Lammps
|
||||
# mpirun -np 1 ../../../../src/lmp_kokkos_mpi_only \
|
||||
# -k on -sf kk -in test-spin-precession.in
|
||||
|
||||
# extract data from Lammps run
|
||||
in="$(grep -n Step log.lammps | awk -F ':' '{print $1}')"
|
||||
en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')"
|
||||
in="$(echo "$in+1" | bc -l)"
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
|
||||
units metal
|
||||
atom_style spin
|
||||
# atom_style spin/kk
|
||||
atom_modify map array
|
||||
boundary f f f
|
||||
shell echo "test1"
|
||||
|
||||
atom_modify map array
|
||||
lattice sc 3.0
|
||||
|
|
|
@ -3,9 +3,15 @@
|
|||
# clean old res
|
||||
rm res_*.dat
|
||||
|
||||
# compute Lammps
|
||||
# test standard Lammps
|
||||
./../../../../src/lmp_serial \
|
||||
-in test-spin-precession.in
|
||||
|
||||
# test spin/kk with Kokkos Lammps
|
||||
# mpirun -np 1 ../../../../src/lmp_kokkos_mpi_only \
|
||||
# -k on -sf kk -in test-spin-precession.in
|
||||
|
||||
# extract data from Lammps run
|
||||
in="$(grep -n Step log.lammps | awk -F ':' '{print $1}')"
|
||||
en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')"
|
||||
in="$(echo "$in+1" | bc -l)"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
units metal
|
||||
atom_style spin
|
||||
# atom_style spin/kk
|
||||
atom_modify map array
|
||||
boundary f f f
|
||||
|
||||
|
|
|
@ -12,7 +12,14 @@ do
|
|||
temp="$(echo "$tempi+$i*($tempf-$tempi)/$N" | bc -l)"
|
||||
sed s/temperature/${temp}/g test-prec-spin.template > \
|
||||
test-prec-spin.in
|
||||
|
||||
# test standard Lammps
|
||||
./../../../../src/lmp_serial -in test-prec-spin.in
|
||||
|
||||
# test spin/kk with Kokkos Lammps
|
||||
# mpirun -np 1 ../../../../src/lmp_kokkos_mpi_only \
|
||||
# -k on -sf kk -in test-prec-spin.in
|
||||
|
||||
Hz="$(tail -n 1 average_spin | awk -F " " '{print $3}')"
|
||||
sz="$(tail -n 1 average_spin | awk -F " " '{print $5}')"
|
||||
en="$(tail -n 1 average_spin | awk -F " " '{print $6}')"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
units metal
|
||||
atom_style spin
|
||||
# atom_style spin/kk
|
||||
atom_modify map array
|
||||
boundary p p p
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
clear
|
||||
units metal
|
||||
atom_style spin
|
||||
# atom_style spin/kk
|
||||
|
||||
dimension 3
|
||||
boundary p p p
|
||||
|
@ -46,4 +47,8 @@ variable tmag equal c_out_mag[6]
|
|||
thermo_style custom step time v_tmag temp v_emag ke pe etotal
|
||||
thermo 200
|
||||
|
||||
compute outsp all property/atom spx spy spz sp fmx fmy fmz
|
||||
dump 1 all custom 10 dump_iron.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3]
|
||||
|
||||
run 100000
|
||||
# run 1
|
||||
|
|
|
@ -3,9 +3,14 @@
|
|||
# clean old res
|
||||
rm res_*.dat
|
||||
|
||||
# compute Lammps
|
||||
./../../../../src/lmp_serial \
|
||||
-in in.spin.iron-nve
|
||||
# test standard Lammps
|
||||
../../../../src/lmp_serial -in in.spin.iron-nve
|
||||
|
||||
# test spin/kk with Kokkos Lammps
|
||||
# mpirun -np 1 ../../../../src/lmp_kokkos_mpi_only \
|
||||
# -k on -sf kk -in in.spin.iron-nve
|
||||
|
||||
# extract data from Lammps run
|
||||
in="$(grep -n Step log.lammps | awk -F ':' '{print $1}')"
|
||||
en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')"
|
||||
in="$(echo "$in+1" | bc -l)"
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
clear
|
||||
units metal
|
||||
atom_style spin
|
||||
# atom_style spin/kk
|
||||
|
||||
dimension 3
|
||||
boundary p p p
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
clear
|
||||
units metal
|
||||
atom_style spin
|
||||
# atom_style spin/kk
|
||||
|
||||
dimension 3
|
||||
boundary p p p
|
||||
|
|
|
@ -3,16 +3,32 @@
|
|||
# clean old res
|
||||
rm res_*.dat
|
||||
|
||||
# compute NVT Spin -> Lattice
|
||||
### compute NVT Spin -> Lattice
|
||||
|
||||
# test standard Lammps
|
||||
./../../../../src/lmp_serial -in in.spin.nvt_spin
|
||||
|
||||
# test spin/kk with Kokkos Lammps
|
||||
# mpirun -np 1 ../../../../src/lmp_kokkos_mpi_only \
|
||||
# -k on -sf kk -in in.spin.nvt_spin
|
||||
|
||||
# extract data from Lammps run
|
||||
in="$(grep -n Step log.lammps | awk -F ':' '{print $1}')"
|
||||
en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')"
|
||||
in="$(echo "$in+1" | bc -l)"
|
||||
en="$(echo "$en-$in" | bc -l)"
|
||||
tail -n +$in log.lammps | head -n $en > res_nvt_spin.dat
|
||||
|
||||
# compute NVT Lattice -> Spin
|
||||
### compute NVT Lattice -> Spin
|
||||
|
||||
# test standard Lammps
|
||||
./../../../../src/lmp_serial -in in.spin.nvt_lattice
|
||||
|
||||
# test spin/kk with Kokkos Lammps
|
||||
# mpirun -np 1 ../../../../src/lmp_kokkos_mpi_only \
|
||||
# -k on -sf kk -in in.spin.nvt_lattice
|
||||
|
||||
# extract data from Lammps run
|
||||
in="$(grep -n Step log.lammps | awk -F ':' '{print $1}')"
|
||||
en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')"
|
||||
in="$(echo "$in+1" | bc -l)"
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
#include "lammpsplugin.h"
|
||||
|
||||
#include "comm.h"
|
||||
#include "command.h"
|
||||
#include "error.h"
|
||||
#include "pointers.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
class Hello : protected Pointers {
|
||||
class Hello : public Command {
|
||||
public:
|
||||
Hello(class LAMMPS *lmp) : Pointers(lmp) {};
|
||||
Hello(class LAMMPS *lmp) : Command(lmp) {};
|
||||
void command(int, char **);
|
||||
};
|
||||
}
|
||||
|
@ -25,10 +25,9 @@ void Hello::command(int argc, char **argv)
|
|||
utils::logmesg(lmp,fmt::format("Hello, {}!\n",argv[0]));
|
||||
}
|
||||
|
||||
static void hellocreator(LAMMPS *lmp, int argc, char **argv)
|
||||
static Command *hellocreator(LAMMPS *lmp)
|
||||
{
|
||||
Hello hello(lmp);
|
||||
hello.command(argc,argv);
|
||||
return new Hello(lmp);
|
||||
}
|
||||
|
||||
extern "C" void lammpsplugin_init(void *lmp, void *handle, void *regfunc)
|
||||
|
@ -39,9 +38,9 @@ extern "C" void lammpsplugin_init(void *lmp, void *handle, void *regfunc)
|
|||
plugin.version = LAMMPS_VERSION;
|
||||
plugin.style = "command";
|
||||
plugin.name = "hello";
|
||||
plugin.info = "Hello world command v1.0";
|
||||
plugin.info = "Hello world command v1.1";
|
||||
plugin.author = "Axel Kohlmeyer (akohlmey@gmail.com)";
|
||||
plugin.creator.v3 = (lammpsplugin_factory3 *) &hellocreator;
|
||||
plugin.creator.v1 = (lammpsplugin_factory1 *) &hellocreator;
|
||||
plugin.handle = handle;
|
||||
(*register_plugin)(&plugin,lmp);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ parser = ArgumentParser(prog='Install.py',
|
|||
|
||||
# settings
|
||||
|
||||
version = "2.7.0"
|
||||
version = "2.7.1"
|
||||
mode = "static"
|
||||
|
||||
# help message
|
||||
|
@ -47,9 +47,12 @@ checksums = { \
|
|||
'2.5.2' : 'bd2f18346c788eb54e1e52f4f6acf41a', \
|
||||
'2.5.3' : 'de30d6e7c2dcc0973298e24a6da24286', \
|
||||
'2.5.4' : 'f31b7d16a4be2e30aa7d5c19c3d37853', \
|
||||
'2.5.7' : '1ca36226fdb8110b1009aa61d615d4e5', \
|
||||
'2.6.0' : '204d2edae58d9b10ba3ad460cad64191', \
|
||||
'2.6.1' : '89a9a450fc6025299fe16af235957163', \
|
||||
'2.6.3' : 'a9f8028fd74528c2024781ea1fdefeee', \
|
||||
'2.7.0' : '95f29dd0c067577f11972ff90dfc7d12', \
|
||||
'2.7.1' : '4eac6a462ec84dfe0cec96c82421b8e8', \
|
||||
}
|
||||
|
||||
# parse and process arguments
|
||||
|
|
|
@ -10,7 +10,7 @@ build target in the conventional and CMake based build systems
|
|||
# copy LAMMPS shared library and lammps package to system dirs
|
||||
|
||||
from __future__ import print_function
|
||||
import sys,os,shutil
|
||||
import sys,os,shutil,time
|
||||
from argparse import ArgumentParser
|
||||
|
||||
parser = ArgumentParser(prog='install.py',
|
||||
|
@ -80,13 +80,15 @@ if args.dir:
|
|||
|
||||
sys.exit()
|
||||
|
||||
# extract version string from header
|
||||
# extract LAMMPS version string from header
|
||||
# and convert to python packaging compatible version
|
||||
def get_lammps_version(header):
|
||||
with open(header, 'r') as f:
|
||||
line = f.readline()
|
||||
start_pos = line.find('"')+1
|
||||
end_pos = line.find('"', start_pos)
|
||||
return "".join(line[start_pos:end_pos].split())
|
||||
t = time.strptime("".join(line[start_pos:end_pos].split()), "%d%b%Y")
|
||||
return "{}.{}.{}".format(t.tm_year,t.tm_mon,t.tm_mday)
|
||||
|
||||
verstr = get_lammps_version(args.version)
|
||||
|
||||
|
|
|
@ -13,10 +13,16 @@ from .core import *
|
|||
from .data import *
|
||||
from .pylammps import *
|
||||
|
||||
# convert module string version to numeric version
|
||||
# convert installed module string version to numeric version
|
||||
def get_version_number():
|
||||
import time
|
||||
from os.path import join
|
||||
from sys import version_info
|
||||
|
||||
# must report 0 when inside LAMMPS source tree
|
||||
if __file__.find(join('python', 'lammps', '__init__.py')) > 0:
|
||||
return 0
|
||||
|
||||
vstring = None
|
||||
if version_info.major == 3 and version_info.minor >= 8:
|
||||
from importlib.metadata import version
|
||||
|
@ -32,7 +38,7 @@ def get_version_number():
|
|||
if not vstring:
|
||||
return 0
|
||||
|
||||
t = time.strptime(vstring, "%d%b%Y")
|
||||
t = time.strptime(vstring, "%Y.%m.%d")
|
||||
return t.tm_year*10000 + t.tm_mon*100 + t.tm_mday
|
||||
|
||||
__version__ = get_version_number()
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
# this only installs the LAMMPS python package
|
||||
# it assumes the LAMMPS shared library is already installed
|
||||
from distutils.core import setup
|
||||
import os
|
||||
from sys import version_info
|
||||
import os,time
|
||||
|
||||
LAMMPS_PYTHON_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||
LAMMPS_DIR = os.path.dirname(LAMMPS_PYTHON_DIR)
|
||||
|
@ -12,7 +13,13 @@ def get_lammps_version():
|
|||
line = f.readline()
|
||||
start_pos = line.find('"')+1
|
||||
end_pos = line.find('"', start_pos)
|
||||
return "".join(line[start_pos:end_pos].split())
|
||||
t = time.strptime("".join(line[start_pos:end_pos].split()), "%d%b%Y")
|
||||
return "{}.{}.{}".format(t.tm_year,t.tm_mon,t.tm_mday)
|
||||
|
||||
if version_info.major >= 3:
|
||||
pkgs = ['lammps', 'lammps.mliap']
|
||||
else:
|
||||
pkgs = ['lammps']
|
||||
|
||||
setup(
|
||||
name = "lammps",
|
||||
|
@ -22,5 +29,5 @@ setup(
|
|||
url = "https://lammps.sandia.gov",
|
||||
description = "LAMMPS Molecular Dynamics Python package",
|
||||
license = "GPL",
|
||||
packages=["lammps","lammps.mliap"],
|
||||
packages=pkgs,
|
||||
)
|
||||
|
|
|
@ -67,7 +67,7 @@ size_t GzFileWriter::write(const void * buffer, size_t length)
|
|||
void GzFileWriter::flush()
|
||||
{
|
||||
if (!isopen()) return;
|
||||
|
||||
|
||||
gzflush(gzFp, Z_SYNC_FLUSH);
|
||||
}
|
||||
|
||||
|
|
|
@ -62,13 +62,13 @@ CommandStyle(kim,KimCommand)
|
|||
#ifndef LMP_KIM_COMMAND_H
|
||||
#define LMP_KIM_COMMAND_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class KimCommand : protected Pointers {
|
||||
class KimCommand : public Command {
|
||||
public:
|
||||
KimCommand(class LAMMPS *lmp) : Pointers(lmp) {};
|
||||
KimCommand(class LAMMPS *lmp) : Command(lmp) {};
|
||||
void command(int, char **);
|
||||
};
|
||||
|
||||
|
|
|
@ -63,6 +63,8 @@ action atom_vec_bond_kokkos.cpp atom_vec_bond.cpp
|
|||
action atom_vec_bond_kokkos.h atom_vec_bond.h
|
||||
action atom_vec_charge_kokkos.cpp
|
||||
action atom_vec_charge_kokkos.h
|
||||
action atom_vec_spin_kokkos.cpp
|
||||
action atom_vec_spin_kokkos.h
|
||||
action atom_vec_dpd_kokkos.cpp atom_vec_dpd.cpp
|
||||
action atom_vec_dpd_kokkos.h atom_vec_dpd.h
|
||||
action atom_vec_full_kokkos.cpp atom_vec_full.cpp
|
||||
|
|
|
@ -76,6 +76,12 @@ AtomKokkos::~AtomKokkos()
|
|||
memoryKK->destroy_kokkos(k_improper_atom3, improper_atom3);
|
||||
memoryKK->destroy_kokkos(k_improper_atom4, improper_atom4);
|
||||
|
||||
// SPIN package
|
||||
|
||||
memoryKK->destroy_kokkos(k_sp, sp);
|
||||
memoryKK->destroy_kokkos(k_fm, fm);
|
||||
memoryKK->destroy_kokkos(k_fm_long, fm_long);
|
||||
|
||||
// USER-DPD package
|
||||
memoryKK->destroy_kokkos(k_uCond,uCond);
|
||||
memoryKK->destroy_kokkos(k_uMech,uMech);
|
||||
|
|
|
@ -54,6 +54,11 @@ class AtomKokkos : public Atom {
|
|||
|
||||
DAT::tdual_float_2d k_dvector;
|
||||
|
||||
// SPIN package
|
||||
|
||||
DAT::tdual_float_1d_4 k_sp;
|
||||
DAT::tdual_f_array k_fm;
|
||||
DAT::tdual_f_array k_fm_long;
|
||||
|
||||
// USER-DPD package
|
||||
DAT::tdual_efloat_1d k_uCond, k_uMech, k_uChem, k_uCG, k_uCGnew,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,132 @@
|
|||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef ATOM_CLASS
|
||||
|
||||
AtomStyle(spin/kk,AtomVecSpinKokkos)
|
||||
AtomStyle(spin/kk/device,AtomVecSpinKokkos)
|
||||
AtomStyle(spin/kk/host,AtomVecSpinKokkos)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_ATOM_VEC_SPIN_KOKKOS_H
|
||||
#define LMP_ATOM_VEC_SPIN_KOKKOS_H
|
||||
|
||||
#include "atom_vec_kokkos.h"
|
||||
#include "kokkos_type.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class AtomVecSpinKokkos : public AtomVecKokkos {
|
||||
public:
|
||||
AtomVecSpinKokkos(class LAMMPS *);
|
||||
void grow(int);
|
||||
void copy(int, int, int);
|
||||
int pack_border(int, int *, double *, int, int *);
|
||||
int pack_border_vel(int, int *, double *, int, int *);
|
||||
int pack_border_hybrid(int, int *, double *);
|
||||
void unpack_border(int, int, double *);
|
||||
void unpack_border_vel(int, int, double *);
|
||||
int unpack_border_hybrid(int, int, double *);
|
||||
int pack_exchange(int, double *);
|
||||
int unpack_exchange(double *);
|
||||
int size_restart();
|
||||
int pack_restart(int, double *);
|
||||
int unpack_restart(double *);
|
||||
void create_atom(int, double *);
|
||||
void data_atom(double *, imageint, char **);
|
||||
int data_atom_hybrid(int, char **);
|
||||
void pack_data(double **);
|
||||
int pack_data_hybrid(int, double *);
|
||||
void write_data(FILE *, int, double **);
|
||||
int write_data_hybrid(FILE *, double *);
|
||||
double memory_usage();
|
||||
|
||||
// clear magnetic and mechanic forces
|
||||
|
||||
void force_clear(int, size_t);
|
||||
|
||||
void grow_pointers();
|
||||
// input lists to be checked
|
||||
int pack_border_kokkos(int n, DAT::tdual_int_2d k_sendlist,
|
||||
DAT::tdual_xfloat_2d buf,int iswap,
|
||||
int pbc_flag, int *pbc, ExecutionSpace space);
|
||||
void unpack_border_kokkos(const int &n, const int &nfirst,
|
||||
const DAT::tdual_xfloat_2d &buf,
|
||||
ExecutionSpace space);
|
||||
int pack_exchange_kokkos(const int &nsend,DAT::tdual_xfloat_2d &buf,
|
||||
DAT::tdual_int_1d k_sendlist,
|
||||
DAT::tdual_int_1d k_copylist,
|
||||
ExecutionSpace space, int dim,
|
||||
X_FLOAT lo, X_FLOAT hi);
|
||||
int unpack_exchange_kokkos(DAT::tdual_xfloat_2d &k_buf, int nrecv,
|
||||
int nlocal, int dim, X_FLOAT lo, X_FLOAT hi,
|
||||
ExecutionSpace space);
|
||||
|
||||
void sync(ExecutionSpace space, unsigned int mask);
|
||||
void modified(ExecutionSpace space, unsigned int mask);
|
||||
void sync_overlapping_device(ExecutionSpace space, unsigned int mask);
|
||||
|
||||
protected:
|
||||
tagint *tag;
|
||||
int *type,*mask;
|
||||
imageint *image;
|
||||
double **x,**v,**f; // lattice quantities
|
||||
|
||||
// spin quantities
|
||||
double **sp; // sp[i][0-2] direction of the spin i
|
||||
// sp[i][3] atomic magnetic moment of the spin i
|
||||
double **fm; // fm[i][0-2] direction of magnetic precession
|
||||
double **fm_long; // storage of long-range spin prec. components
|
||||
|
||||
DAT::t_tagint_1d d_tag;
|
||||
HAT::t_tagint_1d h_tag;
|
||||
|
||||
DAT::t_int_1d d_type, d_mask;
|
||||
HAT::t_int_1d h_type, h_mask;
|
||||
|
||||
DAT::t_imageint_1d d_image;
|
||||
HAT::t_imageint_1d h_image;
|
||||
|
||||
DAT::t_x_array d_x;
|
||||
DAT::t_v_array d_v;
|
||||
DAT::t_f_array d_f;
|
||||
|
||||
DAT::t_sp_array d_sp;
|
||||
DAT::t_fm_array d_fm;
|
||||
DAT::t_fm_long_array d_fm_long;
|
||||
|
||||
HAT::t_sp_array h_sp;
|
||||
HAT::t_fm_array h_fm;
|
||||
HAT::t_fm_long_array h_fm_long;
|
||||
|
||||
DAT::tdual_int_1d k_count;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ERROR/WARNING messages:
|
||||
|
||||
E: Per-processor system is too big
|
||||
|
||||
The number of owned atoms plus ghost atoms on a single
|
||||
processor must fit in 32-bit integer.
|
||||
|
||||
E: Invalid atom type in Atoms section of data file
|
||||
|
||||
Atom types must range from 1 to specified # of types.
|
||||
|
||||
*/
|
|
@ -769,6 +769,36 @@ typedef tdual_virial_array::t_dev_um t_virial_array_um;
|
|||
typedef tdual_virial_array::t_dev_const_um t_virial_array_const_um;
|
||||
typedef tdual_virial_array::t_dev_const_randomread t_virial_array_randomread;
|
||||
|
||||
// Spin Types
|
||||
|
||||
//3d SP_FLOAT array n*4
|
||||
#ifdef LMP_KOKKOS_NO_LEGACY
|
||||
typedef Kokkos::DualView<X_FLOAT*[4], Kokkos::LayoutLeft, LMPDeviceType> tdual_float_1d_4;
|
||||
#else
|
||||
typedef Kokkos::DualView<X_FLOAT*[4], Kokkos::LayoutRight, LMPDeviceType> tdual_float_1d_4;
|
||||
#endif
|
||||
typedef tdual_float_1d_4::t_dev t_sp_array;
|
||||
typedef tdual_float_1d_4::t_dev_const t_sp_array_const;
|
||||
typedef tdual_float_1d_4::t_dev_um t_sp_array_um;
|
||||
typedef tdual_float_1d_4::t_dev_const_um t_sp_array_const_um;
|
||||
typedef tdual_float_1d_4::t_dev_const_randomread t_sp_array_randomread;
|
||||
|
||||
//3d FM_FLOAT array n*3
|
||||
|
||||
typedef tdual_f_array::t_dev t_fm_array;
|
||||
typedef tdual_f_array::t_dev_const t_fm_array_const;
|
||||
typedef tdual_f_array::t_dev_um t_fm_array_um;
|
||||
typedef tdual_f_array::t_dev_const_um t_fm_array_const_um;
|
||||
typedef tdual_f_array::t_dev_const_randomread t_fm_array_randomread;
|
||||
|
||||
//3d FML_FLOAT array n*3
|
||||
|
||||
typedef tdual_f_array::t_dev t_fm_long_array;
|
||||
typedef tdual_f_array::t_dev_const t_fm_long_array_const;
|
||||
typedef tdual_f_array::t_dev_um t_fm_long_array_um;
|
||||
typedef tdual_f_array::t_dev_const_um t_fm_long_array_const_um;
|
||||
typedef tdual_f_array::t_dev_const_randomread t_fm_long_array_randomread;
|
||||
|
||||
//Energy Types
|
||||
//1d E_FLOAT array n
|
||||
|
||||
|
@ -1005,6 +1035,28 @@ typedef tdual_virial_array::t_host_um t_virial_array_um;
|
|||
typedef tdual_virial_array::t_host_const_um t_virial_array_const_um;
|
||||
typedef tdual_virial_array::t_host_const_randomread t_virial_array_randomread;
|
||||
|
||||
// Spin types
|
||||
|
||||
//2d X_FLOAT array n*4
|
||||
typedef tdual_float_1d_4::t_host t_sp_array;
|
||||
typedef tdual_float_1d_4::t_host_const t_sp_array_const;
|
||||
typedef tdual_float_1d_4::t_host_um t_sp_array_um;
|
||||
typedef tdual_float_1d_4::t_host_const_um t_sp_array_const_um;
|
||||
typedef tdual_float_1d_4::t_host_const_randomread t_sp_array_randomread;
|
||||
|
||||
//2d F_FLOAT array n*3
|
||||
typedef tdual_f_array::t_host t_fm_array;
|
||||
typedef tdual_f_array::t_host_const t_fm_array_const;
|
||||
typedef tdual_f_array::t_host_um t_fm_array_um;
|
||||
typedef tdual_f_array::t_host_const_um t_fm_array_const_um;
|
||||
typedef tdual_f_array::t_host_const_randomread t_fm_array_randomread;
|
||||
|
||||
//2d F_FLOAT array n*3
|
||||
typedef tdual_f_array::t_host t_fm_long_array;
|
||||
typedef tdual_f_array::t_host_const t_fm_long_array_const;
|
||||
typedef tdual_f_array::t_host_um t_fm_long_array_um;
|
||||
typedef tdual_f_array::t_host_const_um t_fm_long_array_const_um;
|
||||
typedef tdual_f_array::t_host_const_randomread t_fm_long_array_randomread;
|
||||
|
||||
|
||||
//Energy Types
|
||||
|
|
|
@ -595,6 +595,15 @@ void VerletKokkos::force_clear()
|
|||
atomKK->modified(Device,TORQUE_MASK);
|
||||
}
|
||||
|
||||
// reset SPIN forces
|
||||
|
||||
if (extraflag) {
|
||||
Kokkos::parallel_for(nall, Zero<typename ArrayTypes<LMPDeviceType>::t_fm_array>(atomKK->k_fm.view<LMPDeviceType>()));
|
||||
atomKK->modified(Device,FM_MASK);
|
||||
Kokkos::parallel_for(nall, Zero<typename ArrayTypes<LMPDeviceType>::t_fm_array>(atomKK->k_fm_long.view<LMPDeviceType>()));
|
||||
atomKK->modified(Device,FML_MASK);
|
||||
}
|
||||
|
||||
// neighbor includegroup flag is set
|
||||
// clear force only on initial nfirst particles
|
||||
// if either newton flag is set, also include ghosts
|
||||
|
@ -608,6 +617,15 @@ void VerletKokkos::force_clear()
|
|||
atomKK->modified(Device,TORQUE_MASK);
|
||||
}
|
||||
|
||||
// reset SPIN forces
|
||||
|
||||
if (extraflag) {
|
||||
Kokkos::parallel_for(atomKK->nfirst, Zero<typename ArrayTypes<LMPDeviceType>::t_fm_array>(atomKK->k_fm.view<LMPDeviceType>()));
|
||||
atomKK->modified(Device,FM_MASK);
|
||||
Kokkos::parallel_for(atomKK->nfirst, Zero<typename ArrayTypes<LMPDeviceType>::t_fm_array>(atomKK->k_fm_long.view<LMPDeviceType>()));
|
||||
atomKK->modified(Device,FML_MASK);
|
||||
}
|
||||
|
||||
if (force->newton) {
|
||||
auto range = Kokkos::RangePolicy<LMPDeviceType>(atomKK->nlocal, atomKK->nlocal + atomKK->nghost);
|
||||
Kokkos::parallel_for(range, Zero<typename ArrayTypes<LMPDeviceType>::t_f_array>(atomKK->k_f.view<LMPDeviceType>()));
|
||||
|
@ -617,6 +635,15 @@ void VerletKokkos::force_clear()
|
|||
Kokkos::parallel_for(range, Zero<typename ArrayTypes<LMPDeviceType>::t_f_array>(atomKK->k_torque.view<LMPDeviceType>()));
|
||||
atomKK->modified(Device,TORQUE_MASK);
|
||||
}
|
||||
|
||||
// reset SPIN forces
|
||||
|
||||
if (extraflag) {
|
||||
Kokkos::parallel_for(range, Zero<typename ArrayTypes<LMPDeviceType>::t_fm_array>(atomKK->k_fm.view<LMPDeviceType>()));
|
||||
atomKK->modified(Device,FM_MASK);
|
||||
Kokkos::parallel_for(range, Zero<typename ArrayTypes<LMPDeviceType>::t_fm_array>(atomKK->k_fm_long.view<LMPDeviceType>()));
|
||||
atomKK->modified(Device,FML_MASK);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,21 +17,21 @@
|
|||
|
||||
#include "fix_qeq_comb.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
#include "pair_comb.h"
|
||||
#include "pair_comb3.h"
|
||||
#include "neigh_list.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "group.h"
|
||||
#include "memory.h"
|
||||
#include "neigh_list.h"
|
||||
#include "respa.h"
|
||||
#include "update.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
#include "pair_comb.h"
|
||||
#include "pair_comb3.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
|
@ -85,9 +85,6 @@ FixQEQComb::FixQEQComb(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg),
|
|||
int nlocal = atom->nlocal;
|
||||
for (int i = 0; i < nlocal; i++) qf[i] = 0.0;
|
||||
|
||||
comb = nullptr;
|
||||
comb3 = nullptr;
|
||||
|
||||
comm_forward = 1;
|
||||
}
|
||||
|
||||
|
@ -119,8 +116,9 @@ void FixQEQComb::init()
|
|||
if (!atom->q_flag)
|
||||
error->all(FLERR,"Fix qeq/comb requires atom attribute q");
|
||||
|
||||
comb = (PairComb *) force->pair_match("^comb",0);
|
||||
comb3 = (PairComb3 *) force->pair_match("^comb3",0);
|
||||
if (!comb3) comb = (PairComb *) force->pair_match("^comb",0);
|
||||
|
||||
if (comb == nullptr && comb3 == nullptr)
|
||||
error->all(FLERR,"Must use pair_style comb or comb3 with fix qeq/comb");
|
||||
|
||||
|
@ -204,14 +202,17 @@ void FixQEQComb::post_force(int /*vflag*/)
|
|||
double *q = atom->q;
|
||||
int *mask = atom->mask;
|
||||
|
||||
if (comb) {
|
||||
if (comb) {
|
||||
inum = comb->list->inum;
|
||||
ilist = comb->list->ilist;
|
||||
}
|
||||
if (comb3) {
|
||||
} else if (comb3) {
|
||||
inum = comb3->list->inum;
|
||||
ilist = comb3->list->ilist;
|
||||
} else {
|
||||
inum = 0;
|
||||
ilist = nullptr;
|
||||
}
|
||||
|
||||
for (ii = 0; ii < inum; ii++) {
|
||||
i = ilist[ii];
|
||||
q1[i] = q2[i] = qf[i] = 0.0;
|
||||
|
@ -227,8 +228,9 @@ void FixQEQComb::post_force(int /*vflag*/)
|
|||
}
|
||||
|
||||
comm->forward_comm_fix(this);
|
||||
enegtot = 0.0;
|
||||
if (comb) enegtot = comb->yasu_char(qf,igroup);
|
||||
if (comb3) enegtot = comb3->combqeq(qf,igroup);
|
||||
else if (comb3) enegtot = comb3->combqeq(qf,igroup);
|
||||
|
||||
enegtot /= ngroup;
|
||||
enegchk = enegmax = 0.0;
|
||||
|
|
|
@ -147,7 +147,7 @@ int FixChargeRegulation::setmask() {
|
|||
|
||||
void FixChargeRegulation::init() {
|
||||
|
||||
triclinic = domain->triclinic;
|
||||
triclinic = domain->triclinic;
|
||||
int ipe = modify->find_compute("thermo_pe");
|
||||
c_pe = modify->compute[ipe];
|
||||
|
||||
|
@ -187,14 +187,7 @@ void FixChargeRegulation::init() {
|
|||
// neighbor list exclusion setup
|
||||
// turn off interactions between group all and the exclusion group
|
||||
|
||||
int narg = 4;
|
||||
char **arg = new char*[narg];;
|
||||
arg[0] = (char *) "exclude";
|
||||
arg[1] = (char *) "group";
|
||||
arg[2] = (char *) group_id.c_str();
|
||||
arg[3] = (char *) "all";
|
||||
neighbor->modify_params(narg,arg);
|
||||
delete [] arg;
|
||||
neighbor->modify_params(fmt::format("exclude group {} all",group_id));
|
||||
}
|
||||
|
||||
// check that no deletable atoms are in atom->firstgroup
|
||||
|
@ -356,7 +349,7 @@ void FixChargeRegulation::forward_acid() {
|
|||
|
||||
double energy_before = energy_stored;
|
||||
double factor;
|
||||
double *dummyp = nullptr;
|
||||
double dummyp[3];
|
||||
double pos[3];
|
||||
pos[0] = 0;
|
||||
pos[1] = 0;
|
||||
|
@ -415,7 +408,7 @@ void FixChargeRegulation::backward_acid() {
|
|||
double energy_before = energy_stored;
|
||||
double factor;
|
||||
int mask_tmp;
|
||||
double *dummyp = nullptr;
|
||||
double dummyp[3];
|
||||
double pos[3];
|
||||
pos[0] = 0;
|
||||
pos[1] = 0;
|
||||
|
@ -488,7 +481,7 @@ void FixChargeRegulation::forward_base() {
|
|||
|
||||
double energy_before = energy_stored;
|
||||
double factor;
|
||||
double *dummyp = nullptr;
|
||||
double dummyp[3];
|
||||
double pos[3];
|
||||
pos[0] = 0;
|
||||
pos[1] = 0;
|
||||
|
@ -546,7 +539,7 @@ void FixChargeRegulation::backward_base() {
|
|||
|
||||
double energy_before = energy_stored;
|
||||
double factor;
|
||||
double *dummyp = nullptr;
|
||||
double dummyp[3];
|
||||
int mask_tmp;
|
||||
double pos[3];
|
||||
pos[0] = 0;
|
||||
|
@ -619,7 +612,7 @@ void FixChargeRegulation::forward_ions() {
|
|||
|
||||
double energy_before = energy_stored;
|
||||
double factor;
|
||||
double *dummyp = nullptr;
|
||||
double dummyp[3];
|
||||
int m1 = -1, m2 = -1;
|
||||
factor = volume_rx * volume_rx * c10pI_plus * c10pI_minus /
|
||||
((1 + ncation) * (1 + nanion));
|
||||
|
@ -654,7 +647,7 @@ void FixChargeRegulation::backward_ions() {
|
|||
double energy_before = energy_stored;
|
||||
double factor;
|
||||
int mask1_tmp = 0, mask2_tmp = 0;
|
||||
double *dummyp = nullptr;
|
||||
double dummyp[3];
|
||||
int m1 = -1, m2 = -1;
|
||||
|
||||
m1 = get_random_particle(cation_type, +1, 0, dummyp);
|
||||
|
@ -733,7 +726,7 @@ void FixChargeRegulation::forward_ions_multival() {
|
|||
|
||||
double energy_before = energy_stored;
|
||||
double factor = 1;
|
||||
double *dummyp = nullptr;
|
||||
double dummyp[3];
|
||||
int mm[salt_charge_ratio + 1];// particle ID array for all ions to be inserted
|
||||
|
||||
if (salt_charge[0] <= -salt_charge[1]) {
|
||||
|
@ -787,7 +780,7 @@ void FixChargeRegulation::backward_ions_multival() {
|
|||
|
||||
double energy_before = energy_stored;
|
||||
double factor = 1;
|
||||
double *dummyp = nullptr; // dummy pointer
|
||||
double dummyp[3]; // dummy particle
|
||||
int mm[salt_charge_ratio + 1]; // particle ID array for all deleted ions
|
||||
double qq[salt_charge_ratio + 1]; // charge array for all deleted ions
|
||||
int mask_tmp[salt_charge_ratio + 1]; // temporary mask array
|
||||
|
|
|
@ -580,14 +580,7 @@ void FixGCMC::init()
|
|||
// neighbor list exclusion setup
|
||||
// turn off interactions between group all and the exclusion group
|
||||
|
||||
int narg = 4;
|
||||
char **arg = new char*[narg];;
|
||||
arg[0] = (char *) "exclude";
|
||||
arg[1] = (char *) "group";
|
||||
arg[2] = (char *) group_id.c_str();
|
||||
arg[3] = (char *) "all";
|
||||
neighbor->modify_params(narg,arg);
|
||||
delete [] arg;
|
||||
neighbor->modify_params(fmt::format("exclude group {} all",group_id));
|
||||
}
|
||||
|
||||
// create a new group for temporary use with selected molecules
|
||||
|
|
|
@ -342,14 +342,7 @@ void FixWidom::init()
|
|||
// neighbor list exclusion setup
|
||||
// turn off interactions between group all and the exclusion group
|
||||
|
||||
int narg = 4;
|
||||
char **arg = new char*[narg];;
|
||||
arg[0] = (char *) "exclude";
|
||||
arg[1] = (char *) "group";
|
||||
arg[2] = (char *) group_id.c_str();
|
||||
arg[3] = (char *) "all";
|
||||
neighbor->modify_params(narg,arg);
|
||||
delete [] arg;
|
||||
neighbor->modify_params(fmt::format("exclude group {} all",group_id));
|
||||
}
|
||||
|
||||
// create a new group for temporary use with selected molecules
|
||||
|
|
|
@ -20,13 +20,13 @@ CommandStyle(message,Message)
|
|||
#ifndef LMP_MESSAGE_H
|
||||
#define LMP_MESSAGE_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class Message : protected Pointers {
|
||||
class Message : public Command {
|
||||
public:
|
||||
Message(class LAMMPS *lmp) : Pointers(lmp) {};
|
||||
Message(class LAMMPS *lmp) : Command(lmp) {};
|
||||
void command(int, char **);
|
||||
|
||||
private:
|
||||
|
|
|
@ -20,13 +20,13 @@ CommandStyle(server,Server)
|
|||
#ifndef LMP_SERVER_H
|
||||
#define LMP_SERVER_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class Server : protected Pointers {
|
||||
class Server : public Command {
|
||||
public:
|
||||
Server(class LAMMPS *lmp) : Pointers(lmp) {};
|
||||
Server(class LAMMPS *lmp) : Command(lmp) {};
|
||||
void command(int, char **);
|
||||
};
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace LAMMPS_NS
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Plugin::Plugin(LAMMPS *lmp) : Pointers(lmp) {}
|
||||
Plugin::Plugin(LAMMPS *lmp) : Command(lmp) {}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
@ -257,7 +257,7 @@ namespace LAMMPS_NS
|
|||
"style {} from plugin",
|
||||
plugin->name));
|
||||
}
|
||||
(*command_map)[plugin->name] = (Input::CommandCreator)plugin->creator.v3;
|
||||
(*command_map)[plugin->name] = (Input::CommandCreator)plugin->creator.v1;
|
||||
|
||||
} else {
|
||||
utils::logmesg(lmp,fmt::format("Loading plugin for {} styles not "
|
||||
|
|
|
@ -21,12 +21,12 @@ CommandStyle(plugin,Plugin)
|
|||
#define LMP_PLUGIN_H
|
||||
|
||||
#include "lammpsplugin.h"
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS
|
||||
{
|
||||
|
||||
class Plugin : protected Pointers {
|
||||
class Plugin : public Command {
|
||||
public:
|
||||
Plugin(class LAMMPS *);
|
||||
void command(int, char **);
|
||||
|
|
|
@ -93,7 +93,7 @@ void FixPythonInvoke::end_of_step()
|
|||
{
|
||||
PyUtils::GIL lock;
|
||||
|
||||
PyObject * result = PyObject_CallFunction((PyObject*)pFunc, "O", (PyObject*)lmpPtr);
|
||||
PyObject * result = PyObject_CallFunction((PyObject*)pFunc, (char *)"O", (PyObject*)lmpPtr);
|
||||
|
||||
if (!result) {
|
||||
PyUtils::Print_Errors();
|
||||
|
@ -110,8 +110,9 @@ void FixPythonInvoke::post_force(int vflag)
|
|||
if (update->ntimestep % nevery != 0) return;
|
||||
|
||||
PyUtils::GIL lock;
|
||||
char fmt[] = "Oi";
|
||||
|
||||
PyObject * result = PyObject_CallFunction((PyObject*)pFunc, "Oi", (PyObject*)lmpPtr, vflag);
|
||||
PyObject * result = PyObject_CallFunction((PyObject*)pFunc, fmt, (PyObject*)lmpPtr, vflag);
|
||||
|
||||
if (!result) {
|
||||
PyUtils::Print_Errors();
|
||||
|
|
|
@ -75,7 +75,7 @@ FixPythonMove::FixPythonMove(LAMMPS *lmp, int narg, char **arg) :
|
|||
}
|
||||
|
||||
PyObject *ptr = PY_VOID_POINTER(lmp);
|
||||
PyObject *py_move_obj = PyObject_CallFunction(py_move_type, "O", ptr);
|
||||
PyObject *py_move_obj = PyObject_CallFunction(py_move_type, (char *)"O", ptr);
|
||||
Py_CLEAR(ptr);
|
||||
|
||||
if (!py_move_obj) {
|
||||
|
@ -112,7 +112,7 @@ int FixPythonMove::setmask()
|
|||
void FixPythonMove::init()
|
||||
{
|
||||
PyUtils::GIL lock;
|
||||
PyObject * result = PyObject_CallMethod((PyObject *)py_move, "init", nullptr);
|
||||
PyObject * result = PyObject_CallMethod((PyObject *)py_move, (char *)"init", nullptr);
|
||||
|
||||
if (!result) {
|
||||
PyUtils::Print_Errors();
|
||||
|
@ -126,7 +126,7 @@ void FixPythonMove::init()
|
|||
void FixPythonMove::initial_integrate(int vflag)
|
||||
{
|
||||
PyUtils::GIL lock;
|
||||
PyObject * result = PyObject_CallMethod((PyObject*)py_move, "initial_integrate", "i", vflag);
|
||||
PyObject * result = PyObject_CallMethod((PyObject*)py_move, (char *)"initial_integrate", (char *)"i", vflag);
|
||||
|
||||
if (!result) {
|
||||
PyUtils::Print_Errors();
|
||||
|
@ -140,7 +140,7 @@ void FixPythonMove::initial_integrate(int vflag)
|
|||
void FixPythonMove::final_integrate()
|
||||
{
|
||||
PyUtils::GIL lock;
|
||||
PyObject * result = PyObject_CallMethod((PyObject*)py_move, "final_integrate", nullptr);
|
||||
PyObject * result = PyObject_CallMethod((PyObject*)py_move, (char *)"final_integrate", nullptr);
|
||||
|
||||
if (!result) {
|
||||
PyUtils::Print_Errors();
|
||||
|
@ -154,7 +154,7 @@ void FixPythonMove::final_integrate()
|
|||
void FixPythonMove::initial_integrate_respa(int vflag, int ilevel, int iloop)
|
||||
{
|
||||
PyUtils::GIL lock;
|
||||
PyObject * result = PyObject_CallMethod((PyObject*)py_move, "initial_integrate_respa", "iii", vflag, ilevel, iloop);
|
||||
PyObject * result = PyObject_CallMethod((PyObject*)py_move, (char *)"initial_integrate_respa", (char *)"iii", vflag, ilevel, iloop);
|
||||
|
||||
if (!result) {
|
||||
PyUtils::Print_Errors();
|
||||
|
@ -168,7 +168,7 @@ void FixPythonMove::initial_integrate_respa(int vflag, int ilevel, int iloop)
|
|||
void FixPythonMove::final_integrate_respa(int ilevel, int iloop)
|
||||
{
|
||||
PyUtils::GIL lock;
|
||||
PyObject * result = PyObject_CallMethod((PyObject*)py_move, "final_integrate_respa", "ii", ilevel, iloop);
|
||||
PyObject * result = PyObject_CallMethod((PyObject*)py_move, (char *)"final_integrate_respa", (char *)"ii", ilevel, iloop);
|
||||
|
||||
if (!result) {
|
||||
PyUtils::Print_Errors();
|
||||
|
@ -182,7 +182,7 @@ void FixPythonMove::final_integrate_respa(int ilevel, int iloop)
|
|||
void FixPythonMove::reset_dt()
|
||||
{
|
||||
PyUtils::GIL lock;
|
||||
PyObject * result = PyObject_CallMethod((PyObject*)py_move, "reset_dt", nullptr);
|
||||
PyObject * result = PyObject_CallMethod((PyObject*)py_move, (char *)"reset_dt", nullptr);
|
||||
|
||||
if (!result) {
|
||||
PyUtils::Print_Errors();
|
||||
|
|
|
@ -288,7 +288,7 @@ void PairPython::coeff(int narg, char **arg)
|
|||
|
||||
py_potential = (void *) py_pair_instance;
|
||||
|
||||
PyObject *py_value = PyObject_CallMethod(py_pair_instance, "check_units", "s", update->unit_style);
|
||||
PyObject *py_value = PyObject_CallMethod(py_pair_instance, (char *)"check_units", (char *)"s", update->unit_style);
|
||||
if (!py_value) {
|
||||
PyUtils::Print_Errors();
|
||||
error->all(FLERR,"Calling 'check_units' function failed");
|
||||
|
@ -306,7 +306,7 @@ void PairPython::coeff(int narg, char **arg)
|
|||
} else skip_types[i] = 0;
|
||||
const int type = i;
|
||||
const char * name = arg[2+i];
|
||||
py_value = PyObject_CallMethod(py_pair_instance, "map_coeff", "si", name, type);
|
||||
py_value = PyObject_CallMethod(py_pair_instance, (char *)"map_coeff", (char *)"si", name, type);
|
||||
if (!py_value) {
|
||||
PyUtils::Print_Errors();
|
||||
error->all(FLERR,"Calling 'map_coeff' function failed");
|
||||
|
|
|
@ -18,16 +18,16 @@
|
|||
|
||||
#include "fix_qeq.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "neigh_list.h"
|
||||
#include "update.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "neigh_list.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
|
@ -386,13 +386,11 @@ int FixQEq::CG( double *b, double *x )
|
|||
vector_sum( d, 1., p, beta, d, inum );
|
||||
}
|
||||
|
||||
if (loop >= maxiter && comm->me == 0) {
|
||||
char str[128];
|
||||
sprintf(str,"Fix qeq CG convergence failed (%g) after %d iterations "
|
||||
"at " BIGINT_FORMAT " step",sqrt(sig_new)/b_norm,loop,update->ntimestep);
|
||||
error->warning(FLERR,str);
|
||||
}
|
||||
|
||||
if ((comm->me == 0) && (loop >= maxiter))
|
||||
error->warning(FLERR,fmt::format("Fix qeq CG convergence failed ({}) "
|
||||
"after {} iterations at step {}",
|
||||
sqrt(sig_new)/b_norm,loop,
|
||||
update->ntimestep));
|
||||
return loop;
|
||||
}
|
||||
|
||||
|
@ -708,11 +706,9 @@ void FixQEq::read_file(char *file)
|
|||
FILE *fp;
|
||||
if (comm->me == 0) {
|
||||
fp = utils::open_potential(file,lmp,nullptr);
|
||||
if (fp == nullptr) {
|
||||
char str[128];
|
||||
snprintf(str,128,"Cannot open fix qeq parameter file %s",file);
|
||||
error->one(FLERR,str);
|
||||
}
|
||||
if (fp == nullptr)
|
||||
error->one(FLERR,fmt::format("Cannot open fix qeq parameter file {}: {}",
|
||||
file,utils::getsyserror()));
|
||||
}
|
||||
|
||||
// read each line out of file, skipping blank lines or leading '#'
|
||||
|
|
|
@ -17,20 +17,20 @@
|
|||
|
||||
#include "fix_qeq_dynamic.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <cstring>
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "neighbor.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neigh_request.h"
|
||||
#include "update.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "group.h"
|
||||
#include "kspace.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neigh_request.h"
|
||||
#include "neighbor.h"
|
||||
#include "respa.h"
|
||||
#include "error.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
|
@ -154,14 +154,9 @@ void FixQEqDynamic::pre_force(int /*vflag*/)
|
|||
}
|
||||
}
|
||||
|
||||
if (comm->me == 0) {
|
||||
if (iloop == maxiter) {
|
||||
char str[128];
|
||||
sprintf(str,"Charges did not converge at step " BIGINT_FORMAT
|
||||
": %lg",update->ntimestep,enegchk);
|
||||
error->warning(FLERR,str);
|
||||
}
|
||||
}
|
||||
if ((comm->me == 0) && (iloop >= maxiter))
|
||||
error->warning(FLERR,fmt::format("Charges did not converge at step "
|
||||
"{}: {}",update->ntimestep,enegchk));
|
||||
|
||||
if (force->kspace) force->kspace->qsum_qsq();
|
||||
}
|
||||
|
|
|
@ -17,22 +17,22 @@
|
|||
|
||||
#include "fix_qeq_fire.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <cstring>
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "neighbor.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neigh_request.h"
|
||||
#include "update.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "group.h"
|
||||
#include "kspace.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neigh_request.h"
|
||||
#include "neighbor.h"
|
||||
#include "pair_comb.h"
|
||||
#include "pair_comb3.h"
|
||||
#include "kspace.h"
|
||||
#include "respa.h"
|
||||
#include "error.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
|
@ -47,7 +47,7 @@ using namespace FixConst;
|
|||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixQEqFire::FixQEqFire(LAMMPS *lmp, int narg, char **arg) :
|
||||
FixQEq(lmp, narg, arg)
|
||||
FixQEq(lmp, narg, arg), comb(nullptr), comb3(nullptr)
|
||||
{
|
||||
qdamp = 0.20;
|
||||
qstep = 0.20;
|
||||
|
@ -65,9 +65,6 @@ FixQEqFire::FixQEqFire(LAMMPS *lmp, int narg, char **arg) :
|
|||
iarg += 2;
|
||||
} else error->all(FLERR,"Illegal fix qeq/fire command");
|
||||
}
|
||||
|
||||
comb = nullptr;
|
||||
comb3 = nullptr;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
@ -94,9 +91,8 @@ void FixQEqFire::init()
|
|||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
|
||||
comb = (PairComb *) force->pair_match("comb",1);
|
||||
comb3 = (PairComb3 *) force->pair_match("comb3",1);
|
||||
|
||||
comb3 = (PairComb3 *) force->pair_match("^comb3",0);
|
||||
if (!comb3) comb = (PairComb *) force->pair_match("^comb",0);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
@ -218,14 +214,9 @@ void FixQEqFire::pre_force(int /*vflag*/)
|
|||
if (enegchk < tolerance) break;
|
||||
}
|
||||
|
||||
if (comm->me == 0) {
|
||||
if (iloop == maxiter) {
|
||||
char str[128];
|
||||
sprintf(str,"Charges did not converge at step " BIGINT_FORMAT
|
||||
": %lg",update->ntimestep,enegchk);
|
||||
error->warning(FLERR,str);
|
||||
}
|
||||
}
|
||||
if ((comm->me == 0) && (iloop >= maxiter))
|
||||
error->warning(FLERR,fmt::format("Charges did not converge at step "
|
||||
"{}: {}",update->ntimestep,enegchk));
|
||||
|
||||
if (force->kspace) force->kspace->qsum_qsq();
|
||||
}
|
||||
|
|
|
@ -16,20 +16,22 @@
|
|||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_qeq_point.h"
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "neighbor.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neigh_request.h"
|
||||
#include "update.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "group.h"
|
||||
#include "kspace.h"
|
||||
#include "respa.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neigh_request.h"
|
||||
#include "neighbor.h"
|
||||
#include "respa.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
|
@ -158,13 +160,9 @@ void FixQEqPoint::compute_H()
|
|||
}
|
||||
}
|
||||
|
||||
if (m_fill >= H.m) {
|
||||
char str[128];
|
||||
sprintf(str,"H matrix size has been exceeded: m_fill=%d H.m=%d\n",
|
||||
m_fill, H.m );
|
||||
error->warning(FLERR,str);
|
||||
error->all(FLERR,"Fix qeq/point has insufficient QEq matrix size");
|
||||
}
|
||||
if (m_fill >= H.m)
|
||||
error->all(FLERR,fmt::format("Fix qeq/point has insufficient H matrix "
|
||||
"size: m_fill={} H.m={}\n",m_fill, H.m));
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
|
|
@ -16,21 +16,23 @@
|
|||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_qeq_shielded.h"
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "neighbor.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neigh_request.h"
|
||||
#include "update.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "group.h"
|
||||
#include "pair.h"
|
||||
#include "kspace.h"
|
||||
#include "respa.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neigh_request.h"
|
||||
#include "neighbor.h"
|
||||
#include "pair.h"
|
||||
#include "respa.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
|
@ -223,13 +225,9 @@ void FixQEqShielded::compute_H()
|
|||
}
|
||||
}
|
||||
|
||||
if (m_fill >= H.m) {
|
||||
char str[128];
|
||||
sprintf(str,"H matrix size has been exceeded: m_fill=%d H.m=%d\n",
|
||||
m_fill, H.m );
|
||||
error->warning(FLERR,str);
|
||||
error->all(FLERR,"Fix qeq/shielded has insufficient QEq matrix size");
|
||||
}
|
||||
if (m_fill >= H.m)
|
||||
error->all(FLERR,fmt::format("Fix qeq/shielded has insufficient H matrix "
|
||||
"size: m_fill={} H.m={}\n",m_fill,H.m));
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
@ -247,7 +245,7 @@ double FixQEqShielded::calculate_H( double r, double gamma )
|
|||
Taper = Taper * r + Tap[0];
|
||||
|
||||
denom = r * r * r + gamma;
|
||||
denom = pow(denom,0.3333333333333);
|
||||
denom = pow(denom,1.0/3.0);
|
||||
|
||||
return Taper * EV_TO_KCAL_PER_MOL / denom;
|
||||
}
|
||||
|
|
|
@ -16,22 +16,23 @@
|
|||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_qeq_slater.h"
|
||||
#include <cmath>
|
||||
|
||||
#include <cstring>
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "neighbor.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neigh_request.h"
|
||||
#include "update.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "group.h"
|
||||
#include "pair.h"
|
||||
#include "kspace.h"
|
||||
#include "respa.h"
|
||||
#include "math_const.h"
|
||||
#include "error.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neigh_request.h"
|
||||
#include "neighbor.h"
|
||||
#include "pair.h"
|
||||
#include "respa.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace MathConst;
|
||||
|
@ -207,14 +208,9 @@ void FixQEqSlater::compute_H()
|
|||
chizj[i] = zjtmp;
|
||||
}
|
||||
|
||||
if (m_fill >= H.m) {
|
||||
char str[128];
|
||||
sprintf(str,"H matrix size has been exceeded: m_fill=%d H.m=%d\n",
|
||||
m_fill, H.m );
|
||||
error->warning(FLERR,str);
|
||||
error->all(FLERR,"Fix qeq/slater has insufficient QEq matrix size");
|
||||
}
|
||||
|
||||
if (m_fill >= H.m)
|
||||
error->all(FLERR,fmt::format(FLERR,"Fix qeq/slater has insufficient H "
|
||||
"matrix size:m_fill={} H.m={}\n",m_fill,H.m));
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
|
|
@ -38,7 +38,7 @@ enum{NOHYPER,GLOBAL,LOCAL};
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Hyper::Hyper(LAMMPS *lmp) : Pointers(lmp), dumplist(nullptr) {}
|
||||
Hyper::Hyper(LAMMPS *lmp) : Command(lmp), dumplist(nullptr) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
perform hyperdynamics simulation
|
||||
|
|
|
@ -20,11 +20,11 @@ CommandStyle(hyper,Hyper)
|
|||
#ifndef LMP_HYPER_H
|
||||
#define LMP_HYPER_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class Hyper : protected Pointers {
|
||||
class Hyper : public Command {
|
||||
public:
|
||||
Hyper(class LAMMPS *);
|
||||
~Hyper() {}
|
||||
|
|
|
@ -42,7 +42,7 @@ using namespace MathConst;
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NEB::NEB(LAMMPS *lmp) : Pointers(lmp), all(nullptr), rdist(nullptr) {}
|
||||
NEB::NEB(LAMMPS *lmp) : Command(lmp), all(nullptr), rdist(nullptr) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
internal NEB constructor, called from TAD
|
||||
|
@ -50,7 +50,7 @@ NEB::NEB(LAMMPS *lmp) : Pointers(lmp), all(nullptr), rdist(nullptr) {}
|
|||
|
||||
NEB::NEB(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in,
|
||||
int n2steps_in, int nevery_in, double *buf_init, double *buf_final)
|
||||
: Pointers(lmp), all(nullptr), rdist(nullptr)
|
||||
: Command(lmp), all(nullptr), rdist(nullptr)
|
||||
{
|
||||
double delx,dely,delz;
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@ CommandStyle(neb,NEB)
|
|||
#ifndef LMP_NEB_H
|
||||
#define LMP_NEB_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class NEB : protected Pointers {
|
||||
class NEB : public Command {
|
||||
public:
|
||||
NEB(class LAMMPS *);
|
||||
NEB(class LAMMPS *, double, double, int, int, int, double *, double *);
|
||||
|
|
|
@ -46,7 +46,7 @@ enum{SINGLE_PROC_DIRECT,SINGLE_PROC_MAP,MULTI_PROC};
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PRD::PRD(LAMMPS *lmp) : Pointers(lmp) {}
|
||||
PRD::PRD(LAMMPS *lmp) : Command(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
perform PRD simulation on one or more replicas
|
||||
|
|
|
@ -20,11 +20,11 @@ CommandStyle(prd,PRD)
|
|||
#ifndef LMP_PRD_H
|
||||
#define LMP_PRD_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class PRD : protected Pointers {
|
||||
class PRD : public Command {
|
||||
public:
|
||||
PRD(class LAMMPS *);
|
||||
~PRD() {}
|
||||
|
|
|
@ -43,7 +43,7 @@ using namespace LAMMPS_NS;
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
TAD::TAD(LAMMPS *lmp) : Pointers(lmp) {}
|
||||
TAD::TAD(LAMMPS *lmp) : Command(lmp) {}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@ CommandStyle(tad,TAD)
|
|||
#ifndef LMP_TAD_H
|
||||
#define LMP_TAD_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class TAD : protected Pointers {
|
||||
class TAD : public Command {
|
||||
public:
|
||||
TAD(class LAMMPS *);
|
||||
~TAD();
|
||||
|
|
|
@ -40,7 +40,7 @@ using namespace LAMMPS_NS;
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Temper::Temper(LAMMPS *lmp) : Pointers(lmp) {}
|
||||
Temper::Temper(LAMMPS *lmp) : Command(lmp) {}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@ CommandStyle(temper,Temper)
|
|||
#ifndef LMP_TEMPER_H
|
||||
#define LMP_TEMPER_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class Temper : protected Pointers {
|
||||
class Temper : public Command {
|
||||
public:
|
||||
Temper(class LAMMPS *);
|
||||
~Temper();
|
||||
|
|
|
@ -507,11 +507,23 @@ void FixNVESpin::sectoring()
|
|||
{
|
||||
int sec[3];
|
||||
double sublo[3],subhi[3];
|
||||
double* sublotmp = domain->sublo;
|
||||
double* subhitmp = domain->subhi;
|
||||
for (int dim = 0 ; dim < 3 ; dim++) {
|
||||
sublo[dim]=sublotmp[dim];
|
||||
subhi[dim]=subhitmp[dim];
|
||||
|
||||
if (domain->triclinic == 1){
|
||||
double* sublotmp = domain->sublo_lamda;
|
||||
double* subhitmp = domain->subhi_lamda;
|
||||
for (int dim = 0 ; dim < 3 ; dim++) {
|
||||
sublo[dim]=sublotmp[dim]*domain->boxhi[dim];
|
||||
subhi[dim]=subhitmp[dim]*domain->boxhi[dim];
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
double* sublotmp = domain->sublo;
|
||||
double* subhitmp = domain->subhi;
|
||||
for (int dim = 0 ; dim < 3 ; dim++) {
|
||||
sublo[dim]=sublotmp[dim];
|
||||
subhi[dim]=subhitmp[dim];
|
||||
}
|
||||
}
|
||||
|
||||
const double rsx = subhi[0] - sublo[0];
|
||||
|
|
|
@ -67,7 +67,7 @@ static const char cite_neb_spin[] =
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
NEBSpin::NEBSpin(LAMMPS *lmp) : Pointers(lmp) {
|
||||
NEBSpin::NEBSpin(LAMMPS *lmp) : Command(lmp) {
|
||||
if (lmp->citeme) lmp->citeme->add(cite_neb_spin);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@ CommandStyle(neb/spin,NEBSpin)
|
|||
#ifndef LMP_NEB_SPIN_H
|
||||
#define LMP_NEB_SPIN_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class NEBSpin : protected Pointers {
|
||||
class NEBSpin : public Command {
|
||||
public:
|
||||
NEBSpin(class LAMMPS *);
|
||||
~NEBSpin();
|
||||
|
|
|
@ -393,7 +393,7 @@ void PairSpinExchangeBiquadratic::compute_exchange(int i, int j, double rsq,
|
|||
jtype = type[j];
|
||||
|
||||
r2j = rsq/J3[itype][jtype]/J3[itype][jtype];
|
||||
r2k = rsq/J3[itype][jtype]/J3[itype][jtype];
|
||||
r2k = rsq/K3[itype][jtype]/K3[itype][jtype];
|
||||
|
||||
Jex = 4.0*J1_mag[itype][jtype]*r2j;
|
||||
Jex *= (1.0-J2[itype][jtype]*r2j);
|
||||
|
|
|
@ -22,13 +22,13 @@ CommandStyle(group2ndx,Group2Ndx)
|
|||
#ifndef LMP_GROUP_NDX_H
|
||||
#define LMP_GROUP_NDX_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class Group2Ndx : protected Pointers {
|
||||
class Group2Ndx : public Command {
|
||||
public:
|
||||
Group2Ndx(class LAMMPS *lmp) : Pointers(lmp) {};
|
||||
Group2Ndx(class LAMMPS *lmp) : Command(lmp) {};
|
||||
void command(int, char **);
|
||||
private:
|
||||
void write_group(FILE *, int);
|
||||
|
|
|
@ -22,15 +22,16 @@ CommandStyle(ndx2group,Ndx2Group)
|
|||
#ifndef LMP_NDX_GROUP_H
|
||||
#define LMP_NDX_GROUP_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
#include <vector>
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class Ndx2Group : protected Pointers {
|
||||
class Ndx2Group : public Command {
|
||||
public:
|
||||
Ndx2Group(class LAMMPS *lmp) : Pointers(lmp) {};
|
||||
Ndx2Group(class LAMMPS *lmp) : Command(lmp) {};
|
||||
void command(int, char **);
|
||||
private:
|
||||
void create(const std::string &, const std::vector<tagint> &);
|
||||
};
|
||||
|
||||
|
|
|
@ -128,20 +128,10 @@ void FixSRP::init()
|
|||
// bond particles do not interact with other types
|
||||
// type bptype only interacts with itself
|
||||
|
||||
char* arg1[4];
|
||||
arg1[0] = (char *) "exclude";
|
||||
arg1[1] = (char *) "type";
|
||||
char c0[20];
|
||||
char c1[20];
|
||||
|
||||
for (int z = 1; z < atom->ntypes; z++) {
|
||||
if (z == bptype)
|
||||
continue;
|
||||
sprintf(c0, "%d", z);
|
||||
arg1[2] = c0;
|
||||
sprintf(c1, "%d", bptype);
|
||||
arg1[3] = c1;
|
||||
neighbor->modify_params(4, arg1);
|
||||
neighbor->modify_params(fmt::format("exclude type {} {}",z,bptype));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ using namespace LAMMPS_NS;
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
TemperGrem::TemperGrem(LAMMPS *lmp) : Pointers(lmp) {}
|
||||
TemperGrem::TemperGrem(LAMMPS *lmp) : Command(lmp) {}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@ CommandStyle(temper/grem,TemperGrem)
|
|||
#ifndef LMP_TEMPER_GREM_H
|
||||
#define LMP_TEMPER_GREM_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class TemperGrem : protected Pointers {
|
||||
class TemperGrem : public Command {
|
||||
public:
|
||||
TemperGrem(class LAMMPS *);
|
||||
~TemperGrem();
|
||||
|
|
|
@ -42,7 +42,7 @@ using namespace LAMMPS_NS;
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
TemperNPT::TemperNPT(LAMMPS *lmp) : Pointers(lmp) {}
|
||||
TemperNPT::TemperNPT(LAMMPS *lmp) : Command(lmp) {}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -21,11 +21,11 @@ CommandStyle(temper/npt,TemperNPT)
|
|||
#ifndef LMP_TEMPERNPT_H
|
||||
#define LMP_TEMPERNPT_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class TemperNPT : protected Pointers {
|
||||
class TemperNPT : public Command {
|
||||
public:
|
||||
TemperNPT(class LAMMPS *);
|
||||
~TemperNPT();
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
The USER-PACE package provides the pace pair style,
|
||||
an efficient implementation of the Atomic Cluster Expansion
|
||||
The USER-PACE package provides the pace pair style,
|
||||
an efficient implementation of the Atomic Cluster Expansion
|
||||
potential (ACE).
|
||||
|
||||
ACE is a methodology for deriving a highly accurate classical
|
||||
potential fit to a large archive of quantum mechanical (DFT) data.
|
||||
ACE is a methodology for deriving a highly accurate classical
|
||||
potential fit to a large archive of quantum mechanical (DFT) data.
|
||||
This package was written by Yury Lysogorskiy and others
|
||||
at ICAMS, the Interdisciplinary Centre for Advanced Materials Simulation,
|
||||
at ICAMS, the Interdisciplinary Centre for Advanced Materials Simulation,
|
||||
Ruhr University Bochum, Germany (http://www.icams.de).
|
||||
|
||||
This package requires a library that can be downloaded and built
|
||||
in lib/pace or somewhere else, which must be done before building
|
||||
LAMMPS with this package. Details of the download, build, and
|
||||
install process for this package using traditional make (not CMake)
|
||||
This package requires a library that can be downloaded and built
|
||||
in lib/pace or somewhere else, which must be done before building
|
||||
LAMMPS with this package. Details of the download, build, and
|
||||
install process for this package using traditional make (not CMake)
|
||||
are given in the lib/pace/README file, and scripts are
|
||||
provided to help automate the process. Also see the LAMMPS manual for
|
||||
general information on building LAMMPS with external libraries
|
||||
using either traditional make or CMake.
|
||||
|
||||
More information about the USER-PACE implementation of ACE
|
||||
More information about the USER-PACE implementation of ACE
|
||||
is available here:
|
||||
|
||||
https://github.com/ICAMS/lammps-user-pace
|
||||
|
|
|
@ -32,7 +32,7 @@ enum{REGULAR,ESKM};
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
DynamicalMatrix::DynamicalMatrix(LAMMPS *lmp) : Pointers(lmp), fp(nullptr)
|
||||
DynamicalMatrix::DynamicalMatrix(LAMMPS *lmp) : Command(lmp), fp(nullptr)
|
||||
{
|
||||
external_force_clear = 1;
|
||||
}
|
||||
|
|
|
@ -11,62 +11,62 @@ CommandStyle(dynamical_matrix,DynamicalMatrix)
|
|||
#ifndef LMP_DYNAMICAL_MATRIX_H
|
||||
#define LMP_DYNAMICAL_MATRIX_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class DynamicalMatrix : protected Pointers {
|
||||
public:
|
||||
DynamicalMatrix(class LAMMPS *);
|
||||
virtual ~DynamicalMatrix();
|
||||
void command(int, char **);
|
||||
void setup();
|
||||
class DynamicalMatrix : public Command {
|
||||
public:
|
||||
DynamicalMatrix(class LAMMPS *);
|
||||
virtual ~DynamicalMatrix();
|
||||
void command(int, char **);
|
||||
void setup();
|
||||
|
||||
protected:
|
||||
int eflag,vflag; // flags for energy/virial computation
|
||||
int external_force_clear; // clear forces locally or externally
|
||||
protected:
|
||||
int eflag,vflag; // flags for energy/virial computation
|
||||
int external_force_clear; // clear forces locally or externally
|
||||
|
||||
|
||||
int triclinic; // 0 if domain is orthog, 1 if triclinic
|
||||
int pairflag;
|
||||
int triclinic; // 0 if domain is orthog, 1 if triclinic
|
||||
int pairflag;
|
||||
|
||||
int pair_compute_flag; // 0 if pair->compute is skipped
|
||||
int kspace_compute_flag; // 0 if kspace->compute is skipped
|
||||
int pair_compute_flag; // 0 if pair->compute is skipped
|
||||
int kspace_compute_flag; // 0 if kspace->compute is skipped
|
||||
|
||||
int nvec; // local atomic dof = length of xvec
|
||||
int nvec; // local atomic dof = length of xvec
|
||||
|
||||
void update_force();
|
||||
void force_clear();
|
||||
virtual void openfile(const char* filename);
|
||||
void update_force();
|
||||
void force_clear();
|
||||
virtual void openfile(const char* filename);
|
||||
|
||||
private:
|
||||
void options(int, char **);
|
||||
void calculateMatrix();
|
||||
void dynmat_clear(double **dynmat);
|
||||
void create_groupmap();
|
||||
void writeMatrix(double **dynmat);
|
||||
void convert_units(const char *style);
|
||||
void displace_atom(int local_idx, int direction, int magnitude);
|
||||
private:
|
||||
void options(int, char **);
|
||||
void calculateMatrix();
|
||||
void dynmat_clear(double **dynmat);
|
||||
void create_groupmap();
|
||||
void writeMatrix(double **dynmat);
|
||||
void convert_units(const char *style);
|
||||
void displace_atom(int local_idx, int direction, int magnitude);
|
||||
|
||||
double conversion;
|
||||
double conv_energy;
|
||||
double conv_distance;
|
||||
double conv_mass;
|
||||
double del;
|
||||
int igroup,groupbit;
|
||||
bigint gcount; // number of atoms in group
|
||||
bigint dynlen; // rank of dynamical matrix
|
||||
int scaleflag;
|
||||
int me;
|
||||
bigint *groupmap;
|
||||
double conversion;
|
||||
double conv_energy;
|
||||
double conv_distance;
|
||||
double conv_mass;
|
||||
double del;
|
||||
int igroup,groupbit;
|
||||
bigint gcount; // number of atoms in group
|
||||
bigint dynlen; // rank of dynamical matrix
|
||||
int scaleflag;
|
||||
int me;
|
||||
bigint *groupmap;
|
||||
|
||||
int compressed; // 1 if dump file is written compressed, 0 no
|
||||
int binaryflag; // 1 if dump file is written binary, 0 no
|
||||
int file_opened; // 1 if openfile method has been called, 0 no
|
||||
int file_flag; // 1 custom file name, 0 dynmat.dat
|
||||
int compressed; // 1 if dump file is written compressed, 0 no
|
||||
int binaryflag; // 1 if dump file is written binary, 0 no
|
||||
int file_opened; // 1 if openfile method has been called, 0 no
|
||||
int file_flag; // 1 custom file name, 0 dynmat.dat
|
||||
|
||||
FILE *fp;
|
||||
};
|
||||
FILE *fp;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ enum{REGULAR,BALLISTICO};
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ThirdOrder::ThirdOrder(LAMMPS *lmp) : Pointers(lmp), fp(nullptr)
|
||||
ThirdOrder::ThirdOrder(LAMMPS *lmp) : Command(lmp), fp(nullptr)
|
||||
{
|
||||
external_force_clear = 1;
|
||||
}
|
||||
|
|
|
@ -12,11 +12,11 @@ CommandStyle(third_order,ThirdOrder)
|
|||
#ifndef LMP_THIRD_ORDER_H
|
||||
#define LMP_THIRD_ORDER_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class ThirdOrder : protected Pointers {
|
||||
class ThirdOrder : public Command {
|
||||
public:
|
||||
ThirdOrder(class LAMMPS *);
|
||||
virtual ~ThirdOrder();
|
||||
|
|
|
@ -51,7 +51,7 @@ enum{X,Y,Z};
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Balance::Balance(LAMMPS *lmp) : Pointers(lmp)
|
||||
Balance::Balance(LAMMPS *lmp) : Command(lmp)
|
||||
{
|
||||
MPI_Comm_rank(world,&me);
|
||||
MPI_Comm_size(world,&nprocs);
|
||||
|
|
|
@ -20,11 +20,11 @@ CommandStyle(balance,Balance)
|
|||
#ifndef LMP_BALANCE_H
|
||||
#define LMP_BALANCE_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class Balance : protected Pointers {
|
||||
class Balance : public Command {
|
||||
public:
|
||||
class RCB *rcb;
|
||||
class FixStore *fixstore; // per-atom weights stored in FixStore
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "body.h"
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ enum{X=0,Y,Z,YZ,XZ,XY};
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ChangeBox::ChangeBox(LAMMPS *lmp) : Pointers(lmp) {}
|
||||
ChangeBox::ChangeBox(LAMMPS *lmp) : Command(lmp) {}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@ CommandStyle(change_box,ChangeBox)
|
|||
#ifndef LMP_CHANGE_BOX_H
|
||||
#define LMP_CHANGE_BOX_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class ChangeBox : protected Pointers {
|
||||
class ChangeBox : public Command {
|
||||
public:
|
||||
ChangeBox(class LAMMPS *);
|
||||
void command(int, char **);
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifndef LMP_COMMAND_H
|
||||
#define LMP_COMMAND_H
|
||||
|
||||
#include "pointers.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class Command : protected Pointers {
|
||||
public:
|
||||
Command(class LAMMPS *lmp) : Pointers(lmp) {};
|
||||
virtual void command(int, char **) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -22,7 +22,6 @@
|
|||
#include "modify.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <cctype>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#include "modify.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#include "update.h"
|
||||
#include "variable.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
#define BIG 1.0e20
|
||||
|
|
|
@ -13,15 +13,14 @@
|
|||
|
||||
#include "compute_temp_region.h"
|
||||
|
||||
#include <cstring>
|
||||
#include "atom.h"
|
||||
#include "update.h"
|
||||
#include "force.h"
|
||||
#include "domain.h"
|
||||
#include "region.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "group.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "region.h"
|
||||
#include "update.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ enum{NONE,RATIO,SUBSET};
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
CreateAtoms::CreateAtoms(LAMMPS *lmp) : Pointers(lmp), basistype(nullptr) {}
|
||||
CreateAtoms::CreateAtoms(LAMMPS *lmp) : Command(lmp), basistype(nullptr) {}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@ CommandStyle(create_atoms,CreateAtoms)
|
|||
#ifndef LMP_CREATE_ATOMS_H
|
||||
#define LMP_CREATE_ATOMS_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class CreateAtoms : protected Pointers {
|
||||
class CreateAtoms : public Command {
|
||||
public:
|
||||
CreateAtoms(class LAMMPS *);
|
||||
void command(int, char **);
|
||||
|
|
|
@ -38,7 +38,7 @@ enum{MANY,SBOND,SANGLE,SDIHEDRAL,SIMPROPER};
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
CreateBonds::CreateBonds(LAMMPS *lmp) : Pointers(lmp) {}
|
||||
CreateBonds::CreateBonds(LAMMPS *lmp) : Command(lmp) {}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@ CommandStyle(create_bonds,CreateBonds)
|
|||
#ifndef LMP_CREATE_BONDS_H
|
||||
#define LMP_CREATE_BONDS_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class CreateBonds : protected Pointers {
|
||||
class CreateBonds : public Command {
|
||||
public:
|
||||
CreateBonds(class LAMMPS *);
|
||||
void command(int, char **);
|
||||
|
|
|
@ -12,22 +12,24 @@
|
|||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "create_box.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "atom.h"
|
||||
#include "atom_vec.h"
|
||||
#include "comm.h"
|
||||
#include "domain.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "region.h"
|
||||
#include "region_prism.h"
|
||||
#include "force.h"
|
||||
#include "comm.h"
|
||||
#include "update.h"
|
||||
#include "error.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
CreateBox::CreateBox(LAMMPS *lmp) : Pointers(lmp) {}
|
||||
CreateBox::CreateBox(LAMMPS *lmp) : Command(lmp) {}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@ CommandStyle(create_box,CreateBox)
|
|||
#ifndef LMP_CREATE_BOX_H
|
||||
#define LMP_CREATE_BOX_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class CreateBox : protected Pointers {
|
||||
class CreateBox : public Command {
|
||||
public:
|
||||
CreateBox(class LAMMPS *);
|
||||
void command(int, char **);
|
||||
|
|
|
@ -41,7 +41,7 @@ using namespace LAMMPS_NS;
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
DeleteAtoms::DeleteAtoms(LAMMPS *lmp) : Pointers(lmp) {}
|
||||
DeleteAtoms::DeleteAtoms(LAMMPS *lmp) : Command(lmp) {}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -20,12 +20,12 @@ CommandStyle(delete_atoms,DeleteAtoms)
|
|||
#ifndef LMP_DELETE_ATOMS_H
|
||||
#define LMP_DELETE_ATOMS_H
|
||||
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
#include <map>
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class DeleteAtoms : protected Pointers {
|
||||
class DeleteAtoms : public Command {
|
||||
public:
|
||||
DeleteAtoms(class LAMMPS *);
|
||||
void command(int, char **);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue