update to upstream

This commit is contained in:
Axel Kohlmeyer
2021-05-21 16:15:31 -04:00
parent e01502d349
commit 10961b8cb6
33 changed files with 195 additions and 79 deletions

View File

@ -12,37 +12,89 @@ if(DOWNLOAD_MDI)
set(MDI_MD5 "ddfa46d6ee15b4e59cfd527ec7212184" CACHE STRING "MD5 checksum for MDI tarball")
mark_as_advanced(MDI_URL)
mark_as_advanced(MDI_MD5)
enable_language(C)
set(LAMMPS_LIB_MDI_BIN_DIR ${LAMMPS_LIB_BINARY_DIR}/mdi)
# only ON/OFF are allowed for "mpi" flag when building MDI library
# so translate boolean value of BUILD_MPI
# always disable MPI when cross-compiling to Windows.
if((BUILD_MPI) AND NOT((CMAKE_SYSTEM_NAME STREQUAL Windows) AND CMAKE_CROSSCOMPILING))
set(MDI_USE_MPI ON)
else()
set(MDI_USE_MPI OFF)
endif()
# detect if we have python development support and thus can enable python plugins
set(MDI_USE_PYTHON_PLUGINS OFF)
if(CMAKE_VERSION VERSION_LESS 3.12)
find_package(PythonLibs QUIET) # Deprecated since version 3.12
if (PYTHONLIBS_FOUND)
set(MDI_USE_PYTHON_PLUGINS ON)
endif()
else()
find_package(Python QUIET COMPONENTS Development)
if (Python_Development_FOUND)
set(MDI_USE_PYTHON_PLUGINS ON)
endif()
endif()
# download/ build MDI library
# always build static library with -fpic
# support cross-compilation and ninja-build
include(ExternalProject)
message(STATUS "Building mdi.")
ExternalProject_Add(mdi_external
ExternalProject_Add(mdi_build
URL ${MDI_URL}
URL_MD5 ${MDI_MD5}
UPDATE_COMMAND ""
CMAKE_ARGS ${CMAKE_REQUEST_PIC}
-DCMAKE_INSTALL_PREFIX=${LAMMPS_LIB_MDI_BIN_DIR}
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}
-DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_INSTALL_INCLUDEDIR}
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-Dlanguage=C
CMAKE_CACHE_ARGS -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-DTargetOpenMP_FIND_COMPONENTS:STRING=C;CXX)
-Dlibtype=STATIC
-Dmpi=${MDI_USE_MPI}
-Dpython_plugins=${MDI_USE_PYTHON_PLUGINS}
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_BYPRODUCTS "<BINARY_DIR>/MDI_Library/libmdi.a"
)
# Link the lammps library against MDI
target_include_directories(lammps PRIVATE ${LAMMPS_LIB_MDI_BIN_DIR}/${CMAKE_INSTALL_INCLUDEDIR}/mdi)
target_link_directories(lammps PRIVATE ${LAMMPS_LIB_MDI_BIN_DIR}/${CMAKE_INSTALL_LIBDIR}/mdi)
target_link_libraries(lammps PRIVATE mdi)
add_dependencies(lammps mdi_external)
# where is the compiled library?
ExternalProject_get_property(mdi_build BINARY_DIR)
set(MDI_BINARY_DIR "${BINARY_DIR}/MDI_Library")
# workaround for older CMake versions
file(MAKE_DIRECTORY ${MDI_BINARY_DIR})
# Link the lammps executable against MDI
target_include_directories(lmp PRIVATE ${LAMMPS_LIB_MDI_BIN_DIR}/${CMAKE_INSTALL_INCLUDEDIR}/mdi)
target_link_directories(lmp PRIVATE ${LAMMPS_LIB_MDI_BIN_DIR}/${CMAKE_INSTALL_LIBDIR}/mdi)
target_link_libraries(lmp PRIVATE mdi)
add_dependencies(lmp mdi_external)
# create imported target for the MDI library
add_library(LAMMPS::MDI UNKNOWN IMPORTED)
add_dependencies(LAMMPS::MDI mdi_build)
set_target_properties(LAMMPS::MDI PROPERTIES
IMPORTED_LOCATION "${MDI_BINARY_DIR}/libmdi.a"
INTERFACE_INCLUDE_DIRECTORIES ${MDI_BINARY_DIR}
)
set(MDI_DEP_LIBS "")
# if compiling with python plugins we need
# to add python libraries as dependency.
if(MDI_USE_PYTHON_PLUGINS)
if(CMAKE_VERSION VERSION_LESS 3.12)
list(APPEND MDI_DEP_LIBS ${PYTHON_LIBRARIES})
else()
list(APPEND MDI_DEP_LIBS Python::Python)
endif()
endif()
# need to add support for dlopen/dlsym, except when compiling for Windows.
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
list(APPEND MDI_DEP_LIBS "${CMAKE_DL_LIBS}")
endif()
if(MDI_DEP_LIBS)
set_target_properties(LAMMPS::MDI PROPERTIES
IMPORTED_LINK_INTERFACE_LIBRARIES "${MDI_DEP_LIBS}")
endif()
target_link_libraries(lammps PRIVATE LAMMPS::MDI)
target_link_libraries(lmp PRIVATE LAMMPS::MDI)
else()

