update to upstream
This commit is contained in:
@ -12,37 +12,89 @@ if(DOWNLOAD_MDI)
|
|||||||
set(MDI_MD5 "ddfa46d6ee15b4e59cfd527ec7212184" CACHE STRING "MD5 checksum for MDI tarball")
|
set(MDI_MD5 "ddfa46d6ee15b4e59cfd527ec7212184" CACHE STRING "MD5 checksum for MDI tarball")
|
||||||
mark_as_advanced(MDI_URL)
|
mark_as_advanced(MDI_URL)
|
||||||
mark_as_advanced(MDI_MD5)
|
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)
|
include(ExternalProject)
|
||||||
message(STATUS "Building mdi.")
|
ExternalProject_Add(mdi_build
|
||||||
ExternalProject_Add(mdi_external
|
|
||||||
URL ${MDI_URL}
|
URL ${MDI_URL}
|
||||||
URL_MD5 ${MDI_MD5}
|
URL_MD5 ${MDI_MD5}
|
||||||
UPDATE_COMMAND ""
|
|
||||||
CMAKE_ARGS ${CMAKE_REQUEST_PIC}
|
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_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||||
-DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}
|
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
|
||||||
-DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_INSTALL_INCLUDEDIR}
|
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||||
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
|
|
||||||
-Dlanguage=C
|
-Dlanguage=C
|
||||||
CMAKE_CACHE_ARGS -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
|
-Dlibtype=STATIC
|
||||||
-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
|
-Dmpi=${MDI_USE_MPI}
|
||||||
-DTargetOpenMP_FIND_COMPONENTS:STRING=C;CXX)
|
-Dpython_plugins=${MDI_USE_PYTHON_PLUGINS}
|
||||||
|
UPDATE_COMMAND ""
|
||||||
|
INSTALL_COMMAND ""
|
||||||
|
BUILD_BYPRODUCTS "<BINARY_DIR>/MDI_Library/libmdi.a"
|
||||||
|
)
|
||||||
|
|
||||||
# Link the lammps library against MDI
|
# where is the compiled library?
|
||||||
target_include_directories(lammps PRIVATE ${LAMMPS_LIB_MDI_BIN_DIR}/${CMAKE_INSTALL_INCLUDEDIR}/mdi)
|
ExternalProject_get_property(mdi_build BINARY_DIR)
|
||||||
target_link_directories(lammps PRIVATE ${LAMMPS_LIB_MDI_BIN_DIR}/${CMAKE_INSTALL_LIBDIR}/mdi)
|
set(MDI_BINARY_DIR "${BINARY_DIR}/MDI_Library")
|
||||||
target_link_libraries(lammps PRIVATE mdi)
|
# workaround for older CMake versions
|
||||||
add_dependencies(lammps mdi_external)
|
file(MAKE_DIRECTORY ${MDI_BINARY_DIR})
|
||||||
|
|
||||||
# Link the lammps executable against MDI
|
# create imported target for the MDI library
|
||||||
target_include_directories(lmp PRIVATE ${LAMMPS_LIB_MDI_BIN_DIR}/${CMAKE_INSTALL_INCLUDEDIR}/mdi)
|
add_library(LAMMPS::MDI UNKNOWN IMPORTED)
|
||||||
target_link_directories(lmp PRIVATE ${LAMMPS_LIB_MDI_BIN_DIR}/${CMAKE_INSTALL_LIBDIR}/mdi)
|
add_dependencies(LAMMPS::MDI mdi_build)
|
||||||
target_link_libraries(lmp PRIVATE mdi)
|
set_target_properties(LAMMPS::MDI PROPERTIES
|
||||||
add_dependencies(lmp mdi_external)
|
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()
|
else()
|
||||||
|
|
||||||
|
|||||||
@ -14,13 +14,12 @@ execute_process(
|
|||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
file(GLOB PACE_EVALUATOR_INCLUDE_DIR ${CMAKE_BINARY_DIR}/lammps-user-pace-*/USER-PACE)
|
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)
|
file(GLOB PACE_EVALUATOR_SOURCES ${CMAKE_BINARY_DIR}/lammps-user-pace-*/USER-PACE/*.cpp)
|
||||||
list(FILTER PACE_EVALUATOR_SOURCES EXCLUDE REGEX pair_pace.cpp)
|
list(FILTER PACE_EVALUATOR_SOURCES EXCLUDE REGEX pair_pace.cpp)
|
||||||
|
|
||||||
add_library(pace STATIC ${PACE_EVALUATOR_SOURCES})
|
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_include_directories(pace PUBLIC ${PACE_EVALUATOR_INCLUDE_DIR})
|
||||||
target_link_libraries(lammps PRIVATE pace)
|
target_link_libraries(lammps PRIVATE pace)
|
||||||
|
|
||||||
|
|||||||
@ -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
|
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MESSAGE MISC MLIAP MOLECULE
|
||||||
MPIIO MSCG OPT PERI PLUGIN POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN
|
MPIIO MSCG OPT PERI PLUGIN POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN
|
||||||
SRD VORONOI
|
SRD VORONOI
|
||||||
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
USER-ADIOS USER-ATC USER-AWPMD USER-BROWNIAN USER-BOCS USER-CGDNA USER-CGSDK
|
||||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD USER-HDNNP
|
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESODPD USER-MESONT
|
USER-HDNNP USER-INTEL USER-LB USER-MANIFOLD USER-MDI USER-MEAMC USER-MESODPD
|
||||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP USER-PACE
|
USER-MESONT USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP
|
||||||
USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP USER-REACTION
|
USER-PACE USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP
|
||||||
USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH
|
||||||
USER-UEF USER-VTK USER-YAFF)
|
USER-TALLY USER-UEF USER-VTK USER-YAFF)
|
||||||
|
|
||||||
foreach(PKG ${ALL_PACKAGES})
|
foreach(PKG ${ALL_PACKAGES})
|
||||||
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)
|
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)
|
||||||
|
|||||||
@ -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
|
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MESSAGE MISC MLIAP MOLECULE
|
||||||
MPIIO MSCG OPT PERI PLUGIN POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN
|
MPIIO MSCG OPT PERI PLUGIN POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN
|
||||||
SRD VORONOI
|
SRD VORONOI
|
||||||
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
USER-ADIOS USER-ATC USER-AWPMD USER-BROWNIAN USER-BOCS USER-CGDNA USER-CGSDK
|
||||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD USER-HDNNP
|
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESODPD USER-MESONT
|
USER-HDNNP USER-INTEL USER-LB USER-MANIFOLD USER-MDI USER-MEAMC USER-MESODPD
|
||||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP USER-PACE
|
USER-MESONT USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP
|
||||||
USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP USER-REACTION
|
USER-PACE USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP
|
||||||
USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH
|
||||||
USER-UEF USER-VTK USER-YAFF)
|
USER-TALLY USER-UEF USER-VTK USER-YAFF)
|
||||||
|
|
||||||
foreach(PKG ${ALL_PACKAGES})
|
foreach(PKG ${ALL_PACKAGES})
|
||||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
# preset that turns on packages with automatic downloads of sources of potentials
|
# 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.
|
# 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})
|
foreach(PKG ${ALL_PACKAGES})
|
||||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||||
@ -9,9 +9,11 @@ endforeach()
|
|||||||
|
|
||||||
set(DOWNLOAD_KIM ON CACHE BOOL "" FORCE)
|
set(DOWNLOAD_KIM ON CACHE BOOL "" FORCE)
|
||||||
set(DOWNLOAD_LATTE 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_MSCG ON CACHE BOOL "" FORCE)
|
||||||
set(DOWNLOAD_VORO ON CACHE BOOL "" FORCE)
|
set(DOWNLOAD_VORO ON CACHE BOOL "" FORCE)
|
||||||
set(DOWNLOAD_EIGEN3 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_PLUMED ON CACHE BOOL "" FORCE)
|
||||||
set(DOWNLOAD_SCAFACOS ON CACHE BOOL "" FORCE)
|
set(DOWNLOAD_SCAFACOS ON CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
set(WIN_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
set(WIN_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||||
GRANULAR KSPACE LATTE MANYBODY MC MISC MLIAP MOLECULE OPT
|
GRANULAR KSPACE LATTE MANYBODY MC MISC MLIAP MOLECULE OPT
|
||||||
PERI POEMS QEQ REPLICA RIGID SHOCK SNAP SPIN SRD VORONOI
|
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-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF
|
||||||
USER-FEP USER-INTEL USER-MANIFOLD USER-MEAMC USER-MESODPD
|
USER-FEP USER-INTEL USER-MANIFOLD USER-MEAMC USER-MESODPD
|
||||||
USER-MESONT USER-MISC USER-MGPT USER-MOFFF USER-MOLFILE USER-OMP
|
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-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF
|
||||||
USER-YAFF)
|
USER-YAFF)
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MESSAGE MPIIO MSCG
|
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MESSAGE MPIIO MSCG
|
||||||
PYTHON VORONOI
|
PYTHON VORONOI
|
||||||
USER-ADIOS USER-ATC USER-AWPMD USER-H5MD USER-HDNNP USER-LB USER-MOLFILE
|
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)
|
USER-SCAFACOS USER-SMD USER-VTK)
|
||||||
|
|
||||||
foreach(PKG ${PACKAGES_WITH_LIB})
|
foreach(PKG ${PACKAGES_WITH_LIB})
|
||||||
|
|||||||
@ -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
|
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
|
it will be modeling in its input script, then invoke the
|
||||||
:doc:`mdi/engine <mdi_engine>` command. This will put LAMMPS into
|
: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
|
When the driver sends an "EXIT" command, LAMMPS will exit engine mode
|
||||||
and the input script will continue.
|
and the input script will continue.
|
||||||
|
|
||||||
|
|||||||
@ -10,6 +10,7 @@ letter abbreviation can be used:
|
|||||||
* :ref:`-i or -in <file>`
|
* :ref:`-i or -in <file>`
|
||||||
* :ref:`-k or -kokkos <run-kokkos>`
|
* :ref:`-k or -kokkos <run-kokkos>`
|
||||||
* :ref:`-l or -log <log>`
|
* :ref:`-l or -log <log>`
|
||||||
|
* :ref:`-mdi <mdi>`
|
||||||
* :ref:`-m or -mpicolor <mpicolor>`
|
* :ref:`-m or -mpicolor <mpicolor>`
|
||||||
* :ref:`-c or -cite <cite>`
|
* :ref:`-c or -cite <cite>`
|
||||||
* :ref:`-nc or -nocite <nocite>`
|
* :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:
|
||||||
|
|
||||||
**-mpicolor** color
|
**-mpicolor color**
|
||||||
|
|
||||||
If used, this must be the first command-line argument after the LAMMPS
|
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
|
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:
|
||||||
|
|
||||||
**-cite style or file name**
|
**-cite style** or **file name**
|
||||||
|
|
||||||
Select how and where to output a reminder about citing contributions
|
Select how and where to output a reminder about citing contributions
|
||||||
to the LAMMPS code that were used during the run. Available styles are
|
to the LAMMPS code that were used during the run. Available styles are
|
||||||
|
|||||||
@ -69,7 +69,6 @@ parenthesized comments):
|
|||||||
HAM (keyword is the first text on line)
|
HAM (keyword is the first text on line)
|
||||||
N 181 FP 0 0 EQ 90.0 (N, FP, EQ parameters)
|
N 181 FP 0 0 EQ 90.0 (N, FP, EQ parameters)
|
||||||
(blank line)
|
(blank line)
|
||||||
N 181 FP 0 0 (N, FP parameters)
|
|
||||||
1 0.0 200.5 2.5 (index, angle, energy, derivative)
|
1 0.0 200.5 2.5 (index, angle, energy, derivative)
|
||||||
2 1.0 198.0 2.5
|
2 1.0 198.0 2.5
|
||||||
...
|
...
|
||||||
|
|||||||
@ -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
|
type pair. All type pairs use the same global Coulombic cutoff specified in
|
||||||
the pair_style command.
|
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
|
A version of these styles with a soft core, *lj/cut/tip4p/long/soft*\ , suitable
|
||||||
|
|||||||
@ -67,7 +67,7 @@ delete_atoms overlap 1.0 small big
|
|||||||
|
|
||||||
reset_timestep 0
|
reset_timestep 0
|
||||||
|
|
||||||
neighbor 0.3 bin
|
neighbor 0.3 multi
|
||||||
neigh_modify delay 0 every 1 check yes
|
neigh_modify delay 0 every 1 check yes
|
||||||
|
|
||||||
comm_modify mode multi group big vel yes
|
comm_modify mode multi group big vel yes
|
||||||
|
|||||||
@ -67,7 +67,7 @@ delete_atoms overlap 1.0 small big
|
|||||||
|
|
||||||
reset_timestep 0
|
reset_timestep 0
|
||||||
|
|
||||||
neighbor 0.3 bin
|
neighbor 0.3 multi
|
||||||
neigh_modify delay 0 every 1 check yes
|
neigh_modify delay 0 every 1 check yes
|
||||||
|
|
||||||
comm_modify mode multi group big vel yes
|
comm_modify mode multi group big vel yes
|
||||||
|
|||||||
@ -61,7 +61,7 @@ delete_atoms overlap 0.5 small big
|
|||||||
|
|
||||||
reset_timestep 0
|
reset_timestep 0
|
||||||
|
|
||||||
neighbor 0.3 bin
|
neighbor 0.3 multi
|
||||||
neigh_modify delay 0 every 1 check yes
|
neigh_modify delay 0 every 1 check yes
|
||||||
|
|
||||||
comm_modify mode multi group big vel yes
|
comm_modify mode multi group big vel yes
|
||||||
|
|||||||
@ -61,7 +61,7 @@ delete_atoms overlap 0.5 small big
|
|||||||
|
|
||||||
reset_timestep 0
|
reset_timestep 0
|
||||||
|
|
||||||
neighbor 0.3 bin
|
neighbor 0.3 multi
|
||||||
neigh_modify delay 0 every 1 check yes
|
neigh_modify delay 0 every 1 check yes
|
||||||
|
|
||||||
comm_modify mode multi group big vel yes
|
comm_modify mode multi group big vel yes
|
||||||
|
|||||||
@ -72,7 +72,7 @@ delete_atoms overlap 1.6 small big
|
|||||||
|
|
||||||
reset_timestep 0
|
reset_timestep 0
|
||||||
|
|
||||||
neighbor 0.3 bin
|
neighbor 0.3 multi
|
||||||
neigh_modify delay 0 every 1 check yes
|
neigh_modify delay 0 every 1 check yes
|
||||||
|
|
||||||
comm_modify mode multi group big vel yes
|
comm_modify mode multi group big vel yes
|
||||||
|
|||||||
@ -72,7 +72,7 @@ delete_atoms overlap 1.6 small big
|
|||||||
|
|
||||||
reset_timestep 0
|
reset_timestep 0
|
||||||
|
|
||||||
neighbor 0.3 bin
|
neighbor 0.3 multi
|
||||||
neigh_modify delay 0 every 1 check yes
|
neigh_modify delay 0 every 1 check yes
|
||||||
|
|
||||||
comm_modify mode multi group big vel yes
|
comm_modify mode multi group big vel yes
|
||||||
|
|||||||
@ -34,7 +34,7 @@ reset_timestep 0
|
|||||||
|
|
||||||
velocity small create 1.44 87287 loop geom
|
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 delay 0 every 1 check yes
|
||||||
neigh_modify exclude molecule/intra big include big
|
neigh_modify exclude molecule/intra big include big
|
||||||
|
|
||||||
|
|||||||
@ -70,7 +70,7 @@ delete_atoms overlap 1.0 small big
|
|||||||
|
|
||||||
reset_timestep 0
|
reset_timestep 0
|
||||||
|
|
||||||
neighbor 0.3 bin
|
neighbor 0.3 multi
|
||||||
neigh_modify delay 0 every 1 check yes
|
neigh_modify delay 0 every 1 check yes
|
||||||
|
|
||||||
comm_modify mode multi group big vel yes
|
comm_modify mode multi group big vel yes
|
||||||
|
|||||||
@ -70,7 +70,7 @@ delete_atoms overlap 1.0 small big
|
|||||||
|
|
||||||
reset_timestep 0
|
reset_timestep 0
|
||||||
|
|
||||||
neighbor 0.3 bin
|
neighbor 0.3 multi
|
||||||
neigh_modify delay 0 every 1 check yes
|
neigh_modify delay 0 every 1 check yes
|
||||||
|
|
||||||
comm_modify mode multi group big vel yes
|
comm_modify mode multi group big vel yes
|
||||||
|
|||||||
@ -67,7 +67,7 @@ delete_atoms overlap 0.5 small big
|
|||||||
|
|
||||||
reset_timestep 0
|
reset_timestep 0
|
||||||
|
|
||||||
neighbor 0.3 bin
|
neighbor 0.3 multi
|
||||||
neigh_modify delay 0 every 1 check yes
|
neigh_modify delay 0 every 1 check yes
|
||||||
|
|
||||||
comm_modify mode multi group big vel yes
|
comm_modify mode multi group big vel yes
|
||||||
|
|||||||
@ -67,7 +67,7 @@ delete_atoms overlap 0.5 small big
|
|||||||
|
|
||||||
reset_timestep 0
|
reset_timestep 0
|
||||||
|
|
||||||
neighbor 0.3 bin
|
neighbor 0.3 multi
|
||||||
neigh_modify delay 0 every 1 check yes
|
neigh_modify delay 0 every 1 check yes
|
||||||
|
|
||||||
comm_modify mode multi group big vel yes
|
comm_modify mode multi group big vel yes
|
||||||
|
|||||||
@ -33,7 +33,7 @@ reset_timestep 0
|
|||||||
|
|
||||||
velocity small create 1.44 87287 loop geom
|
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 delay 0 every 1 check yes
|
||||||
neigh_modify exclude molecule/intra big include big
|
neigh_modify exclude molecule/intra big include big
|
||||||
|
|
||||||
|
|||||||
@ -37,10 +37,11 @@ atom_modify first charged
|
|||||||
kspace_style pppm/cg 0.00001
|
kspace_style pppm/cg 0.00001
|
||||||
kspace_modify order 3
|
kspace_modify order 3
|
||||||
|
|
||||||
comm_modify mode multi
|
|
||||||
neighbor 2.0 multi
|
neighbor 2.0 multi
|
||||||
neigh_modify delay 4 every 2 check yes
|
neigh_modify delay 4 every 2 check yes
|
||||||
|
|
||||||
|
comm_modify mode multi
|
||||||
|
|
||||||
timestep 10.0
|
timestep 10.0
|
||||||
|
|
||||||
fix 1 all nvt temp 310.0 310.0 100.0
|
fix 1 all nvt temp 310.0 310.0 100.0
|
||||||
|
|||||||
@ -253,7 +253,7 @@ TYPE grow_kokkos(TYPE &data, typename TYPE::value_type **&array,
|
|||||||
data.resize(n1);
|
data.resize(n1);
|
||||||
|
|
||||||
bigint nbytes = ((bigint) sizeof(typename TYPE::value_type *)) * 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++)
|
for (int i = 0; i < n1; i++)
|
||||||
if (data.h_view.extent(1)==0)
|
if (data.h_view.extent(1)==0)
|
||||||
|
|||||||
@ -52,6 +52,14 @@ PairTableKokkos<DeviceType>::~PairTableKokkos()
|
|||||||
{
|
{
|
||||||
if (copymode) return;
|
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;
|
delete h_table;
|
||||||
h_table = nullptr;
|
h_table = nullptr;
|
||||||
delete d_table;
|
delete d_table;
|
||||||
|
|||||||
@ -166,10 +166,10 @@ PairTableRXKokkos<DeviceType>::~PairTableRXKokkos()
|
|||||||
delete [] site1;
|
delete [] site1;
|
||||||
delete [] site2;
|
delete [] site2;
|
||||||
|
|
||||||
|
if (allocated) {
|
||||||
memoryKK->destroy_kokkos(k_eatom,eatom);
|
memoryKK->destroy_kokkos(k_eatom,eatom);
|
||||||
memoryKK->destroy_kokkos(k_vatom,vatom);
|
memoryKK->destroy_kokkos(k_vatom,vatom);
|
||||||
|
memory->destroy(setflag);
|
||||||
if (allocated) {
|
|
||||||
memoryKK->destroy_kokkos(d_table->cutsq,cutsq);
|
memoryKK->destroy_kokkos(d_table->cutsq,cutsq);
|
||||||
memoryKK->destroy_kokkos(d_table->tabindex,tabindex);
|
memoryKK->destroy_kokkos(d_table->tabindex,tabindex);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -55,6 +55,7 @@ SNAKokkos<DeviceType, real_type, vector_length>::SNAKokkos(real_type rfac0_in,
|
|||||||
ncoeff = compute_ncoeff();
|
ncoeff = compute_ncoeff();
|
||||||
|
|
||||||
nmax = 0;
|
nmax = 0;
|
||||||
|
natom = 0;
|
||||||
|
|
||||||
build_indexlist();
|
build_indexlist();
|
||||||
|
|
||||||
|
|||||||
@ -221,7 +221,7 @@ FixQBMSST::FixQBMSST(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
|||||||
// create a new compute potential energy compute
|
// create a new compute potential energy compute
|
||||||
|
|
||||||
id_pe = utils::strdup(std::string(id) + "_pe");
|
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;
|
peflag = 1;
|
||||||
|
|
||||||
// allocate qbmsst
|
// allocate qbmsst
|
||||||
|
|||||||
@ -15,9 +15,11 @@
|
|||||||
#include "compute_dipole_chunk.h"
|
#include "compute_dipole_chunk.h"
|
||||||
|
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
|
#include "comm.h"
|
||||||
#include "compute_chunk_atom.h"
|
#include "compute_chunk_atom.h"
|
||||||
#include "domain.h"
|
#include "domain.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
#include "force.h"
|
||||||
#include "math_special.h"
|
#include "math_special.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "modify.h"
|
#include "modify.h"
|
||||||
@ -95,6 +97,10 @@ void ComputeDipoleChunk::init()
|
|||||||
cchunk = (ComputeChunkAtom *) modify->compute[icompute];
|
cchunk = (ComputeChunkAtom *) modify->compute[icompute];
|
||||||
if (strcmp(cchunk->style,"chunk/atom") != 0)
|
if (strcmp(cchunk->style,"chunk/atom") != 0)
|
||||||
error->all(FLERR,"Compute dipole/chunk does not use chunk/atom compute");
|
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");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -397,7 +397,7 @@ void FixWallRegion::morse(double r)
|
|||||||
{
|
{
|
||||||
double dr = r - sigma;
|
double dr = r - sigma;
|
||||||
double dexp = exp(-alpha * dr);
|
double dexp = exp(-alpha * dr);
|
||||||
fwall = coeff1 * (dexp*dexp - dexp) / r;
|
fwall = coeff1 * (dexp*dexp - dexp);
|
||||||
eng = epsilon * (dexp*dexp - 2.0*dexp) - offset;
|
eng = epsilon * (dexp*dexp - 2.0*dexp) - offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1142,6 +1142,7 @@ void _noopt LAMMPS::help()
|
|||||||
"-in none/filename : read input from file or stdin (default) (-i)\n"
|
"-in none/filename : read input from file or stdin (default) (-i)\n"
|
||||||
"-kokkos on/off ... : turn KOKKOS mode on or off (-k)\n"
|
"-kokkos on/off ... : turn KOKKOS mode on or off (-k)\n"
|
||||||
"-log none/filename : where to send log output (-l)\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"
|
"-mpicolor color : which exe in a multi-exe mpirun cmd (-m)\n"
|
||||||
"-cite : select citation reminder style (-c)\n"
|
"-cite : select citation reminder style (-c)\n"
|
||||||
"-nocite : disable citation reminder (-nc)\n"
|
"-nocite : disable citation reminder (-nc)\n"
|
||||||
|
|||||||
@ -341,6 +341,8 @@ void PairHybrid::settings(int narg, char **arg)
|
|||||||
|
|
||||||
// multiple[i] = 1 to M if sub-style used multiple times, else 0
|
// 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++) {
|
for (int i = 0; i < nstyles; i++) {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (int j = 0; j < nstyles; j++) {
|
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 (j == i) multiple[i] = count;
|
||||||
}
|
}
|
||||||
if (count == 1) multiple[i] = 0;
|
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
|
// set pair flags from sub-style flags
|
||||||
|
|
||||||
flags();
|
flags();
|
||||||
|
|||||||
Reference in New Issue
Block a user