View File

@ -14,13 +14,12 @@ execute_process(
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
file(GLOB PACE_EVALUATOR_INCLUDE_DIR ${CMAKE_BINARY_DIR}/lammps-user-pace-*/USER-PACE)
file(GLOB PACE_EVALUATOR_SOURCES ${CMAKE_BINARY_DIR}/lammps-user-pace-*/USER-PACE/*.cpp)
list(FILTER PACE_EVALUATOR_SOURCES EXCLUDE REGEX pair_pace.cpp)
add_library(pace STATIC ${PACE_EVALUATOR_SOURCES})
set_target_properties(pace PROPERTIES OUTPUT_NAME lammps_pace${LAMMPS_MACHINE})
set_target_properties(pace PROPERTIES CXX_EXTENSIONS ON OUTPUT_NAME lammps_pace${LAMMPS_MACHINE})
target_include_directories(pace PUBLIC ${PACE_EVALUATOR_INCLUDE_DIR})
target_link_libraries(lammps PRIVATE pace)

View File

@ -5,13 +5,13 @@ set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MESSAGE MISC MLIAP MOLECULE
MPIIO MSCG OPT PERI PLUGIN POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN
SRD VORONOI
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD USER-HDNNP
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESODPD USER-MESONT
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP USER-PACE
USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP USER-REACTION
USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY
USER-UEF USER-VTK USER-YAFF)
USER-ADIOS USER-ATC USER-AWPMD USER-BROWNIAN USER-BOCS USER-CGDNA USER-CGSDK
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
USER-HDNNP USER-INTEL USER-LB USER-MANIFOLD USER-MDI USER-MEAMC USER-MESODPD
USER-MESONT USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP
USER-PACE USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP
USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH
USER-TALLY USER-UEF USER-VTK USER-YAFF)
foreach(PKG ${ALL_PACKAGES})
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)

View File

@ -7,13 +7,13 @@ set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MESSAGE MISC MLIAP MOLECULE
MPIIO MSCG OPT PERI PLUGIN POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN
SRD VORONOI
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD USER-HDNNP
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESODPD USER-MESONT
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP USER-PACE
USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP USER-REACTION
USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY
USER-UEF USER-VTK USER-YAFF)
USER-ADIOS USER-ATC USER-AWPMD USER-BROWNIAN USER-BOCS USER-CGDNA USER-CGSDK
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
USER-HDNNP USER-INTEL USER-LB USER-MANIFOLD USER-MDI USER-MEAMC USER-MESODPD
USER-MESONT USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP
USER-PACE USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP
USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH
USER-TALLY USER-UEF USER-VTK USER-YAFF)
foreach(PKG ${ALL_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)

View File

@ -1,7 +1,7 @@
# preset that turns on packages with automatic downloads of sources of potentials
# compilation of libraries like Plumed or ScaFaCoS can take a considerable amount of time.
# Preset that turns on packages with automatic downloads of sources or potentials.
# Compilation of libraries like Plumed or ScaFaCoS can take a considerable amount of time.
set(ALL_PACKAGES KIM LATTE MSCG VORONOI USER-PLUMED USER-SCAFACOS USER-SMD USER-MESONT)
set(ALL_PACKAGES KIM LATTE MSCG VORONOI USER-PLUMED USER-SCAFACOS USER-SMD USER-MESONT USER-MDI USER-PACE)
foreach(PKG ${ALL_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
@ -9,9 +9,11 @@ endforeach()
set(DOWNLOAD_KIM ON CACHE BOOL "" FORCE)
set(DOWNLOAD_LATTE ON CACHE BOOL "" FORCE)
set(DOWNLOAD_MDI ON CACHE BOOL "" FORCE)
set(DOWNLOAD_MSCG ON CACHE BOOL "" FORCE)
set(DOWNLOAD_VORO ON CACHE BOOL "" FORCE)
set(DOWNLOAD_EIGEN3 ON CACHE BOOL "" FORCE)
set(DOWNLOAD_PACE ON CACHE BOOL "" FORCE)
set(DOWNLOAD_PLUMED ON CACHE BOOL "" FORCE)
set(DOWNLOAD_SCAFACOS ON CACHE BOOL "" FORCE)

View File

@ -1,11 +1,11 @@
set(WIN_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
GRANULAR KSPACE LATTE MANYBODY MC MISC MLIAP MOLECULE OPT
PERI POEMS QEQ REPLICA RIGID SHOCK SNAP SPIN SRD VORONOI
USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK
USER-ATC USER-AWPMD USER-BOCS USER-BROWNIAN USER-CGDNA USER-CGSDK
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF
USER-FEP USER-INTEL USER-MANIFOLD USER-MEAMC USER-MESODPD
USER-MESONT USER-MISC USER-MGPT USER-MOFFF USER-MOLFILE USER-OMP
USER-PHONON USER-PTM USER-QTB USER-REACTION USER-REAXC
USER-PACE USER-PHONON USER-PTM USER-QTB USER-REACTION USER-REAXC
USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF
USER-YAFF)

View File

@ -4,7 +4,7 @@
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MESSAGE MPIIO MSCG
PYTHON VORONOI
USER-ADIOS USER-ATC USER-AWPMD USER-H5MD USER-HDNNP USER-LB USER-MOLFILE
USER-MESONT USER-NETCDF USER-PACE USER-PLUMED USER-QMMM USER-QUIP
USER-MESONT USER-MDI USER-NETCDF USER-PACE USER-PLUMED USER-QMMM USER-QUIP
USER-SCAFACOS USER-SMD USER-VTK)
foreach(PKG ${PACKAGES_WITH_LIB})

View File

@ -109,7 +109,7 @@ instructions on how to run the examples.
If LAMMPS is used as a stand-alone engine it should set up the system
it will be modeling in its input script, then invoke the
:doc:`mdi/engine <mdi_engine>` command. This will put LAMMPS into
engine mode where it waits for messages and data from the driver.
"engine mode" where it waits for messages and data from the driver.
When the driver sends an "EXIT" command, LAMMPS will exit engine mode
and the input script will continue.

View File

@ -10,6 +10,7 @@ letter abbreviation can be used:
* :ref:`-i or -in <file>`
* :ref:`-k or -kokkos <run-kokkos>`
* :ref:`-l or -log <log>`
* :ref:`-mdi <mdi>`
* :ref:`-m or -mpicolor <mpicolor>`
* :ref:`-c or -cite <cite>`
* :ref:`-nc or -nocite <nocite>`
@ -196,9 +197,23 @@ Option -plog will override the name of the partition log files file.N.
----------
.. _mdi:
**-mdi 'multiple flags'**
This flag is only recognized and used when LAMMPS has support for the MolSSI
Driver Interface (MDI) included as part of the :ref:`USER-MDI <PKG-USER-MDI>`
package. This flag is specific to the MDI library and controls how LAMMPS
interacts with MDI. There are usually multiple flags that have to follow it
and those have to be placed in quotation marks. For more information about
how to launch LAMMPS in MDI client/server mode please refer to the
:doc:`MDI Howto <Howto_mdi>`.
----------
.. _mpicolor:
**-mpicolor** color
**-mpicolor color**
If used, this must be the first command-line argument after the LAMMPS
executable name. It is only used when LAMMPS is launched by an mpirun
@ -223,7 +238,7 @@ links with from the lib/message directory. See the
.. _cite:
**-cite style or file name**
**-cite style** or **file name**
Select how and where to output a reminder about citing contributions
to the LAMMPS code that were used during the run. Available styles are

View File

@ -69,7 +69,6 @@ parenthesized comments):
HAM (keyword is the first text on line)
N 181 FP 0 0 EQ 90.0 (N, FP, EQ parameters)
(blank line)
N 181 FP 0 0 (N, FP parameters)
1 0.0 200.5 2.5 (index, angle, energy, derivative)
2 1.0 198.0 2.5
...

View File

@ -145,6 +145,22 @@ specified since a Coulombic cutoff cannot be specified for an individual I,J
type pair. All type pairs use the same global Coulombic cutoff specified in
the pair_style command.
.. warning::
Because of how these pair styles implement the coulomb interactions
by implicitly defining a fourth site for the negative charge
of the TIP4P and similar water models, special care must be taken
when using these pair styles with other computations that also use
charges. Unless they are specially set up to also handle the implicit
definition of the 4th site, results are likely incorrect. Example:
:doc:`compute dipole/chunk <compute_dipole_chunk>`. For the same
reason, when using one of these pair styles with
:doc:`pair_style hybrid <pair_hybrid>`, **all** coulomb interactions
should be handled by a single sub-style with TIP4P support. All other
instances and styles will "see" the M point charges at the position
of the Oxygen atom and thus compute incorrect forces and energies.
LAMMPS will print a warning when it detects one of these issues.
----------
A version of these styles with a soft core, *lj/cut/tip4p/long/soft*\ , suitable

View File

@ -67,7 +67,7 @@ delete_atoms overlap 1.0 small big
reset_timestep 0
neighbor 0.3 bin
neighbor 0.3 multi
neigh_modify delay 0 every 1 check yes
comm_modify mode multi group big vel yes

View File

@ -67,7 +67,7 @@ delete_atoms overlap 1.0 small big
reset_timestep 0
neighbor 0.3 bin
neighbor 0.3 multi
neigh_modify delay 0 every 1 check yes
comm_modify mode multi group big vel yes

View File

@ -61,7 +61,7 @@ delete_atoms overlap 0.5 small big
reset_timestep 0
neighbor 0.3 bin
neighbor 0.3 multi
neigh_modify delay 0 every 1 check yes
comm_modify mode multi group big vel yes

View File

@ -61,7 +61,7 @@ delete_atoms overlap 0.5 small big
reset_timestep 0
neighbor 0.3 bin
neighbor 0.3 multi
neigh_modify delay 0 every 1 check yes
comm_modify mode multi group big vel yes

View File

@ -72,7 +72,7 @@ delete_atoms overlap 1.6 small big
reset_timestep 0
neighbor 0.3 bin
neighbor 0.3 multi
neigh_modify delay 0 every 1 check yes
comm_modify mode multi group big vel yes

View File

@ -72,7 +72,7 @@ delete_atoms overlap 1.6 small big
reset_timestep 0
neighbor 0.3 bin
neighbor 0.3 multi
neigh_modify delay 0 every 1 check yes
comm_modify mode multi group big vel yes

View File

@ -34,7 +34,7 @@ reset_timestep 0
velocity small create 1.44 87287 loop geom
neighbor 0.3 bin
neighbor 0.3 multi
neigh_modify delay 0 every 1 check yes
neigh_modify exclude molecule/intra big include big

View File

@ -70,7 +70,7 @@ delete_atoms overlap 1.0 small big
reset_timestep 0
neighbor 0.3 bin
neighbor 0.3 multi
neigh_modify delay 0 every 1 check yes
comm_modify mode multi group big vel yes

View File

@ -70,7 +70,7 @@ delete_atoms overlap 1.0 small big
reset_timestep 0
neighbor 0.3 bin
neighbor 0.3 multi
neigh_modify delay 0 every 1 check yes
comm_modify mode multi group big vel yes

View File

@ -67,7 +67,7 @@ delete_atoms overlap 0.5 small big
reset_timestep 0
neighbor 0.3 bin
neighbor 0.3 multi
neigh_modify delay 0 every 1 check yes
comm_modify mode multi group big vel yes

View File

@ -67,7 +67,7 @@ delete_atoms overlap 0.5 small big
reset_timestep 0
neighbor 0.3 bin
neighbor 0.3 multi
neigh_modify delay 0 every 1 check yes
comm_modify mode multi group big vel yes

View File

@ -33,7 +33,7 @@ reset_timestep 0
velocity small create 1.44 87287 loop geom
neighbor 0.3 bin
neighbor 0.3 multi
neigh_modify delay 0 every 1 check yes
neigh_modify exclude molecule/intra big include big

View File

@ -37,10 +37,11 @@ atom_modify first charged
kspace_style pppm/cg 0.00001
kspace_modify order 3
comm_modify mode multi
neighbor 2.0 multi
neigh_modify delay 4 every 2 check yes
comm_modify mode multi
timestep 10.0
fix 1 all nvt temp 310.0 310.0 100.0

View File

@ -253,7 +253,7 @@ TYPE grow_kokkos(TYPE &data, typename TYPE::value_type **&array,
data.resize(n1);
bigint nbytes = ((bigint) sizeof(typename TYPE::value_type *)) * n1;
array = (typename TYPE::value_type **) smalloc(nbytes,name);
array = (typename TYPE::value_type **) srealloc(array,nbytes,name);
for (int i = 0; i < n1; i++)
if (data.h_view.extent(1)==0)

View File

@ -52,6 +52,14 @@ PairTableKokkos<DeviceType>::~PairTableKokkos()
{
if (copymode) return;
if (allocated) {
memoryKK->destroy_kokkos(k_eatom,eatom);
memoryKK->destroy_kokkos(k_vatom,vatom);
memory->destroy(setflag);
memoryKK->destroy_kokkos(d_table->cutsq,cutsq);
memoryKK->destroy_kokkos(d_table->tabindex,tabindex);
}
delete h_table;
h_table = nullptr;
delete d_table;

View File

@ -166,10 +166,10 @@ PairTableRXKokkos<DeviceType>::~PairTableRXKokkos()
delete [] site1;
delete [] site2;
if (allocated) {
memoryKK->destroy_kokkos(k_eatom,eatom);
memoryKK->destroy_kokkos(k_vatom,vatom);
if (allocated) {
memory->destroy(setflag);
memoryKK->destroy_kokkos(d_table->cutsq,cutsq);
memoryKK->destroy_kokkos(d_table->tabindex,tabindex);
}

View File

@ -55,6 +55,7 @@ SNAKokkos<DeviceType, real_type, vector_length>::SNAKokkos(real_type rfac0_in,
ncoeff = compute_ncoeff();
nmax = 0;
natom = 0;
build_indexlist();

View File

@ -221,7 +221,7 @@ FixQBMSST::FixQBMSST(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
// create a new compute potential energy compute
id_pe = utils::strdup(std::string(id) + "_pe");
modify->add_compute(fmt::format("{} all pe",id_temp));
modify->add_compute(fmt::format("{} all pe",id_pe));
peflag = 1;
// allocate qbmsst

View File

@ -15,9 +15,11 @@
#include "compute_dipole_chunk.h"
#include "atom.h"
#include "comm.h"
#include "compute_chunk_atom.h"
#include "domain.h"
#include "error.h"
#include "force.h"
#include "math_special.h"
#include "memory.h"
#include "modify.h"
@ -95,6 +97,10 @@ void ComputeDipoleChunk::init()
cchunk = (ComputeChunkAtom *) modify->compute[icompute];
if (strcmp(cchunk->style,"chunk/atom") != 0)
error->all(FLERR,"Compute dipole/chunk does not use chunk/atom compute");
if ((force->pair_match("/tip4p/",0) != nullptr) && (comm->me == 0))
error->warning(FLERR,"Computed dipole moments may be incorrect when "
"using a tip4p pair style");
}
/* ---------------------------------------------------------------------- */

View File

@ -397,7 +397,7 @@ void FixWallRegion::morse(double r)
{
double dr = r - sigma;
double dexp = exp(-alpha * dr);
fwall = coeff1 * (dexp*dexp - dexp) / r;
fwall = coeff1 * (dexp*dexp - dexp);
eng = epsilon * (dexp*dexp - 2.0*dexp) - offset;
}

View File

@ -1142,6 +1142,7 @@ void _noopt LAMMPS::help()
"-in none/filename : read input from file or stdin (default) (-i)\n"
"-kokkos on/off ... : turn KOKKOS mode on or off (-k)\n"
"-log none/filename : where to send log output (-l)\n"
"-mdi '<mdi flags>' : pass flags to the MolSSI Driver Interface\n"
"-mpicolor color : which exe in a multi-exe mpirun cmd (-m)\n"
"-cite : select citation reminder style (-c)\n"
"-nocite : disable citation reminder (-nc)\n"

View File

@ -341,6 +341,8 @@ void PairHybrid::settings(int narg, char **arg)
// multiple[i] = 1 to M if sub-style used multiple times, else 0
int num_tip4p = 0, num_coul = 0; // count sub-styles with tip4p and coulomb
for (int i = 0; i < nstyles; i++) {
int count = 0;
for (int j = 0; j < nstyles; j++) {
@ -348,8 +350,22 @@ void PairHybrid::settings(int narg, char **arg)
if (j == i) multiple[i] = count;
}
if (count == 1) multiple[i] = 0;
if (utils::strmatch(keywords[i],"/tip4p/")) ++num_tip4p;
if (utils::strmatch(keywords[i],"/coul/")
|| utils::strmatch(keywords[i],"^comb")
|| utils::strmatch(keywords[i],"^reax/c")) ++num_coul;
}
if ((num_tip4p > 1) && (comm->me == 0))
error->warning(FLERR,"Using multiple tip4p sub-styles can result in "
"inconsistent calculation of coulomb interactions");
if ((num_tip4p > 0) && (num_coul > 0) && (comm->me == 0))
error->warning(FLERR,"Using a tip4p sub-style with other sub-styles "
"that include coulomb interactions can result in "
"inconsistent calculation of the coulomb interactions");
// set pair flags from sub-style flags
flags();