Merge branch 'master' of github.com:lammps/lammps into pair-style-nnp
This commit is contained in:
@ -778,9 +778,7 @@ if(PKG_GPU)
|
||||
message(STATUS "<<< GPU package settings >>>
|
||||
-- GPU API: ${GPU_API}")
|
||||
if(GPU_API STREQUAL "CUDA")
|
||||
message(STATUS "GPU architecture: ${GPU_ARCH}")
|
||||
elseif(GPU_API STREQUAL "OPENCL")
|
||||
message(STATUS "OpenCL tuning: ${OCL_TUNE}")
|
||||
message(STATUS "GPU default architecture: ${GPU_ARCH}")
|
||||
elseif(GPU_API STREQUAL "HIP")
|
||||
message(STATUS "HIP platform: ${HIP_PLATFORM}")
|
||||
message(STATUS "HIP architecture: ${HIP_ARCH}")
|
||||
|
||||
@ -20,10 +20,10 @@ ExternalProject_Add(googletest
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
|
||||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||
BUILD_BYPRODUCTS <BINARY_DIR>/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${GTEST_LIB_POSTFIX}.a
|
||||
<BINARY_DIR>/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gmock${GTEST_LIB_POSTFIX}.a
|
||||
<BINARY_DIR>/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${GTEST_LIB_POSTFIX}.a
|
||||
<BINARY_DIR>/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gmock_main${GTEST_LIB_POSTFIX}.a
|
||||
BUILD_BYPRODUCTS <BINARY_DIR>/lib/libgtest${GTEST_LIB_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
<BINARY_DIR>/lib/libgmock${GTEST_LIB_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
<BINARY_DIR>/lib/libgtest_main${GTEST_LIB_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
<BINARY_DIR>/lib/libgmock_main${GTEST_LIB_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
LOG_DOWNLOAD ON
|
||||
LOG_CONFIGURE ON
|
||||
LOG_BUILD ON
|
||||
@ -39,10 +39,10 @@ file(MAKE_DIRECTORY ${GTEST_INCLUDE_DIR})
|
||||
file(MAKE_DIRECTORY ${GMOCK_INCLUDE_DIR})
|
||||
|
||||
ExternalProject_Get_Property(googletest BINARY_DIR)
|
||||
set(GTEST_LIBRARY_PATH ${BINARY_DIR}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${GTEST_LIB_POSTFIX}.a)
|
||||
set(GMOCK_LIBRARY_PATH ${BINARY_DIR}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gmock${GTEST_LIB_POSTFIX}.a)
|
||||
set(GTEST_MAIN_LIBRARY_PATH ${BINARY_DIR}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${GTEST_LIB_POSTFIX}.a)
|
||||
set(GMOCK_MAIN_LIBRARY_PATH ${BINARY_DIR}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gmock_main${GTEST_LIB_POSTFIX}.a)
|
||||
set(GTEST_LIBRARY_PATH ${BINARY_DIR}/lib/libgtest${GTEST_LIB_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
set(GMOCK_LIBRARY_PATH ${BINARY_DIR}/lib/libgmock${GTEST_LIB_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
set(GTEST_MAIN_LIBRARY_PATH ${BINARY_DIR}/lib/libgtest_main${GTEST_LIB_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
set(GMOCK_MAIN_LIBRARY_PATH ${BINARY_DIR}/lib/libgmock_main${GTEST_LIB_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
|
||||
# Prevent GoogleTest from overriding our compiler/linker options
|
||||
# when building with Visual Studio
|
||||
|
||||
54
cmake/Modules/OpenCLLoader.cmake
Normal file
54
cmake/Modules/OpenCLLoader.cmake
Normal file
@ -0,0 +1,54 @@
|
||||
message(STATUS "Downloading and building OpenCL loader library")
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
set(OPENCL_LOADER_LIB_POSTFIX d)
|
||||
else()
|
||||
set(OPENCL_LOADER_LIB_POSTFIX)
|
||||
endif()
|
||||
|
||||
include(ExternalProject)
|
||||
set(OPENCL_LOADER_URL "https://download.lammps.org/thirdparty/opencl-loader-2020.12.18.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
|
||||
mark_as_advanced(OPENCL_LOADER_URL)
|
||||
ExternalProject_Add(opencl_loader
|
||||
URL ${OPENCL_LOADER_URL}
|
||||
URL_MD5 011cdcbd41030be94f3fced6d763a52a
|
||||
SOURCE_DIR "${CMAKE_BINARY_DIR}/opencl_loader-src"
|
||||
BINARY_DIR "${CMAKE_BINARY_DIR}/opencl_loader-build"
|
||||
CMAKE_ARGS ${CMAKE_REQUEST_PIC} ${CMAKE_EXTRA_OPENCL_LOADER_OPTS}
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
|
||||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||
BUILD_BYPRODUCTS <BINARY_DIR>/libOpenCL${OPENCL_LOADER_LIB_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
LOG_DOWNLOAD ON
|
||||
LOG_CONFIGURE ON
|
||||
LOG_BUILD ON
|
||||
INSTALL_COMMAND ""
|
||||
TEST_COMMAND "")
|
||||
|
||||
ExternalProject_Get_Property(opencl_loader SOURCE_DIR)
|
||||
set(OPENCL_LOADER_INCLUDE_DIR ${SOURCE_DIR}/inc)
|
||||
|
||||
# workaround for CMake 3.10 on ubuntu 18.04
|
||||
file(MAKE_DIRECTORY ${OPENCL_LOADER_INCLUDE_DIR})
|
||||
|
||||
ExternalProject_Get_Property(opencl_loader BINARY_DIR)
|
||||
set(OPENCL_LOADER_LIBRARY_PATH "${BINARY_DIR}/libOpenCL${OPENCL_LOADER_LIB_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
|
||||
find_package(Threads QUIET)
|
||||
if(NOT WIN32)
|
||||
set(OPENCL_LOADER_DEP_LIBS "Threads::Threads;${CMAKE_DL_LIBS}")
|
||||
else()
|
||||
set(OPENCL_LOADER_DEP_LIBS "cfgmgr32;runtimeobject")
|
||||
endif()
|
||||
|
||||
add_library(OpenCL::OpenCL UNKNOWN IMPORTED)
|
||||
add_dependencies(OpenCL::OpenCL opencl_loader)
|
||||
|
||||
set_target_properties(OpenCL::OpenCL PROPERTIES
|
||||
IMPORTED_LOCATION ${OPENCL_LOADER_LIBRARY_PATH}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${OPENCL_LOADER_INCLUDE_DIR}
|
||||
INTERFACE_LINK_LIBRARIES "${OPENCL_LOADER_DEP_LIBS}")
|
||||
|
||||
|
||||
@ -99,9 +99,13 @@ if(GPU_API STREQUAL "CUDA")
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "10.0")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_75,code=[sm_75,compute_75]")
|
||||
endif()
|
||||
# Ampere (GPU Arch 8.0 and 8.6) is supported by CUDA 11 and later
|
||||
# Ampere (GPU Arch 8.0) is supported by CUDA 11 and later
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.0")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_80,code=[sm_80,compute_80] -gencode arch=compute_86,code=[sm_86,compute_86]")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_80,code=[sm_80,compute_80]")
|
||||
endif()
|
||||
# Ampere (GPU Arch 8.6) is supported by CUDA 11.1 and later
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.1")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_86,code=[sm_86,compute_86]")
|
||||
endif()
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "12.0")
|
||||
message(WARNING "Unsupported CUDA version. Use at your own risk.")
|
||||
@ -141,19 +145,10 @@ if(GPU_API STREQUAL "CUDA")
|
||||
target_include_directories(nvc_get_devices PRIVATE ${CUDA_INCLUDE_DIRS})
|
||||
|
||||
elseif(GPU_API STREQUAL "OPENCL")
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
# download and unpack support binaries for compilation of windows binaries.
|
||||
set(LAMMPS_THIRDPARTY_URL "https://download.lammps.org/thirdparty")
|
||||
file(DOWNLOAD "${LAMMPS_THIRDPARTY_URL}/opencl-win-devel.tar.gz" "${CMAKE_CURRENT_BINARY_DIR}/opencl-win-devel.tar.gz"
|
||||
EXPECTED_MD5 2c00364888d5671195598b44c2e0d44d)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf opencl-win-devel.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
add_library(OpenCL::OpenCL UNKNOWN IMPORTED)
|
||||
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86")
|
||||
set_target_properties(OpenCL::OpenCL PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/OpenCL/lib_win32/libOpenCL.dll")
|
||||
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
|
||||
set_target_properties(OpenCL::OpenCL PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/OpenCL/lib_win64/libOpenCL.dll")
|
||||
endif()
|
||||
set_target_properties(OpenCL::OpenCL PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/OpenCL/include")
|
||||
option(USE_STATIC_OPENCL_LOADER "Download and include a static OpenCL ICD loader" ON)
|
||||
mark_as_advanced(USE_STATIC_OPENCL_LOADER)
|
||||
if (USE_STATIC_OPENCL_LOADER)
|
||||
include(OpenCLLoader)
|
||||
else()
|
||||
find_package(OpenCL REQUIRED)
|
||||
endif()
|
||||
@ -208,6 +203,7 @@ elseif(GPU_API STREQUAL "OPENCL")
|
||||
add_executable(ocl_get_devices ${LAMMPS_LIB_SOURCE_DIR}/gpu/geryon/ucl_get_devices.cpp)
|
||||
target_compile_definitions(ocl_get_devices PRIVATE -DUCL_OPENCL)
|
||||
target_link_libraries(ocl_get_devices PRIVATE OpenCL::OpenCL)
|
||||
add_dependencies(ocl_get_devices OpenCL::OpenCL)
|
||||
elseif(GPU_API STREQUAL "HIP")
|
||||
if(NOT DEFINED HIP_PATH)
|
||||
if(NOT DEFINED ENV{HIP_PATH})
|
||||
@ -390,13 +386,10 @@ elseif(GPU_API STREQUAL "HIP")
|
||||
target_link_libraries(lammps PRIVATE gpu)
|
||||
endif()
|
||||
|
||||
# GPU package
|
||||
FindStyleHeaders(${GPU_SOURCES_DIR} FIX_CLASS fix_ FIX)
|
||||
|
||||
set_property(GLOBAL PROPERTY "GPU_SOURCES" "${GPU_SOURCES}")
|
||||
|
||||
# detects styles which have GPU version
|
||||
# detect styles which have a GPU version
|
||||
RegisterStylesExt(${GPU_SOURCES_DIR} gpu GPU_SOURCES)
|
||||
RegisterFixStyle(${GPU_SOURCES_DIR}/fix_gpu.h)
|
||||
|
||||
get_property(GPU_SOURCES GLOBAL PROPERTY GPU_SOURCES)
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ ExternalProject_Add(libyaml
|
||||
CXX=${CMAKE_CXX_COMPILER}
|
||||
CC=${CMAKE_C_COMPILER}
|
||||
--prefix=<INSTALL_DIR> --disable-shared
|
||||
BUILD_BYPRODUCTS <INSTALL_DIR>/lib/${CMAKE_FIND_LIBRARY_PREFIXES}yaml.a
|
||||
BUILD_BYPRODUCTS <INSTALL_DIR>/lib/libyaml${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
TEST_COMMAND "")
|
||||
|
||||
ExternalProject_Get_Property(libyaml INSTALL_DIR)
|
||||
@ -23,7 +23,7 @@ set(YAML_LIBRARY_DIR ${INSTALL_DIR}/lib)
|
||||
file(MAKE_DIRECTORY ${YAML_INCLUDE_DIR})
|
||||
file(MAKE_DIRECTORY ${YAML_LIBRARY_DIR})
|
||||
|
||||
set(YAML_LIBRARY_PATH ${INSTALL_DIR}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}yaml.a)
|
||||
set(YAML_LIBRARY_PATH ${INSTALL_DIR}/lib/libyaml${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
|
||||
add_library(Yaml::Yaml UNKNOWN IMPORTED)
|
||||
set_target_properties(Yaml::Yaml PROPERTIES
|
||||
|
||||
@ -134,6 +134,8 @@ CMake build
|
||||
# value = yes (default) or no
|
||||
-D CUDA_MPS_SUPPORT=value # enables some tweaks required to run with active nvidia-cuda-mps daemon
|
||||
# value = yes or no (default)
|
||||
-D USE_STATIC_OPENCL_LOADER=value # downloads/includes OpenCL ICD loader library, no local OpenCL headers/libs needed
|
||||
# value = yes (default) or no
|
||||
|
||||
:code:`GPU_ARCH` settings for different GPU hardware is as follows:
|
||||
|
||||
@ -160,6 +162,12 @@ When building with CMake, you **must NOT** build the GPU library in ``lib/gpu``
|
||||
using the traditional build procedure. CMake will detect files generated by that
|
||||
process and will terminate with an error and a suggestion for how to remove them.
|
||||
|
||||
If you are compiling for OpenCL, the default setting is to download, build, and
|
||||
link with a static OpenCL ICD loader library and standard OpenCL headers. This
|
||||
way no local OpenCL development headers or library needs to be present and only
|
||||
OpenCL compatible drivers need to be installed to use OpenCL. If this is not
|
||||
desired, you can set :code:`USE_STATIC_OPENCL_LOADER` to :code:`no`.
|
||||
|
||||
If you are compiling with HIP, note that before running CMake you will have to
|
||||
set appropriate environment variables. Some variables such as
|
||||
:code:`HCC_AMDGPU_TARGET` or :code:`CUDA_PATH` are necessary for :code:`hipcc`
|
||||
@ -257,18 +265,18 @@ To build with this package, the KIM library with API v2 must be downloaded
|
||||
and built on your system. It must include the KIM models that you want to
|
||||
use with LAMMPS.
|
||||
|
||||
If you would like to use the :doc:`kim_query <kim_commands>`
|
||||
If you would like to use the :doc:`kim query <kim_commands>`
|
||||
command, you also need to have libcurl installed with the matching
|
||||
development headers and the curl-config tool.
|
||||
|
||||
If you would like to use the :doc:`kim_property <kim_commands>`
|
||||
If you would like to use the :doc:`kim property <kim_commands>`
|
||||
command, you need to build LAMMPS with the PYTHON package installed
|
||||
and linked to Python 3.6 or later. See the :ref:`PYTHON package build info <python>`
|
||||
for more details on this. After successfully building LAMMPS with Python, you
|
||||
also need to install the kim-property Python package, which can be easily done using
|
||||
*pip* as ``pip install kim-property``, or from the *conda-forge* channel as
|
||||
``conda install kim-property`` if LAMMPS is built in Conda. More detailed
|
||||
information is available at:
|
||||
also need to install the ``kim-property`` Python package, which can be easily
|
||||
done using *pip* as ``pip install kim-property``, or from the *conda-forge*
|
||||
channel as ``conda install kim-property`` if LAMMPS is built in Conda. More
|
||||
detailed information is available at:
|
||||
`kim-property installation <https://github.com/openkim/kim-property#installing-kim-property>`_.
|
||||
|
||||
In addition to installing the KIM API, it is also necessary to install the
|
||||
@ -308,7 +316,7 @@ minutes to hours) to build. Of course you only need to do that once.)
|
||||
|
||||
You can download and build the KIM library manually if you prefer;
|
||||
follow the instructions in ``lib/kim/README``. You can also do
|
||||
this in one step from the lammps/src dir, using a command like
|
||||
this in one step from the lammps/src directory, using a command like
|
||||
these, which simply invoke the ``lib/kim/Install.py`` script with
|
||||
the specified args.
|
||||
|
||||
@ -376,10 +384,11 @@ Enabling the extra unit tests have some requirements,
|
||||
Conda. More detailed information is available at:
|
||||
`kim-property installation <https://github.com/openkim/kim-property#installing-kim-property>`_.
|
||||
* It is also necessary to install
|
||||
``EAM_Dynamo_Mendelev_2007_Zr__MO_848899341753_000``, and
|
||||
``EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005`` KIM models.
|
||||
``EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000``,
|
||||
``EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005``, and
|
||||
``LennardJones612_UniversalShifted__MO_959249795837_003`` KIM models.
|
||||
See `Obtaining KIM Models <http://openkim.org/doc/usage/obtaining-models>`_
|
||||
to learn how to install a pre-build binary of the OpenKIM Repository of
|
||||
to learn how to install a pre-built binary of the OpenKIM Repository of
|
||||
Models or see
|
||||
`Installing KIM Models <https://openkim.org/doc/usage/obtaining-models/#installing_models>`_
|
||||
to learn how to install the specific KIM models.
|
||||
|
||||
@ -60,11 +60,7 @@ An alphabetic list of all general LAMMPS commands.
|
||||
* :doc:`include <include>`
|
||||
* :doc:`info <info>`
|
||||
* :doc:`jump <jump>`
|
||||
* :doc:`kim_init <kim_commands>`
|
||||
* :doc:`kim_interactions <kim_commands>`
|
||||
* :doc:`kim_param <kim_commands>`
|
||||
* :doc:`kim_property <kim_commands>`
|
||||
* :doc:`kim_query <kim_commands>`
|
||||
* :doc:`kim <kim_commands>`
|
||||
* :doc:`kspace_modify <kspace_modify>`
|
||||
* :doc:`kspace_style <kspace_style>`
|
||||
* :doc:`label <label>`
|
||||
|
||||
@ -85,7 +85,7 @@ commands)
|
||||
* water potentials: TIP3P, TIP4P, SPC
|
||||
* implicit solvent potentials: hydrodynamic lubrication, Debye
|
||||
* force-field compatibility with common CHARMM, AMBER, DREIDING, OPLS, GROMACS, COMPASS options
|
||||
* access to the `OpenKIM Repository <http://openkim.org>`_ of potentials via :doc:`kim_init, kim_interactions, and kim_query <kim_commands>` commands
|
||||
* access to the `OpenKIM Repository <http://openkim.org>`_ of potentials via :doc:`kim command <kim_commands>`
|
||||
* hybrid potentials: multiple pair, bond, angle, dihedral, improper potentials can be used in one simulation
|
||||
* overlaid potentials: superposition of multiple pair potentials
|
||||
|
||||
|
||||
@ -368,17 +368,19 @@ KIM package
|
||||
|
||||
**Contents:**
|
||||
|
||||
This package contains a set of commands that serve as a wrapper on the
|
||||
This package contains a command with a set of subcommands that serve as a
|
||||
wrapper on the
|
||||
`Open Knowledgebase of Interatomic Models (OpenKIM) <https://openkim.org>`_
|
||||
repository of interatomic models (IMs) enabling compatible ones to be used in
|
||||
LAMMPS simulations.
|
||||
|
||||
This includes :doc:`kim_init <kim_commands>`, and
|
||||
:doc:`kim_interactions <kim_commands>` commands to select, initialize and
|
||||
instantiate the IM, a :doc:`kim_query <kim_commands>` command to perform web
|
||||
|
||||
This includes :doc:`kim init <kim_commands>`, and
|
||||
:doc:`kim interactions <kim_commands>` commands to select, initialize and
|
||||
instantiate the IM, a :doc:`kim query <kim_commands>` command to perform web
|
||||
queries for material property predictions of OpenKIM IMs, a
|
||||
:doc:`kim_param <kim_commands>` command to access KIM Model Parameters from
|
||||
LAMMPS, and a :doc:`kim_property <kim_commands>` command to write material
|
||||
:doc:`kim param <kim_commands>` command to access KIM Model Parameters from
|
||||
LAMMPS, and a :doc:`kim property <kim_commands>` command to write material
|
||||
properties computed in LAMMPS to standard KIM property instance format.
|
||||
|
||||
Support for KIM IMs that conform to the
|
||||
@ -387,8 +389,8 @@ is provided by the :doc:`pair_style kim <pair_kim>` command.
|
||||
|
||||
.. note::
|
||||
|
||||
The command *pair_style kim* is called by *kim_interactions* and
|
||||
is not recommended to be directly used in input scripts.
|
||||
The command *pair_style kim* is called by *kim interactions* and is not
|
||||
recommended to be directly used in input scripts.
|
||||
|
||||
To use this package you must have the KIM API library available on your
|
||||
system. The KIM API is available for download on the
|
||||
@ -405,7 +407,7 @@ and is funded by the `National Science Foundation <https://www.nsf.gov/>`_.
|
||||
API and the *pair_style kim* command. Yaser Afshar (U Minnesota),
|
||||
Axel Kohlmeyer (Temple U), Ellad Tadmor (U Minnesota), and
|
||||
Daniel Karls (U Minnesota) contributed to the
|
||||
:doc:`kim_commands <kim_commands>` interface in close collaboration with
|
||||
:doc:`kim command <kim_commands>` interface in close collaboration with
|
||||
Ryan Elliott.
|
||||
|
||||
**Install:**
|
||||
@ -415,7 +417,7 @@ This package has :ref:`specific installation instructions <kim>` on the
|
||||
|
||||
**Supporting info:**
|
||||
|
||||
* :doc:`kim_commands <kim_commands>`
|
||||
* :doc:`kim command <kim_commands>`
|
||||
* :doc:`pair_style kim <pair_kim>`
|
||||
* src/KIM: filenames -> commands
|
||||
* src/KIM/README
|
||||
|
||||
@ -153,7 +153,7 @@ temp/chunk calculation to a file is to use the :doc:`fix ave/time <fix_ave_time>
|
||||
|
||||
compute cc1 all chunk/atom molecule
|
||||
compute myChunk all temp/chunk cc1 temp
|
||||
fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector
|
||||
fix 1 all ave/time 100 1 100 c_myChunk[1] file tmp.out mode vector
|
||||
|
||||
----------
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -59,7 +59,7 @@ command to specify them.
|
||||
* The OpenKIM Project at
|
||||
`https://openkim.org/browse/models/by-type <https://openkim.org/browse/models/by-type>`_
|
||||
provides ADP potentials that can be used directly in LAMMPS with the
|
||||
:doc:`kim_commands <kim_commands>` interface.
|
||||
:doc:`kim command <kim_commands>` interface.
|
||||
|
||||
----------
|
||||
|
||||
|
||||
@ -141,7 +141,7 @@ interatomic potentials and file formats.
|
||||
The OpenKIM Project at
|
||||
`https://openkim.org/browse/models/by-type <https://openkim.org/browse/models/by-type>`_
|
||||
provides EAM potentials that can be used directly in LAMMPS with the
|
||||
:doc:`kim_commands <kim_commands>` interface.
|
||||
:doc:`kim command <kim_commands>` interface.
|
||||
|
||||
----------
|
||||
|
||||
|
||||
@ -23,29 +23,30 @@ Examples
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
This pair style is a wrapper on the `Open Knowledgebase of Interatomic Models (OpenKIM) <https://openkim.org>`_ repository of interatomic
|
||||
potentials to enable their use in LAMMPS scripts.
|
||||
This pair style is a wrapper on the
|
||||
`Open Knowledgebase of Interatomic Models (OpenKIM) <https://openkim.org>`_
|
||||
repository of interatomic potentials to enable their use in LAMMPS scripts.
|
||||
|
||||
The preferred interface for using interatomic models archived in
|
||||
OpenKIM is the :doc:`kim_commands interface <kim_commands>`. That
|
||||
OpenKIM is the :doc:`kim command <kim_commands>` interface. That
|
||||
interface supports both "KIM Portable Models" (PMs) that conform to the
|
||||
KIM API Portable Model Interface (PMI) and can be used by any
|
||||
simulation code that conforms to the KIM API/PMI, and
|
||||
"KIM Simulator Models" that are natively implemented within a single
|
||||
"KIM Simulator Models" (SMs) that are natively implemented within a single
|
||||
simulation code (like LAMMPS) and can only be used with it.
|
||||
The *pair_style kim* command is limited to KIM PMs. It is
|
||||
used by the :doc:`kim_commands interface <kim_commands>` as needed.
|
||||
used by the :doc:`kim command <kim_commands>` interface as needed.
|
||||
|
||||
.. note::
|
||||
|
||||
Since *pair_style kim* is called by *kim_interactions* as needed,
|
||||
is not recommended to be directly used in input scripts.
|
||||
Since *pair_style kim* is called by *kim interactions* as needed,
|
||||
it is not recommended to be directly used in input scripts.
|
||||
|
||||
----------
|
||||
|
||||
The argument *model* is the name of the KIM PM.
|
||||
For potentials archived in OpenKIM
|
||||
this is the extended KIM ID (see :doc:`kim_commands <kim_commands>`
|
||||
this is the extended KIM ID (see :doc:`kim command <kim_commands>`
|
||||
for details). LAMMPS can invoke any KIM PM, however there can
|
||||
be incompatibilities (for example due to unit matching issues).
|
||||
In the event of an incompatibility, the code will terminate with
|
||||
@ -106,7 +107,7 @@ Restrictions
|
||||
""""""""""""
|
||||
|
||||
This pair style is part of the KIM package. See details on
|
||||
restrictions in :doc:`kim_commands <kim_commands>`.
|
||||
restrictions in :doc:`kim command <kim_commands>`.
|
||||
|
||||
This current version of pair_style kim is compatible with the
|
||||
kim-api package version 2.0.0 and higher.
|
||||
@ -114,7 +115,7 @@ kim-api package version 2.0.0 and higher.
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`pair_coeff <pair_coeff>`, :doc:`kim_commands <kim_commands>`
|
||||
:doc:`pair_coeff <pair_coeff>`, :doc:`kim command <kim_commands>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
@ -8,8 +8,8 @@ LAMMPS_COMMANDS = ("angle_coeff", "angle_style", "atom_modify", "atom_style",
|
||||
"delete_bonds", "dielectric", "dihedral_coeff", "dihedral_style", "dimension",
|
||||
"displace_atoms", "dump_modify", "dynamical_matrix", "echo",
|
||||
"fix_modify", "group2ndx", "hyper", "if", "improper_coeff",
|
||||
"improper_style", "include", "info", "jump", "kim_init", "kim_interactions",
|
||||
"kim_param", "kim_query", "kspace_modify", "kspace_style", "label", "lattice",
|
||||
"improper_style", "include", "info", "jump", "kim",
|
||||
"kspace_modify", "kspace_style", "label", "lattice",
|
||||
"log", "mass", "message", "minimize", "min_modify", "min_style", "molecule",
|
||||
"ndx2group", "neb", "neb/spin", "neighbor", "neigh_modify", "newton", "next",
|
||||
"package", "pair_coeff", "pair_modify", "pair_style", "pair_write",
|
||||
|
||||
@ -22,7 +22,7 @@ improper_style class2
|
||||
read_data tiny_nylon.data
|
||||
|
||||
variable runsteps equal 1000
|
||||
variable prob1 equal step/v_runsteps*2
|
||||
variable prob1 equal step/v_runsteps*2+0.1
|
||||
variable prob2 equal (step/v_runsteps)>0.5
|
||||
|
||||
velocity all create 300.0 4928459 dist gaussian
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the example models provided with
|
||||
# the kim-api package are installed. see the ./lib/kim/README or
|
||||
# ./lib/kim/Install.py files for details on how to install these
|
||||
# the kim-api package are installed. see the `./lib/kim/README` or
|
||||
# `./lib/kim/Install.py` files for details on how to install these
|
||||
# example models.
|
||||
#
|
||||
|
||||
@ -14,14 +14,14 @@ variable xx equal 20*$x
|
||||
variable yy equal 20*$y
|
||||
variable zz equal 20*$z
|
||||
|
||||
kim_init LennardJones_Ar real
|
||||
kim init LennardJones_Ar real
|
||||
|
||||
lattice fcc 4.4300
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
|
||||
kim_interactions Ar
|
||||
kim interactions Ar
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# kim-property example
|
||||
# kim property example
|
||||
#
|
||||
# For detailed information of this example please refer to:
|
||||
# https://openkim.org/doc/evaluation/tutorial-lammps/
|
||||
# `https://openkim.org/doc/evaluation/tutorial-lammps/`
|
||||
#
|
||||
# Description:
|
||||
#
|
||||
@ -10,10 +10,10 @@
|
||||
# `LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004` model for
|
||||
# argon. The material properties computed in LAMMPS are represented as a
|
||||
# standard KIM property instance format. (See
|
||||
# https://openkim.org/doc/schema/properties-framework/ and
|
||||
# https://lammps.sandia.gov/doc/kim_commands.html for further details).
|
||||
# Then the created property instance is written to a file named results.edn
|
||||
# using the `kim_property dump` commands.
|
||||
# `https://openkim.org/doc/schema/properties-framework/` and
|
||||
# `https://lammps.sandia.gov/doc/kim_commands.html` for further details).
|
||||
# Then the created property instance is written to a file named `results.edn`
|
||||
# using the `kim property dump` command.
|
||||
#
|
||||
# Requirement:
|
||||
#
|
||||
@ -28,7 +28,7 @@
|
||||
# This example requires that the KIM Portable Model (PM)
|
||||
# `LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004`
|
||||
# is installed. This can be done with the command
|
||||
# `kim-api-collections-management install user LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004`
|
||||
# kim-api-collections-management install user LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004
|
||||
# If this command does not work, you may need to setup your PATH to find the utility.
|
||||
# If you installed the kim-api using the LAMMPS CMake build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS build directory)
|
||||
@ -38,14 +38,14 @@
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# Or, see https://openkim.org/doc/obtaining-models for alternative options.
|
||||
# Or, see `https://openkim.org/doc/obtaining-models` for alternative options.
|
||||
#
|
||||
|
||||
# Initialize interatomic potential (KIM model) and units
|
||||
atom_style atomic
|
||||
|
||||
# Set the OpenKIM model that will be used
|
||||
kim_init LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004 metal
|
||||
kim init LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004 metal
|
||||
|
||||
# the equilibrium lattice constant for the fcc structure
|
||||
variable lattice_constant equal 5.248509056866169
|
||||
@ -62,7 +62,7 @@ create_atoms 1 box
|
||||
mass 1 39.948
|
||||
|
||||
# Specify the KIM interactions
|
||||
kim_interactions Ar
|
||||
kim interactions Ar
|
||||
|
||||
# Compute energy
|
||||
run 0
|
||||
@ -72,10 +72,10 @@ variable natoms equal "count(all)"
|
||||
variable ecohesive equal "-pe/v_natoms"
|
||||
|
||||
# Create a property instance
|
||||
kim_property create 1 cohesive-potential-energy-cubic-crystal
|
||||
kim property create 1 cohesive-potential-energy-cubic-crystal
|
||||
|
||||
# Set all the key-value pairs for this property instance
|
||||
kim_property modify 1 key short-name source-value 1 fcc &
|
||||
kim property modify 1 key short-name source-value 1 fcc &
|
||||
key species source-value 1 Ar &
|
||||
key a source-value ${lattice_constant} &
|
||||
source-unit angstrom &
|
||||
@ -88,4 +88,4 @@ kim_property modify 1 key short-name source-value 1 fcc
|
||||
source-unit eV
|
||||
|
||||
# Dump the results in a file
|
||||
kim_property dump "results.edn"
|
||||
kim property dump "results.edn"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the KIM Portable Model (PM)
|
||||
# SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
# `SW_StillingerWeber_1985_Si__MO_405512056662_005`
|
||||
# is installed. This can be done with the command
|
||||
# kim-api-collections-management install user SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
# If this command does not work, you may need to setup your PATH to find the utility.
|
||||
@ -13,7 +13,7 @@
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# Or, see https://openkim.org/doc/obtaining-models for alternative options.
|
||||
# Or, see `https://openkim.org/doc/obtaining-models` for alternative options.
|
||||
#
|
||||
|
||||
variable x index 1
|
||||
@ -24,15 +24,15 @@ variable xx equal 20*$x
|
||||
variable yy equal 20*$y
|
||||
variable zz equal 20*$z
|
||||
|
||||
kim_init SW_StillingerWeber_1985_Si__MO_405512056662_005 real
|
||||
kim_query a0 get_lattice_constant_cubic crystal=["fcc"] species=["Si"] units=["angstrom"]
|
||||
kim init SW_StillingerWeber_1985_Si__MO_405512056662_005 real
|
||||
kim query a0 get_lattice_constant_cubic crystal=["fcc"] species=["Si"] units=["angstrom"]
|
||||
|
||||
lattice fcc ${a0}
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
|
||||
kim_interactions Si
|
||||
kim interactions Si
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the KIM Portable Model (PM)
|
||||
# SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
# `SW_StillingerWeber_1985_Si__MO_405512056662_005`
|
||||
# is installed. This can be done with the command
|
||||
# kim-api-collections-management install user SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
# If this command does not work, you may need to setup your PATH to find the utility.
|
||||
@ -13,7 +13,7 @@
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# Or, see https://openkim.org/doc/obtaining-models for alternative options.
|
||||
# Or, see `https://openkim.org/doc/obtaining-models` for alternative options.
|
||||
#
|
||||
|
||||
variable x index 1
|
||||
@ -24,14 +24,14 @@ variable xx equal 20*$x
|
||||
variable yy equal 20*$y
|
||||
variable zz equal 20*$z
|
||||
|
||||
kim_init SW_StillingerWeber_1985_Si__MO_405512056662_005 real
|
||||
kim init SW_StillingerWeber_1985_Si__MO_405512056662_005 real
|
||||
|
||||
lattice fcc 4.4300
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
|
||||
kim_interactions Si
|
||||
kim interactions Si
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
76
examples/kim/in.kim-query
Normal file
76
examples/kim/in.kim-query
Normal file
@ -0,0 +1,76 @@
|
||||
# kim query example
|
||||
#
|
||||
# Requirement:
|
||||
#
|
||||
# This example requires LAMMPS is built with KIM package. A requirement for
|
||||
# the KIM package, is the KIM API library that must be downloaded from the
|
||||
# OpenKIM website and installed before LAMMPS is compiled. The 'kim query'
|
||||
# command requires the libcurl library to be installed. See the
|
||||
# `https://lammps.sandia.gov/doc/Build_extras.html#kim` doc page for further
|
||||
# details
|
||||
#
|
||||
# This example requires that the KIM Models
|
||||
# `EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005`
|
||||
# and
|
||||
# `EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000`
|
||||
# are installed.
|
||||
#
|
||||
# This can be done with the commands
|
||||
# `kim-api-collections-management install user `EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005`
|
||||
# `kim-api-collections-management install user `EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000`
|
||||
#
|
||||
# If these commands do not work, you may need to setup your PATH to find the utility.
|
||||
# If you installed the kim-api using the LAMMPS CMake build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS build directory)
|
||||
# source ./kim_build-prefix/bin/kim-api-activate
|
||||
# If you installed the kim-api using the LAMMPS Make build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS src directory)
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# Or, see https://openkim.org/doc/obtaining-models for alternative options.
|
||||
#
|
||||
|
||||
# -----------------------------------------------
|
||||
# Get an equilibrium fcc crystal lattice constant
|
||||
# -----------------------------------------------
|
||||
kim init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal
|
||||
kim query latconst_1 get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom]
|
||||
print "FCC lattice constant (EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005) = ${latconst_1}"
|
||||
# Get the lattice contant from a different model
|
||||
kim query latconst_2 get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_WineyKubotaGupta_2010_Al__MO_149316865608_005]
|
||||
print "FCC lattice constant (EAM_Dynamo_WineyKubotaGupta_2010_Al__MO_149316865608_005) = ${latconst_2}"
|
||||
clear
|
||||
|
||||
|
||||
# -----------------------------------------------
|
||||
# Get an equilibrium fcc crystal lattice constant
|
||||
# -----------------------------------------------
|
||||
kim query latconst_1 get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005]
|
||||
kim query latconst_2 get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_WineyKubotaGupta_2010_Al__MO_149316865608_005]
|
||||
print "FCC lattice constant (EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005) = ${latconst_1}"
|
||||
print "FCC lattice constant (EAM_Dynamo_WineyKubotaGupta_2010_Al__MO_149316865608_005) = ${latconst_2}"
|
||||
clear
|
||||
|
||||
|
||||
# -----------------------------------------------
|
||||
# Get an equilibrium hcp crystal lattice constant
|
||||
# -----------------------------------------------
|
||||
kim init EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000 metal
|
||||
kim query latconst split get_lattice_constant_hexagonal crystal=["hcp"] species=["Zr"] units=["angstrom"]
|
||||
print "HCP lattice constants = ${latconst_1}, ${latconst_2}"
|
||||
clear
|
||||
|
||||
|
||||
# -----------------------------------------------
|
||||
# Query for KIM models from openkim.org
|
||||
# Get all the EAM models that support Al
|
||||
# -----------------------------------------------
|
||||
kim query model index get_available_models species=[Al] potential_type=[eam]
|
||||
label model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
next model
|
||||
jump SELF model_loop
|
||||
clear
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the KIM Simulator Model (PM)
|
||||
# Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000
|
||||
# `Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000`
|
||||
# is installed. This can be done with the command
|
||||
# kim-api-collections-management install user Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000
|
||||
# If this command does not work, you may need to setup your PATH to find the utility.
|
||||
@ -13,7 +13,7 @@
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# See https://openkim.org/doc/obtaining-models for alternative options.
|
||||
# See `https://openkim.org/doc/obtaining-models` for alternative options.
|
||||
#
|
||||
|
||||
variable x index 1
|
||||
@ -24,14 +24,14 @@ variable xx equal 20*$x
|
||||
variable yy equal 20*$y
|
||||
variable zz equal 20*$z
|
||||
|
||||
kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real
|
||||
kim init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real
|
||||
|
||||
lattice fcc 4.4300
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
|
||||
kim_interactions O
|
||||
kim interactions O
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
107
examples/kim/log.10Feb21.in.kim-ex.melt.clang.1
Normal file
107
examples/kim/log.10Feb21.in.kim-ex.melt.clang.1
Normal file
@ -0,0 +1,107 @@
|
||||
LAMMPS (10 Feb 2021)
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the example models provided with
|
||||
# the kim-api package are installed. see the `./lib/kim/README` or
|
||||
# `./lib/kim/Install.py` files for details on how to install these
|
||||
# example models.
|
||||
#
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
kim init LennardJones_Ar real
|
||||
#=== BEGIN kim init ==========================================
|
||||
units real
|
||||
neighbor 2.0 bin # Angstroms
|
||||
timestep 1.0 # femtoseconds
|
||||
|
||||
This model has No mutable parameters.
|
||||
#=== END kim init ============================================
|
||||
|
||||
|
||||
lattice fcc 4.4300
|
||||
Lattice spacing in x,y,z = 4.4300000 4.4300000 4.4300000
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (88.600000 88.600000 88.600000)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.003 seconds
|
||||
|
||||
kim interactions Ar
|
||||
#=== BEGIN kim interactions ==================================
|
||||
pair_style kim LennardJones_Ar
|
||||
WARNING: KIM Model does not provide 'partialParticleEnergy'; energy per atom will be zero (src/KIM/pair_kim.cpp:1139)
|
||||
WARNING: KIM Model does not provide 'partialParticleVirial'; virial per atom will be zero (src/KIM/pair_kim.cpp:1145)
|
||||
pair_coeff * * Ar
|
||||
#=== END kim interactions ====================================
|
||||
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
|
||||
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 8.45
|
||||
ghost atom cutoff = 8.45
|
||||
binsize = 4.225, bins = 21 21 21
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair kim, perpetual
|
||||
attributes: full, newton off, cut 8.450000000000001
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 28.12 | 28.12 | 28.12 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 200 145069.63 0 164146.22 128015.94
|
||||
100 95.179703 154939.42 0 164017.94 131602.75
|
||||
Loop time of 2.8463 on 1 procs for 100 steps with 32000 atoms
|
||||
|
||||
Performance: 3.036 ns/day, 7.906 hours/ns, 35.133 timesteps/s
|
||||
99.9% CPU use with 1 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 2.5046 | 2.5046 | 2.5046 | 0.0 | 88.00
|
||||
Neigh | 0.29437 | 0.29437 | 0.29437 | 0.0 | 10.34
|
||||
Comm | 0.01182 | 0.01182 | 0.01182 | 0.0 | 0.42
|
||||
Output | 7e-05 | 7e-05 | 7e-05 | 0.0 | 0.00
|
||||
Modify | 0.024522 | 0.024522 | 0.024522 | 0.0 | 0.86
|
||||
Other | | 0.01091 | | | 0.38
|
||||
|
||||
Nlocal: 32000.0 ave 32000 max 32000 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 19911.0 ave 19911 max 19911 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 0.00000 ave 0 max 0 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 4.25375e+06 ave 4.25375e+06 max 4.25375e+06 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 4253750
|
||||
Ave neighs/atom = 132.92969
|
||||
Neighbor list builds = 3
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:02
|
||||
107
examples/kim/log.10Feb21.in.kim-ex.melt.clang.4
Normal file
107
examples/kim/log.10Feb21.in.kim-ex.melt.clang.4
Normal file
@ -0,0 +1,107 @@
|
||||
LAMMPS (10 Feb 2021)
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the example models provided with
|
||||
# the kim-api package are installed. see the `./lib/kim/README` or
|
||||
# `./lib/kim/Install.py` files for details on how to install these
|
||||
# example models.
|
||||
#
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
kim init LennardJones_Ar real
|
||||
#=== BEGIN kim init ==========================================
|
||||
units real
|
||||
neighbor 2.0 bin # Angstroms
|
||||
timestep 1.0 # femtoseconds
|
||||
|
||||
This model has No mutable parameters.
|
||||
#=== END kim init ============================================
|
||||
|
||||
|
||||
lattice fcc 4.4300
|
||||
Lattice spacing in x,y,z = 4.4300000 4.4300000 4.4300000
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (88.600000 88.600000 88.600000)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.001 seconds
|
||||
|
||||
kim interactions Ar
|
||||
#=== BEGIN kim interactions ==================================
|
||||
pair_style kim LennardJones_Ar
|
||||
WARNING: KIM Model does not provide 'partialParticleEnergy'; energy per atom will be zero (src/KIM/pair_kim.cpp:1139)
|
||||
WARNING: KIM Model does not provide 'partialParticleVirial'; virial per atom will be zero (src/KIM/pair_kim.cpp:1145)
|
||||
pair_coeff * * Ar
|
||||
#=== END kim interactions ====================================
|
||||
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
|
||||
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 8.45
|
||||
ghost atom cutoff = 8.45
|
||||
binsize = 4.225, bins = 21 21 21
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair kim, perpetual
|
||||
attributes: full, newton off, cut 8.450000000000001
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 9.791 | 9.791 | 9.791 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 200 145069.63 0 164146.22 128015.94
|
||||
100 95.179703 154939.42 0 164017.94 131602.75
|
||||
Loop time of 0.857614 on 4 procs for 100 steps with 32000 atoms
|
||||
|
||||
Performance: 10.074 ns/day, 2.382 hours/ns, 116.603 timesteps/s
|
||||
99.6% CPU use with 4 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0.73048 | 0.73398 | 0.73855 | 0.3 | 85.58
|
||||
Neigh | 0.083739 | 0.083964 | 0.084335 | 0.1 | 9.79
|
||||
Comm | 0.017996 | 0.022912 | 0.026515 | 2.1 | 2.67
|
||||
Output | 2.7e-05 | 3.5e-05 | 4.5e-05 | 0.0 | 0.00
|
||||
Modify | 0.010073 | 0.010158 | 0.010271 | 0.1 | 1.18
|
||||
Other | | 0.006571 | | | 0.77
|
||||
|
||||
Nlocal: 8000.00 ave 8018 max 7967 min
|
||||
Histogram: 1 0 0 0 0 0 1 0 0 2
|
||||
Nghost: 9131.00 ave 9164 max 9113 min
|
||||
Histogram: 2 0 0 1 0 0 0 0 0 1
|
||||
Neighs: 0.00000 ave 0 max 0 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 1.06344e+06 ave 1.06594e+06 max 1.05881e+06 min
|
||||
Histogram: 1 0 0 0 0 0 1 0 0 2
|
||||
|
||||
Total # of neighbors = 4253750
|
||||
Ave neighs/atom = 132.92969
|
||||
Neighbor list builds = 3
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:00
|
||||
223
examples/kim/log.10Feb21.in.kim-pm-property.clang.1
Normal file
223
examples/kim/log.10Feb21.in.kim-pm-property.clang.1
Normal file
@ -0,0 +1,223 @@
|
||||
LAMMPS (10 Feb 2021)
|
||||
# kim property example
|
||||
#
|
||||
# For detailed information of this example please refer to:
|
||||
# `https://openkim.org/doc/evaluation/tutorial-lammps/`
|
||||
#
|
||||
# Description:
|
||||
#
|
||||
# This example is designed to calculate the cohesive energy corresponding to
|
||||
# the equilibrium FCC lattice constant for
|
||||
# `LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004` model for
|
||||
# argon. The material properties computed in LAMMPS are represented as a
|
||||
# standard KIM property instance format. (See
|
||||
# `https://openkim.org/doc/schema/properties-framework/` and
|
||||
# `https://lammps.sandia.gov/doc/kim_commands.html` for further details).
|
||||
# Then the created property instance is written to a file named `results.edn`
|
||||
# using the `kim property dump` command.
|
||||
#
|
||||
# Requirement:
|
||||
#
|
||||
# This example requires LAMMPS built with the Python 3.6 or later package
|
||||
# installed. See the `https://lammps.sandia.gov/doc/python.html` doc page for
|
||||
# more info on building LAMMPS with the version of Python on your system.
|
||||
# After successfully building LAMMPS with Python, you need to install the
|
||||
# kim-property Python package, See the
|
||||
# `https://lammps.sandia.gov/doc/Build_extras.html#kim` doc page for
|
||||
# further details.
|
||||
#
|
||||
# This example requires that the KIM Portable Model (PM)
|
||||
# `LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004`
|
||||
# is installed. This can be done with the command
|
||||
# kim-api-collections-management install user LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004
|
||||
# If this command does not work, you may need to setup your PATH to find the utility.
|
||||
# If you installed the kim-api using the LAMMPS CMake build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS build directory)
|
||||
# source ./kim_build-prefix/bin/kim-api-activate
|
||||
# If you installed the kim-api using the LAMMPS Make build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS src directory)
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# Or, see `https://openkim.org/doc/obtaining-models` for alternative options.
|
||||
#
|
||||
|
||||
# Initialize interatomic potential (KIM model) and units
|
||||
atom_style atomic
|
||||
|
||||
# Set the OpenKIM model that will be used
|
||||
kim init LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004 metal
|
||||
#=== BEGIN kim init ==========================================
|
||||
units metal
|
||||
neighbor 2.0 bin # Angstroms
|
||||
timestep 1.0e-3 # picoseconds
|
||||
|
||||
This model has 3 mutable parameters.
|
||||
No. | Parameter name | data type | extent
|
||||
-----------------------------------------------------
|
||||
1 | cutoff | "Double" | 1
|
||||
2 | epsilon | "Double" | 1
|
||||
3 | sigma | "Double" | 1
|
||||
#=== END kim init ============================================
|
||||
|
||||
|
||||
# the equilibrium lattice constant for the fcc structure
|
||||
variable lattice_constant equal 5.248509056866169
|
||||
|
||||
# Periodic boundary conditions along all three dimensions
|
||||
boundary p p p
|
||||
|
||||
# Create an FCC lattice with the lattice spacing
|
||||
# using a single conventional (orthogonal) unit cell
|
||||
lattice fcc ${lattice_constant}
|
||||
lattice fcc 5.24850905686617
|
||||
Lattice spacing in x,y,z = 5.2485091 5.2485091 5.2485091
|
||||
region box block 0 1 0 1 0 1 units lattice
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (5.2485091 5.2485091 5.2485091)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 4 atoms
|
||||
create_atoms CPU = 0.000 seconds
|
||||
mass 1 39.948
|
||||
|
||||
# Specify the KIM interactions
|
||||
kim interactions Ar
|
||||
#=== BEGIN kim interactions ==================================
|
||||
pair_style kim LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004
|
||||
pair_coeff * * Ar
|
||||
#=== END kim interactions ====================================
|
||||
|
||||
|
||||
# Compute energy
|
||||
run 0
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Your simulation uses code contributions which should be cited:
|
||||
|
||||
- @Comment
|
||||
{
|
||||
\documentclass{article}
|
||||
\usepackage{url}
|
||||
\begin{document}
|
||||
This Model originally published in \cite{MO_126566794224_004a} is archived in OpenKIM~\cite{MO_126566794224_004, MD_498634107543_004, tadmor:elliott:2011, elliott:tadmor:2011}.
|
||||
\bibliographystyle{vancouver}
|
||||
\bibliography{kimcite-MO_126566794224_004.bib}
|
||||
\end{document}
|
||||
}
|
||||
|
||||
@Misc{MO_126566794224_004,
|
||||
author = {Ellad Tadmor},
|
||||
title = {{L}ennard-{J}ones model (shifted) for {A}r with parameters from {B}ernardes (1958) (medium precision cutoff) v004},
|
||||
doi = {10.25950/9f98b989},
|
||||
howpublished = {OpenKIM, \url{https://doi.org/10.25950/9f98b989}},
|
||||
keywords = {OpenKIM, Model, MO_126566794224_004},
|
||||
publisher = {OpenKIM},
|
||||
year = 2020,
|
||||
}
|
||||
|
||||
@Misc{MD_498634107543_004,
|
||||
author = {Ellad Tadmor},
|
||||
title = {{D}river for the {L}ennard-{J}ones model uniformly shifted to have zero energy at the cutoff radius v004},
|
||||
doi = {10.25950/bdffd6a6},
|
||||
howpublished = {OpenKIM, \url{https://doi.org/10.25950/9f98b989}},
|
||||
keywords = {OpenKIM, Model Driver, MD_498634107543_004},
|
||||
publisher = {OpenKIM},
|
||||
year = 2020,
|
||||
}
|
||||
|
||||
@Article{tadmor:elliott:2011,
|
||||
author = {E. B. Tadmor and R. S. Elliott and J. P. Sethna and R. E. Miller and C. A. Becker},
|
||||
title = {The potential of atomistic simulations and the {K}nowledgebase of {I}nteratomic {M}odels},
|
||||
journal = {{JOM}},
|
||||
year = {2011},
|
||||
volume = {63},
|
||||
number = {7},
|
||||
pages = {17},
|
||||
doi = {10.1007/s11837-011-0102-6},
|
||||
}
|
||||
|
||||
@Misc{elliott:tadmor:2011,
|
||||
author = {Ryan S. Elliott and Ellad B. Tadmor},
|
||||
title = {{K}nowledgebase of {I}nteratomic {M}odels ({KIM}) Application Programming Interface ({API})},
|
||||
howpublished = {\url{https://openkim.org/kim-api}},
|
||||
publisher = {OpenKIM},
|
||||
year = 2011,
|
||||
doi = {10.25950/ff8f563a},
|
||||
}
|
||||
|
||||
@Article{MO_126566794224_004a,
|
||||
author = {Newton Bernardes},
|
||||
doi = {10.1103/PhysRev.112.1534},
|
||||
issue = {5},
|
||||
journal = {Physical Review},
|
||||
pages = {1534--1539},
|
||||
publisher = {American Physical Society},
|
||||
title = {Theory of Solid {N}e, {A}, {K}r, and {X}e at 0{K}},
|
||||
volume = {112},
|
||||
year = {1958},
|
||||
}
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 10 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 15.5
|
||||
ghost atom cutoff = 15.5
|
||||
binsize = 7.75, bins = 1 1 1
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair kim, perpetual
|
||||
attributes: full, newton off, cut 15.5
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 3.119 | 3.119 | 3.119 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 0 -0.34602203 0 -0.34602203 0.00061471244
|
||||
Loop time of 0 on 1 procs for 0 steps with 4 atoms
|
||||
|
||||
0.0% CPU use with 1 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Output | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Modify | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Other | | 0 | | | 0.00
|
||||
|
||||
Nlocal: 4.00000 ave 4 max 4 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 1094.00 ave 1094 max 1094 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 0.00000 ave 0 max 0 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 1712.00 ave 1712 max 1712 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 1712
|
||||
Ave neighs/atom = 428.00000
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
|
||||
# Get cohesive energy
|
||||
variable natoms equal "count(all)"
|
||||
variable ecohesive equal "-pe/v_natoms"
|
||||
|
||||
# Create a property instance
|
||||
kim property create 1 cohesive-potential-energy-cubic-crystal
|
||||
#=== kim property ===========================================
|
||||
|
||||
# Set all the key-value pairs for this property instance
|
||||
kim property modify 1 key short-name source-value 1 fcc key species source-value 1 Ar key a source-value ${lattice_constant} source-unit angstrom key basis-atom-coordinates source-value 1 1:3 0.0 0.0 0.0 source-value 2 1:3 0.0 0.5 0.5 source-value 3 1:3 0.5 0.0 0.5 source-value 4 1:3 0.5 0.5 0.0 key space-group source-value Fm-3m key cohesive-potential-energy source-value ${ecohesive} source-unit eV
|
||||
kim property modify 1 key short-name source-value 1 fcc key species source-value 1 Ar key a source-value 5.24850905686617 source-unit angstrom key basis-atom-coordinates source-value 1 1:3 0.0 0.0 0.0 source-value 2 1:3 0.0 0.5 0.5 source-value 3 1:3 0.5 0.0 0.5 source-value 4 1:3 0.5 0.5 0.0 key space-group source-value Fm-3m key cohesive-potential-energy source-value ${ecohesive} source-unit eV
|
||||
kim property modify 1 key short-name source-value 1 fcc key species source-value 1 Ar key a source-value 5.24850905686617 source-unit angstrom key basis-atom-coordinates source-value 1 1:3 0.0 0.0 0.0 source-value 2 1:3 0.0 0.5 0.5 source-value 3 1:3 0.5 0.0 0.5 source-value 4 1:3 0.5 0.5 0.0 key space-group source-value Fm-3m key cohesive-potential-energy source-value 0.0865055084950546 source-unit eV
|
||||
#=== kim property ===========================================
|
||||
|
||||
# Dump the results in a file
|
||||
kim property dump "results.edn"
|
||||
#=== kim property ===========================================
|
||||
Total wall time: 0:00:00
|
||||
223
examples/kim/log.10Feb21.in.kim-pm-property.clang.4
Normal file
223
examples/kim/log.10Feb21.in.kim-pm-property.clang.4
Normal file
@ -0,0 +1,223 @@
|
||||
LAMMPS (10 Feb 2021)
|
||||
# kim property example
|
||||
#
|
||||
# For detailed information of this example please refer to:
|
||||
# `https://openkim.org/doc/evaluation/tutorial-lammps/`
|
||||
#
|
||||
# Description:
|
||||
#
|
||||
# This example is designed to calculate the cohesive energy corresponding to
|
||||
# the equilibrium FCC lattice constant for
|
||||
# `LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004` model for
|
||||
# argon. The material properties computed in LAMMPS are represented as a
|
||||
# standard KIM property instance format. (See
|
||||
# `https://openkim.org/doc/schema/properties-framework/` and
|
||||
# `https://lammps.sandia.gov/doc/kim_commands.html` for further details).
|
||||
# Then the created property instance is written to a file named `results.edn`
|
||||
# using the `kim property dump` command.
|
||||
#
|
||||
# Requirement:
|
||||
#
|
||||
# This example requires LAMMPS built with the Python 3.6 or later package
|
||||
# installed. See the `https://lammps.sandia.gov/doc/python.html` doc page for
|
||||
# more info on building LAMMPS with the version of Python on your system.
|
||||
# After successfully building LAMMPS with Python, you need to install the
|
||||
# kim-property Python package, See the
|
||||
# `https://lammps.sandia.gov/doc/Build_extras.html#kim` doc page for
|
||||
# further details.
|
||||
#
|
||||
# This example requires that the KIM Portable Model (PM)
|
||||
# `LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004`
|
||||
# is installed. This can be done with the command
|
||||
# kim-api-collections-management install user LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004
|
||||
# If this command does not work, you may need to setup your PATH to find the utility.
|
||||
# If you installed the kim-api using the LAMMPS CMake build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS build directory)
|
||||
# source ./kim_build-prefix/bin/kim-api-activate
|
||||
# If you installed the kim-api using the LAMMPS Make build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS src directory)
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# Or, see `https://openkim.org/doc/obtaining-models` for alternative options.
|
||||
#
|
||||
|
||||
# Initialize interatomic potential (KIM model) and units
|
||||
atom_style atomic
|
||||
|
||||
# Set the OpenKIM model that will be used
|
||||
kim init LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004 metal
|
||||
#=== BEGIN kim init ==========================================
|
||||
units metal
|
||||
neighbor 2.0 bin # Angstroms
|
||||
timestep 1.0e-3 # picoseconds
|
||||
|
||||
This model has 3 mutable parameters.
|
||||
No. | Parameter name | data type | extent
|
||||
-----------------------------------------------------
|
||||
1 | cutoff | "Double" | 1
|
||||
2 | epsilon | "Double" | 1
|
||||
3 | sigma | "Double" | 1
|
||||
#=== END kim init ============================================
|
||||
|
||||
|
||||
# the equilibrium lattice constant for the fcc structure
|
||||
variable lattice_constant equal 5.248509056866169
|
||||
|
||||
# Periodic boundary conditions along all three dimensions
|
||||
boundary p p p
|
||||
|
||||
# Create an FCC lattice with the lattice spacing
|
||||
# using a single conventional (orthogonal) unit cell
|
||||
lattice fcc ${lattice_constant}
|
||||
lattice fcc 5.24850905686617
|
||||
Lattice spacing in x,y,z = 5.2485091 5.2485091 5.2485091
|
||||
region box block 0 1 0 1 0 1 units lattice
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (5.2485091 5.2485091 5.2485091)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 4 atoms
|
||||
create_atoms CPU = 0.000 seconds
|
||||
mass 1 39.948
|
||||
|
||||
# Specify the KIM interactions
|
||||
kim interactions Ar
|
||||
#=== BEGIN kim interactions ==================================
|
||||
pair_style kim LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004
|
||||
pair_coeff * * Ar
|
||||
#=== END kim interactions ====================================
|
||||
|
||||
|
||||
# Compute energy
|
||||
run 0
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Your simulation uses code contributions which should be cited:
|
||||
|
||||
- @Comment
|
||||
{
|
||||
\documentclass{article}
|
||||
\usepackage{url}
|
||||
\begin{document}
|
||||
This Model originally published in \cite{MO_126566794224_004a} is archived in OpenKIM~\cite{MO_126566794224_004, MD_498634107543_004, tadmor:elliott:2011, elliott:tadmor:2011}.
|
||||
\bibliographystyle{vancouver}
|
||||
\bibliography{kimcite-MO_126566794224_004.bib}
|
||||
\end{document}
|
||||
}
|
||||
|
||||
@Misc{MO_126566794224_004,
|
||||
author = {Ellad Tadmor},
|
||||
title = {{L}ennard-{J}ones model (shifted) for {A}r with parameters from {B}ernardes (1958) (medium precision cutoff) v004},
|
||||
doi = {10.25950/9f98b989},
|
||||
howpublished = {OpenKIM, \url{https://doi.org/10.25950/9f98b989}},
|
||||
keywords = {OpenKIM, Model, MO_126566794224_004},
|
||||
publisher = {OpenKIM},
|
||||
year = 2020,
|
||||
}
|
||||
|
||||
@Misc{MD_498634107543_004,
|
||||
author = {Ellad Tadmor},
|
||||
title = {{D}river for the {L}ennard-{J}ones model uniformly shifted to have zero energy at the cutoff radius v004},
|
||||
doi = {10.25950/bdffd6a6},
|
||||
howpublished = {OpenKIM, \url{https://doi.org/10.25950/9f98b989}},
|
||||
keywords = {OpenKIM, Model Driver, MD_498634107543_004},
|
||||
publisher = {OpenKIM},
|
||||
year = 2020,
|
||||
}
|
||||
|
||||
@Article{tadmor:elliott:2011,
|
||||
author = {E. B. Tadmor and R. S. Elliott and J. P. Sethna and R. E. Miller and C. A. Becker},
|
||||
title = {The potential of atomistic simulations and the {K}nowledgebase of {I}nteratomic {M}odels},
|
||||
journal = {{JOM}},
|
||||
year = {2011},
|
||||
volume = {63},
|
||||
number = {7},
|
||||
pages = {17},
|
||||
doi = {10.1007/s11837-011-0102-6},
|
||||
}
|
||||
|
||||
@Misc{elliott:tadmor:2011,
|
||||
author = {Ryan S. Elliott and Ellad B. Tadmor},
|
||||
title = {{K}nowledgebase of {I}nteratomic {M}odels ({KIM}) Application Programming Interface ({API})},
|
||||
howpublished = {\url{https://openkim.org/kim-api}},
|
||||
publisher = {OpenKIM},
|
||||
year = 2011,
|
||||
doi = {10.25950/ff8f563a},
|
||||
}
|
||||
|
||||
@Article{MO_126566794224_004a,
|
||||
author = {Newton Bernardes},
|
||||
doi = {10.1103/PhysRev.112.1534},
|
||||
issue = {5},
|
||||
journal = {Physical Review},
|
||||
pages = {1534--1539},
|
||||
publisher = {American Physical Society},
|
||||
title = {Theory of Solid {N}e, {A}, {K}r, and {X}e at 0{K}},
|
||||
volume = {112},
|
||||
year = {1958},
|
||||
}
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 10 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 15.5
|
||||
ghost atom cutoff = 15.5
|
||||
binsize = 7.75, bins = 1 1 1
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair kim, perpetual
|
||||
attributes: full, newton off, cut 15.5
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 3.165 | 3.165 | 3.165 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 0 -0.34602203 0 -0.34602203 0.00061471244
|
||||
Loop time of 1.5e-06 on 4 procs for 0 steps with 4 atoms
|
||||
|
||||
100.0% CPU use with 4 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Output | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Modify | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Other | | 1.5e-06 | | |100.00
|
||||
|
||||
Nlocal: 1.00000 ave 1 max 1 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 935.000 ave 935 max 935 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 0.00000 ave 0 max 0 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 428.000 ave 428 max 428 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 1712
|
||||
Ave neighs/atom = 428.00000
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
|
||||
# Get cohesive energy
|
||||
variable natoms equal "count(all)"
|
||||
variable ecohesive equal "-pe/v_natoms"
|
||||
|
||||
# Create a property instance
|
||||
kim property create 1 cohesive-potential-energy-cubic-crystal
|
||||
#=== kim property ===========================================
|
||||
|
||||
# Set all the key-value pairs for this property instance
|
||||
kim property modify 1 key short-name source-value 1 fcc key species source-value 1 Ar key a source-value ${lattice_constant} source-unit angstrom key basis-atom-coordinates source-value 1 1:3 0.0 0.0 0.0 source-value 2 1:3 0.0 0.5 0.5 source-value 3 1:3 0.5 0.0 0.5 source-value 4 1:3 0.5 0.5 0.0 key space-group source-value Fm-3m key cohesive-potential-energy source-value ${ecohesive} source-unit eV
|
||||
kim property modify 1 key short-name source-value 1 fcc key species source-value 1 Ar key a source-value 5.24850905686617 source-unit angstrom key basis-atom-coordinates source-value 1 1:3 0.0 0.0 0.0 source-value 2 1:3 0.0 0.5 0.5 source-value 3 1:3 0.5 0.0 0.5 source-value 4 1:3 0.5 0.5 0.0 key space-group source-value Fm-3m key cohesive-potential-energy source-value ${ecohesive} source-unit eV
|
||||
kim property modify 1 key short-name source-value 1 fcc key species source-value 1 Ar key a source-value 5.24850905686617 source-unit angstrom key basis-atom-coordinates source-value 1 1:3 0.0 0.0 0.0 source-value 2 1:3 0.0 0.5 0.5 source-value 3 1:3 0.5 0.0 0.5 source-value 4 1:3 0.5 0.5 0.0 key space-group source-value Fm-3m key cohesive-potential-energy source-value 0.0865055084950538 source-unit eV
|
||||
#=== kim property ===========================================
|
||||
|
||||
# Dump the results in a file
|
||||
kim property dump "results.edn"
|
||||
#=== kim property ===========================================
|
||||
Total wall time: 0:00:00
|
||||
210
examples/kim/log.10Feb21.in.kim-pm-query.melt.clang.1
Normal file
210
examples/kim/log.10Feb21.in.kim-pm-query.melt.clang.1
Normal file
@ -0,0 +1,210 @@
|
||||
LAMMPS (10 Feb 2021)
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the KIM Portable Model (PM)
|
||||
# `SW_StillingerWeber_1985_Si__MO_405512056662_005`
|
||||
# is installed. This can be done with the command
|
||||
# kim-api-collections-management install user SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
# If this command does not work, you may need to setup your PATH to find the utility.
|
||||
# If you installed the kim-api using the LAMMPS CMake build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS build directory)
|
||||
# source ./kim_build-prefix/bin/kim-api-activate
|
||||
# If you installed the kim-api using the LAMMPS Make build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS src directory)
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# Or, see `https://openkim.org/doc/obtaining-models` for alternative options.
|
||||
#
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
kim init SW_StillingerWeber_1985_Si__MO_405512056662_005 real
|
||||
#=== BEGIN kim init ==========================================
|
||||
units real
|
||||
neighbor 2.0 bin # Angstroms
|
||||
timestep 1.0 # femtoseconds
|
||||
|
||||
This model has 9 mutable parameters.
|
||||
No. | Parameter name | data type | extent
|
||||
-----------------------------------------------------
|
||||
1 | A | "Double" | 1
|
||||
2 | B | "Double" | 1
|
||||
3 | p | "Double" | 1
|
||||
4 | q | "Double" | 1
|
||||
5 | sigma | "Double" | 1
|
||||
6 | gamma | "Double" | 1
|
||||
7 | cutoff | "Double" | 1
|
||||
8 | lambda | "Double" | 1
|
||||
9 | costheta0 | "Double" | 1
|
||||
#=== END kim init ============================================
|
||||
|
||||
kim query a0 get_lattice_constant_cubic crystal=["fcc"] species=["Si"] units=["angstrom"]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable a0 string "4.146581932902336"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
|
||||
lattice fcc ${a0}
|
||||
lattice fcc 4.146581932902336
|
||||
Lattice spacing in x,y,z = 4.1465819 4.1465819 4.1465819
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (82.931639 82.931639 82.931639)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.004 seconds
|
||||
|
||||
kim interactions Si
|
||||
#=== BEGIN kim interactions ==================================
|
||||
pair_style kim SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
pair_coeff * * Si
|
||||
#=== END kim interactions ====================================
|
||||
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
|
||||
|
||||
run 100
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Your simulation uses code contributions which should be cited:
|
||||
|
||||
- @Comment
|
||||
{
|
||||
\documentclass{article}
|
||||
\usepackage{url}
|
||||
\begin{document}
|
||||
This Model originally published in \cite{MO_405512056662_005a, MO_405512056662_005b} is archived in OpenKIM~\cite{MO_405512056662_005, MD_335816936951_004, tadmor:elliott:2011, elliott:tadmor:2011}.
|
||||
\bibliographystyle{vancouver}
|
||||
\bibliography{kimcite-MO_405512056662_005.bib}
|
||||
\end{document}
|
||||
}
|
||||
|
||||
@Misc{MO_405512056662_005,
|
||||
author = {Amit K Singh},
|
||||
title = {{S}tillinger-{W}eber potential for {S}i due to {S}tillinger and {W}eber (1985) v005},
|
||||
doi = {10.25950/c74b293f},
|
||||
howpublished = {OpenKIM, \url{https://doi.org/10.25950/c74b293f}},
|
||||
keywords = {OpenKIM, Model, MO_405512056662_005},
|
||||
publisher = {OpenKIM},
|
||||
year = 2018,
|
||||
}
|
||||
|
||||
@Misc{MD_335816936951_004,
|
||||
author = {Mingjian Wen},
|
||||
title = {{S}tillinger-{W}eber ({SW}) {M}odel {D}river v004},
|
||||
doi = {10.25950/f3abd2d6},
|
||||
howpublished = {OpenKIM, \url{https://doi.org/10.25950/c74b293f}},
|
||||
keywords = {OpenKIM, Model Driver, MD_335816936951_004},
|
||||
publisher = {OpenKIM},
|
||||
year = 2018,
|
||||
}
|
||||
|
||||
@Article{tadmor:elliott:2011,
|
||||
author = {E. B. Tadmor and R. S. Elliott and J. P. Sethna and R. E. Miller and C. A. Becker},
|
||||
title = {The potential of atomistic simulations and the {K}nowledgebase of {I}nteratomic {M}odels},
|
||||
journal = {{JOM}},
|
||||
year = {2011},
|
||||
volume = {63},
|
||||
number = {7},
|
||||
pages = {17},
|
||||
doi = {10.1007/s11837-011-0102-6},
|
||||
}
|
||||
|
||||
@Misc{elliott:tadmor:2011,
|
||||
author = {Ryan S. Elliott and Ellad B. Tadmor},
|
||||
title = {{K}nowledgebase of {I}nteratomic {M}odels ({KIM}) Application Programming Interface ({API})},
|
||||
howpublished = {\url{https://openkim.org/kim-api}},
|
||||
publisher = {OpenKIM},
|
||||
year = 2011,
|
||||
doi = {10.25950/ff8f563a},
|
||||
}
|
||||
|
||||
@Article{MO_405512056662_005a,
|
||||
author = {Stillinger, Frank H. and Weber, Thomas A.},
|
||||
doi = {10.1103/PhysRevB.31.5262},
|
||||
issue = {8},
|
||||
journal = {Physical Review B},
|
||||
month = {Apr},
|
||||
pages = {5262--5271},
|
||||
publisher = {American Physical Society},
|
||||
title = {Computer simulation of local order in condensed phases of silicon},
|
||||
volume = {31},
|
||||
year = {1985},
|
||||
}
|
||||
|
||||
@Book{MO_405512056662_005b,
|
||||
author = {Tadmor, Ellad B. and Miller, Ronald E.},
|
||||
doi = {10.1017/CBO9781139003582},
|
||||
publisher = {Cambridge University Press},
|
||||
title = {Modeling Materials: {C}ontinuum, Atomistic and Multiscale Techniques},
|
||||
year = {2011},
|
||||
}
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 4.07118
|
||||
ghost atom cutoff = 4.07118
|
||||
binsize = 2.03559, bins = 41 41 41
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair kim, perpetual
|
||||
attributes: full, newton off, cut 4.07118
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 10.36 | 10.36 | 10.36 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 200 -126084.25 0 -107007.66 1528.8768
|
||||
100 94.450495 -116016.03 0 -107007.07 2282.2685
|
||||
Loop time of 18.2886 on 1 procs for 100 steps with 32000 atoms
|
||||
|
||||
Performance: 0.472 ns/day, 50.802 hours/ns, 5.468 timesteps/s
|
||||
99.9% CPU use with 1 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 18.155 | 18.155 | 18.155 | 0.0 | 99.27
|
||||
Neigh | 0.087194 | 0.087194 | 0.087194 | 0.0 | 0.48
|
||||
Comm | 0.009477 | 0.009477 | 0.009477 | 0.0 | 0.05
|
||||
Output | 6.7e-05 | 6.7e-05 | 6.7e-05 | 0.0 | 0.00
|
||||
Modify | 0.02616 | 0.02616 | 0.02616 | 0.0 | 0.14
|
||||
Other | | 0.0111 | | | 0.06
|
||||
|
||||
Nlocal: 32000.0 ave 32000 max 32000 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 9667.00 ave 9667 max 9667 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 0.00000 ave 0 max 0 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 450192.0 ave 450192 max 450192 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 450192
|
||||
Ave neighs/atom = 14.068500
|
||||
Neighbor list builds = 3
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:21
|
||||
210
examples/kim/log.10Feb21.in.kim-pm-query.melt.clang.4
Normal file
210
examples/kim/log.10Feb21.in.kim-pm-query.melt.clang.4
Normal file
@ -0,0 +1,210 @@
|
||||
LAMMPS (10 Feb 2021)
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the KIM Portable Model (PM)
|
||||
# `SW_StillingerWeber_1985_Si__MO_405512056662_005`
|
||||
# is installed. This can be done with the command
|
||||
# kim-api-collections-management install user SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
# If this command does not work, you may need to setup your PATH to find the utility.
|
||||
# If you installed the kim-api using the LAMMPS CMake build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS build directory)
|
||||
# source ./kim_build-prefix/bin/kim-api-activate
|
||||
# If you installed the kim-api using the LAMMPS Make build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS src directory)
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# Or, see `https://openkim.org/doc/obtaining-models` for alternative options.
|
||||
#
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
kim init SW_StillingerWeber_1985_Si__MO_405512056662_005 real
|
||||
#=== BEGIN kim init ==========================================
|
||||
units real
|
||||
neighbor 2.0 bin # Angstroms
|
||||
timestep 1.0 # femtoseconds
|
||||
|
||||
This model has 9 mutable parameters.
|
||||
No. | Parameter name | data type | extent
|
||||
-----------------------------------------------------
|
||||
1 | A | "Double" | 1
|
||||
2 | B | "Double" | 1
|
||||
3 | p | "Double" | 1
|
||||
4 | q | "Double" | 1
|
||||
5 | sigma | "Double" | 1
|
||||
6 | gamma | "Double" | 1
|
||||
7 | cutoff | "Double" | 1
|
||||
8 | lambda | "Double" | 1
|
||||
9 | costheta0 | "Double" | 1
|
||||
#=== END kim init ============================================
|
||||
|
||||
kim query a0 get_lattice_constant_cubic crystal=["fcc"] species=["Si"] units=["angstrom"]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable a0 string "4.146581932902336"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
|
||||
lattice fcc ${a0}
|
||||
lattice fcc 4.146581932902336
|
||||
Lattice spacing in x,y,z = 4.1465819 4.1465819 4.1465819
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (82.931639 82.931639 82.931639)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.001 seconds
|
||||
|
||||
kim interactions Si
|
||||
#=== BEGIN kim interactions ==================================
|
||||
pair_style kim SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
pair_coeff * * Si
|
||||
#=== END kim interactions ====================================
|
||||
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
|
||||
|
||||
run 100
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Your simulation uses code contributions which should be cited:
|
||||
|
||||
- @Comment
|
||||
{
|
||||
\documentclass{article}
|
||||
\usepackage{url}
|
||||
\begin{document}
|
||||
This Model originally published in \cite{MO_405512056662_005a, MO_405512056662_005b} is archived in OpenKIM~\cite{MO_405512056662_005, MD_335816936951_004, tadmor:elliott:2011, elliott:tadmor:2011}.
|
||||
\bibliographystyle{vancouver}
|
||||
\bibliography{kimcite-MO_405512056662_005.bib}
|
||||
\end{document}
|
||||
}
|
||||
|
||||
@Misc{MO_405512056662_005,
|
||||
author = {Amit K Singh},
|
||||
title = {{S}tillinger-{W}eber potential for {S}i due to {S}tillinger and {W}eber (1985) v005},
|
||||
doi = {10.25950/c74b293f},
|
||||
howpublished = {OpenKIM, \url{https://doi.org/10.25950/c74b293f}},
|
||||
keywords = {OpenKIM, Model, MO_405512056662_005},
|
||||
publisher = {OpenKIM},
|
||||
year = 2018,
|
||||
}
|
||||
|
||||
@Misc{MD_335816936951_004,
|
||||
author = {Mingjian Wen},
|
||||
title = {{S}tillinger-{W}eber ({SW}) {M}odel {D}river v004},
|
||||
doi = {10.25950/f3abd2d6},
|
||||
howpublished = {OpenKIM, \url{https://doi.org/10.25950/c74b293f}},
|
||||
keywords = {OpenKIM, Model Driver, MD_335816936951_004},
|
||||
publisher = {OpenKIM},
|
||||
year = 2018,
|
||||
}
|
||||
|
||||
@Article{tadmor:elliott:2011,
|
||||
author = {E. B. Tadmor and R. S. Elliott and J. P. Sethna and R. E. Miller and C. A. Becker},
|
||||
title = {The potential of atomistic simulations and the {K}nowledgebase of {I}nteratomic {M}odels},
|
||||
journal = {{JOM}},
|
||||
year = {2011},
|
||||
volume = {63},
|
||||
number = {7},
|
||||
pages = {17},
|
||||
doi = {10.1007/s11837-011-0102-6},
|
||||
}
|
||||
|
||||
@Misc{elliott:tadmor:2011,
|
||||
author = {Ryan S. Elliott and Ellad B. Tadmor},
|
||||
title = {{K}nowledgebase of {I}nteratomic {M}odels ({KIM}) Application Programming Interface ({API})},
|
||||
howpublished = {\url{https://openkim.org/kim-api}},
|
||||
publisher = {OpenKIM},
|
||||
year = 2011,
|
||||
doi = {10.25950/ff8f563a},
|
||||
}
|
||||
|
||||
@Article{MO_405512056662_005a,
|
||||
author = {Stillinger, Frank H. and Weber, Thomas A.},
|
||||
doi = {10.1103/PhysRevB.31.5262},
|
||||
issue = {8},
|
||||
journal = {Physical Review B},
|
||||
month = {Apr},
|
||||
pages = {5262--5271},
|
||||
publisher = {American Physical Society},
|
||||
title = {Computer simulation of local order in condensed phases of silicon},
|
||||
volume = {31},
|
||||
year = {1985},
|
||||
}
|
||||
|
||||
@Book{MO_405512056662_005b,
|
||||
author = {Tadmor, Ellad B. and Miller, Ronald E.},
|
||||
doi = {10.1017/CBO9781139003582},
|
||||
publisher = {Cambridge University Press},
|
||||
title = {Modeling Materials: {C}ontinuum, Atomistic and Multiscale Techniques},
|
||||
year = {2011},
|
||||
}
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 4.07118
|
||||
ghost atom cutoff = 4.07118
|
||||
binsize = 2.03559, bins = 41 41 41
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair kim, perpetual
|
||||
attributes: full, newton off, cut 4.07118
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 3.489 | 3.489 | 3.489 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 200 -126084.25 0 -107007.66 1528.8768
|
||||
100 94.450495 -116016.03 0 -107007.07 2282.2685
|
||||
Loop time of 5.00432 on 4 procs for 100 steps with 32000 atoms
|
||||
|
||||
Performance: 1.727 ns/day, 13.901 hours/ns, 19.983 timesteps/s
|
||||
99.7% CPU use with 4 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 4.9281 | 4.9366 | 4.9447 | 0.3 | 98.65
|
||||
Neigh | 0.02399 | 0.024135 | 0.024318 | 0.1 | 0.48
|
||||
Comm | 0.020646 | 0.029014 | 0.037515 | 4.3 | 0.58
|
||||
Output | 2.9e-05 | 3.325e-05 | 4.2e-05 | 0.0 | 0.00
|
||||
Modify | 0.008808 | 0.0088445 | 0.00888 | 0.0 | 0.18
|
||||
Other | | 0.005691 | | | 0.11
|
||||
|
||||
Nlocal: 8000.00 ave 8029 max 7968 min
|
||||
Histogram: 1 1 0 0 0 0 0 0 0 2
|
||||
Nghost: 4259.00 ave 4303 max 4202 min
|
||||
Histogram: 1 0 0 0 0 0 2 0 0 1
|
||||
Neighs: 0.00000 ave 0 max 0 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 112548.0 ave 113091 max 111995 min
|
||||
Histogram: 1 0 0 1 0 0 0 1 0 1
|
||||
|
||||
Total # of neighbors = 450192
|
||||
Ave neighs/atom = 14.068500
|
||||
Neighbor list builds = 3
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:07
|
||||
204
examples/kim/log.10Feb21.in.kim-pm.melt.clang.1
Normal file
204
examples/kim/log.10Feb21.in.kim-pm.melt.clang.1
Normal file
@ -0,0 +1,204 @@
|
||||
LAMMPS (10 Feb 2021)
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the KIM Portable Model (PM)
|
||||
# `SW_StillingerWeber_1985_Si__MO_405512056662_005`
|
||||
# is installed. This can be done with the command
|
||||
# kim-api-collections-management install user SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
# If this command does not work, you may need to setup your PATH to find the utility.
|
||||
# If you installed the kim-api using the LAMMPS CMake build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS build directory)
|
||||
# source ./kim_build-prefix/bin/kim-api-activate
|
||||
# If you installed the kim-api using the LAMMPS Make build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS src directory)
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# Or, see `https://openkim.org/doc/obtaining-models` for alternative options.
|
||||
#
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
kim init SW_StillingerWeber_1985_Si__MO_405512056662_005 real
|
||||
#=== BEGIN kim init ==========================================
|
||||
units real
|
||||
neighbor 2.0 bin # Angstroms
|
||||
timestep 1.0 # femtoseconds
|
||||
|
||||
This model has 9 mutable parameters.
|
||||
No. | Parameter name | data type | extent
|
||||
-----------------------------------------------------
|
||||
1 | A | "Double" | 1
|
||||
2 | B | "Double" | 1
|
||||
3 | p | "Double" | 1
|
||||
4 | q | "Double" | 1
|
||||
5 | sigma | "Double" | 1
|
||||
6 | gamma | "Double" | 1
|
||||
7 | cutoff | "Double" | 1
|
||||
8 | lambda | "Double" | 1
|
||||
9 | costheta0 | "Double" | 1
|
||||
#=== END kim init ============================================
|
||||
|
||||
|
||||
lattice fcc 4.4300
|
||||
Lattice spacing in x,y,z = 4.4300000 4.4300000 4.4300000
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (88.600000 88.600000 88.600000)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.002 seconds
|
||||
|
||||
kim interactions Si
|
||||
#=== BEGIN kim interactions ==================================
|
||||
pair_style kim SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
pair_coeff * * Si
|
||||
#=== END kim interactions ====================================
|
||||
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
|
||||
|
||||
run 100
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Your simulation uses code contributions which should be cited:
|
||||
|
||||
- @Comment
|
||||
{
|
||||
\documentclass{article}
|
||||
\usepackage{url}
|
||||
\begin{document}
|
||||
This Model originally published in \cite{MO_405512056662_005a, MO_405512056662_005b} is archived in OpenKIM~\cite{MO_405512056662_005, MD_335816936951_004, tadmor:elliott:2011, elliott:tadmor:2011}.
|
||||
\bibliographystyle{vancouver}
|
||||
\bibliography{kimcite-MO_405512056662_005.bib}
|
||||
\end{document}
|
||||
}
|
||||
|
||||
@Misc{MO_405512056662_005,
|
||||
author = {Amit K Singh},
|
||||
title = {{S}tillinger-{W}eber potential for {S}i due to {S}tillinger and {W}eber (1985) v005},
|
||||
doi = {10.25950/c74b293f},
|
||||
howpublished = {OpenKIM, \url{https://doi.org/10.25950/c74b293f}},
|
||||
keywords = {OpenKIM, Model, MO_405512056662_005},
|
||||
publisher = {OpenKIM},
|
||||
year = 2018,
|
||||
}
|
||||
|
||||
@Misc{MD_335816936951_004,
|
||||
author = {Mingjian Wen},
|
||||
title = {{S}tillinger-{W}eber ({SW}) {M}odel {D}river v004},
|
||||
doi = {10.25950/f3abd2d6},
|
||||
howpublished = {OpenKIM, \url{https://doi.org/10.25950/c74b293f}},
|
||||
keywords = {OpenKIM, Model Driver, MD_335816936951_004},
|
||||
publisher = {OpenKIM},
|
||||
year = 2018,
|
||||
}
|
||||
|
||||
@Article{tadmor:elliott:2011,
|
||||
author = {E. B. Tadmor and R. S. Elliott and J. P. Sethna and R. E. Miller and C. A. Becker},
|
||||
title = {The potential of atomistic simulations and the {K}nowledgebase of {I}nteratomic {M}odels},
|
||||
journal = {{JOM}},
|
||||
year = {2011},
|
||||
volume = {63},
|
||||
number = {7},
|
||||
pages = {17},
|
||||
doi = {10.1007/s11837-011-0102-6},
|
||||
}
|
||||
|
||||
@Misc{elliott:tadmor:2011,
|
||||
author = {Ryan S. Elliott and Ellad B. Tadmor},
|
||||
title = {{K}nowledgebase of {I}nteratomic {M}odels ({KIM}) Application Programming Interface ({API})},
|
||||
howpublished = {\url{https://openkim.org/kim-api}},
|
||||
publisher = {OpenKIM},
|
||||
year = 2011,
|
||||
doi = {10.25950/ff8f563a},
|
||||
}
|
||||
|
||||
@Article{MO_405512056662_005a,
|
||||
author = {Stillinger, Frank H. and Weber, Thomas A.},
|
||||
doi = {10.1103/PhysRevB.31.5262},
|
||||
issue = {8},
|
||||
journal = {Physical Review B},
|
||||
month = {Apr},
|
||||
pages = {5262--5271},
|
||||
publisher = {American Physical Society},
|
||||
title = {Computer simulation of local order in condensed phases of silicon},
|
||||
volume = {31},
|
||||
year = {1985},
|
||||
}
|
||||
|
||||
@Book{MO_405512056662_005b,
|
||||
author = {Tadmor, Ellad B. and Miller, Ronald E.},
|
||||
doi = {10.1017/CBO9781139003582},
|
||||
publisher = {Cambridge University Press},
|
||||
title = {Modeling Materials: {C}ontinuum, Atomistic and Multiscale Techniques},
|
||||
year = {2011},
|
||||
}
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 4.07118
|
||||
ghost atom cutoff = 4.07118
|
||||
binsize = 2.03559, bins = 44 44 44
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair kim, perpetual
|
||||
attributes: full, newton off, cut 4.07118
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 10.44 | 10.44 | 10.44 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 200 -85249.847 0 -66173.259 -33302.387
|
||||
100 253.43357 -90346.68 0 -66173.441 -14888.698
|
||||
Loop time of 17.7449 on 1 procs for 100 steps with 32000 atoms
|
||||
|
||||
Performance: 0.487 ns/day, 49.291 hours/ns, 5.635 timesteps/s
|
||||
99.9% CPU use with 1 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 17.64 | 17.64 | 17.64 | 0.0 | 99.41
|
||||
Neigh | 0.060149 | 0.060149 | 0.060149 | 0.0 | 0.34
|
||||
Comm | 0.008585 | 0.008585 | 0.008585 | 0.0 | 0.05
|
||||
Output | 6.3e-05 | 6.3e-05 | 6.3e-05 | 0.0 | 0.00
|
||||
Modify | 0.025324 | 0.025324 | 0.025324 | 0.0 | 0.14
|
||||
Other | | 0.01057 | | | 0.06
|
||||
|
||||
Nlocal: 32000.0 ave 32000 max 32000 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 7760.00 ave 7760 max 7760 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 0.00000 ave 0 max 0 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 402352.0 ave 402352 max 402352 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 402352
|
||||
Ave neighs/atom = 12.573500
|
||||
Neighbor list builds = 4
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:17
|
||||
204
examples/kim/log.10Feb21.in.kim-pm.melt.clang.4
Normal file
204
examples/kim/log.10Feb21.in.kim-pm.melt.clang.4
Normal file
@ -0,0 +1,204 @@
|
||||
LAMMPS (10 Feb 2021)
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the KIM Portable Model (PM)
|
||||
# `SW_StillingerWeber_1985_Si__MO_405512056662_005`
|
||||
# is installed. This can be done with the command
|
||||
# kim-api-collections-management install user SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
# If this command does not work, you may need to setup your PATH to find the utility.
|
||||
# If you installed the kim-api using the LAMMPS CMake build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS build directory)
|
||||
# source ./kim_build-prefix/bin/kim-api-activate
|
||||
# If you installed the kim-api using the LAMMPS Make build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS src directory)
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# Or, see `https://openkim.org/doc/obtaining-models` for alternative options.
|
||||
#
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
kim init SW_StillingerWeber_1985_Si__MO_405512056662_005 real
|
||||
#=== BEGIN kim init ==========================================
|
||||
units real
|
||||
neighbor 2.0 bin # Angstroms
|
||||
timestep 1.0 # femtoseconds
|
||||
|
||||
This model has 9 mutable parameters.
|
||||
No. | Parameter name | data type | extent
|
||||
-----------------------------------------------------
|
||||
1 | A | "Double" | 1
|
||||
2 | B | "Double" | 1
|
||||
3 | p | "Double" | 1
|
||||
4 | q | "Double" | 1
|
||||
5 | sigma | "Double" | 1
|
||||
6 | gamma | "Double" | 1
|
||||
7 | cutoff | "Double" | 1
|
||||
8 | lambda | "Double" | 1
|
||||
9 | costheta0 | "Double" | 1
|
||||
#=== END kim init ============================================
|
||||
|
||||
|
||||
lattice fcc 4.4300
|
||||
Lattice spacing in x,y,z = 4.4300000 4.4300000 4.4300000
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (88.600000 88.600000 88.600000)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.001 seconds
|
||||
|
||||
kim interactions Si
|
||||
#=== BEGIN kim interactions ==================================
|
||||
pair_style kim SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
pair_coeff * * Si
|
||||
#=== END kim interactions ====================================
|
||||
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
|
||||
|
||||
run 100
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Your simulation uses code contributions which should be cited:
|
||||
|
||||
- @Comment
|
||||
{
|
||||
\documentclass{article}
|
||||
\usepackage{url}
|
||||
\begin{document}
|
||||
This Model originally published in \cite{MO_405512056662_005a, MO_405512056662_005b} is archived in OpenKIM~\cite{MO_405512056662_005, MD_335816936951_004, tadmor:elliott:2011, elliott:tadmor:2011}.
|
||||
\bibliographystyle{vancouver}
|
||||
\bibliography{kimcite-MO_405512056662_005.bib}
|
||||
\end{document}
|
||||
}
|
||||
|
||||
@Misc{MO_405512056662_005,
|
||||
author = {Amit K Singh},
|
||||
title = {{S}tillinger-{W}eber potential for {S}i due to {S}tillinger and {W}eber (1985) v005},
|
||||
doi = {10.25950/c74b293f},
|
||||
howpublished = {OpenKIM, \url{https://doi.org/10.25950/c74b293f}},
|
||||
keywords = {OpenKIM, Model, MO_405512056662_005},
|
||||
publisher = {OpenKIM},
|
||||
year = 2018,
|
||||
}
|
||||
|
||||
@Misc{MD_335816936951_004,
|
||||
author = {Mingjian Wen},
|
||||
title = {{S}tillinger-{W}eber ({SW}) {M}odel {D}river v004},
|
||||
doi = {10.25950/f3abd2d6},
|
||||
howpublished = {OpenKIM, \url{https://doi.org/10.25950/c74b293f}},
|
||||
keywords = {OpenKIM, Model Driver, MD_335816936951_004},
|
||||
publisher = {OpenKIM},
|
||||
year = 2018,
|
||||
}
|
||||
|
||||
@Article{tadmor:elliott:2011,
|
||||
author = {E. B. Tadmor and R. S. Elliott and J. P. Sethna and R. E. Miller and C. A. Becker},
|
||||
title = {The potential of atomistic simulations and the {K}nowledgebase of {I}nteratomic {M}odels},
|
||||
journal = {{JOM}},
|
||||
year = {2011},
|
||||
volume = {63},
|
||||
number = {7},
|
||||
pages = {17},
|
||||
doi = {10.1007/s11837-011-0102-6},
|
||||
}
|
||||
|
||||
@Misc{elliott:tadmor:2011,
|
||||
author = {Ryan S. Elliott and Ellad B. Tadmor},
|
||||
title = {{K}nowledgebase of {I}nteratomic {M}odels ({KIM}) Application Programming Interface ({API})},
|
||||
howpublished = {\url{https://openkim.org/kim-api}},
|
||||
publisher = {OpenKIM},
|
||||
year = 2011,
|
||||
doi = {10.25950/ff8f563a},
|
||||
}
|
||||
|
||||
@Article{MO_405512056662_005a,
|
||||
author = {Stillinger, Frank H. and Weber, Thomas A.},
|
||||
doi = {10.1103/PhysRevB.31.5262},
|
||||
issue = {8},
|
||||
journal = {Physical Review B},
|
||||
month = {Apr},
|
||||
pages = {5262--5271},
|
||||
publisher = {American Physical Society},
|
||||
title = {Computer simulation of local order in condensed phases of silicon},
|
||||
volume = {31},
|
||||
year = {1985},
|
||||
}
|
||||
|
||||
@Book{MO_405512056662_005b,
|
||||
author = {Tadmor, Ellad B. and Miller, Ronald E.},
|
||||
doi = {10.1017/CBO9781139003582},
|
||||
publisher = {Cambridge University Press},
|
||||
title = {Modeling Materials: {C}ontinuum, Atomistic and Multiscale Techniques},
|
||||
year = {2011},
|
||||
}
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 4.07118
|
||||
ghost atom cutoff = 4.07118
|
||||
binsize = 2.03559, bins = 44 44 44
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair kim, perpetual
|
||||
attributes: full, newton off, cut 4.07118
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 3.517 | 3.517 | 3.517 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 200 -85249.847 0 -66173.259 -33302.387
|
||||
100 253.43357 -90346.68 0 -66173.441 -14888.698
|
||||
Loop time of 4.87378 on 4 procs for 100 steps with 32000 atoms
|
||||
|
||||
Performance: 1.773 ns/day, 13.538 hours/ns, 20.518 timesteps/s
|
||||
99.7% CPU use with 4 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 4.8075 | 4.816 | 4.8244 | 0.3 | 98.81
|
||||
Neigh | 0.015902 | 0.015996 | 0.016077 | 0.1 | 0.33
|
||||
Comm | 0.018078 | 0.026375 | 0.034752 | 4.2 | 0.54
|
||||
Output | 3e-05 | 3.5e-05 | 4.4e-05 | 0.0 | 0.00
|
||||
Modify | 0.009331 | 0.0094922 | 0.009588 | 0.1 | 0.19
|
||||
Other | | 0.005919 | | | 0.12
|
||||
|
||||
Nlocal: 8000.00 ave 8014 max 7988 min
|
||||
Histogram: 1 1 0 0 0 0 1 0 0 1
|
||||
Nghost: 3374.75 ave 3389 max 3361 min
|
||||
Histogram: 1 0 1 0 0 0 0 1 0 1
|
||||
Neighs: 0.00000 ave 0 max 0 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 100588.0 ave 100856 max 100392 min
|
||||
Histogram: 1 0 1 0 1 0 0 0 0 1
|
||||
|
||||
Total # of neighbors = 402352
|
||||
Ave neighs/atom = 12.573500
|
||||
Neighbor list builds = 4
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:04
|
||||
655
examples/kim/log.10Feb21.in.kim-query.clang.1
Normal file
655
examples/kim/log.10Feb21.in.kim-query.clang.1
Normal file
@ -0,0 +1,655 @@
|
||||
LAMMPS (10 Feb 2021)
|
||||
# kim query example
|
||||
#
|
||||
# Requirement:
|
||||
#
|
||||
# This example requires LAMMPS is built with KIM package. A requirement for
|
||||
# the KIM package, is the KIM API library that must be downloaded from the
|
||||
# OpenKIM website and installed before LAMMPS is compiled. The 'kim query'
|
||||
# command requires the libcurl library to be installed. See the
|
||||
# `https://lammps.sandia.gov/doc/Build_extras.html#kim` doc page for further
|
||||
# details
|
||||
#
|
||||
# This example requires that the KIM Models
|
||||
# `EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005`
|
||||
# and
|
||||
# `EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000`
|
||||
# are installed.
|
||||
#
|
||||
# This can be done with the commands
|
||||
# `kim-api-collections-management install user `EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005`
|
||||
# `kim-api-collections-management install user `EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000`
|
||||
#
|
||||
# If these commands do not work, you may need to setup your PATH to find the utility.
|
||||
# If you installed the kim-api using the LAMMPS CMake build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS build directory)
|
||||
# source ./kim_build-prefix/bin/kim-api-activate
|
||||
# If you installed the kim-api using the LAMMPS Make build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS src directory)
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# Or, see https://openkim.org/doc/obtaining-models for alternative options.
|
||||
#
|
||||
|
||||
# -----------------------------------------------
|
||||
# Get an equilibrium fcc crystal lattice constant
|
||||
# -----------------------------------------------
|
||||
kim init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal
|
||||
#=== BEGIN kim init ==========================================
|
||||
units metal
|
||||
neighbor 2.0 bin # Angstroms
|
||||
timestep 1.0e-3 # picoseconds
|
||||
|
||||
This model has 6 mutable parameters.
|
||||
No. | Parameter name | data type | extent
|
||||
-----------------------------------------------------
|
||||
1 | cutoff | "Double" | 1
|
||||
2 | deltaRho | "Double" | 1
|
||||
3 | deltaR | "Double" | 1
|
||||
4 | embeddingData | "Double" | 500
|
||||
5 | rPhiData | "Double" | 500
|
||||
6 | densityData | "Double" | 500
|
||||
#=== END kim init ============================================
|
||||
|
||||
kim query latconst_1 get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst_1 string "4.032082033157349"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005) = ${latconst_1}"
|
||||
FCC lattice constant (EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005) = 4.032082033157349
|
||||
# Get the lattice contant from a different model
|
||||
kim query latconst_2 get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_WineyKubotaGupta_2010_Al__MO_149316865608_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst_2 string "4.024845376610756"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (EAM_Dynamo_WineyKubotaGupta_2010_Al__MO_149316865608_005) = ${latconst_2}"
|
||||
FCC lattice constant (EAM_Dynamo_WineyKubotaGupta_2010_Al__MO_149316865608_005) = 4.024845376610756
|
||||
clear
|
||||
|
||||
|
||||
# -----------------------------------------------
|
||||
# Get an equilibrium fcc crystal lattice constant
|
||||
# -----------------------------------------------
|
||||
kim query latconst_1 get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst_1 string "4.032082033157349"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
kim query latconst_2 get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_WineyKubotaGupta_2010_Al__MO_149316865608_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst_2 string "4.024845376610756"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005) = ${latconst_1}"
|
||||
FCC lattice constant (EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005) = 4.032082033157349
|
||||
print "FCC lattice constant (EAM_Dynamo_WineyKubotaGupta_2010_Al__MO_149316865608_005) = ${latconst_2}"
|
||||
FCC lattice constant (EAM_Dynamo_WineyKubotaGupta_2010_Al__MO_149316865608_005) = 4.024845376610756
|
||||
clear
|
||||
|
||||
|
||||
# -----------------------------------------------
|
||||
# Get an equilibrium hcp crystal lattice constant
|
||||
# -----------------------------------------------
|
||||
kim init EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000 metal
|
||||
#=== BEGIN kim init ==========================================
|
||||
units metal
|
||||
neighbor 2.0 bin # Angstroms
|
||||
timestep 1.0e-3 # picoseconds
|
||||
|
||||
This model has 6 mutable parameters.
|
||||
No. | Parameter name | data type | extent
|
||||
-----------------------------------------------------
|
||||
1 | cutoff | "Double" | 1
|
||||
2 | deltaRho | "Double" | 1
|
||||
3 | deltaR | "Double" | 1
|
||||
4 | embeddingData | "Double" | 10000
|
||||
5 | rPhiData | "Double" | 10000
|
||||
6 | densityData | "Double" | 10000
|
||||
#=== END kim init ============================================
|
||||
|
||||
kim query latconst split get_lattice_constant_hexagonal crystal=["hcp"] species=["Zr"] units=["angstrom"]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst_1 string 3.234055244384789
|
||||
variable latconst_2 string 5.167650199630013
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "HCP lattice constants = ${latconst_1}, ${latconst_2}"
|
||||
HCP lattice constants = 3.234055244384789, 5.167650199630013
|
||||
clear
|
||||
|
||||
|
||||
# -----------------------------------------------
|
||||
# Query for KIM models from openkim.org
|
||||
# Get all the EAM models that support Al
|
||||
# -----------------------------------------------
|
||||
kim query model index get_available_models species=[Al] potential_type=[eam]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable model index "EAM_CubicNaturalSpline_ErcolessiAdams_1994_Al__MO_800509458712_002" "EAM_Dynamo_AngeloMoodyBaskes_1995_NiAlH__MO_418978237058_005" "EAM_Dynamo_CaiYe_1996_AlCu__MO_942551040047_005" "EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005" "EAM_Dynamo_FarkasJones_1996_NbTiAl__MO_042691367780_000" "EAM_Dynamo_JacobsenNorskovPuska_1987_Al__MO_411692133366_000" "EAM_Dynamo_LandaWynblattSiegel_2000_AlPb__MO_699137396381_005" "EAM_Dynamo_LiuAdams_1998_AlMg__MO_019873715786_000" "EAM_Dynamo_LiuErcolessiAdams_2004_Al__MO_051157671505_000" "EAM_Dynamo_LiuLiuBorucki_1999_AlCu__MO_020851069572_000" "EAM_Dynamo_LiuOhotnickyAdams_1997_AlMg__MO_559870613549_000" "EAM_Dynamo_MendelevAstaRahman_2009_AlMg__MO_658278549784_005" "EAM_Dynamo_MendelevFangYe_2015_AlSm__MO_338600200739_000" "EAM_Dynamo_MendelevKramerBecker_2008_Al__MO_106969701023_005" "EAM_Dynamo_MendelevSrolovitzAckland_2005_AlFe__MO_577453891941_005" "EAM_Dynamo_MishinFarkasMehl_1999_Al__MO_651801486679_005" "EAM_Dynamo_MishinMehlPapaconstantopoulos_2002_NiAl__MO_109933561507_005" "EAM_Dynamo_Mishin_2004_NiAl__MO_101214310689_005" "EAM_Dynamo_PunMishin_2009_NiAl__MO_751354403791_005" "EAM_Dynamo_PunYamakovMishin_2013_AlCo__MO_678952612413_000" "EAM_Dynamo_PunYamakovMishin_2013_NiAlCo__MO_826591359508_000" "EAM_Dynamo_SchopfBrommerFrigan_2012_AlMnPd__MO_137572817842_000" "EAM_Dynamo_SturgeonLaird_2000_Al__MO_120808805541_005" "EAM_Dynamo_VailheFarkas_1997_CoAl__MO_284963179498_005" "EAM_Dynamo_WineyKubotaGupta_2010_Al__MO_149316865608_005" "EAM_Dynamo_Zhakhovsky_2009_Al__MO_519613893196_000" "EAM_Dynamo_ZhouJohnsonWadley_2004NISTretabulation_Al__MO_060567868558_000" "EAM_Dynamo_ZhouJohnsonWadley_2004_Al__MO_131650261510_005" "EAM_Dynamo_ZhouWadleyJohnson_2001_Al__MO_049243498555_000" "EAM_Dynamo_ZopeMishin_2003_Al__MO_664470114311_005" "EAM_Dynamo_ZopeMishin_2003_TiAl__MO_117656786760_005" "EAM_ErcolessiAdams_1994_Al__MO_324507536345_003" "EAM_IMD_BrommerGaehler_2006A_AlNiCo__MO_122703700223_003" "EAM_IMD_BrommerGaehler_2006B_AlNiCo__MO_128037485276_003" "EAM_IMD_SchopfBrommerFrigan_2012_AlMnPd__MO_878712978062_003" "EAM_QuinticClampedSpline_ErcolessiAdams_1994_Al__MO_450093727396_002" "EAM_QuinticHermiteSpline_ErcolessiAdams_1994_Al__MO_781138671863_002" "EMT_Asap_Standard_JacobsenStoltzeNorskov_1996_AlAgAuCuNiPdPt__MO_115316750986_001" "EMT_Asap_Standard_JacobsenStoltzeNorskov_1996_Al__MO_623376124862_001"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
label model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_CubicNaturalSpline_ErcolessiAdams_1994_Al__MO_800509458712_002]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.032082748413087"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_CubicNaturalSpline_ErcolessiAdams_1994_Al__MO_800509458712_002) = 4.032082748413087
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_AngeloMoodyBaskes_1995_NiAlH__MO_418978237058_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.050000071525574"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_AngeloMoodyBaskes_1995_NiAlH__MO_418978237058_005) = 4.050000071525574
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_CaiYe_1996_AlCu__MO_942551040047_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.049763545393944"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_CaiYe_1996_AlCu__MO_942551040047_005) = 4.049763545393944
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.032082033157349"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005) = 4.032082033157349
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_FarkasJones_1996_NbTiAl__MO_042691367780_000]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "3.869337007403374"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_FarkasJones_1996_NbTiAl__MO_042691367780_000) = 3.869337007403374
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_JacobsenNorskovPuska_1987_Al__MO_411692133366_000]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "3.987558534741402"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_JacobsenNorskovPuska_1987_Al__MO_411692133366_000) = 3.987558534741402
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_LandaWynblattSiegel_2000_AlPb__MO_699137396381_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.031036108732224"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_LandaWynblattSiegel_2000_AlPb__MO_699137396381_005) = 4.031036108732224
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_LiuAdams_1998_AlMg__MO_019873715786_000]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.03203821182251"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_LiuAdams_1998_AlMg__MO_019873715786_000) = 4.03203821182251
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_LiuErcolessiAdams_2004_Al__MO_051157671505_000]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "9.5"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_LiuErcolessiAdams_2004_Al__MO_051157671505_000) = 9.5
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_LiuLiuBorucki_1999_AlCu__MO_020851069572_000]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.032073378562927"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_LiuLiuBorucki_1999_AlCu__MO_020851069572_000) = 4.032073378562927
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_LiuOhotnickyAdams_1997_AlMg__MO_559870613549_000]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "8.5"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_LiuOhotnickyAdams_1997_AlMg__MO_559870613549_000) = 8.5
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_MendelevAstaRahman_2009_AlMg__MO_658278549784_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.045270472764969"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_MendelevAstaRahman_2009_AlMg__MO_658278549784_005) = 4.045270472764969
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_MendelevFangYe_2015_AlSm__MO_338600200739_000]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.040926471352577"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_MendelevFangYe_2015_AlSm__MO_338600200739_000) = 4.040926471352577
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_MendelevKramerBecker_2008_Al__MO_106969701023_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.045259781181811"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_MendelevKramerBecker_2008_Al__MO_106969701023_005) = 4.045259781181811
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_MendelevSrolovitzAckland_2005_AlFe__MO_577453891941_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.03330184519291"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_MendelevSrolovitzAckland_2005_AlFe__MO_577453891941_005) = 4.03330184519291
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_MishinFarkasMehl_1999_Al__MO_651801486679_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.050004702806472"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_MishinFarkasMehl_1999_Al__MO_651801486679_005) = 4.050004702806472
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_MishinMehlPapaconstantopoulos_2002_NiAl__MO_109933561507_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.051526293158533"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_MishinMehlPapaconstantopoulos_2002_NiAl__MO_109933561507_005) = 4.051526293158533
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_Mishin_2004_NiAl__MO_101214310689_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.049999862909317"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_Mishin_2004_NiAl__MO_101214310689_005) = 4.049999862909317
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_PunMishin_2009_NiAl__MO_751354403791_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.050000071525574"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_PunMishin_2009_NiAl__MO_751354403791_005) = 4.050000071525574
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_PunYamakovMishin_2013_AlCo__MO_678952612413_000]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.05000014603138"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_PunYamakovMishin_2013_AlCo__MO_678952612413_000) = 4.05000014603138
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_PunYamakovMishin_2013_NiAlCo__MO_826591359508_000]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.05000014603138"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_PunYamakovMishin_2013_NiAlCo__MO_826591359508_000) = 4.05000014603138
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_SchopfBrommerFrigan_2012_AlMnPd__MO_137572817842_000]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.210718545317654"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_SchopfBrommerFrigan_2012_AlMnPd__MO_137572817842_000) = 4.210718545317654
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_SturgeonLaird_2000_Al__MO_120808805541_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.050010219216347"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_SturgeonLaird_2000_Al__MO_120808805541_005) = 4.050010219216347
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_VailheFarkas_1997_CoAl__MO_284963179498_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.049696564674378"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_VailheFarkas_1997_CoAl__MO_284963179498_005) = 4.049696564674378
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_WineyKubotaGupta_2010_Al__MO_149316865608_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.024845376610756"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_WineyKubotaGupta_2010_Al__MO_149316865608_005) = 4.024845376610756
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_Zhakhovsky_2009_Al__MO_519613893196_000]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.031999975442885"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_Zhakhovsky_2009_Al__MO_519613893196_000) = 4.031999975442885
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_ZhouJohnsonWadley_2004NISTretabulation_Al__MO_060567868558_000]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.050199627876282"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_ZhouJohnsonWadley_2004NISTretabulation_Al__MO_060567868558_000) = 4.050199627876282
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_ZhouJohnsonWadley_2004_Al__MO_131650261510_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.050180745124819"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_ZhouJohnsonWadley_2004_Al__MO_131650261510_005) = 4.050180745124819
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_ZhouWadleyJohnson_2001_Al__MO_049243498555_000]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.081654928624631"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_ZhouWadleyJohnson_2001_Al__MO_049243498555_000) = 4.081654928624631
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_ZopeMishin_2003_Al__MO_664470114311_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.050000011920929"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_ZopeMishin_2003_Al__MO_664470114311_005) = 4.050000011920929
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_Dynamo_ZopeMishin_2003_TiAl__MO_117656786760_005]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.049999445676804"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_Dynamo_ZopeMishin_2003_TiAl__MO_117656786760_005) = 4.049999445676804
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_ErcolessiAdams_1994_Al__MO_324507536345_003]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.032082714140415"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_ErcolessiAdams_1994_Al__MO_324507536345_003) = 4.032082714140415
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_IMD_BrommerGaehler_2006A_AlNiCo__MO_122703700223_003]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.128871455788613"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_IMD_BrommerGaehler_2006A_AlNiCo__MO_122703700223_003) = 4.128871455788613
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_IMD_BrommerGaehler_2006B_AlNiCo__MO_128037485276_003]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.073718130588532"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_IMD_BrommerGaehler_2006B_AlNiCo__MO_128037485276_003) = 4.073718130588532
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_IMD_SchopfBrommerFrigan_2012_AlMnPd__MO_878712978062_003]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.210700303316115"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_IMD_SchopfBrommerFrigan_2012_AlMnPd__MO_878712978062_003) = 4.210700303316115
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_QuinticClampedSpline_ErcolessiAdams_1994_Al__MO_450093727396_002]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.032082897424699"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_QuinticClampedSpline_ErcolessiAdams_1994_Al__MO_450093727396_002) = 4.032082897424699
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EAM_QuinticHermiteSpline_ErcolessiAdams_1994_Al__MO_781138671863_002]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "4.03208246231079"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EAM_QuinticHermiteSpline_ErcolessiAdams_1994_Al__MO_781138671863_002) = 4.03208246231079
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EMT_Asap_Standard_JacobsenStoltzeNorskov_1996_AlAgAuCuNiPdPt__MO_115316750986_001]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "3.994616635143757"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EMT_Asap_Standard_JacobsenStoltzeNorskov_1996_AlAgAuCuNiPdPt__MO_115316750986_001) = 3.994616635143757
|
||||
next model
|
||||
jump SELF model_loop
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[${model}]
|
||||
kim query latconst get_lattice_constant_cubic crystal=[fcc] species=[Al] units=[angstrom] model=[EMT_Asap_Standard_JacobsenStoltzeNorskov_1996_Al__MO_623376124862_001]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable latconst string "3.994608342647553"
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
print "FCC lattice constant (${model}) = ${latconst}"
|
||||
FCC lattice constant (EMT_Asap_Standard_JacobsenStoltzeNorskov_1996_Al__MO_623376124862_001) = 3.994608342647553
|
||||
next model
|
||||
jump SELF model_loop
|
||||
clear
|
||||
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Your simulation uses code contributions which should be cited:
|
||||
|
||||
- @Comment
|
||||
{
|
||||
\documentclass{article}
|
||||
\usepackage{url}
|
||||
\begin{document}
|
||||
This Model originally published in \cite{MO_123629422045_005a} is archived in OpenKIM~\cite{MO_123629422045_005, MD_120291908751_005, tadmor:elliott:2011, elliott:tadmor:2011}.
|
||||
\bibliographystyle{vancouver}
|
||||
\bibliography{kimcite-MO_123629422045_005.bib}
|
||||
\end{document}
|
||||
}
|
||||
|
||||
@Misc{MO_123629422045_005,
|
||||
author = {Ryan S. Elliott},
|
||||
title = {{EAM} potential ({LAMMPS} cubic hermite tabulation) for {A}l developed by {E}rcolessi and {A}dams (1994) v005},
|
||||
doi = {10.25950/7cd2a6ab},
|
||||
howpublished = {OpenKIM, \url{https://doi.org/10.25950/7cd2a6ab}},
|
||||
keywords = {OpenKIM, Model, MO_123629422045_005},
|
||||
publisher = {OpenKIM},
|
||||
year = 2018,
|
||||
}
|
||||
|
||||
@Misc{MD_120291908751_005,
|
||||
author = {Ryan S. Elliott},
|
||||
title = {{EAM} {M}odel {D}river for tabulated potentials with cubic {H}ermite spline interpolation as used in {LAMMPS} v005},
|
||||
doi = {10.25950/68defa36},
|
||||
howpublished = {OpenKIM, \url{https://doi.org/10.25950/7cd2a6ab}},
|
||||
keywords = {OpenKIM, Model Driver, MD_120291908751_005},
|
||||
publisher = {OpenKIM},
|
||||
year = 2018,
|
||||
}
|
||||
|
||||
@Article{tadmor:elliott:2011,
|
||||
author = {E. B. Tadmor and R. S. Elliott and J. P. Sethna and R. E. Miller and C. A. Becker},
|
||||
title = {The potential of atomistic simulations and the {K}nowledgebase of {I}nteratomic {M}odels},
|
||||
journal = {{JOM}},
|
||||
year = {2011},
|
||||
volume = {63},
|
||||
number = {7},
|
||||
pages = {17},
|
||||
doi = {10.1007/s11837-011-0102-6},
|
||||
}
|
||||
|
||||
@Misc{elliott:tadmor:2011,
|
||||
author = {Ryan S. Elliott and Ellad B. Tadmor},
|
||||
title = {{K}nowledgebase of {I}nteratomic {M}odels ({KIM}) Application Programming Interface ({API})},
|
||||
howpublished = {\url{https://openkim.org/kim-api}},
|
||||
publisher = {OpenKIM},
|
||||
year = 2011,
|
||||
doi = {10.25950/ff8f563a},
|
||||
}
|
||||
|
||||
@Article{MO_123629422045_005a,
|
||||
author = {F. Ercolessi and J. B. Adams},
|
||||
doi = {10.1209/0295-5075/26/8/005},
|
||||
journal = {Europhysics Letters},
|
||||
number = {8},
|
||||
pages = {583},
|
||||
title = {Interatomic Potentials from First-Principles Calculations: {T}he Force-Matching Method},
|
||||
volume = {26},
|
||||
year = {1994},
|
||||
}
|
||||
- @Comment
|
||||
{
|
||||
\documentclass{article}
|
||||
\usepackage{url}
|
||||
\begin{document}
|
||||
This Model originally published in \cite{MO_004835508849_000a} is archived in OpenKIM~\cite{MO_004835508849_000, MD_120291908751_005, tadmor:elliott:2011, elliott:tadmor:2011}.
|
||||
\bibliographystyle{vancouver}
|
||||
\bibliography{kimcite-MO_004835508849_000.bib}
|
||||
\end{document}
|
||||
}
|
||||
|
||||
@Misc{MO_004835508849_000,
|
||||
author = {Ellad Tadmor},
|
||||
title = {{F}innis-{S}inclair potential ({LAMMPS} cubic hermite tabulation) for {Z}r developed by {M}endelev and {A}ckland (2007); version 3 refitted for radiation studies v000},
|
||||
doi = {10.25950/7b7b5ab5},
|
||||
howpublished = {OpenKIM, \url{https://doi.org/10.25950/7b7b5ab5}},
|
||||
keywords = {OpenKIM, Model, MO_004835508849_000},
|
||||
publisher = {OpenKIM},
|
||||
year = 2018,
|
||||
}
|
||||
|
||||
@Misc{MD_120291908751_005,
|
||||
author = {Ryan S. Elliott},
|
||||
title = {{EAM} {M}odel {D}river for tabulated potentials with cubic {H}ermite spline interpolation as used in {LAMMPS} v005},
|
||||
doi = {10.25950/68defa36},
|
||||
howpublished = {OpenKIM, \url{https://doi.org/10.25950/7b7b5ab5}},
|
||||
keywords = {OpenKIM, Model Driver, MD_120291908751_005},
|
||||
publisher = {OpenKIM},
|
||||
year = 2018,
|
||||
}
|
||||
|
||||
@Article{tadmor:elliott:2011,
|
||||
author = {E. B. Tadmor and R. S. Elliott and J. P. Sethna and R. E. Miller and C. A. Becker},
|
||||
title = {The potential of atomistic simulations and the {K}nowledgebase of {I}nteratomic {M}odels},
|
||||
journal = {{JOM}},
|
||||
year = {2011},
|
||||
volume = {63},
|
||||
number = {7},
|
||||
pages = {17},
|
||||
doi = {10.1007/s11837-011-0102-6},
|
||||
}
|
||||
|
||||
@Misc{elliott:tadmor:2011,
|
||||
author = {Ryan S. Elliott and Ellad B. Tadmor},
|
||||
title = {{K}nowledgebase of {I}nteratomic {M}odels ({KIM}) Application Programming Interface ({API})},
|
||||
howpublished = {\url{https://openkim.org/kim-api}},
|
||||
publisher = {OpenKIM},
|
||||
year = 2011,
|
||||
doi = {10.25950/ff8f563a},
|
||||
}
|
||||
|
||||
@Article{MO_004835508849_000a,
|
||||
author = {Mendelev, M. I. and Ackland, G. J.},
|
||||
doi = {10.1080/09500830701191393},
|
||||
journal = {Philosophical Magazine Letters},
|
||||
number = {5},
|
||||
pages = {349-359},
|
||||
title = {Development of an interatomic potential for the simulation of phase transformations in zirconium},
|
||||
volume = {87},
|
||||
year = {2007},
|
||||
}
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Total wall time: 0:01:58
|
||||
208
examples/kim/log.10Feb21.in.kim-sm.melt.clang.1
Normal file
208
examples/kim/log.10Feb21.in.kim-sm.melt.clang.1
Normal file
@ -0,0 +1,208 @@
|
||||
LAMMPS (10 Feb 2021)
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the KIM Simulator Model (PM)
|
||||
# `Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000`
|
||||
# is installed. This can be done with the command
|
||||
# kim-api-collections-management install user Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000
|
||||
# If this command does not work, you may need to setup your PATH to find the utility.
|
||||
# If you installed the kim-api using the LAMMPS CMake build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS build directory)
|
||||
# source ./kim_build-prefix/bin/kim-api-activate
|
||||
# If you installed the kim-api using the LAMMPS Make build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS src directory)
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# See `https://openkim.org/doc/obtaining-models` for alternative options.
|
||||
#
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
kim init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real
|
||||
#=== BEGIN kim init ==========================================
|
||||
# Using KIM Simulator Model : Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000
|
||||
# For Simulator : LAMMPS 28 Feb 2019
|
||||
# Running on : LAMMPS 10 Feb 2021
|
||||
#
|
||||
units real
|
||||
neighbor 2.0 bin # Angstroms
|
||||
timestep 1.0 # femtoseconds
|
||||
atom_style charge
|
||||
neigh_modify one 4000
|
||||
#=== END kim init ============================================
|
||||
|
||||
|
||||
lattice fcc 4.4300
|
||||
Lattice spacing in x,y,z = 4.4300000 4.4300000 4.4300000
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (88.600000 88.600000 88.600000)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.003 seconds
|
||||
|
||||
kim interactions O
|
||||
#=== BEGIN kim interactions ==================================
|
||||
variable kim_periodic equal 1
|
||||
pair_style reax/c /var/tmp/kim-shared-library-parameter-file-directory-pgBW45WFK0TI/lmp_control safezone 2.0 mincap 100
|
||||
pair_coeff * * /var/tmp/kim-shared-library-parameter-file-directory-pgBW45WFK0TI/ffield.reax.rdx O
|
||||
Reading potential file /var/tmp/kim-shared-library-parameter-file-directory-pgBW45WFK0TI/ffield.reax.rdx with DATE: 2010-02-19
|
||||
fix reaxqeq all qeq/reax 1 0.0 10.0 1.0e-6 /var/tmp/kim-shared-library-parameter-file-directory-pgBW45WFK0TI/param.qeq
|
||||
#=== END kim interactions ====================================
|
||||
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
|
||||
|
||||
run 100
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Your simulation uses code contributions which should be cited:
|
||||
|
||||
- @Comment
|
||||
{
|
||||
\documentclass{article}
|
||||
\usepackage{url}
|
||||
\begin{document}
|
||||
This Simulator Model originally published in \cite{SM_107643900657_000a} is archived in OpenKIM~\cite{SM_107643900657_000, tadmor:elliott:2011, elliott:tadmor:2011}.
|
||||
\bibliographystyle{vancouver}
|
||||
\bibliography{kimcite-SM_107643900657_000.bib}
|
||||
\end{document}
|
||||
}
|
||||
|
||||
@Misc{SM_107643900657_000,
|
||||
author = {Ellad Tadmor},
|
||||
title = {{LAMMPS} {R}eax{FF} potential for {RDX} ({C}-{H}-{N}-{O}) systems developed by {S}trachan et al. (2003) v000},
|
||||
doi = {10.25950/acd3fc89},
|
||||
howpublished = {OpenKIM, \url{https://doi.org/10.25950/acd3fc89}},
|
||||
keywords = {OpenKIM, Simulator Model, SM_107643900657_000},
|
||||
publisher = {OpenKIM},
|
||||
year = 2019,
|
||||
}
|
||||
|
||||
@Article{tadmor:elliott:2011,
|
||||
author = {E. B. Tadmor and R. S. Elliott and J. P. Sethna and R. E. Miller and C. A. Becker},
|
||||
title = {The potential of atomistic simulations and the {K}nowledgebase of {I}nteratomic {M}odels},
|
||||
journal = {{JOM}},
|
||||
year = {2011},
|
||||
volume = {63},
|
||||
number = {7},
|
||||
pages = {17},
|
||||
doi = {10.1007/s11837-011-0102-6},
|
||||
}
|
||||
|
||||
@Misc{elliott:tadmor:2011,
|
||||
author = {Ryan S. Elliott and Ellad B. Tadmor},
|
||||
title = {{K}nowledgebase of {I}nteratomic {M}odels ({KIM}) Application Programming Interface ({API})},
|
||||
howpublished = {\url{https://openkim.org/kim-api}},
|
||||
publisher = {OpenKIM},
|
||||
year = 2011,
|
||||
doi = {10.25950/ff8f563a},
|
||||
}
|
||||
|
||||
@Article{SM_107643900657_000a,
|
||||
author = {Strachan, Alejandro and van Duin, Adri C. T. and Chakraborty, Debashis and Dasgupta, Siddharth and Goddard, William A.},
|
||||
doi = {10.1103/PhysRevLett.91.098301},
|
||||
issue = {9},
|
||||
journal = {Physical Review Letters},
|
||||
month = {Aug},
|
||||
numpages = {4},
|
||||
pages = {098301},
|
||||
publisher = {American Physical Society},
|
||||
title = {Shock Waves in High-Energy Materials: {T}he Initial Chemical Events in Nitramine {RDX}},
|
||||
volume = {91},
|
||||
year = {2003},
|
||||
}
|
||||
- pair reax/c command:
|
||||
|
||||
@Article{Aktulga12,
|
||||
author = {H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama},
|
||||
title = {Parallel reactive molecular dynamics: Numerical methods and algorithmic techniques},
|
||||
journal = {Parallel Computing},
|
||||
year = 2012,
|
||||
volume = 38,
|
||||
pages = {245--259}
|
||||
}
|
||||
|
||||
- fix qeq/reax command:
|
||||
|
||||
@Article{Aktulga12,
|
||||
author = {H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama},
|
||||
title = {Parallel reactive molecular dynamics: Numerical methods and algorithmic techniques},
|
||||
journal = {Parallel Computing},
|
||||
year = 2012,
|
||||
volume = 38,
|
||||
pages = {245--259}
|
||||
}
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 4000, page size: 100000
|
||||
master list distance cutoff = 10.3
|
||||
ghost atom cutoff = 10.3
|
||||
binsize = 5.15, bins = 18 18 18
|
||||
2 neighbor lists, perpetual/occasional/extra = 2 0 0
|
||||
(1) pair reax/c, perpetual
|
||||
attributes: half, newton off, ghost
|
||||
pair build: half/bin/newtoff/ghost
|
||||
stencil: half/ghost/bin/3d/newtoff
|
||||
bin: standard
|
||||
(2) fix qeq/reax, perpetual, copy from (1)
|
||||
attributes: half, newton off, ghost
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
Per MPI rank memory allocation (min/avg/max) = 1803.0 | 1803.0 | 1803.0 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 200 -39091.147 0 -20014.559 19501.107
|
||||
100 63.198252 -26042.062 0 -20014.027 21497.661
|
||||
Loop time of 40.2545 on 1 procs for 100 steps with 32000 atoms
|
||||
|
||||
Performance: 0.215 ns/day, 111.818 hours/ns, 2.484 timesteps/s
|
||||
99.1% CPU use with 1 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 24.364 | 24.364 | 24.364 | 0.0 | 60.52
|
||||
Neigh | 0.4185 | 0.4185 | 0.4185 | 0.0 | 1.04
|
||||
Comm | 0.022045 | 0.022045 | 0.022045 | 0.0 | 0.05
|
||||
Output | 6.6e-05 | 6.6e-05 | 6.6e-05 | 0.0 | 0.00
|
||||
Modify | 15.438 | 15.438 | 15.438 | 0.0 | 38.35
|
||||
Other | | 0.01285 | | | 0.03
|
||||
|
||||
Nlocal: 32000.0 ave 32000 max 32000 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 26825.0 ave 26825 max 26825 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 3.73924e+06 ave 3.73924e+06 max 3.73924e+06 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 3739236
|
||||
Ave neighs/atom = 116.85112
|
||||
Neighbor list builds = 3
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:41
|
||||
208
examples/kim/log.10Feb21.in.kim-sm.melt.clang.4
Normal file
208
examples/kim/log.10Feb21.in.kim-sm.melt.clang.4
Normal file
@ -0,0 +1,208 @@
|
||||
LAMMPS (10 Feb 2021)
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the KIM Simulator Model (PM)
|
||||
# `Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000`
|
||||
# is installed. This can be done with the command
|
||||
# kim-api-collections-management install user Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000
|
||||
# If this command does not work, you may need to setup your PATH to find the utility.
|
||||
# If you installed the kim-api using the LAMMPS CMake build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS build directory)
|
||||
# source ./kim_build-prefix/bin/kim-api-activate
|
||||
# If you installed the kim-api using the LAMMPS Make build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS src directory)
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# See `https://openkim.org/doc/obtaining-models` for alternative options.
|
||||
#
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
kim init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real
|
||||
#=== BEGIN kim init ==========================================
|
||||
# Using KIM Simulator Model : Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000
|
||||
# For Simulator : LAMMPS 28 Feb 2019
|
||||
# Running on : LAMMPS 10 Feb 2021
|
||||
#
|
||||
units real
|
||||
neighbor 2.0 bin # Angstroms
|
||||
timestep 1.0 # femtoseconds
|
||||
atom_style charge
|
||||
neigh_modify one 4000
|
||||
#=== END kim init ============================================
|
||||
|
||||
|
||||
lattice fcc 4.4300
|
||||
Lattice spacing in x,y,z = 4.4300000 4.4300000 4.4300000
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (88.600000 88.600000 88.600000)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.001 seconds
|
||||
|
||||
kim interactions O
|
||||
#=== BEGIN kim interactions ==================================
|
||||
variable kim_periodic equal 1
|
||||
pair_style reax/c /var/tmp/kim-shared-library-parameter-file-directory-zYQfH0ms5WSw/lmp_control safezone 2.0 mincap 100
|
||||
pair_coeff * * /var/tmp/kim-shared-library-parameter-file-directory-zYQfH0ms5WSw/ffield.reax.rdx O
|
||||
Reading potential file /var/tmp/kim-shared-library-parameter-file-directory-zYQfH0ms5WSw/ffield.reax.rdx with DATE: 2010-02-19
|
||||
fix reaxqeq all qeq/reax 1 0.0 10.0 1.0e-6 /var/tmp/kim-shared-library-parameter-file-directory-zYQfH0ms5WSw/param.qeq
|
||||
#=== END kim interactions ====================================
|
||||
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
|
||||
|
||||
run 100
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Your simulation uses code contributions which should be cited:
|
||||
|
||||
- @Comment
|
||||
{
|
||||
\documentclass{article}
|
||||
\usepackage{url}
|
||||
\begin{document}
|
||||
This Simulator Model originally published in \cite{SM_107643900657_000a} is archived in OpenKIM~\cite{SM_107643900657_000, tadmor:elliott:2011, elliott:tadmor:2011}.
|
||||
\bibliographystyle{vancouver}
|
||||
\bibliography{kimcite-SM_107643900657_000.bib}
|
||||
\end{document}
|
||||
}
|
||||
|
||||
@Misc{SM_107643900657_000,
|
||||
author = {Ellad Tadmor},
|
||||
title = {{LAMMPS} {R}eax{FF} potential for {RDX} ({C}-{H}-{N}-{O}) systems developed by {S}trachan et al. (2003) v000},
|
||||
doi = {10.25950/acd3fc89},
|
||||
howpublished = {OpenKIM, \url{https://doi.org/10.25950/acd3fc89}},
|
||||
keywords = {OpenKIM, Simulator Model, SM_107643900657_000},
|
||||
publisher = {OpenKIM},
|
||||
year = 2019,
|
||||
}
|
||||
|
||||
@Article{tadmor:elliott:2011,
|
||||
author = {E. B. Tadmor and R. S. Elliott and J. P. Sethna and R. E. Miller and C. A. Becker},
|
||||
title = {The potential of atomistic simulations and the {K}nowledgebase of {I}nteratomic {M}odels},
|
||||
journal = {{JOM}},
|
||||
year = {2011},
|
||||
volume = {63},
|
||||
number = {7},
|
||||
pages = {17},
|
||||
doi = {10.1007/s11837-011-0102-6},
|
||||
}
|
||||
|
||||
@Misc{elliott:tadmor:2011,
|
||||
author = {Ryan S. Elliott and Ellad B. Tadmor},
|
||||
title = {{K}nowledgebase of {I}nteratomic {M}odels ({KIM}) Application Programming Interface ({API})},
|
||||
howpublished = {\url{https://openkim.org/kim-api}},
|
||||
publisher = {OpenKIM},
|
||||
year = 2011,
|
||||
doi = {10.25950/ff8f563a},
|
||||
}
|
||||
|
||||
@Article{SM_107643900657_000a,
|
||||
author = {Strachan, Alejandro and van Duin, Adri C. T. and Chakraborty, Debashis and Dasgupta, Siddharth and Goddard, William A.},
|
||||
doi = {10.1103/PhysRevLett.91.098301},
|
||||
issue = {9},
|
||||
journal = {Physical Review Letters},
|
||||
month = {Aug},
|
||||
numpages = {4},
|
||||
pages = {098301},
|
||||
publisher = {American Physical Society},
|
||||
title = {Shock Waves in High-Energy Materials: {T}he Initial Chemical Events in Nitramine {RDX}},
|
||||
volume = {91},
|
||||
year = {2003},
|
||||
}
|
||||
- pair reax/c command:
|
||||
|
||||
@Article{Aktulga12,
|
||||
author = {H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama},
|
||||
title = {Parallel reactive molecular dynamics: Numerical methods and algorithmic techniques},
|
||||
journal = {Parallel Computing},
|
||||
year = 2012,
|
||||
volume = 38,
|
||||
pages = {245--259}
|
||||
}
|
||||
|
||||
- fix qeq/reax command:
|
||||
|
||||
@Article{Aktulga12,
|
||||
author = {H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama},
|
||||
title = {Parallel reactive molecular dynamics: Numerical methods and algorithmic techniques},
|
||||
journal = {Parallel Computing},
|
||||
year = 2012,
|
||||
volume = 38,
|
||||
pages = {245--259}
|
||||
}
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 4000, page size: 100000
|
||||
master list distance cutoff = 10.3
|
||||
ghost atom cutoff = 10.3
|
||||
binsize = 5.15, bins = 18 18 18
|
||||
2 neighbor lists, perpetual/occasional/extra = 2 0 0
|
||||
(1) pair reax/c, perpetual
|
||||
attributes: half, newton off, ghost
|
||||
pair build: half/bin/newtoff/ghost
|
||||
stencil: half/ghost/bin/3d/newtoff
|
||||
bin: standard
|
||||
(2) fix qeq/reax, perpetual, copy from (1)
|
||||
attributes: half, newton off, ghost
|
||||
pair build: copy
|
||||
stencil: none
|
||||
bin: none
|
||||
Per MPI rank memory allocation (min/avg/max) = 630.2 | 630.2 | 630.2 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 200 -39091.147 0 -20014.559 19501.107
|
||||
100 63.198252 -26042.062 0 -20014.027 21497.661
|
||||
Loop time of 15.049 on 4 procs for 100 steps with 32000 atoms
|
||||
|
||||
Performance: 0.574 ns/day, 41.803 hours/ns, 6.645 timesteps/s
|
||||
99.0% CPU use with 4 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 9.8158 | 9.8159 | 9.8161 | 0.0 | 65.23
|
||||
Neigh | 0.17685 | 0.17759 | 0.17832 | 0.1 | 1.18
|
||||
Comm | 0.028692 | 0.028847 | 0.028942 | 0.1 | 0.19
|
||||
Output | 2.5e-05 | 3.575e-05 | 4.6e-05 | 0.0 | 0.00
|
||||
Modify | 5.0171 | 5.0179 | 5.0186 | 0.0 | 33.34
|
||||
Other | | 0.008715 | | | 0.06
|
||||
|
||||
Nlocal: 8000.00 ave 8010 max 7993 min
|
||||
Histogram: 2 0 0 0 0 1 0 0 0 1
|
||||
Nghost: 12605.0 ave 12612 max 12595 min
|
||||
Histogram: 1 0 0 0 1 0 0 0 0 2
|
||||
Neighs: 1.00097e+06 ave 1.00187e+06 max 1.0006e+06 min
|
||||
Histogram: 2 1 0 0 0 0 0 0 0 1
|
||||
|
||||
Total # of neighbors = 4003876
|
||||
Ave neighs/atom = 125.12113
|
||||
Neighbor list builds = 3
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:15
|
||||
88
examples/kim/log.10Feb21.in.lammps.melt.clang.1
Normal file
88
examples/kim/log.10Feb21.in.lammps.melt.clang.1
Normal file
@ -0,0 +1,88 @@
|
||||
LAMMPS (10 Feb 2021)
|
||||
# 3d Lennard-Jones melt
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
units real
|
||||
|
||||
lattice fcc 4.4300
|
||||
Lattice spacing in x,y,z = 4.4300000 4.4300000 4.4300000
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (88.600000 88.600000 88.600000)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.002 seconds
|
||||
|
||||
pair_style lj/cut 8.1500
|
||||
pair_coeff 1 1 0.0104 3.4000
|
||||
|
||||
#pair_style kim LennardJones_Ar
|
||||
#pair_coeff * * Ar
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
|
||||
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 8.45
|
||||
ghost atom cutoff = 8.45
|
||||
binsize = 4.225, bins = 21 21 21
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair lj/cut, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d/newton
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 19.23 | 19.23 | 19.23 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 200 6290.8194 0 25367.408 6750.7421
|
||||
100 98.747096 15900.676 0 25319.465 10184.453
|
||||
Loop time of 1.92822 on 1 procs for 100 steps with 32000 atoms
|
||||
|
||||
Performance: 4.481 ns/day, 5.356 hours/ns, 51.861 timesteps/s
|
||||
99.8% CPU use with 1 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 1.7377 | 1.7377 | 1.7377 | 0.0 | 90.12
|
||||
Neigh | 0.14234 | 0.14234 | 0.14234 | 0.0 | 7.38
|
||||
Comm | 0.011694 | 0.011694 | 0.011694 | 0.0 | 0.61
|
||||
Output | 6.7e-05 | 6.7e-05 | 6.7e-05 | 0.0 | 0.00
|
||||
Modify | 0.02476 | 0.02476 | 0.02476 | 0.0 | 1.28
|
||||
Other | | 0.01163 | | | 0.60
|
||||
|
||||
Nlocal: 32000.0 ave 32000 max 32000 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 19911.0 ave 19911 max 19911 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 1.96027e+06 ave 1.96027e+06 max 1.96027e+06 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 1960266
|
||||
Ave neighs/atom = 61.258313
|
||||
Neighbor list builds = 3
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:01
|
||||
88
examples/kim/log.10Feb21.in.lammps.melt.clang.4
Normal file
88
examples/kim/log.10Feb21.in.lammps.melt.clang.4
Normal file
@ -0,0 +1,88 @@
|
||||
LAMMPS (10 Feb 2021)
|
||||
# 3d Lennard-Jones melt
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
units real
|
||||
|
||||
lattice fcc 4.4300
|
||||
Lattice spacing in x,y,z = 4.4300000 4.4300000 4.4300000
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (88.600000 88.600000 88.600000)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.001 seconds
|
||||
|
||||
pair_style lj/cut 8.1500
|
||||
pair_coeff 1 1 0.0104 3.4000
|
||||
|
||||
#pair_style kim LennardJones_Ar
|
||||
#pair_coeff * * Ar
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
|
||||
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 8.45
|
||||
ghost atom cutoff = 8.45
|
||||
binsize = 4.225, bins = 21 21 21
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair lj/cut, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d/newton
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 7.633 | 7.633 | 7.633 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 200 6290.8194 0 25367.408 6750.7421
|
||||
100 98.747096 15900.676 0 25319.465 10184.453
|
||||
Loop time of 0.561006 on 4 procs for 100 steps with 32000 atoms
|
||||
|
||||
Performance: 15.401 ns/day, 1.558 hours/ns, 178.251 timesteps/s
|
||||
99.6% CPU use with 4 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0.48486 | 0.48676 | 0.48817 | 0.2 | 86.77
|
||||
Neigh | 0.040698 | 0.04091 | 0.041066 | 0.1 | 7.29
|
||||
Comm | 0.016616 | 0.01811 | 0.0202 | 1.1 | 3.23
|
||||
Output | 3e-05 | 3.575e-05 | 4.7e-05 | 0.0 | 0.01
|
||||
Modify | 0.008934 | 0.009025 | 0.009142 | 0.1 | 1.61
|
||||
Other | | 0.006161 | | | 1.10
|
||||
|
||||
Nlocal: 8000.00 ave 8012 max 7989 min
|
||||
Histogram: 1 0 0 0 2 0 0 0 0 1
|
||||
Nghost: 9131.00 ave 9142 max 9119 min
|
||||
Histogram: 1 0 0 0 0 2 0 0 0 1
|
||||
Neighs: 490066.0 ave 491443 max 489273 min
|
||||
Histogram: 2 0 0 0 1 0 0 0 0 1
|
||||
|
||||
Total # of neighbors = 1960266
|
||||
Ave neighs/atom = 61.258313
|
||||
Neighbor list builds = 3
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:00
|
||||
@ -1,107 +0,0 @@
|
||||
LAMMPS (7 Aug 2019)
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the example models provided with
|
||||
# the kim-api package are installed. see the ./lib/kim/README or
|
||||
# ./lib/kim/Install.py files for details on how to install these
|
||||
# example models.
|
||||
#
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
kim_init LennardJones_Ar real
|
||||
#=== BEGIN kim-init ==========================================
|
||||
units real
|
||||
#=== END kim-init ============================================
|
||||
|
||||
|
||||
lattice fcc 4.4300
|
||||
Lattice spacing in x,y,z = 4.43 4.43 4.43
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (88.6 88.6 88.6)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.004321 secs
|
||||
|
||||
kim_interactions Ar
|
||||
#=== BEGIN kim_interactions ==================================
|
||||
pair_style kim LennardJones_Ar
|
||||
WARNING: KIM Model does not provide `partialParticleEnergy'; energy per atom will be zero (../pair_kim.cpp:974)
|
||||
WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (../pair_kim.cpp:979)
|
||||
pair_coeff * * Ar
|
||||
#=== END kim_interactions ====================================
|
||||
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
|
||||
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 8.45
|
||||
ghost atom cutoff = 8.45
|
||||
binsize = 4.225, bins = 21 21 21
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair kim, perpetual
|
||||
attributes: full, newton off, cut 8.45
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Setting up Verlet run ...
|
||||
Unit style : real
|
||||
Current step : 0
|
||||
Time step : 1
|
||||
Per MPI rank memory allocation (min/avg/max) = 28.12 | 28.12 | 28.12 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 200 145069.63 0 164146.22 128015.94
|
||||
100 95.179703 154939.42 0 164017.94 131602.75
|
||||
Loop time of 3.48256 on 1 procs for 100 steps with 32000 atoms
|
||||
|
||||
Performance: 2.481 ns/day, 9.674 hours/ns, 28.715 timesteps/s
|
||||
98.3% CPU use with 1 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 3.0502 | 3.0502 | 3.0502 | 0.0 | 87.59
|
||||
Neigh | 0.3646 | 0.3646 | 0.3646 | 0.0 | 10.47
|
||||
Comm | 0.01783 | 0.01783 | 0.01783 | 0.0 | 0.51
|
||||
Output | 6.8e-05 | 6.8e-05 | 6.8e-05 | 0.0 | 0.00
|
||||
Modify | 0.034349 | 0.034349 | 0.034349 | 0.0 | 0.99
|
||||
Other | | 0.01547 | | | 0.44
|
||||
|
||||
Nlocal: 32000 ave 32000 max 32000 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 19911 ave 19911 max 19911 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 0 ave 0 max 0 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 4.25375e+06 ave 4.25375e+06 max 4.25375e+06 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 4253750
|
||||
Ave neighs/atom = 132.93
|
||||
Neighbor list builds = 3
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:03
|
||||
@ -1,113 +0,0 @@
|
||||
LAMMPS (7 Aug 2019)
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the example models provided with
|
||||
# the kim-api package are installed. see the ./lib/kim/README or
|
||||
# ./lib/kim/Install.py files for details on how to install these
|
||||
# example models.
|
||||
#
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
kim_init LennardJones_Ar real
|
||||
#=== BEGIN kim-init ==========================================
|
||||
units real
|
||||
#=== END kim-init ============================================
|
||||
|
||||
|
||||
lattice fcc 4.4300
|
||||
Lattice spacing in x,y,z = 4.43 4.43 4.43
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (88.6 88.6 88.6)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.000989 secs
|
||||
|
||||
kim_interactions Ar
|
||||
#=== BEGIN kim_interactions ==================================
|
||||
pair_style kim LennardJones_Ar
|
||||
WARNING: KIM Model does not provide `partialParticleEnergy'; energy per atom will be zero (../pair_kim.cpp:974)
|
||||
WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (../pair_kim.cpp:979)
|
||||
pair_coeff * * Ar
|
||||
WARNING: KIM Model does not provide `partialParticleEnergy'; energy per atom will be zero (../pair_kim.cpp:974)
|
||||
WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (../pair_kim.cpp:979)
|
||||
#=== END kim_interactions ====================================
|
||||
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
WARNING: KIM Model does not provide `partialParticleEnergy'; energy per atom will be zero (../pair_kim.cpp:974)
|
||||
WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (../pair_kim.cpp:979)
|
||||
WARNING: KIM Model does not provide `partialParticleEnergy'; energy per atom will be zero (../pair_kim.cpp:974)
|
||||
WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (../pair_kim.cpp:979)
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
|
||||
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 8.45
|
||||
ghost atom cutoff = 8.45
|
||||
binsize = 4.225, bins = 21 21 21
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair kim, perpetual
|
||||
attributes: full, newton off, cut 8.45
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Setting up Verlet run ...
|
||||
Unit style : real
|
||||
Current step : 0
|
||||
Time step : 1
|
||||
Per MPI rank memory allocation (min/avg/max) = 9.791 | 9.791 | 9.791 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 200 145069.63 0 164146.22 128015.94
|
||||
100 95.179703 154939.42 0 164017.94 131602.75
|
||||
Loop time of 0.924494 on 4 procs for 100 steps with 32000 atoms
|
||||
|
||||
Performance: 9.346 ns/day, 2.568 hours/ns, 108.167 timesteps/s
|
||||
99.6% CPU use with 4 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0.76434 | 0.76847 | 0.77207 | 0.3 | 83.12
|
||||
Neigh | 0.09089 | 0.094446 | 0.099911 | 1.1 | 10.22
|
||||
Comm | 0.038599 | 0.044759 | 0.051381 | 2.1 | 4.84
|
||||
Output | 3.5e-05 | 4e-05 | 4.9e-05 | 0.0 | 0.00
|
||||
Modify | 0.009396 | 0.009685 | 0.009941 | 0.2 | 1.05
|
||||
Other | | 0.00709 | | | 0.77
|
||||
|
||||
Nlocal: 8000 ave 8018 max 7967 min
|
||||
Histogram: 1 0 0 0 0 0 1 0 0 2
|
||||
Nghost: 9131 ave 9164 max 9113 min
|
||||
Histogram: 2 0 0 1 0 0 0 0 0 1
|
||||
Neighs: 0 ave 0 max 0 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 1.06344e+06 ave 1.06594e+06 max 1.05881e+06 min
|
||||
Histogram: 1 0 0 0 0 0 1 0 0 2
|
||||
|
||||
Total # of neighbors = 4253750
|
||||
Ave neighs/atom = 132.93
|
||||
Neighbor list builds = 3
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:00
|
||||
@ -1,124 +0,0 @@
|
||||
LAMMPS (7 Aug 2019)
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the KIM Portable Model (PM)
|
||||
# SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
# is installed. This can be done with the command
|
||||
# kim-api-collections-management install user SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
# If this command does not work, you may need to setup your PATH to find the utility.
|
||||
# If you installed the kim-api using the LAMMPS CMake build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS build directory)
|
||||
# source ./kim_build-prefix/bin/kim-api-activate
|
||||
# If you installed the kim-api using the LAMMPS Make build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS src directory)
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# Or, see https://openkim.org/doc/obtaining-models for alternative options.
|
||||
#
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
kim_init SW_StillingerWeber_1985_Si__MO_405512056662_005 real
|
||||
#=== BEGIN kim-init ==========================================
|
||||
units real
|
||||
#=== END kim-init ============================================
|
||||
|
||||
kim_query a0 get_lattice_constant_cubic crystal=["fcc"] species=["Si"] units=["angstrom"]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable a0 string 4.146581932902336
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
|
||||
lattice fcc ${a0}
|
||||
lattice fcc 4.146581932902336
|
||||
Lattice spacing in x,y,z = 4.14658 4.14658 4.14658
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (82.9316 82.9316 82.9316)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.005415 secs
|
||||
|
||||
kim_interactions Si
|
||||
#=== BEGIN kim_interactions ==================================
|
||||
pair_style kim SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
pair_coeff * * Si
|
||||
#=== END kim_interactions ====================================
|
||||
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
|
||||
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 4.07118
|
||||
ghost atom cutoff = 4.07118
|
||||
binsize = 2.03559, bins = 41 41 41
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair kim, perpetual
|
||||
attributes: full, newton off, cut 4.07118
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Setting up Verlet run ...
|
||||
Unit style : real
|
||||
Current step : 0
|
||||
Time step : 1
|
||||
Per MPI rank memory allocation (min/avg/max) = 10.36 | 10.36 | 10.36 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 200 -126084.25 0 -107007.66 1528.8768
|
||||
100 94.450495 -116016.03 0 -107007.07 2282.2685
|
||||
Loop time of 74.6055 on 1 procs for 100 steps with 32000 atoms
|
||||
|
||||
Performance: 0.116 ns/day, 207.238 hours/ns, 1.340 timesteps/s
|
||||
98.6% CPU use with 1 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 74.446 | 74.446 | 74.446 | 0.0 | 99.79
|
||||
Neigh | 0.096611 | 0.096611 | 0.096611 | 0.0 | 0.13
|
||||
Comm | 0.014594 | 0.014594 | 0.014594 | 0.0 | 0.02
|
||||
Output | 7.9e-05 | 7.9e-05 | 7.9e-05 | 0.0 | 0.00
|
||||
Modify | 0.03454 | 0.03454 | 0.03454 | 0.0 | 0.05
|
||||
Other | | 0.01396 | | | 0.02
|
||||
|
||||
Nlocal: 32000 ave 32000 max 32000 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 9667 ave 9667 max 9667 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 0 ave 0 max 0 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 450192 ave 450192 max 450192 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 450192
|
||||
Ave neighs/atom = 14.0685
|
||||
Neighbor list builds = 3
|
||||
Dangerous builds = 0
|
||||
|
||||
Please see the log.cite file for references relevant to this simulation
|
||||
|
||||
Total wall time: 0:01:16
|
||||
@ -1,124 +0,0 @@
|
||||
LAMMPS (7 Aug 2019)
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the KIM Portable Model (PM)
|
||||
# SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
# is installed. This can be done with the command
|
||||
# kim-api-collections-management install user SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
# If this command does not work, you may need to setup your PATH to find the utility.
|
||||
# If you installed the kim-api using the LAMMPS CMake build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS build directory)
|
||||
# source ./kim_build-prefix/bin/kim-api-activate
|
||||
# If you installed the kim-api using the LAMMPS Make build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS src directory)
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# Or, see https://openkim.org/doc/obtaining-models for alternative options.
|
||||
#
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
kim_init SW_StillingerWeber_1985_Si__MO_405512056662_005 real
|
||||
#=== BEGIN kim-init ==========================================
|
||||
units real
|
||||
#=== END kim-init ============================================
|
||||
|
||||
kim_query a0 get_lattice_constant_cubic crystal=["fcc"] species=["Si"] units=["angstrom"]
|
||||
#=== BEGIN kim-query =========================================
|
||||
variable a0 string 4.146581932902336
|
||||
#=== END kim-query ===========================================
|
||||
|
||||
|
||||
lattice fcc ${a0}
|
||||
lattice fcc 4.146581932902336
|
||||
Lattice spacing in x,y,z = 4.14658 4.14658 4.14658
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (82.9316 82.9316 82.9316)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.000946 secs
|
||||
|
||||
kim_interactions Si
|
||||
#=== BEGIN kim_interactions ==================================
|
||||
pair_style kim SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
pair_coeff * * Si
|
||||
#=== END kim_interactions ====================================
|
||||
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
|
||||
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 4.07118
|
||||
ghost atom cutoff = 4.07118
|
||||
binsize = 2.03559, bins = 41 41 41
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair kim, perpetual
|
||||
attributes: full, newton off, cut 4.07118
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Setting up Verlet run ...
|
||||
Unit style : real
|
||||
Current step : 0
|
||||
Time step : 1
|
||||
Per MPI rank memory allocation (min/avg/max) = 3.489 | 3.489 | 3.489 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 200 -126084.25 0 -107007.66 1528.8768
|
||||
100 94.450495 -116016.03 0 -107007.07 2282.2685
|
||||
Loop time of 19.0792 on 4 procs for 100 steps with 32000 atoms
|
||||
|
||||
Performance: 0.453 ns/day, 52.998 hours/ns, 5.241 timesteps/s
|
||||
99.4% CPU use with 4 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 18.78 | 18.855 | 18.937 | 1.5 | 98.83
|
||||
Neigh | 0.026047 | 0.026274 | 0.0266 | 0.1 | 0.14
|
||||
Comm | 0.09039 | 0.17196 | 0.24675 | 15.9 | 0.90
|
||||
Output | 3.9e-05 | 4.975e-05 | 6.1e-05 | 0.0 | 0.00
|
||||
Modify | 0.015667 | 0.015819 | 0.016008 | 0.1 | 0.08
|
||||
Other | | 0.01008 | | | 0.05
|
||||
|
||||
Nlocal: 8000 ave 8029 max 7968 min
|
||||
Histogram: 1 1 0 0 0 0 0 0 0 2
|
||||
Nghost: 4259 ave 4303 max 4202 min
|
||||
Histogram: 1 0 0 0 0 0 2 0 0 1
|
||||
Neighs: 0 ave 0 max 0 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 112548 ave 113091 max 111995 min
|
||||
Histogram: 1 0 0 1 0 0 0 1 0 1
|
||||
|
||||
Total # of neighbors = 450192
|
||||
Ave neighs/atom = 14.0685
|
||||
Neighbor list builds = 3
|
||||
Dangerous builds = 0
|
||||
|
||||
Please see the log.cite file for references relevant to this simulation
|
||||
|
||||
Total wall time: 0:00:20
|
||||
@ -1,118 +0,0 @@
|
||||
LAMMPS (7 Aug 2019)
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the KIM Portable Model (PM)
|
||||
# SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
# is installed. This can be done with the command
|
||||
# kim-api-collections-management install user SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
# If this command does not work, you may need to setup your PATH to find the utility.
|
||||
# If you installed the kim-api using the LAMMPS CMake build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS build directory)
|
||||
# source ./kim_build-prefix/bin/kim-api-activate
|
||||
# If you installed the kim-api using the LAMMPS Make build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS src directory)
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# Or, see https://openkim.org/doc/obtaining-models for alternative options.
|
||||
#
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
kim_init SW_StillingerWeber_1985_Si__MO_405512056662_005 real
|
||||
#=== BEGIN kim-init ==========================================
|
||||
units real
|
||||
#=== END kim-init ============================================
|
||||
|
||||
|
||||
lattice fcc 4.4300
|
||||
Lattice spacing in x,y,z = 4.43 4.43 4.43
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (88.6 88.6 88.6)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.003591 secs
|
||||
|
||||
kim_interactions Si
|
||||
#=== BEGIN kim_interactions ==================================
|
||||
pair_style kim SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
pair_coeff * * Si
|
||||
#=== END kim_interactions ====================================
|
||||
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
|
||||
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 4.07118
|
||||
ghost atom cutoff = 4.07118
|
||||
binsize = 2.03559, bins = 44 44 44
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair kim, perpetual
|
||||
attributes: full, newton off, cut 4.07118
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Setting up Verlet run ...
|
||||
Unit style : real
|
||||
Current step : 0
|
||||
Time step : 1
|
||||
Per MPI rank memory allocation (min/avg/max) = 10.44 | 10.44 | 10.44 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 200 -85249.847 0 -66173.259 -33302.387
|
||||
100 253.43357 -90346.68 0 -66173.441 -14888.698
|
||||
Loop time of 74.248 on 1 procs for 100 steps with 32000 atoms
|
||||
|
||||
Performance: 0.116 ns/day, 206.244 hours/ns, 1.347 timesteps/s
|
||||
98.8% CPU use with 1 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 74.118 | 74.118 | 74.118 | 0.0 | 99.83
|
||||
Neigh | 0.069623 | 0.069623 | 0.069623 | 0.0 | 0.09
|
||||
Comm | 0.0137 | 0.0137 | 0.0137 | 0.0 | 0.02
|
||||
Output | 7.6e-05 | 7.6e-05 | 7.6e-05 | 0.0 | 0.00
|
||||
Modify | 0.031883 | 0.031883 | 0.031883 | 0.0 | 0.04
|
||||
Other | | 0.01433 | | | 0.02
|
||||
|
||||
Nlocal: 32000 ave 32000 max 32000 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 7760 ave 7760 max 7760 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 0 ave 0 max 0 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 402352 ave 402352 max 402352 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 402352
|
||||
Ave neighs/atom = 12.5735
|
||||
Neighbor list builds = 4
|
||||
Dangerous builds = 0
|
||||
|
||||
Please see the log.cite file for references relevant to this simulation
|
||||
|
||||
Total wall time: 0:01:14
|
||||
@ -1,118 +0,0 @@
|
||||
LAMMPS (7 Aug 2019)
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the KIM Portable Model (PM)
|
||||
# SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
# is installed. This can be done with the command
|
||||
# kim-api-collections-management install user SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
# If this command does not work, you may need to setup your PATH to find the utility.
|
||||
# If you installed the kim-api using the LAMMPS CMake build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS build directory)
|
||||
# source ./kim_build-prefix/bin/kim-api-activate
|
||||
# If you installed the kim-api using the LAMMPS Make build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS src directory)
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# Or, see https://openkim.org/doc/obtaining-models for alternative options.
|
||||
#
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
kim_init SW_StillingerWeber_1985_Si__MO_405512056662_005 real
|
||||
#=== BEGIN kim-init ==========================================
|
||||
units real
|
||||
#=== END kim-init ============================================
|
||||
|
||||
|
||||
lattice fcc 4.4300
|
||||
Lattice spacing in x,y,z = 4.43 4.43 4.43
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (88.6 88.6 88.6)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.000997 secs
|
||||
|
||||
kim_interactions Si
|
||||
#=== BEGIN kim_interactions ==================================
|
||||
pair_style kim SW_StillingerWeber_1985_Si__MO_405512056662_005
|
||||
pair_coeff * * Si
|
||||
#=== END kim_interactions ====================================
|
||||
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
|
||||
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 4.07118
|
||||
ghost atom cutoff = 4.07118
|
||||
binsize = 2.03559, bins = 44 44 44
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair kim, perpetual
|
||||
attributes: full, newton off, cut 4.07118
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Setting up Verlet run ...
|
||||
Unit style : real
|
||||
Current step : 0
|
||||
Time step : 1
|
||||
Per MPI rank memory allocation (min/avg/max) = 3.517 | 3.517 | 3.517 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 200 -85249.847 0 -66173.259 -33302.387
|
||||
100 253.43357 -90346.68 0 -66173.441 -14888.698
|
||||
Loop time of 19.0287 on 4 procs for 100 steps with 32000 atoms
|
||||
|
||||
Performance: 0.454 ns/day, 52.857 hours/ns, 5.255 timesteps/s
|
||||
99.1% CPU use with 4 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 18.81 | 18.838 | 18.883 | 0.6 | 99.00
|
||||
Neigh | 0.018598 | 0.01914 | 0.020732 | 0.7 | 0.10
|
||||
Comm | 0.10341 | 0.1475 | 0.17393 | 7.1 | 0.78
|
||||
Output | 6e-05 | 6.225e-05 | 6.7e-05 | 0.0 | 0.00
|
||||
Modify | 0.014839 | 0.014925 | 0.015047 | 0.1 | 0.08
|
||||
Other | | 0.008997 | | | 0.05
|
||||
|
||||
Nlocal: 8000 ave 8014 max 7988 min
|
||||
Histogram: 1 1 0 0 0 0 1 0 0 1
|
||||
Nghost: 3374.75 ave 3389 max 3361 min
|
||||
Histogram: 1 0 1 0 0 0 0 1 0 1
|
||||
Neighs: 0 ave 0 max 0 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 100588 ave 100856 max 100392 min
|
||||
Histogram: 1 0 1 0 1 0 0 0 0 1
|
||||
|
||||
Total # of neighbors = 402352
|
||||
Ave neighs/atom = 12.5735
|
||||
Neighbor list builds = 4
|
||||
Dangerous builds = 0
|
||||
|
||||
Please see the log.cite file for references relevant to this simulation
|
||||
|
||||
Total wall time: 0:00:19
|
||||
@ -1,71 +0,0 @@
|
||||
LAMMPS (7 Aug 2019)
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the KIM Simulator Model (PM)
|
||||
# Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000
|
||||
# is installed. This can be done with the command
|
||||
# kim-api-collections-management install user Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000
|
||||
# If this command does not work, you may need to setup your PATH to find the utility.
|
||||
# If you installed the kim-api using the LAMMPS CMake build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS build directory)
|
||||
# source ./kim_build-prefix/bin/kim-api-activate
|
||||
# If you installed the kim-api using the LAMMPS Make build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS src directory)
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# See https://openkim.org/doc/obtaining-models for alternative options.
|
||||
#
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real
|
||||
#=== BEGIN kim-init ==========================================
|
||||
# Using KIM Simulator Model : Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000
|
||||
# For Simulator : LAMMPS 28 Feb 2019
|
||||
# Running on : LAMMPS 7 Aug 2019
|
||||
#
|
||||
units real
|
||||
atom_style charge
|
||||
neigh_modify one 4000
|
||||
#=== END kim-init ============================================
|
||||
|
||||
|
||||
lattice fcc 4.4300
|
||||
Lattice spacing in x,y,z = 4.43 4.43 4.43
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (88.6 88.6 88.6)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.003447 secs
|
||||
|
||||
kim_interactions O
|
||||
#=== BEGIN kim_interactions ==================================
|
||||
pair_style reax/c /var/tmp/kim-simulator-model-parameter-file-directory-6Acs1QDbXgBx/lmp_control safezone 2.0 mincap 100
|
||||
ERROR: Unrecognized pair style 'reax/c' is part of the USER-REAXC package which is not enabled in this LAMMPS binary. (../force.cpp:262)
|
||||
Last command: pair_style reax/c /var/tmp/kim-simulator-model-parameter-file-directory-6Acs1QDbXgBx/lmp_control safezone 2.0 mincap 100
|
||||
--------------------------------------------------------------------------
|
||||
Primary job terminated normally, but 1 process returned
|
||||
a non-zero exit code. Per user-direction, the job has been aborted.
|
||||
--------------------------------------------------------------------------
|
||||
--------------------------------------------------------------------------
|
||||
mpirun detected that one or more processes exited with non-zero status, thus causing
|
||||
the job to be terminated. The first process to do so was:
|
||||
|
||||
Process name: [[33054,1],0]
|
||||
Exit code: 1
|
||||
--------------------------------------------------------------------------
|
||||
@ -1,60 +0,0 @@
|
||||
LAMMPS (7 Aug 2019)
|
||||
# 3d Lennard-Jones melt
|
||||
#
|
||||
# This example requires that the KIM Simulator Model (PM)
|
||||
# Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000
|
||||
# is installed. This can be done with the command
|
||||
# kim-api-collections-management install user Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000
|
||||
# If this command does not work, you may need to setup your PATH to find the utility.
|
||||
# If you installed the kim-api using the LAMMPS CMake build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS build directory)
|
||||
# source ./kim_build-prefix/bin/kim-api-activate
|
||||
# If you installed the kim-api using the LAMMPS Make build, you can do the following
|
||||
# (where the current working directory is assumed to be the LAMMPS src directory)
|
||||
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
|
||||
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
|
||||
#
|
||||
# See https://openkim.org/doc/obtaining-models for alternative options.
|
||||
#
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real
|
||||
#=== BEGIN kim-init ==========================================
|
||||
# Using KIM Simulator Model : Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000
|
||||
# For Simulator : LAMMPS 28 Feb 2019
|
||||
# Running on : LAMMPS 7 Aug 2019
|
||||
#
|
||||
units real
|
||||
atom_style charge
|
||||
neigh_modify one 4000
|
||||
#=== END kim-init ============================================
|
||||
|
||||
|
||||
lattice fcc 4.4300
|
||||
Lattice spacing in x,y,z = 4.43 4.43 4.43
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (88.6 88.6 88.6)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.001307 secs
|
||||
|
||||
kim_interactions O
|
||||
#=== BEGIN kim_interactions ==================================
|
||||
pair_style reax/c /var/tmp/kim-simulator-model-parameter-file-directory-6tmKtZEXzhgv/lmp_control safezone 2.0 mincap 100
|
||||
ERROR: Unrecognized pair style 'reax/c' is part of the USER-REAXC package which is not enabled in this LAMMPS binary. (../force.cpp:262)
|
||||
Last command: pair_style reax/c /var/tmp/kim-simulator-model-parameter-file-directory-6tmKtZEXzhgv/lmp_control safezone 2.0 mincap 100
|
||||
@ -1,92 +0,0 @@
|
||||
LAMMPS (7 Aug 2019)
|
||||
# 3d Lennard-Jones melt
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
units real
|
||||
|
||||
lattice fcc 4.4300
|
||||
Lattice spacing in x,y,z = 4.43 4.43 4.43
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (88.6 88.6 88.6)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.003037 secs
|
||||
|
||||
pair_style lj/cut 8.1500
|
||||
pair_coeff 1 1 0.0104 3.4000
|
||||
|
||||
#pair_style kim LennardJones_Ar
|
||||
#pair_coeff * * Ar
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
|
||||
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 8.45
|
||||
ghost atom cutoff = 8.45
|
||||
binsize = 4.225, bins = 21 21 21
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair lj/cut, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d/newton
|
||||
bin: standard
|
||||
Setting up Verlet run ...
|
||||
Unit style : real
|
||||
Current step : 0
|
||||
Time step : 1
|
||||
Per MPI rank memory allocation (min/avg/max) = 19.23 | 19.23 | 19.23 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 200 6290.8194 0 25367.408 6750.7421
|
||||
100 98.747096 15900.676 0 25319.465 10184.453
|
||||
Loop time of 2.43768 on 1 procs for 100 steps with 32000 atoms
|
||||
|
||||
Performance: 3.544 ns/day, 6.771 hours/ns, 41.023 timesteps/s
|
||||
97.8% CPU use with 1 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 2.1895 | 2.1895 | 2.1895 | 0.0 | 89.82
|
||||
Neigh | 0.17546 | 0.17546 | 0.17546 | 0.0 | 7.20
|
||||
Comm | 0.021001 | 0.021001 | 0.021001 | 0.0 | 0.86
|
||||
Output | 7.9e-05 | 7.9e-05 | 7.9e-05 | 0.0 | 0.00
|
||||
Modify | 0.034253 | 0.034253 | 0.034253 | 0.0 | 1.41
|
||||
Other | | 0.01735 | | | 0.71
|
||||
|
||||
Nlocal: 32000 ave 32000 max 32000 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 19911 ave 19911 max 19911 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 1.96027e+06 ave 1.96027e+06 max 1.96027e+06 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 1960266
|
||||
Ave neighs/atom = 61.2583
|
||||
Neighbor list builds = 3
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:02
|
||||
@ -1,92 +0,0 @@
|
||||
LAMMPS (7 Aug 2019)
|
||||
# 3d Lennard-Jones melt
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable xx equal 20*1
|
||||
variable yy equal 20*$y
|
||||
variable yy equal 20*1
|
||||
variable zz equal 20*$z
|
||||
variable zz equal 20*1
|
||||
|
||||
units real
|
||||
|
||||
lattice fcc 4.4300
|
||||
Lattice spacing in x,y,z = 4.43 4.43 4.43
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 ${yy} 0 ${zz}
|
||||
region box block 0 20 0 20 0 ${zz}
|
||||
region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (88.6 88.6 88.6)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.001194 secs
|
||||
|
||||
pair_style lj/cut 8.1500
|
||||
pair_coeff 1 1 0.0104 3.4000
|
||||
|
||||
#pair_style kim LennardJones_Ar
|
||||
#pair_coeff * * Ar
|
||||
|
||||
mass 1 39.95
|
||||
velocity all create 200.0 232345 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
|
||||
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 8.45
|
||||
ghost atom cutoff = 8.45
|
||||
binsize = 4.225, bins = 21 21 21
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair lj/cut, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d/newton
|
||||
bin: standard
|
||||
Setting up Verlet run ...
|
||||
Unit style : real
|
||||
Current step : 0
|
||||
Time step : 1
|
||||
Per MPI rank memory allocation (min/avg/max) = 7.633 | 7.633 | 7.633 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 200 6290.8194 0 25367.408 6750.7421
|
||||
100 98.747096 15900.676 0 25319.465 10184.453
|
||||
Loop time of 0.726239 on 4 procs for 100 steps with 32000 atoms
|
||||
|
||||
Performance: 11.897 ns/day, 2.017 hours/ns, 137.696 timesteps/s
|
||||
98.7% CPU use with 4 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0.57617 | 0.5835 | 0.59084 | 0.9 | 80.34
|
||||
Neigh | 0.046682 | 0.047783 | 0.048641 | 0.3 | 6.58
|
||||
Comm | 0.065469 | 0.071509 | 0.07899 | 2.3 | 9.85
|
||||
Output | 3.9e-05 | 4.6e-05 | 6.1e-05 | 0.0 | 0.01
|
||||
Modify | 0.013205 | 0.01363 | 0.014044 | 0.3 | 1.88
|
||||
Other | | 0.009775 | | | 1.35
|
||||
|
||||
Nlocal: 8000 ave 8012 max 7989 min
|
||||
Histogram: 1 0 0 0 2 0 0 0 0 1
|
||||
Nghost: 9131 ave 9142 max 9119 min
|
||||
Histogram: 1 0 0 0 0 2 0 0 0 1
|
||||
Neighs: 490066 ave 491443 max 489273 min
|
||||
Histogram: 2 0 0 0 1 0 0 0 0 1
|
||||
|
||||
Total # of neighbors = 1960266
|
||||
Ave neighs/atom = 61.2583
|
||||
Neighbor list builds = 3
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:00
|
||||
@ -8,6 +8,9 @@
|
||||
#ifndef HIP_DEVICE
|
||||
#define HIP_DEVICE
|
||||
|
||||
// workaround after GPU package Feb2021 update
|
||||
// todo: make new neighbor code work with HIP
|
||||
#define LAL_USE_OLD_NEIGHBOR
|
||||
|
||||
#include <hip/hip_runtime.h>
|
||||
#include <unordered_map>
|
||||
@ -41,8 +44,8 @@ struct NVDProperties {
|
||||
int maxThreadsPerBlock;
|
||||
int maxThreadsDim[3];
|
||||
int maxGridSize[3];
|
||||
int sharedMemPerBlock;
|
||||
int totalConstantMemory;
|
||||
CUDA_INT_TYPE sharedMemPerBlock;
|
||||
CUDA_INT_TYPE totalConstantMemory;
|
||||
int SIMDWidth;
|
||||
int memPitch;
|
||||
int regsPerBlock;
|
||||
@ -362,32 +365,35 @@ UCL_Device::UCL_Device() {
|
||||
CU_SAFE_CALL_NS(hipDeviceGetName(namecstr,1024,dev));
|
||||
prop.name=namecstr;
|
||||
|
||||
CU_SAFE_CALL_NS(hipDeviceTotalMem(&prop.totalGlobalMem,dev));
|
||||
CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.multiProcessorCount, hipDeviceAttributeMultiprocessorCount, dev));
|
||||
hipDeviceProp_t hip_prop;
|
||||
|
||||
CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.maxThreadsPerBlock, hipDeviceAttributeMaxThreadsPerBlock, dev));
|
||||
CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.maxThreadsDim[0], hipDeviceAttributeMaxBlockDimX, dev));
|
||||
CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.maxThreadsDim[1], hipDeviceAttributeMaxBlockDimY, dev));
|
||||
CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.maxThreadsDim[2], hipDeviceAttributeMaxBlockDimZ, dev));
|
||||
CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.maxGridSize[0], hipDeviceAttributeMaxGridDimX, dev));
|
||||
CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.maxGridSize[1], hipDeviceAttributeMaxGridDimY, dev));
|
||||
CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.maxGridSize[2], hipDeviceAttributeMaxGridDimZ, dev));
|
||||
CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.sharedMemPerBlock, hipDeviceAttributeMaxSharedMemoryPerBlock, dev));
|
||||
CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.totalConstantMemory, hipDeviceAttributeTotalConstantMemory, dev));
|
||||
CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.SIMDWidth, hipDeviceAttributeWarpSize, dev));
|
||||
CU_SAFE_CALL_NS(hipGetDeviceProperties(&hip_prop,dev));
|
||||
|
||||
prop.totalGlobalMem = hip_prop.totalGlobalMem;
|
||||
prop.multiProcessorCount = hip_prop.multiProcessorCount;
|
||||
prop.maxThreadsPerBlock = hip_prop.maxThreadsPerBlock;
|
||||
prop.maxThreadsDim[0] = hip_prop.maxThreadsDim[0];
|
||||
prop.maxThreadsDim[1] = hip_prop.maxThreadsDim[1];
|
||||
prop.maxThreadsDim[2] = hip_prop.maxThreadsDim[2];
|
||||
prop.maxGridSize[0] = hip_prop.maxGridSize[0];
|
||||
prop.maxGridSize[1] = hip_prop.maxGridSize[1];
|
||||
prop.maxGridSize[2] = hip_prop.maxGridSize[2];
|
||||
prop.sharedMemPerBlock = hip_prop.sharedMemPerBlock;
|
||||
prop.totalConstantMemory = hip_prop.totalConstMem;
|
||||
prop.SIMDWidth = hip_prop.warpSize;
|
||||
prop.regsPerBlock = hip_prop.regsPerBlock;
|
||||
prop.clockRate = hip_prop.clockRate;
|
||||
prop.computeMode = hip_prop.computeMode;
|
||||
//CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.memPitch, CU_DEVICE_ATTRIBUTE_MAX_PITCH, dev));
|
||||
CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.regsPerBlock, hipDeviceAttributeMaxRegistersPerBlock, dev));
|
||||
CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.clockRate, hipDeviceAttributeClockRate, dev));
|
||||
//CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.textureAlign, CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT, dev));
|
||||
|
||||
//#if CUDA_VERSION >= 2020
|
||||
//CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.kernelExecTimeoutEnabled, CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT,dev));
|
||||
CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.integrated, hipDeviceAttributeIntegrated, dev));
|
||||
//CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.canMapHostMemory, CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY, dev));
|
||||
CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.computeMode, hipDeviceAttributeComputeMode,dev));
|
||||
//#endif
|
||||
//#if CUDA_VERSION >= 3010
|
||||
CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.concurrentKernels, hipDeviceAttributeConcurrentKernels, dev));
|
||||
prop.concurrentKernels = hip_prop.concurrentKernels;
|
||||
//CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.ECCEnabled, CU_DEVICE_ATTRIBUTE_ECC_ENABLED, dev));
|
||||
//#endif
|
||||
|
||||
|
||||
@ -69,6 +69,9 @@ class UCL_Program {
|
||||
return _device_ptr->load_module(program, _module, log);
|
||||
}
|
||||
|
||||
/// Return the default command queue/stream associated with this data
|
||||
inline hipStream_t & cq() { return _cq; }
|
||||
|
||||
friend class UCL_Kernel;
|
||||
private:
|
||||
hipModule_t _module;
|
||||
|
||||
@ -13,15 +13,14 @@
|
||||
// email : brownw@ornl.gov
|
||||
// ***************************************************************************/
|
||||
|
||||
#ifdef NV_KERNEL
|
||||
|
||||
#if defined(NV_KERNEL) || defined(USE_HIP)
|
||||
#include "lal_aux_fun1.h"
|
||||
#ifndef _DOUBLE_DOUBLE
|
||||
texture<float4> pos_tex;
|
||||
texture<float> q_tex;
|
||||
_texture(pos_tex, float4);
|
||||
_texture(q_tex, float);
|
||||
#else
|
||||
texture<int4,1> pos_tex;
|
||||
texture<int2> q_tex;
|
||||
_texture_2d(pos_tex, int4);
|
||||
_texture(q_tex, int2);
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
@ -400,6 +400,7 @@ class PyLammps(object):
|
||||
self.lmp = lammps(name=name,cmdargs=cmdargs,ptr=None,comm=comm)
|
||||
print("LAMMPS output is captured by PyLammps wrapper")
|
||||
self._cmd_history = []
|
||||
self._enable_cmd_history = False
|
||||
self.runs = []
|
||||
|
||||
def __del__(self):
|
||||
@ -434,6 +435,24 @@ class PyLammps(object):
|
||||
"""
|
||||
self.lmp.file(file)
|
||||
|
||||
@property
|
||||
def enable_cmd_history(self):
|
||||
"""
|
||||
:getter: Return whether command history is saved
|
||||
:setter: Set if command history should be saved
|
||||
:type: bool
|
||||
"""
|
||||
return self._enable_cmd_history
|
||||
|
||||
@enable_cmd_history.setter
|
||||
def enable_cmd_history(self, value):
|
||||
"""
|
||||
:getter: Return whether command history is saved
|
||||
:setter: Set if command history should be saved
|
||||
:type: bool
|
||||
"""
|
||||
self._enable_cmd_history = (value == True)
|
||||
|
||||
def write_script(self, filepath):
|
||||
"""
|
||||
Write LAMMPS script file containing all commands executed up until now
|
||||
@ -445,17 +464,27 @@ class PyLammps(object):
|
||||
for cmd in self._cmd_history:
|
||||
print(cmd, file=f)
|
||||
|
||||
def clear_cmd_history(self):
|
||||
"""
|
||||
Clear LAMMPS command history up to this point
|
||||
"""
|
||||
self._cmd_history = []
|
||||
|
||||
def command(self, cmd):
|
||||
"""
|
||||
Execute LAMMPS command
|
||||
|
||||
All commands executed will be stored in a command history which can be
|
||||
written to a file using :py:meth:`PyLammps.write_script()`
|
||||
If :py:attr:`PyLammps.enable_cmd_history` is set to ``True``, commands executed
|
||||
will be recorded. The entire command history can be written to a file using
|
||||
:py:meth:`PyLammps.write_script()`. To clear the command history, use
|
||||
:py:meth:`PyLammps.clear_cmd_history()`.
|
||||
|
||||
:param cmd: command string that should be executed
|
||||
:type: cmd: string
|
||||
"""
|
||||
self.lmp.command(cmd)
|
||||
|
||||
if self.enable_cmd_history:
|
||||
self._cmd_history.append(cmd)
|
||||
|
||||
def run(self, *args, **kwargs):
|
||||
|
||||
98
src/KIM/kim_command.cpp
Normal file
98
src/KIM/kim_command.cpp
Normal file
@ -0,0 +1,98 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://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.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing authors: Axel Kohlmeyer (Temple U),
|
||||
Yaser Afshar (UMN)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 2 of the License, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, see <https://www.gnu.org/licenses>.
|
||||
|
||||
Linking LAMMPS statically or dynamically with other modules is making a
|
||||
combined work based on LAMMPS. Thus, the terms and conditions of the GNU
|
||||
General Public License cover the whole combination.
|
||||
|
||||
In addition, as a special exception, the copyright holders of LAMMPS give
|
||||
you permission to combine LAMMPS with free software programs or libraries
|
||||
that are released under the GNU LGPL and with code included in the standard
|
||||
release of the "kim-api" under the CDDL (or modified versions of such code,
|
||||
with unchanged license). You may copy and distribute such a system following
|
||||
the terms of the GNU GPL for LAMMPS and the licenses of the other code
|
||||
concerned, provided that you include the source code of that other code
|
||||
when and as the GNU GPL requires distribution of source code.
|
||||
|
||||
Note that people who make modified versions of LAMMPS are not obligated to
|
||||
grant this special exception for their modified versions; it is their choice
|
||||
whether to do so. The GNU General Public License gives permission to release
|
||||
a modified version without this exception; this exception also makes it
|
||||
possible to release a modified version which carries forward this exception.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Designed for use with the kim-api-2.1.0 (and newer) package
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "kim_command.h"
|
||||
|
||||
#include "error.h"
|
||||
|
||||
// include KIM sub-command headers here
|
||||
#include "kim_init.h"
|
||||
#include "kim_interactions.h"
|
||||
#include "kim_param.h"
|
||||
#include "kim_property.h"
|
||||
#include "kim_query.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void KimCommand::command(int narg, char **arg)
|
||||
{
|
||||
if (narg < 1) error->all(FLERR,"Illegal kim command");
|
||||
|
||||
const std::string subcmd(arg[0]);
|
||||
narg--;
|
||||
arg++;
|
||||
|
||||
if (subcmd == "init") {
|
||||
std::unique_ptr<KimInit> cmd(new KimInit(lmp));
|
||||
cmd->command(narg, arg);
|
||||
} else if (subcmd == "interactions") {
|
||||
std::unique_ptr<KimInteractions> cmd(new KimInteractions(lmp));
|
||||
cmd->command(narg, arg);
|
||||
} else if (subcmd == "param") {
|
||||
std::unique_ptr<KimParam> cmd(new KimParam(lmp));
|
||||
cmd->command(narg, arg);
|
||||
} else if (subcmd == "property") {
|
||||
std::unique_ptr<KimProperty> cmd(new KimProperty(lmp));
|
||||
cmd->command(narg, arg);
|
||||
} else if (subcmd == "query") {
|
||||
std::unique_ptr<KimQuery> cmd(new KimQuery(lmp));
|
||||
cmd->command(narg, arg);
|
||||
} else error->all(FLERR, fmt::format("Unknown kim subcommand {}", subcmd));
|
||||
}
|
||||
83
src/KIM/kim_command.h
Normal file
83
src/KIM/kim_command.h
Normal file
@ -0,0 +1,83 @@
|
||||
/* -*- 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.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing authors: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 2 of the License, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, see <https://www.gnu.org/licenses>.
|
||||
|
||||
Linking LAMMPS statically or dynamically with other modules is making a
|
||||
combined work based on LAMMPS. Thus, the terms and conditions of the GNU
|
||||
General Public License cover the whole combination.
|
||||
|
||||
In addition, as a special exception, the copyright holders of LAMMPS give
|
||||
you permission to combine LAMMPS with free software programs or libraries
|
||||
that are released under the GNU LGPL and with code included in the standard
|
||||
release of the "kim-api" under the CDDL (or modified versions of such code,
|
||||
with unchanged license). You may copy and distribute such a system following
|
||||
the terms of the GNU GPL for LAMMPS and the licenses of the other code
|
||||
concerned, provided that you include the source code of that other code
|
||||
when and as the GNU GPL requires distribution of source code.
|
||||
|
||||
Note that people who make modified versions of LAMMPS are not obligated to
|
||||
grant this special exception for their modified versions; it is their choice
|
||||
whether to do so. The GNU General Public License gives permission to release
|
||||
a modified version without this exception; this exception also makes it
|
||||
possible to release a modified version which carries forward this exception.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Designed for use with the kim-api-2.1.0 (and newer) package
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef COMMAND_CLASS
|
||||
|
||||
CommandStyle(kim,KimCommand)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_KIM_COMMAND_H
|
||||
#define LMP_KIM_COMMAND_H
|
||||
|
||||
#include "pointers.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class KimCommand : protected Pointers {
|
||||
public:
|
||||
KimCommand(class LAMMPS *lmp) : Pointers(lmp) {};
|
||||
void command(int, char **);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ERROR/WARNING messages:
|
||||
|
||||
|
||||
*/
|
||||
@ -81,17 +81,17 @@ using namespace LAMMPS_NS;
|
||||
|
||||
void KimInit::command(int narg, char **arg)
|
||||
{
|
||||
if ((narg < 2) || (narg > 3)) error->all(FLERR,"Illegal kim_init command");
|
||||
if ((narg < 2) || (narg > 3)) error->all(FLERR, "Illegal 'kim init' command");
|
||||
|
||||
if (domain->box_exist)
|
||||
error->all(FLERR,"Must use 'kim_init' command before "
|
||||
error->all(FLERR, "Must use 'kim init' command before "
|
||||
"simulation box is defined");
|
||||
char *model_name = utils::strdup(arg[0]);
|
||||
char *user_units = utils::strdup(arg[1]);
|
||||
if (narg == 3) {
|
||||
if (strcmp(arg[2],"unit_conversion_mode")==0) unit_conversion_mode = true;
|
||||
if (strcmp(arg[2], "unit_conversion_mode")==0) unit_conversion_mode = true;
|
||||
else {
|
||||
error->all(FLERR,fmt::format("Illegal kim_init command.\nThe argument "
|
||||
error->all(FLERR, fmt::format("Illegal 'kim init' command.\nThe argument "
|
||||
"followed by unit_style {} is an optional "
|
||||
"argument and when is used must "
|
||||
"be unit_conversion_mode", user_units));
|
||||
@ -101,10 +101,8 @@ void KimInit::command(int narg, char **arg)
|
||||
char *model_units;
|
||||
KIM_Model *pkim = nullptr;
|
||||
|
||||
if (universe->me == 0)
|
||||
std::remove("kim.log");
|
||||
if (universe->nprocs > 1)
|
||||
MPI_Barrier(universe->uworld);
|
||||
if (universe->me == 0) std::remove("kim.log");
|
||||
if (universe->nprocs > 1) MPI_Barrier(universe->uworld);
|
||||
|
||||
determine_model_type_and_units(model_name, user_units, &model_units, pkim);
|
||||
|
||||
@ -125,43 +123,43 @@ void get_kim_unit_names(
|
||||
KIM_TimeUnit & timeUnit,
|
||||
Error * error)
|
||||
{
|
||||
if (strcmp(system,"real") == 0) {
|
||||
if (strcmp(system, "real") == 0) {
|
||||
lengthUnit = KIM_LENGTH_UNIT_A;
|
||||
energyUnit = KIM_ENERGY_UNIT_kcal_mol;
|
||||
chargeUnit = KIM_CHARGE_UNIT_e;
|
||||
temperatureUnit = KIM_TEMPERATURE_UNIT_K;
|
||||
timeUnit = KIM_TIME_UNIT_fs;
|
||||
} else if (strcmp(system,"metal") == 0) {
|
||||
} else if (strcmp(system, "metal") == 0) {
|
||||
lengthUnit = KIM_LENGTH_UNIT_A;
|
||||
energyUnit = KIM_ENERGY_UNIT_eV;
|
||||
chargeUnit = KIM_CHARGE_UNIT_e;
|
||||
temperatureUnit = KIM_TEMPERATURE_UNIT_K;
|
||||
timeUnit = KIM_TIME_UNIT_ps;
|
||||
} else if (strcmp(system,"si") == 0) {
|
||||
} else if (strcmp(system, "si") == 0) {
|
||||
lengthUnit = KIM_LENGTH_UNIT_m;
|
||||
energyUnit = KIM_ENERGY_UNIT_J;
|
||||
chargeUnit = KIM_CHARGE_UNIT_C;
|
||||
temperatureUnit = KIM_TEMPERATURE_UNIT_K;
|
||||
timeUnit = KIM_TIME_UNIT_s;
|
||||
} else if (strcmp(system,"cgs") == 0) {
|
||||
} else if (strcmp(system, "cgs") == 0) {
|
||||
lengthUnit = KIM_LENGTH_UNIT_cm;
|
||||
energyUnit = KIM_ENERGY_UNIT_erg;
|
||||
chargeUnit = KIM_CHARGE_UNIT_statC;
|
||||
temperatureUnit = KIM_TEMPERATURE_UNIT_K;
|
||||
timeUnit = KIM_TIME_UNIT_s;
|
||||
} else if (strcmp(system,"electron") == 0) {
|
||||
} else if (strcmp(system, "electron") == 0) {
|
||||
lengthUnit = KIM_LENGTH_UNIT_Bohr;
|
||||
energyUnit = KIM_ENERGY_UNIT_Hartree;
|
||||
chargeUnit = KIM_CHARGE_UNIT_e;
|
||||
temperatureUnit = KIM_TEMPERATURE_UNIT_K;
|
||||
timeUnit = KIM_TIME_UNIT_fs;
|
||||
} else if (strcmp(system,"lj") == 0 ||
|
||||
strcmp(system,"micro") ==0 ||
|
||||
strcmp(system,"nano")==0) {
|
||||
error->all(FLERR,fmt::format("LAMMPS unit_style {} not supported "
|
||||
} else if (strcmp(system, "lj") == 0 ||
|
||||
strcmp(system, "micro") ==0 ||
|
||||
strcmp(system, "nano")==0) {
|
||||
error->all(FLERR, fmt::format("LAMMPS unit_style {} not supported "
|
||||
"by KIM models", system));
|
||||
} else {
|
||||
error->all(FLERR,"Unknown unit_style");
|
||||
error->all(FLERR, "Unknown unit_style");
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
@ -182,13 +180,13 @@ void KimInit::determine_model_type_and_units(char * model_name,
|
||||
|
||||
int kim_error = KIM_Collections_Create(&collections);
|
||||
if (kim_error)
|
||||
error->all(FLERR,"Unable to access KIM Collections to find Model");
|
||||
error->all(FLERR, "Unable to access KIM Collections to find Model");
|
||||
|
||||
auto logID = fmt::format("{}_Collections", comm->me);
|
||||
KIM_Collections_SetLogID(collections, logID.c_str());
|
||||
|
||||
kim_error = KIM_Collections_GetItemType(collections, model_name, &itemType);
|
||||
if (kim_error) error->all(FLERR,"KIM Model name not found");
|
||||
if (kim_error) error->all(FLERR, "KIM Model name not found");
|
||||
KIM_Collections_Destroy(&collections);
|
||||
|
||||
if (KIM_CollectionItemType_Equal(itemType,
|
||||
@ -205,7 +203,7 @@ void KimInit::determine_model_type_and_units(char * model_name,
|
||||
&units_accepted,
|
||||
&pkim);
|
||||
|
||||
if (kim_error) error->all(FLERR,"Unable to load KIM Simulator Model");
|
||||
if (kim_error) error->all(FLERR, "Unable to load KIM Simulator Model");
|
||||
|
||||
model_type = MO;
|
||||
|
||||
@ -239,17 +237,17 @@ void KimInit::determine_model_type_and_units(char * model_name,
|
||||
}
|
||||
KIM_Model_Destroy(&pkim);
|
||||
}
|
||||
error->all(FLERR,"KIM Model does not support any lammps unit system");
|
||||
error->all(FLERR, "KIM Model does not support any lammps unit system");
|
||||
} else {
|
||||
KIM_Model_Destroy(&pkim);
|
||||
error->all(FLERR,"KIM Model does not support the requested unit system");
|
||||
error->all(FLERR, "KIM Model does not support the requested unit system");
|
||||
}
|
||||
} else if (KIM_CollectionItemType_Equal(
|
||||
itemType, KIM_COLLECTION_ITEM_TYPE_simulatorModel)) {
|
||||
KIM_SimulatorModel * simulatorModel;
|
||||
kim_error = KIM_SimulatorModel_Create(model_name, &simulatorModel);
|
||||
if (kim_error)
|
||||
error->all(FLERR,"Unable to load KIM Simulator Model");
|
||||
error->all(FLERR, "Unable to load KIM Simulator Model");
|
||||
model_type = SM;
|
||||
|
||||
logID = fmt::format("{}_SimulatorModel", comm->me);
|
||||
@ -265,7 +263,7 @@ void KimInit::determine_model_type_and_units(char * model_name,
|
||||
KIM_SimulatorModel_GetSimulatorFieldMetadata(
|
||||
simulatorModel, i, &sim_lines, &sim_field);
|
||||
|
||||
if (0 == strcmp(sim_field,"units")) {
|
||||
if (0 == strcmp(sim_field, "units")) {
|
||||
KIM_SimulatorModel_GetSimulatorFieldLine(
|
||||
simulatorModel, i, 0, &sim_value);
|
||||
*model_units = utils::strdup(sim_value);
|
||||
@ -275,7 +273,7 @@ void KimInit::determine_model_type_and_units(char * model_name,
|
||||
KIM_SimulatorModel_Destroy(&simulatorModel);
|
||||
|
||||
if ((! unit_conversion_mode) && (strcmp(*model_units, user_units)!=0)) {
|
||||
error->all(FLERR,fmt::format("Incompatible units for KIM Simulator Model"
|
||||
error->all(FLERR, fmt::format("Incompatible units for KIM Simulator Model"
|
||||
", required units = {}", *model_units));
|
||||
}
|
||||
}
|
||||
@ -283,7 +281,8 @@ void KimInit::determine_model_type_and_units(char * model_name,
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void KimInit::do_init(char *model_name, char *user_units, char *model_units, KIM_Model *&pkim)
|
||||
void KimInit::do_init(char *model_name, char *user_units, char *model_units,
|
||||
KIM_Model *&pkim)
|
||||
{
|
||||
// create storage proxy fix. delete existing fix, if needed.
|
||||
|
||||
@ -298,14 +297,15 @@ void KimInit::do_init(char *model_name, char *user_units, char *model_units, KIM
|
||||
fix_store->setptr("model_units", (void *) model_units);
|
||||
|
||||
// Begin output to log file
|
||||
input->write_echo("#=== BEGIN kim-init ==========================================\n");
|
||||
input->write_echo("#=== BEGIN kim init ==================================="
|
||||
"=======\n");
|
||||
|
||||
KIM_SimulatorModel * simulatorModel;
|
||||
if (model_type == SM) {
|
||||
int kim_error =
|
||||
KIM_SimulatorModel_Create(model_name, &simulatorModel);
|
||||
if (kim_error)
|
||||
error->all(FLERR,"Unable to load KIM Simulator Model");
|
||||
error->all(FLERR, "Unable to load KIM Simulator Model");
|
||||
|
||||
auto logID = fmt::format("{}_SimulatorModel", comm->me);
|
||||
KIM_SimulatorModel_SetLogID(simulatorModel, logID.c_str());
|
||||
@ -314,8 +314,8 @@ void KimInit::do_init(char *model_name, char *user_units, char *model_units, KIM
|
||||
KIM_SimulatorModel_GetSimulatorNameAndVersion(
|
||||
simulatorModel, &sim_name, &sim_version);
|
||||
|
||||
if (0 != strcmp(sim_name,"LAMMPS"))
|
||||
error->all(FLERR,"Incompatible KIM Simulator Model");
|
||||
if (0 != strcmp(sim_name, "LAMMPS"))
|
||||
error->all(FLERR, "Incompatible KIM Simulator Model");
|
||||
|
||||
if (comm->me == 0) {
|
||||
std::string mesg("# Using KIM Simulator Model : ");
|
||||
@ -328,7 +328,7 @@ void KimInit::do_init(char *model_name, char *user_units, char *model_units, KIM
|
||||
mesg += "\n";
|
||||
mesg += "#\n";
|
||||
|
||||
utils::logmesg(lmp,mesg);
|
||||
utils::logmesg(lmp, mesg);
|
||||
}
|
||||
|
||||
fix_store->setptr("simulator_model", (void *) simulatorModel);
|
||||
@ -347,6 +347,24 @@ void KimInit::do_init(char *model_name, char *user_units, char *model_units, KIM
|
||||
cmd += model_units;
|
||||
input->one(cmd);
|
||||
|
||||
// Set the skin and timestep default values as
|
||||
// 2.0 Angstroms and 1.0 femtosecond
|
||||
|
||||
std::string skin_cmd =
|
||||
(strcmp(model_units, "real") == 0) ? "neighbor 2.0 bin # Angstroms":
|
||||
(strcmp(model_units, "metal") == 0) ? "neighbor 2.0 bin # Angstroms":
|
||||
(strcmp(model_units, "si") == 0) ? "neighbor 2e-10 bin # meters":
|
||||
(strcmp(model_units, "cgs") == 0) ? "neighbor 2e-8 bin # centimeters":
|
||||
"neighbor 3.77945224 bin # Bohr";
|
||||
std::string step_cmd =
|
||||
(strcmp(model_units, "real") == 0) ? "timestep 1.0 # femtoseconds":
|
||||
(strcmp(model_units, "metal") == 0) ? "timestep 1.0e-3 # picoseconds":
|
||||
(strcmp(model_units, "si") == 0) ? "timestep 1e-15 # seconds":
|
||||
(strcmp(model_units, "cgs") == 0) ? "timestep 1e-15 # seconds":
|
||||
"timestep 1.0 # femtoseconds";
|
||||
input->one(skin_cmd);
|
||||
input->one(step_cmd);
|
||||
|
||||
if (model_type == SM) {
|
||||
int sim_fields, sim_lines;
|
||||
char const *sim_field, *sim_value;
|
||||
@ -356,11 +374,11 @@ void KimInit::do_init(char *model_name, char *user_units, char *model_units, KIM
|
||||
|
||||
for (int i=0; i < sim_fields; ++i) {
|
||||
KIM_SimulatorModel_GetSimulatorFieldMetadata(
|
||||
simulatorModel,i,&sim_lines,&sim_field);
|
||||
if (0 == strcmp(sim_field,"model-init")) {
|
||||
simulatorModel, i, &sim_lines, &sim_field);
|
||||
if (0 == strcmp(sim_field, "model-init")) {
|
||||
for (int j=0; j < sim_lines; ++j) {
|
||||
KIM_SimulatorModel_GetSimulatorFieldLine(
|
||||
simulatorModel,i,j,&sim_value);
|
||||
simulatorModel, i, j, &sim_value);
|
||||
input->one(sim_value);
|
||||
}
|
||||
break;
|
||||
@ -388,17 +406,17 @@ void KimInit::do_init(char *model_name, char *user_units, char *model_units, KIM
|
||||
&extent, &str_name, &str_desc);
|
||||
max_len = MAX(max_len, (int)strlen(str_name));
|
||||
}
|
||||
max_len = MAX(18,max_len+1);
|
||||
max_len = MAX(18, max_len + 1);
|
||||
mesg += fmt::format(" No. | {:<{}} | data type | extent\n",
|
||||
"Parameter name", max_len);
|
||||
mesg += fmt::format("{:-<{}}\n","-",max_len+35);
|
||||
mesg += fmt::format("{:-<{}}\n", "-", max_len + 35);
|
||||
for (int i = 0; i < numberOfParameters; ++i) {
|
||||
KIM_Model_GetParameterMetadata(pkim, i, &kim_DataType,
|
||||
&extent, &str_name, &str_desc);
|
||||
auto data_type = std::string("\"");
|
||||
data_type += KIM_DataType_ToString(kim_DataType) + std::string("\"");
|
||||
mesg += fmt::format(" {:<8} | {:<{}} | {:<10} | {}\n",i+1,str_name,
|
||||
max_len,data_type,extent);
|
||||
mesg += fmt::format(" {:<8} | {:<{}} | {:<10} | {}\n", i + 1, str_name,
|
||||
max_len, data_type, extent);
|
||||
}
|
||||
} else mesg += "No mutable parameters.\n";
|
||||
|
||||
@ -407,7 +425,8 @@ void KimInit::do_init(char *model_name, char *user_units, char *model_units, KIM
|
||||
}
|
||||
|
||||
// End output to log file
|
||||
input->write_echo("#=== END kim-init ============================================\n\n");
|
||||
input->write_echo("#=== END kim init ====================================="
|
||||
"=======\n\n");
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -417,7 +436,7 @@ void KimInit::do_variables(const std::string &from, const std::string &to)
|
||||
// refuse conversion from or to reduced units
|
||||
|
||||
if ((from == "lj") || (to == "lj"))
|
||||
error->all(FLERR,"Cannot set up conversion variables for 'lj' units");
|
||||
error->all(FLERR, "Cannot set up conversion variables for 'lj' units");
|
||||
|
||||
// get index to internal style variables. create, if needed.
|
||||
// set conversion factors for newly created variables.
|
||||
@ -442,7 +461,7 @@ void KimInit::do_variables(const std::string &from, const std::string &to)
|
||||
nullptr};
|
||||
|
||||
input->write_echo(fmt::format("# Conversion factors from {} to {}:\n",
|
||||
from,to));
|
||||
from, to));
|
||||
|
||||
auto variable = input->variable;
|
||||
for (int i = 0; units[i] != nullptr; ++i) {
|
||||
@ -452,16 +471,14 @@ void KimInit::do_variables(const std::string &from, const std::string &to)
|
||||
variable->set(var_str + " internal 1.0");
|
||||
v_unit = variable->find(var_str.c_str());
|
||||
}
|
||||
ier = lammps_unit_conversion(units[i],
|
||||
from,
|
||||
to,
|
||||
ier = lammps_unit_conversion(units[i], from, to,
|
||||
conversion_factor);
|
||||
if (ier != 0)
|
||||
error->all(FLERR,fmt::format("Unable to obtain conversion factor: "
|
||||
error->all(FLERR, fmt::format("Unable to obtain conversion factor: "
|
||||
"unit = {}; from = {}; to = {}",
|
||||
units[i], from, to));
|
||||
|
||||
variable->internal_set(v_unit,conversion_factor);
|
||||
variable->internal_set(v_unit, conversion_factor);
|
||||
input->write_echo(fmt::format("variable {:<15s} internal {:<15.12e}\n",
|
||||
var_str, conversion_factor));
|
||||
}
|
||||
@ -483,13 +500,13 @@ void KimInit::write_log_cite(char *model_name)
|
||||
if (model_type == MO) {
|
||||
err = KIM_Collections_CacheListOfItemMetadataFiles(
|
||||
collections, KIM_COLLECTION_ITEM_TYPE_portableModel,
|
||||
model_name,&extent);
|
||||
model_name, &extent);
|
||||
} else if (model_type == SM) {
|
||||
err = KIM_Collections_CacheListOfItemMetadataFiles(
|
||||
collections, KIM_COLLECTION_ITEM_TYPE_simulatorModel,
|
||||
model_name, &extent);
|
||||
} else {
|
||||
error->all(FLERR,"Unknown model type");
|
||||
error->all(FLERR, "Unknown model type");
|
||||
}
|
||||
|
||||
if (err) {
|
||||
@ -506,7 +523,7 @@ void KimInit::write_log_cite(char *model_name)
|
||||
&availableAsString, &fileString);
|
||||
if (err) continue;
|
||||
|
||||
if (0 == strncmp("kimcite",fileName,7)) {
|
||||
if (0 == strncmp("kimcite", fileName, 7)) {
|
||||
if ((lmp->citeme) && (availableAsString)) lmp->citeme->add(fileString);
|
||||
}
|
||||
}
|
||||
|
||||
@ -56,12 +56,6 @@
|
||||
Designed for use with the kim-api-2.1.0 (and newer) package
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef COMMAND_CLASS
|
||||
|
||||
CommandStyle(kim_init,KimInit)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_KIM_INIT_H
|
||||
#define LMP_KIM_INIT_H
|
||||
|
||||
@ -89,7 +83,6 @@ class KimInit : protected Pointers {
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ERROR/WARNING messages:
|
||||
|
||||
@ -83,13 +83,13 @@ using namespace LAMMPS_NS;
|
||||
|
||||
void KimInteractions::command(int narg, char **arg)
|
||||
{
|
||||
if (narg < 1) error->all(FLERR,"Illegal kim_interactions command");
|
||||
if (narg < 1) error->all(FLERR, "Illegal 'kim interactions' command");
|
||||
|
||||
if (!domain->box_exist)
|
||||
error->all(FLERR,"Must use 'kim_interactions' command after "
|
||||
error->all(FLERR, "Must use 'kim interactions' command after "
|
||||
"simulation box is defined");
|
||||
|
||||
do_setup(narg,arg);
|
||||
do_setup(narg, arg);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -97,13 +97,13 @@ void KimInteractions::command(int narg, char **arg)
|
||||
void KimInteractions::do_setup(int narg, char **arg)
|
||||
{
|
||||
bool fixed_types;
|
||||
if ((narg == 1) && (0 == strcmp("fixed_types",arg[0]))) {
|
||||
if ((narg == 1) && (0 == strcmp("fixed_types", arg[0]))) {
|
||||
fixed_types = true;
|
||||
} else if (narg != atom->ntypes) {
|
||||
error->all(FLERR,fmt::format("Illegal kim_interactions command.\nThe "
|
||||
error->all(FLERR, fmt::format("Illegal 'kim interactions' command.\nThe "
|
||||
"LAMMPS simulation has {} atom type(s), but "
|
||||
"{} chemical species passed to the "
|
||||
"kim_interactions command",
|
||||
"'kim interactions' command",
|
||||
atom->ntypes, narg));
|
||||
} else {
|
||||
fixed_types = false;
|
||||
@ -112,7 +112,7 @@ void KimInteractions::do_setup(int narg, char **arg)
|
||||
char *model_name = nullptr;
|
||||
KIM_SimulatorModel *simulatorModel(nullptr);
|
||||
|
||||
// check if we had a kim_init command by finding fix STORE/KIM
|
||||
// check if we had a kim init command by finding fix STORE/KIM
|
||||
// retrieve model name and pointer to simulator model class instance.
|
||||
// validate model name if not given as null pointer.
|
||||
|
||||
@ -121,10 +121,11 @@ void KimInteractions::do_setup(int narg, char **arg)
|
||||
FixStoreKIM *fix_store = (FixStoreKIM *) modify->fix[ifix];
|
||||
model_name = (char *)fix_store->getptr("model_name");
|
||||
simulatorModel = (KIM_SimulatorModel *)fix_store->getptr("simulator_model");
|
||||
} else error->all(FLERR,"Must use 'kim_init' before 'kim_interactions'");
|
||||
} else error->all(FLERR, "Must use 'kim init' before 'kim interactions'");
|
||||
|
||||
// Begin output to log file
|
||||
input->write_echo("#=== BEGIN kim_interactions ==================================\n");
|
||||
input->write_echo("#=== BEGIN kim interactions ==========================="
|
||||
"=======\n");
|
||||
|
||||
if (simulatorModel) {
|
||||
if (!fixed_types) {
|
||||
@ -149,7 +150,7 @@ void KimInteractions::do_setup(int narg, char **arg)
|
||||
bool species_is_supported;
|
||||
char const *sim_species;
|
||||
KIM_SimulatorModel_GetNumberOfSupportedSpecies(
|
||||
simulatorModel,&sim_num_species);
|
||||
simulatorModel, &sim_num_species);
|
||||
|
||||
for (auto atom_type_sym : utils::split_words(atom_type_sym_list)) {
|
||||
species_is_supported = false;
|
||||
@ -160,7 +161,7 @@ void KimInteractions::do_setup(int narg, char **arg)
|
||||
if (atom_type_sym == sim_species) species_is_supported = true;
|
||||
}
|
||||
if (!species_is_supported) {
|
||||
error->all(FLERR,fmt::format("Species '{}' is not supported by this "
|
||||
error->all(FLERR, fmt::format("Species '{}' is not supported by this "
|
||||
"KIM Simulator Model", atom_type_sym));
|
||||
}
|
||||
}
|
||||
@ -177,10 +178,10 @@ void KimInteractions::do_setup(int narg, char **arg)
|
||||
KIM_SimulatorModel_GetSimulatorFieldMetadata(
|
||||
simulatorModel, i, &sim_lines, &sim_field);
|
||||
|
||||
if (strcmp(sim_field,"units") == 0) {
|
||||
if (strcmp(sim_field, "units") == 0) {
|
||||
KIM_SimulatorModel_GetSimulatorFieldLine(
|
||||
simulatorModel, i, 0, &sim_value);
|
||||
if (strcmp(sim_value,update->unit_style) != 0)
|
||||
if (strcmp(sim_value, update->unit_style) != 0)
|
||||
error->all(FLERR,"Incompatible units for KIM Simulator Model");
|
||||
}
|
||||
}
|
||||
@ -189,7 +190,7 @@ void KimInteractions::do_setup(int narg, char **arg)
|
||||
for (int i = 0; i < sim_fields; ++i) {
|
||||
KIM_SimulatorModel_GetSimulatorFieldMetadata(
|
||||
simulatorModel, i, &sim_lines, &sim_field);
|
||||
if (strcmp(sim_field,"model-defn") == 0) {
|
||||
if (strcmp(sim_field, "model-defn") == 0) {
|
||||
if (domain->periodicity[0]&&
|
||||
domain->periodicity[1]&&
|
||||
domain->periodicity[2])
|
||||
@ -206,12 +207,12 @@ void KimInteractions::do_setup(int narg, char **arg)
|
||||
for (int j = 0; j < sim_lines; ++j) {
|
||||
KIM_SimulatorModel_GetSimulatorFieldLine(
|
||||
simulatorModel, i, j, &sim_value);
|
||||
if (utils::strmatch(sim_value,"^KIM_SET_TYPE_PARAMETERS")) {
|
||||
if (utils::strmatch(sim_value, "^KIM_SET_TYPE_PARAMETERS")) {
|
||||
// Notes regarding the KIM_SET_TYPE_PARAMETERS command
|
||||
// * This is an INTERNAL command.
|
||||
// * It is intended for use only by KIM Simulator Models.
|
||||
// * It is not possible to use this command outside of the context
|
||||
// of the kim_interactions command and KIM Simulator Models.
|
||||
// of the kim interactions command and KIM Simulator Models.
|
||||
// * The command performs a transformation from symbolic
|
||||
// string-based atom types to lammps numeric atom types for
|
||||
// the pair_coeff and charge settings.
|
||||
@ -227,7 +228,7 @@ void KimInteractions::do_setup(int narg, char **arg)
|
||||
}
|
||||
|
||||
if (no_model_definition)
|
||||
error->all(FLERR,"KIM Simulator Model has no Model definition");
|
||||
error->all(FLERR, "KIM Simulator Model has no Model definition");
|
||||
|
||||
KIM_SimulatorModel_OpenAndInitializeTemplateMap(simulatorModel);
|
||||
|
||||
@ -236,7 +237,7 @@ void KimInteractions::do_setup(int narg, char **arg)
|
||||
// not a simulator model. issue pair_style and pair_coeff commands.
|
||||
|
||||
if (fixed_types)
|
||||
error->all(FLERR,"fixed_types cannot be used with a KIM Portable Model");
|
||||
error->all(FLERR, "fixed_types cannot be used with a KIM Portable Model");
|
||||
|
||||
// NOTE: all references to arg must appear before calls to input->one()
|
||||
// as that will reset the argument vector.
|
||||
@ -250,7 +251,8 @@ void KimInteractions::do_setup(int narg, char **arg)
|
||||
}
|
||||
|
||||
// End output to log file
|
||||
input->write_echo("#=== END kim_interactions ====================================\n\n");
|
||||
input->write_echo("#=== END kim interactions ============================="
|
||||
"=======\n\n");
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -261,18 +263,18 @@ void KimInteractions::KIM_SET_TYPE_PARAMETERS(const std::string &input_line) con
|
||||
|
||||
const std::string key = words[1];
|
||||
if (key != "pair" && key != "charge")
|
||||
error->one(FLERR,fmt::format("Unrecognized KEY {} for "
|
||||
error->one(FLERR, fmt::format("Unrecognized KEY {} for "
|
||||
"KIM_SET_TYPE_PARAMETERS command", key));
|
||||
|
||||
std::string filename = words[2];
|
||||
std::vector<std::string> species(words.begin()+3,words.end());
|
||||
std::vector<std::string> species(words.begin() + 3, words.end());
|
||||
if ((int)species.size() != atom->ntypes)
|
||||
error->one(FLERR,"Incorrect args for KIM_SET_TYPE_PARAMETERS command");
|
||||
error->one(FLERR, "Incorrect args for KIM_SET_TYPE_PARAMETERS command");
|
||||
|
||||
FILE *fp = nullptr;
|
||||
if (comm->me == 0) {
|
||||
fp = fopen(filename.c_str(),"r");
|
||||
if (fp == nullptr) error->one(FLERR,"Parameter file not found");
|
||||
fp = fopen(filename.c_str(), "r");
|
||||
if (fp == nullptr) error->one(FLERR, "Parameter file not found");
|
||||
}
|
||||
|
||||
char line[MAXLINE], *ptr;
|
||||
@ -280,16 +282,16 @@ void KimInteractions::KIM_SET_TYPE_PARAMETERS(const std::string &input_line) con
|
||||
|
||||
while (1) {
|
||||
if (comm->me == 0) {
|
||||
ptr = fgets(line,MAXLINE,fp);
|
||||
ptr = fgets(line, MAXLINE,fp);
|
||||
if (ptr == nullptr) {
|
||||
eof = 1;
|
||||
fclose(fp);
|
||||
} else n = strlen(line) + 1;
|
||||
}
|
||||
MPI_Bcast(&eof,1,MPI_INT,0,world);
|
||||
MPI_Bcast(&eof, 1, MPI_INT, 0, world);
|
||||
if (eof) break;
|
||||
MPI_Bcast(&n,1,MPI_INT,0,world);
|
||||
MPI_Bcast(line,n,MPI_CHAR,0,world);
|
||||
MPI_Bcast(&n, 1, MPI_INT, 0, world);
|
||||
MPI_Bcast(line, n, MPI_CHAR, 0, world);
|
||||
|
||||
auto trimmed = utils::trim_comment(line);
|
||||
if (trimmed.find_first_not_of(" \t\n\r") == std::string::npos) continue;
|
||||
@ -300,13 +302,13 @@ void KimInteractions::KIM_SET_TYPE_PARAMETERS(const std::string &input_line) con
|
||||
for (int ib = ia; ib < atom->ntypes; ++ib)
|
||||
if (((species[ia] == words[0]) && (species[ib] == words[1]))
|
||||
|| ((species[ib] == words[0]) && (species[ia] == words[1])))
|
||||
input->one(fmt::format("pair_coeff {} {} {}",ia+1,ib+1,
|
||||
fmt::join(words.begin()+2,words.end()," ")));
|
||||
input->one(fmt::format("pair_coeff {} {} {}", ia + 1, ib + 1,
|
||||
fmt::join(words.begin() + 2, words.end(), " ")));
|
||||
}
|
||||
} else {
|
||||
for (int ia = 0; ia < atom->ntypes; ++ia)
|
||||
if (species[ia] == words[0])
|
||||
input->one(fmt::format("set type {} charge {}",ia+1,words[1]));
|
||||
input->one(fmt::format("set type {} charge {}", ia + 1, words[1]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -56,12 +56,6 @@
|
||||
Designed for use with the kim-api-2.1.0 (and newer) package
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef COMMAND_CLASS
|
||||
|
||||
CommandStyle(kim_interactions,KimInteractions)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_KIM_INTERACTIONS_H
|
||||
#define LMP_KIM_INTERACTIONS_H
|
||||
|
||||
@ -81,7 +75,6 @@ class KimInteractions : protected Pointers {
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ERROR/WARNING messages:
|
||||
|
||||
@ -120,10 +120,10 @@ void get_kim_unit_names(
|
||||
chargeUnit = KIM_CHARGE_UNIT_e;
|
||||
temperatureUnit = KIM_TEMPERATURE_UNIT_K;
|
||||
timeUnit = KIM_TIME_UNIT_fs;
|
||||
} else if (strcmp(system,"lj") == 0 ||
|
||||
strcmp(system,"micro") ==0 ||
|
||||
strcmp(system,"nano")==0) {
|
||||
error->all(FLERR,fmt::format("LAMMPS unit_style {} not supported "
|
||||
} else if (strcmp(system, "lj") == 0 ||
|
||||
strcmp(system, "micro") ==0 ||
|
||||
strcmp(system, "nano")==0) {
|
||||
error->all(FLERR, fmt::format("LAMMPS unit_style {} not supported "
|
||||
"by KIM models", system));
|
||||
} else
|
||||
error->all(FLERR, "Unknown unit_style");
|
||||
@ -134,42 +134,30 @@ void get_kim_unit_names(
|
||||
|
||||
KimParam::KimParam(LAMMPS *lmp) : Pointers(lmp) {}
|
||||
|
||||
KimParam::~KimParam() {}
|
||||
|
||||
void KimParam::command(int narg, char **arg)
|
||||
{
|
||||
// kim_param is a command for
|
||||
// kim param is a command for
|
||||
// getting/setting the value of a %KIM PM parameter
|
||||
//
|
||||
// kim_param get param_name index_range variables formatarg
|
||||
// kim_param set param_name index_range values
|
||||
// kim param get param_name index_range variables formatarg
|
||||
// kim param set param_name index_range values
|
||||
//
|
||||
// kim param get paramname 1 varname
|
||||
// kim param get paramname index_range varname_1, ..., varname_N
|
||||
// kim param get paramname index_range varname_base split
|
||||
// kim param get paramname index_range varname_base list
|
||||
// kim param set paramname index_range values
|
||||
|
||||
// kim_param get paramname 1 varname
|
||||
// kim_param get paramname index_range varname_1, ..., varname_N
|
||||
// kim_param get paramname index_range varname_base split
|
||||
// kim_param get paramname index_range varname_base list
|
||||
// kim_param set paramname index_range values
|
||||
if (narg < 4) error->all(FLERR, "Illegal 'kim param' command");
|
||||
|
||||
if (narg < 4)
|
||||
error->all(FLERR, "Illegal kim_param command");
|
||||
|
||||
std::string kim_param_get_set = arg[0];
|
||||
std::string kim_param_get_set(arg[0]);
|
||||
|
||||
if ((kim_param_get_set != "get") && (kim_param_get_set != "set")) {
|
||||
std::string msg("Incorrect arguments in kim_param command.\n");
|
||||
msg += "'kim_param get/set' is mandatory";
|
||||
std::string msg("Incorrect arguments in 'kim param' command.\n");
|
||||
msg += "'kim param get/set' is mandatory";
|
||||
error->all(FLERR, msg);
|
||||
}
|
||||
|
||||
// Check if we called a kim_init command
|
||||
// by finding fix STORE/KIM
|
||||
// retrieve model name and model units.
|
||||
|
||||
char *model_name;
|
||||
char *model_units;
|
||||
|
||||
bool isPortableModel(false);
|
||||
|
||||
int const ifix = modify->find_fix("KIM_MODEL_STORE");
|
||||
if (ifix >= 0) {
|
||||
FixStoreKIM *fix_store = reinterpret_cast<FixStoreKIM *>(modify->fix[ifix]);
|
||||
@ -178,31 +166,25 @@ void KimParam::command(int narg, char **arg)
|
||||
reinterpret_cast<KIM_SimulatorModel *>(
|
||||
fix_store->getptr("simulator_model"));
|
||||
|
||||
isPortableModel = simulatorModel ? false : true;
|
||||
if (!isPortableModel)
|
||||
error->all(FLERR, "kim_param can only be used with a KIM Portable Model");
|
||||
if (simulatorModel)
|
||||
error->all(FLERR,
|
||||
"'kim param' can only be used with a KIM Portable Model");
|
||||
}
|
||||
|
||||
model_name = (char *)fix_store->getptr("model_name");
|
||||
model_units = (char *)fix_store->getptr("model_units");
|
||||
} else
|
||||
error->all(FLERR, "Must use 'kim_init' before 'kim_param'");
|
||||
|
||||
input->write_echo(fmt::format("#=== BEGIN kim-param {} ==================="
|
||||
"==================\n",kim_param_get_set));
|
||||
input->write_echo(fmt::format("#=== BEGIN kim param {} ==================="
|
||||
"==================\n", kim_param_get_set));
|
||||
|
||||
KIM_Model *pkim = nullptr;
|
||||
|
||||
std::string atom_type_list;
|
||||
|
||||
int kim_error;
|
||||
|
||||
bool isPairStyleAssigned = force->pair ? true : false;
|
||||
if (isPairStyleAssigned) {
|
||||
Pair *pair = force->pair_match("kim", 1, 0);
|
||||
if (pair) {
|
||||
PairKIM *pairKIM = reinterpret_cast<PairKIM *>(pair);
|
||||
|
||||
pkim = pairKIM->get_KIM_Model();
|
||||
pkim = pairKIM->get_kim_model();
|
||||
if (!pkim)
|
||||
error->all(FLERR, "Unable to get the KIM Portable Model");
|
||||
|
||||
@ -215,40 +197,11 @@ void KimParam::command(int narg, char **arg)
|
||||
error->all(FLERR, "Pair style is defined, but there is "
|
||||
"no match for kim style in lammps");
|
||||
} else {
|
||||
if (kim_param_get_set == "set") {
|
||||
std::string msg("Wrong 'kim_param set' command.\n");
|
||||
msg += "To set the new parameter values, pair style must ";
|
||||
msg += "be assigned.\nMust use 'kim_interactions' or";
|
||||
msg += "'pair_style kim' before 'kim_param set'";
|
||||
auto msg = fmt::format("Illegal 'kim param {0}' command.\nTo {0} the new "
|
||||
"parameter values, pair style must be assigned.\n"
|
||||
"Must use 'kim interactions' or 'pair_style kim' "
|
||||
"before 'kim param {0}'", kim_param_get_set);
|
||||
error->all(FLERR, msg);
|
||||
} else {
|
||||
KIM_LengthUnit lengthUnit;
|
||||
KIM_EnergyUnit energyUnit;
|
||||
KIM_ChargeUnit chargeUnit;
|
||||
KIM_TemperatureUnit temperatureUnit;
|
||||
KIM_TimeUnit timeUnit;
|
||||
|
||||
get_kim_unit_names(model_units, lengthUnit, energyUnit,
|
||||
chargeUnit, temperatureUnit, timeUnit,
|
||||
error);
|
||||
|
||||
int units_accepted;
|
||||
|
||||
kim_error = KIM_Model_Create(KIM_NUMBERING_zeroBased,
|
||||
lengthUnit,
|
||||
energyUnit,
|
||||
chargeUnit,
|
||||
temperatureUnit,
|
||||
timeUnit,
|
||||
model_name,
|
||||
&units_accepted,
|
||||
&pkim);
|
||||
if (kim_error)
|
||||
error->all(FLERR, "Unable to create KIM Portable Model");
|
||||
|
||||
auto logID = fmt::format("{}_Model", comm->me);
|
||||
KIM_Model_SetLogID(pkim, logID.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
// Get the number of mutable parameters in the kim model
|
||||
@ -258,6 +211,7 @@ void KimParam::command(int narg, char **arg)
|
||||
if (numberOfParameters) {
|
||||
// Get the parameters
|
||||
if (kim_param_get_set == "get") {
|
||||
int kim_error;
|
||||
// Parameter name
|
||||
char *paramname = nullptr;
|
||||
// Variable name
|
||||
@ -289,7 +243,7 @@ void KimParam::command(int narg, char **arg)
|
||||
}
|
||||
|
||||
if (param_index >= numberOfParameters) {
|
||||
auto msg = fmt::format("Wrong argument in kim_param get command.\n"
|
||||
auto msg = fmt::format("Wrong argument in 'kim param get' command.\n"
|
||||
"This Model does not have the requested '{}' "
|
||||
"parameter", paramname);
|
||||
error->all(FLERR, msg);
|
||||
@ -338,7 +292,7 @@ void KimParam::command(int narg, char **arg)
|
||||
nubound = nlbound;
|
||||
}
|
||||
} else {
|
||||
std::string msg("Wrong number of arguments in 'kim_param get' ");
|
||||
std::string msg("Wrong number of arguments in 'kim param get' ");
|
||||
msg += "command.\nIndex range after parameter name is mandatory";
|
||||
error->all(FLERR, msg);
|
||||
}
|
||||
@ -349,8 +303,10 @@ void KimParam::command(int narg, char **arg)
|
||||
if (i < narg) {
|
||||
// Get the variable/variable_base name
|
||||
varname = arg[i++];
|
||||
if (varname == "split" || varname == "list" || varname == "explicit")
|
||||
error->all(FLERR, "Illegal variable name in 'kim param get'");
|
||||
} else {
|
||||
std::string msg("Wrong number of arguments in 'kim_param get' ");
|
||||
std::string msg("Wrong number of arguments in 'kim param get' ");
|
||||
msg += "command.\nThe LAMMPS variable name is mandatory";
|
||||
error->all(FLERR, msg);
|
||||
}
|
||||
@ -365,28 +321,35 @@ void KimParam::command(int narg, char **arg)
|
||||
for (int j = 0, k = nlbound; j < nvars; ++j, ++k) {
|
||||
varsname[j] = fmt::format("{}_{}", varname, k);
|
||||
}
|
||||
++i;
|
||||
} else if (strcmp(arg[i], "list") == 0) {
|
||||
list_requested = true;
|
||||
varsname.resize(1);
|
||||
varsname[0] = varname;
|
||||
++i;
|
||||
// Default explicit (optional) formatarg
|
||||
} else if (i - 1 + nvars < narg) {
|
||||
} else if (i - 1 + nvars - 1 < narg) {
|
||||
varsname.resize(nvars);
|
||||
--i;
|
||||
for (int j = 0; j < nvars; ++j, ++i) varsname[j] = arg[i];
|
||||
for (int j = 0; j < nvars; ++j, ++i) {
|
||||
varsname[j] = arg[i];
|
||||
if (varsname[j] == "split" || varsname[j] == "list" ||
|
||||
varsname[j] == "explicit")
|
||||
error->all(FLERR, "Illegal variable name in 'kim param get'");
|
||||
}
|
||||
if (i < narg) {
|
||||
if (strcmp(arg[i], "explicit") == 0) ++i;
|
||||
}
|
||||
} else {
|
||||
auto msg =
|
||||
fmt::format("Wrong number of arguments in 'kim_param get' "
|
||||
fmt::format("Wrong number of arguments in 'kim param get' "
|
||||
"command.\nThe LAMMPS '{}' variable names or "
|
||||
"'{} split' is mandatory", nvars, varname);
|
||||
error->all(FLERR, msg);
|
||||
}
|
||||
} else {
|
||||
auto msg =
|
||||
fmt::format("Wrong number of arguments in 'kim_param get' "
|
||||
fmt::format("Wrong number of arguments in 'kim param get' "
|
||||
"command.\nThe LAMMPS '{}' variable names or "
|
||||
"'{} split/list' is mandatory", nvars, varname);
|
||||
error->all(FLERR, msg);
|
||||
@ -399,8 +362,7 @@ void KimParam::command(int narg, char **arg)
|
||||
++i;
|
||||
} else {
|
||||
if ((strcmp(arg[i], "list") == 0) ||
|
||||
(strcmp(arg[i], "explicit") == 0))
|
||||
++i;
|
||||
(strcmp(arg[i], "explicit") == 0)) ++i;
|
||||
|
||||
varsname[0] = varname;
|
||||
}
|
||||
@ -430,7 +392,7 @@ void KimParam::command(int narg, char **arg)
|
||||
str += fmt::format(" {}", V);
|
||||
}
|
||||
|
||||
auto setcmd = fmt::format("{} string {}", varsname[0], str);
|
||||
auto setcmd = fmt::format("{} string \"{}\"", varsname[0], str);
|
||||
input->variable->set(setcmd);
|
||||
input->write_echo(fmt::format("variable {}\n", setcmd));
|
||||
|
||||
@ -468,7 +430,7 @@ void KimParam::command(int narg, char **arg)
|
||||
str += fmt::format(" {}", V);
|
||||
}
|
||||
|
||||
auto setcmd = fmt::format("{} string {}", varsname[0], str);
|
||||
auto setcmd = fmt::format("{} string \"{}\"", varsname[0], str);
|
||||
input->variable->set(setcmd);
|
||||
input->write_echo(fmt::format("variable {}\n", setcmd));
|
||||
|
||||
@ -497,9 +459,6 @@ void KimParam::command(int narg, char **arg)
|
||||
} else
|
||||
error->all(FLERR, "This model has No mutable parameters");
|
||||
|
||||
if (!isPairStyleAssigned)
|
||||
KIM_Model_Destroy(&pkim);
|
||||
|
||||
input->write_echo(fmt::format("#=== END kim-param {} ====================="
|
||||
"==================\n",kim_param_get_set));
|
||||
input->write_echo(fmt::format("#=== END kim param {} ====================="
|
||||
"==================\n", kim_param_get_set));
|
||||
}
|
||||
|
||||
@ -55,12 +55,6 @@
|
||||
Designed for use with the kim-api-2.1.0 (and newer) package
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef COMMAND_CLASS
|
||||
|
||||
CommandStyle(kim_param, KimParam)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_KIM_PARAM_H
|
||||
#define LMP_KIM_PARAM_H
|
||||
|
||||
@ -73,16 +67,12 @@ class KimParam : protected Pointers
|
||||
{
|
||||
public:
|
||||
KimParam(class LAMMPS *lmp);
|
||||
|
||||
~KimParam();
|
||||
|
||||
void command(int, char **);
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
}
|
||||
|
||||
#endif // LMP_KIM_PARAM_H
|
||||
#endif // COMMAND_CLASS
|
||||
#endif
|
||||
|
||||
/* ERROR/WARNING messages:
|
||||
|
||||
|
||||
@ -70,37 +70,33 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
kimProperty::kimProperty(LAMMPS *lmp) : Pointers(lmp)
|
||||
KimProperty::KimProperty(LAMMPS *lmp) : Pointers(lmp)
|
||||
{
|
||||
// one-time initialization of Python interpreter
|
||||
python->init();
|
||||
|
||||
if (!python->has_minimum_version(3, 6)) {
|
||||
error->all(FLERR, "Invalid Python version.\n"
|
||||
"The kim-property Python package requires Python "
|
||||
"3 >= 3.6 support.");
|
||||
}
|
||||
if (!python->has_minimum_version(3, 6))
|
||||
error->all(FLERR, "Invalid Python version.\nThe kim-property Python "
|
||||
"package requires Python 3 >= 3.6 support");
|
||||
}
|
||||
|
||||
void kimProperty::command(int narg, char **arg)
|
||||
void KimProperty::command(int narg, char **arg)
|
||||
{
|
||||
#if LMP_PYTHON
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
if (narg < 2)
|
||||
error->all(FLERR, "Invalid kim_property command.");
|
||||
|
||||
if (narg < 2) error->all(FLERR, "Invalid 'kim property' command");
|
||||
if (!(strcmp(arg[0], "create") == 0) &&
|
||||
!(strcmp(arg[0], "destroy") == 0) &&
|
||||
!(strcmp(arg[0], "modify") == 0) &&
|
||||
!(strcmp(arg[0], "remove") == 0) &&
|
||||
!(strcmp(arg[0], "dump") == 0)) {
|
||||
std::string msg("Incorrect arguments in kim_property command.\n");
|
||||
msg += "'kim_property create/destroy/modify/remove/dump' ";
|
||||
msg += "is mandatory.";
|
||||
std::string msg("Incorrect arguments in 'kim property' command.\n");
|
||||
msg += "'kim property create/destroy/modify/remove/dump' is mandatory";
|
||||
error->all(FLERR, msg);
|
||||
}
|
||||
|
||||
input->write_echo("#=== kim-property ===========================================\n");
|
||||
input->write_echo("#=== kim property ====================================="
|
||||
"======\n");
|
||||
|
||||
// Get the kim_str ptr to the data associated with a kim_property_str
|
||||
// variable
|
||||
@ -115,18 +111,18 @@ void kimProperty::command(int narg, char **arg)
|
||||
PyObject *obj = PyUnicode_FromString("kim_property");
|
||||
if (!obj) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "Creating a 'PyObject'!");
|
||||
error->all(FLERR, "Failed to create a 'PyObject'");
|
||||
}
|
||||
|
||||
kim_property = PyImport_Import(obj);
|
||||
if (!kim_property) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "Unable to import Python kim_property module!"
|
||||
"\nkim-property Python package can be installed "
|
||||
"with pip:\n'pip install kim-property'\n"
|
||||
"See the installation instructions at\n"
|
||||
"https://github.com/openkim/kim-property#installing-kim-property\n"
|
||||
"for detailed information.");
|
||||
std::string msg("Unable to import Python kim_property module!");
|
||||
msg += "\nkim-property Python package can be installed with pip:\n";
|
||||
msg += "'pip install kim-property'\nSee the installation instructions ";
|
||||
msg += "at\nhttps://github.com/openkim/kim-property#installing-kim-";
|
||||
msg += "property\nfor detailed information";
|
||||
error->all(FLERR, msg);
|
||||
}
|
||||
|
||||
// Decrementing of the reference count
|
||||
@ -137,7 +133,7 @@ void kimProperty::command(int narg, char **arg)
|
||||
if (strcmp(arg[0], "create") == 0) {
|
||||
if (narg != 3) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "Invalid 'kim_property create' command.");
|
||||
error->all(FLERR, "Invalid 'kim property create' command");
|
||||
}
|
||||
|
||||
int const ID = utils::inumeric(FLERR, arg[1], true, lmp);
|
||||
@ -151,8 +147,9 @@ void kimProperty::command(int narg, char **arg)
|
||||
PyObject_GetAttrString(kim_property, "kim_property_create");
|
||||
if (!pFunc) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "Unable to get an attribute named "
|
||||
"'kim_property_create' from a kim_property object!");
|
||||
std::string msg("Unable to get an attribute named ");
|
||||
msg += "'kim_property_create' from a kim_property object";
|
||||
error->all(FLERR, msg);
|
||||
}
|
||||
|
||||
// Decrementing of the reference count
|
||||
@ -162,7 +159,7 @@ void kimProperty::command(int narg, char **arg)
|
||||
PyObject *pArgs = PyTuple_New(nSize);
|
||||
if (!pArgs) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "Could not create Python function arguments.");
|
||||
error->all(FLERR, "Could not create Python function arguments");
|
||||
}
|
||||
|
||||
// Python object to set the tuple
|
||||
@ -185,15 +182,16 @@ void kimProperty::command(int narg, char **arg)
|
||||
if (!pValue) {
|
||||
PyErr_Print();
|
||||
PyGILState_Release(gstate);
|
||||
error->one(FLERR, "Python 'kim_property_create' function "
|
||||
"evaluation failed!");
|
||||
std::string msg("Python 'kim_property_create' function ");
|
||||
msg += "evaluation failed";
|
||||
error->one(FLERR, msg);
|
||||
}
|
||||
|
||||
// Python function returned a string value
|
||||
const char *pystr = PyUnicode_AsUTF8(pValue);
|
||||
if (kim_str) input->variable->set_string("kim_property_str", pystr);
|
||||
else input->variable->set(std::string("kim_property_str string '")
|
||||
+ pystr + std::string("'"));
|
||||
else
|
||||
input->variable->set(fmt::format("kim_property_str string '{}'", pystr));
|
||||
|
||||
Py_XDECREF(pArgs);
|
||||
Py_XDECREF(pFunc);
|
||||
@ -201,7 +199,7 @@ void kimProperty::command(int narg, char **arg)
|
||||
} else if (strcmp(arg[0], "destroy") == 0) {
|
||||
if (narg != 2) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "Invalid 'kim_property destroy' command.");
|
||||
error->all(FLERR, "Invalid 'kim property destroy' command");
|
||||
}
|
||||
|
||||
if (!kim_str) {
|
||||
@ -212,13 +210,15 @@ void kimProperty::command(int narg, char **arg)
|
||||
int const ID = utils::inumeric(FLERR, arg[1], true, lmp);
|
||||
|
||||
// Python function
|
||||
// This is the equivalent of the Python expression kim_property.kim_property_destroy
|
||||
// This is the equivalent of the Python expression
|
||||
// kim_property.kim_property_destroy
|
||||
PyObject *pFunc =
|
||||
PyObject_GetAttrString(kim_property, "kim_property_destroy");
|
||||
if (!pFunc) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "Unable to get an attribute named "
|
||||
"'kim_property_destroy' from a kim_property object!");
|
||||
std::string msg("Unable to get an attribute named ");
|
||||
msg += "'kim_property_destroy' from a kim_property object";
|
||||
error->all(FLERR, msg);
|
||||
}
|
||||
|
||||
// Decrementing of the reference count
|
||||
@ -228,7 +228,7 @@ void kimProperty::command(int narg, char **arg)
|
||||
PyObject *pArgs = PyTuple_New(2);
|
||||
if (!pArgs) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "Could not create Python function arguments.");
|
||||
error->all(FLERR, "Could not create Python function arguments");
|
||||
}
|
||||
|
||||
// Python object to set the tuple
|
||||
@ -244,8 +244,9 @@ void kimProperty::command(int narg, char **arg)
|
||||
if (!pValue) {
|
||||
PyErr_Print();
|
||||
PyGILState_Release(gstate);
|
||||
error->one(FLERR, "Python 'kim_property_destroy' function "
|
||||
"evaluation failed!");
|
||||
std::string msg("Python 'kim_property_destroy' function ");
|
||||
msg += "evaluation failed";
|
||||
error->one(FLERR, msg);
|
||||
}
|
||||
|
||||
// Python function returned a string value
|
||||
@ -258,13 +259,12 @@ void kimProperty::command(int narg, char **arg)
|
||||
} else if (strcmp(arg[0], "modify") == 0) {
|
||||
if (narg < 6) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "Invalid 'kim_property modify' command.");
|
||||
error->all(FLERR, "Invalid 'kim property modify' command");
|
||||
}
|
||||
|
||||
if (!kim_str) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "There is no property instance to modify "
|
||||
"the content.");
|
||||
error->all(FLERR, "There is no property instance to modify the content");
|
||||
}
|
||||
|
||||
int const ID = utils::inumeric(FLERR, arg[1], true, lmp);
|
||||
@ -276,8 +276,9 @@ void kimProperty::command(int narg, char **arg)
|
||||
PyObject_GetAttrString(kim_property, "kim_property_modify");
|
||||
if (!pFunc) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "Unable to get an attribute named "
|
||||
"'kim_property_modify' from a kim_property object!");
|
||||
std::string msg("Unable to get an attribute named ");
|
||||
msg += "'kim_property_modify' from a kim_property object";
|
||||
error->all(FLERR, msg);
|
||||
}
|
||||
|
||||
// Decrementing of the reference count
|
||||
@ -287,7 +288,7 @@ void kimProperty::command(int narg, char **arg)
|
||||
PyObject *pArgs = PyTuple_New(static_cast<Py_ssize_t>(narg));
|
||||
if (!pArgs) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "Could not create Python function arguments.");
|
||||
error->all(FLERR, "Could not create Python function arguments");
|
||||
}
|
||||
|
||||
// Python object to set the tuple
|
||||
@ -308,8 +309,9 @@ void kimProperty::command(int narg, char **arg)
|
||||
if (!pValue) {
|
||||
PyErr_Print();
|
||||
PyGILState_Release(gstate);
|
||||
error->one(FLERR, "Python 'kim_property_modify' function "
|
||||
"evaluation failed!");
|
||||
std::string msg("Python 'kim_property_modify' function ");
|
||||
msg += "evaluation failed";
|
||||
error->one(FLERR, msg);
|
||||
}
|
||||
|
||||
// Python function returned a string value
|
||||
@ -322,13 +324,12 @@ void kimProperty::command(int narg, char **arg)
|
||||
} else if (strcmp(arg[0], "remove") == 0) {
|
||||
if (narg < 4) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "Invalid 'kim_property remove' command.");
|
||||
error->all(FLERR, "Invalid 'kim property remove' command");
|
||||
}
|
||||
|
||||
if (!kim_str) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "There is no property instance to remove "
|
||||
"the content.");
|
||||
error->all(FLERR, "There is no property instance to remove the content");
|
||||
}
|
||||
|
||||
int const ID = utils::inumeric(FLERR, arg[1], true, lmp);
|
||||
@ -340,8 +341,9 @@ void kimProperty::command(int narg, char **arg)
|
||||
PyObject_GetAttrString(kim_property, "kim_property_remove");
|
||||
if (!pFunc) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "Unable to get an attribute named "
|
||||
"'kim_property_remove' from a kim_property object!");
|
||||
std::string msg("Unable to get an attribute named ");
|
||||
msg += "'kim_property_remove' from a kim_property object";
|
||||
error->all(FLERR, msg);
|
||||
}
|
||||
|
||||
// Decrementing of the reference count
|
||||
@ -351,7 +353,7 @@ void kimProperty::command(int narg, char **arg)
|
||||
PyObject *pArgs = PyTuple_New(static_cast<Py_ssize_t>(narg));
|
||||
if (!pArgs) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "Could not create Python function arguments.");
|
||||
error->all(FLERR, "Could not create Python function arguments");
|
||||
}
|
||||
|
||||
// Python object to set the tuple
|
||||
@ -372,8 +374,9 @@ void kimProperty::command(int narg, char **arg)
|
||||
if (!pValue) {
|
||||
PyErr_Print();
|
||||
PyGILState_Release(gstate);
|
||||
error->one(FLERR, "Python 'kim_property_remove' function "
|
||||
"evaluation failed!");
|
||||
std::string msg("Python 'kim_property_remove' function ");
|
||||
msg += "evaluation failed";
|
||||
error->one(FLERR, msg);
|
||||
}
|
||||
|
||||
// Python function returned a string value
|
||||
@ -386,13 +389,12 @@ void kimProperty::command(int narg, char **arg)
|
||||
} else if (strcmp(arg[0], "dump") == 0) {
|
||||
if (narg != 2) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "Invalid 'kim_property dump' command.");
|
||||
error->all(FLERR, "Invalid 'kim property dump' command");
|
||||
}
|
||||
|
||||
if (!kim_str) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "There is no property instance to dump "
|
||||
"the content.");
|
||||
error->all(FLERR, "There is no property instance to dump the content.");
|
||||
}
|
||||
|
||||
// Python function
|
||||
@ -402,8 +404,9 @@ void kimProperty::command(int narg, char **arg)
|
||||
PyObject_GetAttrString(kim_property, "kim_property_dump");
|
||||
if (!pFunc) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "Unable to get an attribute named "
|
||||
"'kim_property_dump' from a kim_property object!");
|
||||
std::string msg("Unable to get an attribute named ");
|
||||
msg += "'kim_property_dump' from a kim_property object";
|
||||
error->all(FLERR, msg);
|
||||
}
|
||||
|
||||
// Decrementing of the reference count
|
||||
@ -413,7 +416,7 @@ void kimProperty::command(int narg, char **arg)
|
||||
PyObject *pArgs = PyTuple_New(2);
|
||||
if (!pArgs) {
|
||||
PyGILState_Release(gstate);
|
||||
error->all(FLERR, "Could not create Python function arguments.");
|
||||
error->all(FLERR, "Could not create Python function arguments");
|
||||
}
|
||||
|
||||
// Python object to set the tuple
|
||||
@ -430,8 +433,9 @@ void kimProperty::command(int narg, char **arg)
|
||||
if (!pValue) {
|
||||
PyErr_Print();
|
||||
PyGILState_Release(gstate);
|
||||
error->one(FLERR, "Python 'kim_property_dump' function "
|
||||
"evaluation failed!");
|
||||
std::string msg("Python 'kim_property_dump' function ");
|
||||
msg += "evaluation failed";
|
||||
error->one(FLERR, msg);
|
||||
}
|
||||
} else
|
||||
pValue = nullptr;
|
||||
|
||||
@ -53,12 +53,6 @@
|
||||
Designed for use with the kim-api-2.1.0 (and newer) package
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef COMMAND_CLASS
|
||||
|
||||
CommandStyle(kim_property, kimProperty)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_KIM_PROPERTY_H
|
||||
#define LMP_KIM_PROPERTY_H
|
||||
|
||||
@ -67,18 +61,16 @@ CommandStyle(kim_property, kimProperty)
|
||||
namespace LAMMPS_NS
|
||||
{
|
||||
|
||||
class kimProperty : protected Pointers
|
||||
class KimProperty : protected Pointers
|
||||
{
|
||||
public:
|
||||
kimProperty(class LAMMPS *lmp);
|
||||
|
||||
KimProperty(class LAMMPS *lmp);
|
||||
void command(int, char **);
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
}
|
||||
|
||||
#endif // LMP_KIM_PROPERTY_H
|
||||
#endif // COMMAND_CLASS
|
||||
#endif
|
||||
|
||||
/* ERROR/WARNING messages:
|
||||
|
||||
|
||||
@ -81,123 +81,161 @@
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
#if defined(LMP_KIM_CURL)
|
||||
namespace {
|
||||
static constexpr int kBufSize{10240};
|
||||
|
||||
struct WriteBuf {
|
||||
char *dataptr;
|
||||
size_t sizeleft;
|
||||
};
|
||||
|
||||
static char *do_query(char *, char *, int, char **, int, MPI_Comm);
|
||||
static size_t write_callback(void *, size_t, size_t, void *);
|
||||
static char *do_query(const std::string &, const std::string &,
|
||||
int, char **, int, MPI_Comm);
|
||||
|
||||
static size_t write_callback(void *, size_t, size_t, void *);
|
||||
} // namespace
|
||||
#endif
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void KimQuery::command(int narg, char **arg)
|
||||
{
|
||||
if (narg < 2) error->all(FLERR,"Illegal kim_query command");
|
||||
if (narg < 2) error->all(FLERR, "Illegal 'kim query' command");
|
||||
|
||||
// check if we had a kim_init command by finding fix STORE/KIM
|
||||
// retrieve model name.
|
||||
char *model_name;
|
||||
std::string var_name{arg[0]};
|
||||
|
||||
// format_arg = list, split, or index (optional):
|
||||
std::string format_arg{arg[1]};
|
||||
if (format_arg == "split" || format_arg == "list" || format_arg == "index") {
|
||||
if (narg == 2) {
|
||||
auto msg = fmt::format("Illegal 'kim query' command.\nThe keyword '{}' "
|
||||
"must be followed by the name of the query function", format_arg);
|
||||
error->all(FLERR, msg);
|
||||
}
|
||||
++arg;
|
||||
--narg;
|
||||
// The “list” is the default setting
|
||||
// the result is returned as a space-separated list of values in a variable
|
||||
} else format_arg = "list";
|
||||
|
||||
std::string query_function{arg[1]};
|
||||
if (query_function == "split" || query_function == "list" ||
|
||||
query_function == "index") {
|
||||
auto msg = fmt::format("Illegal 'kim query' command.\nThe '{}' keyword "
|
||||
"can not be used after '{}'", query_function, format_arg);
|
||||
error->all(FLERR, msg);
|
||||
}
|
||||
|
||||
std::string model_name;
|
||||
|
||||
// check the query_args format (a series of keyword=value pairs)
|
||||
for (int i = 2; i < narg; ++i) {
|
||||
if (!strchr(arg[i], '=') || !strchr(arg[i], '[') || !strchr(arg[i], ']')) {
|
||||
auto msg = fmt::format("Illegal query format.\nInput argument "
|
||||
"of `{}` to 'kim query' is wrong. The query format is the "
|
||||
"keyword=[value], where value is always an array of one or "
|
||||
"more comma-separated items", arg[i]);
|
||||
error->all(FLERR, msg);
|
||||
}
|
||||
}
|
||||
|
||||
if (query_function != "get_available_models") {
|
||||
for (int i = 2; i < narg; ++i) {
|
||||
// check if the model is specified as an argument
|
||||
if (strncmp("model=", arg[i], 6) == 0) {
|
||||
ValueTokenizer values(arg[i], "=[]");
|
||||
std::string key = values.next_string();
|
||||
model_name = values.next_string();
|
||||
break;
|
||||
}
|
||||
}
|
||||
// if the model name is not provided by the user
|
||||
if (model_name.empty()) {
|
||||
// check if we had a kim init command by finding fix STORE/KIM
|
||||
const int ifix = modify->find_fix("KIM_MODEL_STORE");
|
||||
if (ifix >= 0) {
|
||||
FixStoreKIM *fix_store = (FixStoreKIM *) modify->fix[ifix];
|
||||
model_name = (char *)fix_store->getptr("model_name");
|
||||
} else error->all(FLERR,"Must use 'kim_init' before 'kim_query'");
|
||||
|
||||
char *varname = arg[0];
|
||||
|
||||
bool split = false;
|
||||
if (strcmp("split",arg[1]) == 0) {
|
||||
if (narg == 2) error->all(FLERR,"Illegal kim_query command.\nThe keyword "
|
||||
"'split' must be followed by the name of "
|
||||
"the query function");
|
||||
if (strcmp("list",arg[2]) == 0)
|
||||
error->all(FLERR,"Illegal kim_query command.\nThe 'list' keyword "
|
||||
"can not be used after 'split'");
|
||||
split = true;
|
||||
arg++;
|
||||
narg--;
|
||||
char *model_name_c = (char *) fix_store->getptr("model_name");
|
||||
model_name = fmt::format("{}", model_name_c);
|
||||
} else {
|
||||
auto msg = fmt::format("Illegal query format.\nMust use 'kim init' "
|
||||
"before 'kim query' or must provide the model name after query "
|
||||
"function with the format of 'model=[model_name]'");
|
||||
error->all(FLERR, msg);
|
||||
}
|
||||
|
||||
// The “list” is the default setting
|
||||
// the result is returned as a space-separated list of values in variable
|
||||
if (strcmp("list",arg[1]) == 0) {
|
||||
if (narg == 2) error->all(FLERR,"Illegal kim_query command.\nThe 'list' "
|
||||
"keyword must be followed by ('split' "
|
||||
"and) the name of the query function");
|
||||
arg++;
|
||||
narg--;
|
||||
}
|
||||
|
||||
char *function = arg[1];
|
||||
for (int i = 2; i < narg; ++i) {
|
||||
if (strncmp("model=",arg[i],6) == 0)
|
||||
error->all(FLERR,"Illegal 'model' key in kim_query command");
|
||||
|
||||
if (!strchr(arg[i], '=') || !strchr(arg[i], '[') || !strchr(arg[i], ']'))
|
||||
error->all(FLERR,fmt::format("Illegal query format.\nInput argument of "
|
||||
"`{}` to kim_query is wrong. The query "
|
||||
"format is the keyword=[value], where value "
|
||||
"is always an array of one or more "
|
||||
"comma-separated items", arg[i]));
|
||||
}
|
||||
|
||||
#if defined(LMP_KIM_CURL)
|
||||
|
||||
char *value = do_query(function, model_name, narg-2, arg+2, comm->me, world);
|
||||
char *value = do_query(query_function, model_name,
|
||||
narg - 2, arg + 2, comm->me, world);
|
||||
|
||||
// check for valid result
|
||||
// on error the content of "value" is a '\0' byte
|
||||
// as the first element, and then the error message
|
||||
// that was returned by the web server
|
||||
// on error the content of "value" is a '\0' byte as the first element,
|
||||
// and then the error message that was returned by the web server
|
||||
|
||||
if (strlen(value) == 0) {
|
||||
error->all(FLERR,fmt::format("OpenKIM query failed: {}", value+1));
|
||||
} else if (strcmp(value,"EMPTY") == 0) {
|
||||
error->all(FLERR,fmt::format("OpenKIM query returned no results"));
|
||||
auto msg = fmt::format("OpenKIM query failed: {}", value + 1);
|
||||
delete [] value;
|
||||
error->all(FLERR, msg);
|
||||
} else if (strcmp(value, "EMPTY") == 0) {
|
||||
delete [] value;
|
||||
error->all(FLERR, fmt::format("OpenKIM query returned no results"));
|
||||
}
|
||||
|
||||
input->write_echo("#=== BEGIN kim-query =========================================\n");
|
||||
input->write_echo("#=== BEGIN kim-query =================================="
|
||||
"=======\n");
|
||||
ValueTokenizer values(value, ",");
|
||||
if (split) {
|
||||
if (format_arg == "split") {
|
||||
int counter = 1;
|
||||
while (values.has_next()) {
|
||||
auto svalue = values.next_string();
|
||||
auto setcmd = fmt::format("{}_{} string {}", varname, counter++, svalue);
|
||||
auto setcmd = fmt::format("{}_{} string {}", var_name, counter++, svalue);
|
||||
input->variable->set(setcmd);
|
||||
input->write_echo(fmt::format("variable {}\n", setcmd));
|
||||
}
|
||||
} else {
|
||||
auto svalue = values.next_string();
|
||||
std::string setcmd = fmt::format("{} string \"{}", varname, svalue);
|
||||
std::string setcmd;
|
||||
auto svalue = utils::trim(values.next_string());
|
||||
if (format_arg == "list") {
|
||||
setcmd = fmt::format("{} string \"", var_name);
|
||||
setcmd += (svalue.front() == '"' && svalue.back() == '"')
|
||||
? fmt::format("{}", svalue.substr(1, svalue.size() - 2))
|
||||
: fmt::format("{}", svalue);
|
||||
while (values.has_next()) {
|
||||
svalue = utils::trim(values.next_string());
|
||||
setcmd += (svalue.front() == '"' && svalue.back() == '"')
|
||||
? fmt::format(" {}", svalue.substr(1, svalue.size() - 2))
|
||||
: fmt::format(" {}", svalue);
|
||||
}
|
||||
setcmd += "\"";
|
||||
} else {
|
||||
// format_arg == "index"
|
||||
setcmd = fmt::format("{} index {}", var_name, svalue);
|
||||
while (values.has_next()) {
|
||||
svalue = values.next_string();
|
||||
setcmd += fmt::format(" {}", svalue);
|
||||
}
|
||||
setcmd += "\"";
|
||||
}
|
||||
input->variable->set(setcmd);
|
||||
input->write_echo(fmt::format("variable {}\n", setcmd));
|
||||
}
|
||||
input->write_echo("#=== END kim-query ===========================================\n\n");
|
||||
input->write_echo("#=== END kim-query ===================================="
|
||||
"=======\n\n");
|
||||
|
||||
delete[] value;
|
||||
delete [] value;
|
||||
#else
|
||||
error->all(FLERR,"Cannot use 'kim_query' command when KIM package "
|
||||
error->all(FLERR, "Cannot use 'kim query' command when KIM package "
|
||||
"is compiled without support for libcurl");
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(LMP_KIM_CURL)
|
||||
|
||||
namespace {
|
||||
// copy data to the user provided data structure, optionally in increments
|
||||
|
||||
size_t write_callback(void *data, size_t size, size_t nmemb, void *userp)
|
||||
{
|
||||
struct WriteBuf *buf = (struct WriteBuf *)userp;
|
||||
WriteBuf *buf = (WriteBuf *) userp;
|
||||
|
||||
// copy chunks into the buffer for as long as there is space left
|
||||
if (buf->sizeleft) {
|
||||
@ -209,25 +247,23 @@ size_t write_callback(void *data, size_t size, size_t nmemb, void *userp)
|
||||
|
||||
buf->dataptr += copy_this_much;
|
||||
buf->sizeleft -= copy_this_much;
|
||||
|
||||
return copy_this_much;
|
||||
}
|
||||
return 0; // done
|
||||
}
|
||||
|
||||
char *do_query(char *qfunction, char * model_name, int narg, char **arg,
|
||||
int rank, MPI_Comm comm)
|
||||
char *do_query(const std::string &qfunction, const std::string &mname,
|
||||
int narg, char **arg, int rank, MPI_Comm comm)
|
||||
{
|
||||
char value[512];
|
||||
char value[kBufSize];
|
||||
|
||||
// run the web query from rank 0 only
|
||||
|
||||
if (rank == 0) {
|
||||
// set up and clear receive buffer
|
||||
struct WriteBuf buf;
|
||||
WriteBuf buf;
|
||||
buf.dataptr = value;
|
||||
buf.sizeleft = 511;
|
||||
memset(value,0,512);
|
||||
buf.sizeleft = kBufSize - 1;
|
||||
memset(value, 0, kBufSize);
|
||||
|
||||
// create curl web query instance
|
||||
curl_global_init(CURL_GLOBAL_DEFAULT);
|
||||
@ -235,17 +271,21 @@ char *do_query(char *qfunction, char * model_name, int narg, char **arg,
|
||||
|
||||
if (handle) {
|
||||
auto url = fmt::format("https://query.openkim.org/api/{}", qfunction);
|
||||
auto query = fmt::format("model=[\"{}\"]", model_name);
|
||||
auto query = mname.empty()
|
||||
? fmt::format("")
|
||||
: (mname.front() == '"' && mname.back() == '"')
|
||||
? fmt::format("model=[{}]", mname)
|
||||
: fmt::format("model=[\"{}\"]", mname);
|
||||
for (int i = 0; i < narg; ++i) {
|
||||
ValueTokenizer values(arg[i], "=[]");
|
||||
std::string key = values.next_string();
|
||||
if (key == "model") continue;
|
||||
std::string val = values.next_string();
|
||||
std::string::size_type n = val.find(",");
|
||||
if (n == std::string::npos) {
|
||||
if (utils::is_integer(val) ||
|
||||
utils::is_double(val) ||
|
||||
(val.front() == '"' &&
|
||||
val.back() == '"')) {
|
||||
(val.front() == '"' && val.back() == '"')) {
|
||||
query += fmt::format("&{}", arg[i]);
|
||||
} else {
|
||||
query += fmt::format("&{}=[\"{}\"]", key, val);
|
||||
@ -256,8 +296,7 @@ char *do_query(char *qfunction, char * model_name, int narg, char **arg,
|
||||
std::string sval = val.substr(0, n);
|
||||
if (utils::is_integer(sval) ||
|
||||
utils::is_double(sval) ||
|
||||
(val.front() == '"' &&
|
||||
val.back() == '"')) {
|
||||
(sval.front() == '"' && sval.back() == '"')) {
|
||||
query += fmt::format("{},", sval);
|
||||
} else {
|
||||
query += fmt::format("\"{}\",", sval);
|
||||
@ -265,8 +304,11 @@ char *do_query(char *qfunction, char * model_name, int narg, char **arg,
|
||||
val = val.substr(n + 1);
|
||||
n = val.find(",");
|
||||
}
|
||||
if (val.size()) query += fmt::format("\"{}\"]", val);
|
||||
else query[query.size() - 1]=']';
|
||||
if (val.size()) {
|
||||
query += (val.front() == '"' && val.back() == '"')
|
||||
? fmt::format("{}]", val)
|
||||
: fmt::format("\"{}\"]", val);
|
||||
} else query.back() = ']';
|
||||
}
|
||||
}
|
||||
|
||||
@ -292,7 +334,7 @@ char *do_query(char *qfunction, char * model_name, int narg, char **arg,
|
||||
}
|
||||
}
|
||||
|
||||
std::string user_agent = fmt::format("kim_query--LAMMPS/{} ({})",
|
||||
auto user_agent = fmt::format("kim query--LAMMPS/{} ({})",
|
||||
LAMMPS_VERSION, Info::get_os_info());
|
||||
|
||||
curl_easy_setopt(handle, CURLOPT_USERAGENT, user_agent.c_str());
|
||||
@ -300,20 +342,20 @@ char *do_query(char *qfunction, char * model_name, int narg, char **arg,
|
||||
curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
curl_easy_setopt(handle, CURLOPT_POSTFIELDS, query.c_str());
|
||||
curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, write_callback);
|
||||
curl_easy_setopt(handle, CURLOPT_WRITEDATA,&buf);
|
||||
curl_easy_setopt(handle, CURLOPT_WRITEDATA, &buf);
|
||||
|
||||
// perform OpenKIM query and check for errors
|
||||
CURLcode res = curl_easy_perform(handle);
|
||||
if (res != CURLE_OK) {
|
||||
// on error we return an "empty" string but add error message after it
|
||||
value[0] = '\0';
|
||||
strcpy(value+1,curl_easy_strerror(res));
|
||||
strcpy(value + 1, curl_easy_strerror(res));
|
||||
}
|
||||
curl_easy_cleanup(handle);
|
||||
}
|
||||
curl_global_cleanup();
|
||||
}
|
||||
MPI_Bcast(value, 512, MPI_CHAR, 0, comm);
|
||||
MPI_Bcast(value, kBufSize, MPI_CHAR, 0, comm);
|
||||
|
||||
// we must make a proper copy of the query, as the stack allocation
|
||||
// for "value" will go out of scope. a valid query has a '[' as
|
||||
@ -328,27 +370,28 @@ char *do_query(char *qfunction, char * model_name, int narg, char **arg,
|
||||
if (value[len] == ']') {
|
||||
value[len] = '\0';
|
||||
retval = new char[len];
|
||||
if (strcmp(value+1, "") == 0) strcpy(retval,"EMPTY");
|
||||
else strcpy(retval,value+1);
|
||||
if (strcmp(value + 1, "") == 0) strcpy(retval, "EMPTY");
|
||||
else strcpy(retval, value + 1);
|
||||
} else {
|
||||
retval = new char[len+2];
|
||||
retval = new char[len + 2];
|
||||
retval[0] = '\0';
|
||||
strcpy(retval+1,value);
|
||||
strcpy(retval + 1, value);
|
||||
}
|
||||
// an error message starts with a '\0' character
|
||||
} else if (value[0] == '\0') {
|
||||
int len = strlen(value+1)+2;
|
||||
int len = strlen(value + 1) + 2;
|
||||
retval = new char[len];
|
||||
retval[0] = '\0';
|
||||
strcpy(retval+1,value+1);
|
||||
strcpy(retval + 1, value + 1);
|
||||
// unknown response type. we should not get here.
|
||||
} else {
|
||||
// we return an "empty" string but add error message after it
|
||||
int len = strlen(value)+2;
|
||||
int len = strlen(value) + 2;
|
||||
retval = new char[len];
|
||||
retval[0] = '\0';
|
||||
strcpy(retval+1,value);
|
||||
strcpy(retval + 1, value);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
} // namespace
|
||||
#endif
|
||||
|
||||
@ -55,12 +55,6 @@
|
||||
Designed for use with the kim-api-2.1.0 (and newer) package
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef COMMAND_CLASS
|
||||
|
||||
CommandStyle(kim_query,KimQuery)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_KIM_QUERY_H
|
||||
#define LMP_KIM_QUERY_H
|
||||
|
||||
@ -76,7 +70,6 @@ class KimQuery : protected Pointers {
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ERROR/WARNING messages:
|
||||
|
||||
@ -309,13 +309,11 @@ void PairKIM::settings(int narg, char **arg)
|
||||
set_lmps_flags();
|
||||
|
||||
// set KIM Model name
|
||||
int nmlen = strlen(arg[0]);
|
||||
if (kim_modelname != 0) {
|
||||
delete [] kim_modelname;
|
||||
kim_modelname = 0;
|
||||
}
|
||||
kim_modelname = new char[nmlen+1];
|
||||
strcpy(kim_modelname, arg[0]);
|
||||
kim_modelname = utils::strdup(arg[0]);
|
||||
|
||||
// initialize KIM Model
|
||||
kim_init();
|
||||
@ -330,7 +328,7 @@ void PairKIM::coeff(int narg, char **arg)
|
||||
// This is called when "pair_coeff ..." is read from input
|
||||
// may be called multiple times
|
||||
|
||||
int i,j,n;
|
||||
int i,j;
|
||||
|
||||
if (!allocated) allocate();
|
||||
|
||||
@ -373,9 +371,7 @@ void PairKIM::coeff(int narg, char **arg)
|
||||
if (strcmp(arg[i],lmps_unique_elements[j]) == 0) break;
|
||||
lmps_map_species_to_unique[i-1] = j;
|
||||
if (j == lmps_num_unique_elements) {
|
||||
n = strlen(arg[i]) + 1;
|
||||
lmps_unique_elements[j] = new char[n];
|
||||
strcpy(lmps_unique_elements[j],arg[i]);
|
||||
lmps_unique_elements[j] = utils::strdup(arg[i]);
|
||||
lmps_num_unique_elements++;
|
||||
}
|
||||
}
|
||||
@ -601,6 +597,8 @@ void PairKIM::init_style()
|
||||
|
||||
// set cutoff
|
||||
neighbor->requests[irequest]->cut = 1;
|
||||
if (kim_cutoff_values[i] <= neighbor->skin)
|
||||
error->all(FLERR,"Illegal neighbor request (force cutoff <= skin)");
|
||||
neighbor->requests[irequest]->cutoff
|
||||
= kim_cutoff_values[i] + neighbor->skin;
|
||||
}
|
||||
@ -1161,6 +1159,6 @@ void PairKIM::set_kim_model_has_flags()
|
||||
}
|
||||
}
|
||||
|
||||
KIM_Model *PairKIM::get_KIM_Model() { return pkim; }
|
||||
KIM_Model *PairKIM::get_kim_model() { return pkim; }
|
||||
|
||||
std::string PairKIM::get_atom_type_list() { return atom_type_list; }
|
||||
|
||||
@ -89,8 +89,7 @@ class PairKIM : public Pair {
|
||||
virtual double memory_usage();
|
||||
|
||||
// Get the KIM_Model object
|
||||
KIM_Model *get_KIM_Model();
|
||||
|
||||
KIM_Model *get_kim_model();
|
||||
// Get the atom type list
|
||||
std::string get_atom_type_list();
|
||||
protected:
|
||||
|
||||
@ -50,6 +50,7 @@ struct TagPairSNAPBeta{};
|
||||
struct TagPairSNAPComputeBi{};
|
||||
struct TagPairSNAPTransformBi{}; // re-order blist from AoSoA to AoS
|
||||
struct TagPairSNAPComputeYi{};
|
||||
template<int dir>
|
||||
struct TagPairSNAPComputeFusedDeidrj{};
|
||||
|
||||
// CPU backend only
|
||||
@ -78,10 +79,31 @@ public:
|
||||
using real_type = real_type_;
|
||||
using complex = SNAComplex<real_type>;
|
||||
|
||||
// type-dependent team sizes
|
||||
// Static team/tile sizes for device offload
|
||||
static constexpr int team_size_compute_neigh = 4;
|
||||
static constexpr int tile_size_compute_ck = 4;
|
||||
static constexpr int tile_size_pre_ui = 4;
|
||||
static constexpr int team_size_compute_ui = sizeof(real_type) == 4 ? 8 : 4;
|
||||
static constexpr int tile_size_transform_ui = 4;
|
||||
static constexpr int tile_size_compute_zi = 8;
|
||||
static constexpr int tile_size_compute_bi = 4;
|
||||
static constexpr int tile_size_transform_bi = 4;
|
||||
static constexpr int tile_size_compute_yi = 8;
|
||||
static constexpr int team_size_compute_fused_deidrj = sizeof(real_type) == 4 ? 4 : 2;
|
||||
|
||||
// Custom MDRangePolicy, Rank3, to reduce verbosity of kernel launches
|
||||
// This hides the Kokkos::IndexType<int> and Kokkos::Rank<3...>
|
||||
// and reduces the verbosity of the LaunchBound by hiding the explicit
|
||||
// multiplication by vector_length
|
||||
template <class Device, int num_tiles, class TagPairSNAP>
|
||||
using Snap3DRangePolicy = typename Kokkos::MDRangePolicy<Device, Kokkos::IndexType<int>, Kokkos::Rank<3, Kokkos::Iterate::Left, Kokkos::Iterate::Left>, Kokkos::LaunchBounds<vector_length * num_tiles>, TagPairSNAP>;
|
||||
|
||||
// Custom SnapAoSoATeamPolicy to reduce the verbosity of kernel launches
|
||||
// This hides the LaunchBounds abstraction by hiding the explicit
|
||||
// multiplication by vector length
|
||||
template <class Device, int num_teams, class TagPairSNAP>
|
||||
using SnapAoSoATeamPolicy = typename Kokkos::TeamPolicy<Device, Kokkos::LaunchBounds<vector_length * num_teams>, TagPairSNAP>;
|
||||
|
||||
PairSNAPKokkos(class LAMMPS *);
|
||||
~PairSNAPKokkos();
|
||||
|
||||
@ -139,8 +161,9 @@ public:
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void operator() (TagPairSNAPComputeYi,const int iatom_mod, const int idxz, const int iatom_div) const;
|
||||
|
||||
template<int dir>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void operator() (TagPairSNAPComputeFusedDeidrj,const typename Kokkos::TeamPolicy<DeviceType, TagPairSNAPComputeFusedDeidrj>::member_type& team) const;
|
||||
void operator() (TagPairSNAPComputeFusedDeidrj<dir>,const typename Kokkos::TeamPolicy<DeviceType, TagPairSNAPComputeFusedDeidrj<dir> >::member_type& team) const;
|
||||
|
||||
// CPU backend only
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
@ -252,6 +275,11 @@ inline double dist2(double* x,double* y);
|
||||
|
||||
friend void pair_virial_fdotr_compute<PairSNAPKokkos>(PairSNAPKokkos*);
|
||||
|
||||
// Utility routine which wraps computing per-team scratch size requirements for
|
||||
// ComputeNeigh, ComputeUi, and ComputeFusedDeidrj
|
||||
template <typename scratch_type>
|
||||
int scratch_size_helper(int values_per_team);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -279,7 +279,6 @@ void PairSNAPKokkos<DeviceType, real_type, vector_length>::compute(int eflag_in,
|
||||
int team_size = team_size_default;
|
||||
|
||||
typename Kokkos::TeamPolicy<DeviceType,TagPairSNAPComputeDuidrjCPU> policy_duidrj_cpu(((chunk_size+team_size-1)/team_size)*max_neighs,team_size,vector_length);
|
||||
snaKK.set_dir(-1); // technically doesn't do anything
|
||||
Kokkos::parallel_for("ComputeDuidrjCPU",policy_duidrj_cpu,*this);
|
||||
|
||||
typename Kokkos::TeamPolicy<DeviceType,TagPairSNAPComputeDeidrjCPU> policy_deidrj_cpu(((chunk_size+team_size-1)/team_size)*max_neighs,team_size,vector_length);
|
||||
@ -291,91 +290,84 @@ void PairSNAPKokkos<DeviceType, real_type, vector_length>::compute(int eflag_in,
|
||||
|
||||
#ifdef LMP_KOKKOS_GPU
|
||||
|
||||
// Pre-compute ceil(chunk_size / vector_length) for code cleanliness
|
||||
const int chunk_size_div = (chunk_size + vector_length - 1) / vector_length;
|
||||
|
||||
//ComputeNeigh
|
||||
{
|
||||
constexpr int team_size = 4;
|
||||
// team_size_compute_neigh is defined in `pair_snap_kokkos.h`
|
||||
int scratch_size = scratch_size_helper<int>(team_size_compute_neigh * max_neighs);
|
||||
|
||||
// scratch size: max_neighs * sizeof(int) * number of threads per team
|
||||
typedef Kokkos::View< int*,
|
||||
Kokkos::DefaultExecutionSpace::scratch_memory_space,
|
||||
Kokkos::MemoryTraits<Kokkos::Unmanaged> >
|
||||
ScratchViewType;
|
||||
int scratch_size = ScratchViewType::shmem_size(team_size * max_neighs);
|
||||
|
||||
typename Kokkos::TeamPolicy<DeviceType,TagPairSNAPComputeNeigh> policy_neigh(chunk_size,team_size,vector_length);
|
||||
SnapAoSoATeamPolicy<DeviceType, team_size_compute_neigh, TagPairSNAPComputeNeigh> policy_neigh(chunk_size,team_size_compute_neigh,vector_length);
|
||||
policy_neigh = policy_neigh.set_scratch_size(0, Kokkos::PerTeam(scratch_size));
|
||||
Kokkos::parallel_for("ComputeNeigh",policy_neigh,*this);
|
||||
}
|
||||
|
||||
//ComputeCayleyKlein
|
||||
{
|
||||
typename Kokkos::MDRangePolicy<DeviceType, Kokkos::IndexType<int>, Kokkos::Rank<3, Kokkos::Iterate::Left, Kokkos::Iterate::Left>, TagPairSNAPComputeCayleyKlein>
|
||||
policy_compute_ck({0,0,0},{vector_length,max_neighs,(chunk_size + vector_length - 1) / vector_length},{vector_length,4,1});
|
||||
// tile_size_compute_ck is defined in `pair_snap_kokkos.h`
|
||||
Snap3DRangePolicy<DeviceType, tile_size_compute_ck, TagPairSNAPComputeCayleyKlein>
|
||||
policy_compute_ck({0,0,0},{vector_length,max_neighs,chunk_size_div},{vector_length,tile_size_compute_ck,1});
|
||||
Kokkos::parallel_for("ComputeCayleyKlein",policy_compute_ck,*this);
|
||||
}
|
||||
|
||||
//PreUi
|
||||
{
|
||||
typename Kokkos::MDRangePolicy<DeviceType, Kokkos::IndexType<int>, Kokkos::Rank<3, Kokkos::Iterate::Left, Kokkos::Iterate::Left>, TagPairSNAPPreUi>
|
||||
policy_preui({0,0,0},{vector_length,twojmax+1,(chunk_size + vector_length - 1) / vector_length},{vector_length,4,1});
|
||||
// tile_size_pre_ui is defined in `pair_snap_kokkos.h`
|
||||
Snap3DRangePolicy<DeviceType, tile_size_pre_ui, TagPairSNAPPreUi>
|
||||
policy_preui({0,0,0},{vector_length,twojmax+1,chunk_size_div},{vector_length,tile_size_pre_ui,1});
|
||||
Kokkos::parallel_for("PreUi",policy_preui,*this);
|
||||
|
||||
}
|
||||
|
||||
// ComputeUi w/vector parallelism, shared memory, direct atomicAdd into ulisttot
|
||||
{
|
||||
// new AoSoA form
|
||||
|
||||
// team_size_compute_ui is defined in `pair_snap_kokkos.h`
|
||||
constexpr int team_size = team_size_compute_ui;
|
||||
|
||||
// scratch size: 32 atoms * (twojmax+1) cached values, no double buffer
|
||||
const int tile_size = vector_length * (twojmax + 1);
|
||||
typedef Kokkos::View< complex*,
|
||||
Kokkos::DefaultExecutionSpace::scratch_memory_space,
|
||||
Kokkos::MemoryTraits<Kokkos::Unmanaged> >
|
||||
ScratchViewType;
|
||||
int scratch_size = ScratchViewType::shmem_size(team_size * tile_size);
|
||||
const int scratch_size = scratch_size_helper<complex>(team_size_compute_ui * tile_size);
|
||||
|
||||
// total number of teams needed
|
||||
int chunk_size_div = (chunk_size + vector_length - 1) / vector_length;
|
||||
// total number of teams needed: (natoms / 32) * (max_neighs) * ("bend" locations)
|
||||
const int n_teams = chunk_size_div * max_neighs * (twojmax + 1);
|
||||
const int n_teams_div = (n_teams + team_size_compute_ui - 1) / team_size_compute_ui;
|
||||
|
||||
// (natoms / 32) * (max_neighs) * ("bend" locations)
|
||||
int n_teams = chunk_size_div * max_neighs * (twojmax + 1);
|
||||
int n_teams_div = (n_teams + team_size - 1) / team_size;
|
||||
|
||||
typename Kokkos::TeamPolicy<DeviceType,TagPairSNAPComputeUi> policy_ui(n_teams_div, team_size, vector_length);
|
||||
SnapAoSoATeamPolicy<DeviceType, team_size_compute_ui, TagPairSNAPComputeUi> policy_ui(n_teams_div, team_size_compute_ui, vector_length);
|
||||
policy_ui = policy_ui.set_scratch_size(0, Kokkos::PerTeam(scratch_size));
|
||||
|
||||
Kokkos::parallel_for("ComputeUi",policy_ui,*this);
|
||||
}
|
||||
|
||||
// un-"fold" ulisttot, zero ylist
|
||||
typename Kokkos::MDRangePolicy<DeviceType, Kokkos::IndexType<int>, Kokkos::Rank<3, Kokkos::Iterate::Left, Kokkos::Iterate::Left>, TagPairSNAPTransformUi> policy_transform_ui({0,0,0},{vector_length,snaKK.idxu_max,(chunk_size + vector_length - 1) / vector_length},{vector_length,4,1});
|
||||
//TransformUi: un-"fold" ulisttot, zero ylist
|
||||
{
|
||||
// team_size_transform_ui is defined in `pair_snap_kokkos.h`
|
||||
Snap3DRangePolicy<DeviceType, tile_size_transform_ui, TagPairSNAPTransformUi>
|
||||
policy_transform_ui({0,0,0},{vector_length,snaKK.idxu_max,chunk_size_div},{vector_length,tile_size_transform_ui,1});
|
||||
Kokkos::parallel_for("TransformUi",policy_transform_ui,*this);
|
||||
|
||||
}
|
||||
|
||||
//Compute bispectrum in AoSoA data layout, transform Bi
|
||||
if (quadraticflag || eflag) {
|
||||
// team_size_[compute_zi, compute_bi, transform_bi] are defined in `pair_snap_kokkos.h`
|
||||
|
||||
//ComputeZi
|
||||
int idxz_max = snaKK.idxz_max;
|
||||
typename Kokkos::MDRangePolicy<DeviceType, Kokkos::IndexType<int>, Kokkos::Rank<3, Kokkos::Iterate::Left, Kokkos::Iterate::Left>, TagPairSNAPComputeZi> policy_compute_zi({0,0,0},{vector_length,idxz_max,(chunk_size + vector_length - 1) / vector_length},{vector_length,4,1});
|
||||
const int idxz_max = snaKK.idxz_max;
|
||||
Snap3DRangePolicy<DeviceType, tile_size_compute_zi, TagPairSNAPComputeZi>
|
||||
policy_compute_zi({0,0,0},{vector_length,idxz_max,chunk_size_div},{vector_length,tile_size_compute_zi,1});
|
||||
Kokkos::parallel_for("ComputeZi",policy_compute_zi,*this);
|
||||
|
||||
//ComputeBi
|
||||
int idxb_max = snaKK.idxb_max;
|
||||
typename Kokkos::MDRangePolicy<DeviceType, Kokkos::IndexType<int>, Kokkos::Rank<3, Kokkos::Iterate::Left, Kokkos::Iterate::Left>, TagPairSNAPComputeBi> policy_compute_bi({0,0,0},{vector_length,idxb_max,(chunk_size + vector_length - 1) / vector_length},{vector_length,4,1});
|
||||
const int idxb_max = snaKK.idxb_max;
|
||||
Snap3DRangePolicy<DeviceType, tile_size_compute_bi, TagPairSNAPComputeBi>
|
||||
policy_compute_bi({0,0,0},{vector_length,idxb_max,chunk_size_div},{vector_length,tile_size_compute_bi,1});
|
||||
Kokkos::parallel_for("ComputeBi",policy_compute_bi,*this);
|
||||
|
||||
//Transform data layout of blist out of AoSoA
|
||||
//We need this b/c `blist` gets used in ComputeForce which doesn't
|
||||
//take advantage of AoSoA (which at best would only be beneficial
|
||||
//on the margins)
|
||||
typename Kokkos::MDRangePolicy<DeviceType, Kokkos::IndexType<int>, Kokkos::Rank<3, Kokkos::Iterate::Left, Kokkos::Iterate::Left>, TagPairSNAPTransformBi> policy_transform_bi({0,0,0},{vector_length,idxb_max,(chunk_size + vector_length - 1) / vector_length},{vector_length,4,1});
|
||||
//We need this because `blist` gets used in ComputeForce which doesn't
|
||||
//take advantage of AoSoA, which at best would only be beneficial on the margins
|
||||
Snap3DRangePolicy<DeviceType, tile_size_transform_bi, TagPairSNAPTransformBi>
|
||||
policy_transform_bi({0,0,0},{vector_length,idxb_max,chunk_size_div},{vector_length,tile_size_transform_bi,1});
|
||||
Kokkos::parallel_for("TransformBi",policy_transform_bi,*this);
|
||||
}
|
||||
|
||||
//ComputeYi in AoSoA data layout, transform to AoS for ComputeFusedDeidrj
|
||||
//Note zeroing `ylist` is fused into `TransformUi`.
|
||||
{
|
||||
//Compute beta = dE_i/dB_i for all i in list
|
||||
@ -383,41 +375,40 @@ void PairSNAPKokkos<DeviceType, real_type, vector_length>::compute(int eflag_in,
|
||||
Kokkos::parallel_for("ComputeBeta",policy_beta,*this);
|
||||
|
||||
//ComputeYi
|
||||
// team_size_compute_yi is defined in `pair_snap_kokkos.h`
|
||||
const int idxz_max = snaKK.idxz_max;
|
||||
typename Kokkos::MDRangePolicy<DeviceType, Kokkos::IndexType<int>, Kokkos::Rank<3, Kokkos::Iterate::Left, Kokkos::Iterate::Left>, TagPairSNAPComputeYi> policy_compute_yi({0,0,0},{vector_length,idxz_max,(chunk_size + vector_length - 1) / vector_length},{vector_length,4,1});
|
||||
Snap3DRangePolicy<DeviceType, tile_size_compute_yi, TagPairSNAPComputeYi>
|
||||
policy_compute_yi({0,0,0},{vector_length,idxz_max,chunk_size_div},{vector_length,tile_size_compute_yi,1});
|
||||
Kokkos::parallel_for("ComputeYi",policy_compute_yi,*this);
|
||||
|
||||
}
|
||||
|
||||
// Fused ComputeDuidrj, ComputeDeidrj
|
||||
{
|
||||
// new AoSoA form
|
||||
|
||||
// team_size_compute_fused_deidrj is defined in `pair_snap_kokkos.h`
|
||||
constexpr int team_size = team_size_compute_fused_deidrj;
|
||||
|
||||
// scratch size: 32 atoms * (twojmax+1) cached values * 2 for u, du, no double buffer
|
||||
const int tile_size = vector_length * (twojmax + 1);
|
||||
typedef Kokkos::View< complex*,
|
||||
Kokkos::DefaultExecutionSpace::scratch_memory_space,
|
||||
Kokkos::MemoryTraits<Kokkos::Unmanaged> >
|
||||
ScratchViewType;
|
||||
int scratch_size = ScratchViewType::shmem_size(2 * team_size * tile_size);
|
||||
const int scratch_size = scratch_size_helper<complex>(2 * team_size_compute_fused_deidrj * tile_size);
|
||||
|
||||
// total number of teams needed
|
||||
int chunk_size_div = (chunk_size + vector_length - 1) / vector_length;
|
||||
// total number of teams needed: (natoms / 32) * (max_neighs) * ("bend" locations)
|
||||
const int n_teams = chunk_size_div * max_neighs * (twojmax + 1);
|
||||
const int n_teams_div = (n_teams + team_size_compute_fused_deidrj - 1) / team_size_compute_fused_deidrj;
|
||||
|
||||
// (natoms / 32) * (max_neighs) * ("bend" locations)
|
||||
int n_teams = chunk_size_div * max_neighs * (twojmax + 1);
|
||||
int n_teams_div = (n_teams + team_size - 1) / team_size;
|
||||
// x direction
|
||||
SnapAoSoATeamPolicy<DeviceType, team_size_compute_fused_deidrj, TagPairSNAPComputeFusedDeidrj<0> > policy_fused_deidrj_x(n_teams_div,team_size_compute_fused_deidrj,vector_length);
|
||||
policy_fused_deidrj_x = policy_fused_deidrj_x.set_scratch_size(0, Kokkos::PerTeam(scratch_size));
|
||||
Kokkos::parallel_for("ComputeFusedDeidrj<0>",policy_fused_deidrj_x,*this);
|
||||
|
||||
typename Kokkos::TeamPolicy<DeviceType,TagPairSNAPComputeFusedDeidrj> policy_fused_deidrj(n_teams_div,team_size,vector_length);
|
||||
policy_fused_deidrj = policy_fused_deidrj.set_scratch_size(0, Kokkos::PerTeam(scratch_size));
|
||||
// y direction
|
||||
SnapAoSoATeamPolicy<DeviceType, team_size_compute_fused_deidrj, TagPairSNAPComputeFusedDeidrj<1> > policy_fused_deidrj_y(n_teams_div,team_size_compute_fused_deidrj,vector_length);
|
||||
policy_fused_deidrj_y = policy_fused_deidrj_y.set_scratch_size(0, Kokkos::PerTeam(scratch_size));
|
||||
Kokkos::parallel_for("ComputeFusedDeidrj<1>",policy_fused_deidrj_y,*this);
|
||||
|
||||
for (int k = 0; k < 3; k++) {
|
||||
snaKK.set_dir(k);
|
||||
Kokkos::parallel_for("ComputeFusedDeidrj",policy_fused_deidrj,*this);
|
||||
}
|
||||
// z direction
|
||||
SnapAoSoATeamPolicy<DeviceType, team_size_compute_fused_deidrj, TagPairSNAPComputeFusedDeidrj<2> > policy_fused_deidrj_z(n_teams_div,team_size_compute_fused_deidrj,vector_length);
|
||||
policy_fused_deidrj_z = policy_fused_deidrj_z.set_scratch_size(0, Kokkos::PerTeam(scratch_size));
|
||||
Kokkos::parallel_for("ComputeFusedDeidrj<2>",policy_fused_deidrj_z,*this);
|
||||
|
||||
}
|
||||
|
||||
@ -853,8 +844,9 @@ void PairSNAPKokkos<DeviceType, real_type, vector_length>::operator() (TagPairSN
|
||||
}
|
||||
|
||||
template<class DeviceType, typename real_type, int vector_length>
|
||||
template<int dir>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void PairSNAPKokkos<DeviceType, real_type, vector_length>::operator() (TagPairSNAPComputeFusedDeidrj,const typename Kokkos::TeamPolicy<DeviceType,TagPairSNAPComputeFusedDeidrj>::member_type& team) const {
|
||||
void PairSNAPKokkos<DeviceType, real_type, vector_length>::operator() (TagPairSNAPComputeFusedDeidrj<dir>,const typename Kokkos::TeamPolicy<DeviceType,TagPairSNAPComputeFusedDeidrj<dir> >::member_type& team) const {
|
||||
SNAKokkos<DeviceType, real_type, vector_length> my_sna = snaKK;
|
||||
|
||||
// extract flattened atom_div / neighbor number / bend location
|
||||
@ -874,7 +866,7 @@ void PairSNAPKokkos<DeviceType, real_type, vector_length>::operator() (TagPairSN
|
||||
const int ninside = d_ninside(ii);
|
||||
if (jj >= ninside) return;
|
||||
|
||||
my_sna.compute_fused_deidrj(team, iatom_mod, jbend, jj, iatom_div);
|
||||
my_sna.template compute_fused_deidrj<dir>(team, iatom_mod, jbend, jj, iatom_div);
|
||||
|
||||
});
|
||||
|
||||
@ -1338,6 +1330,15 @@ void PairSNAPKokkos<DeviceType, real_type, vector_length>::check_team_size_reduc
|
||||
team_size = team_size_max/vector_length;
|
||||
}
|
||||
|
||||
template<class DeviceType, typename real_type, int vector_length>
|
||||
template<typename scratch_type>
|
||||
int PairSNAPKokkos<DeviceType, real_type, vector_length>::scratch_size_helper(int values_per_team) {
|
||||
typedef Kokkos::View<scratch_type*, Kokkos::DefaultExecutionSpace::scratch_memory_space, Kokkos::MemoryTraits<Kokkos::Unmanaged> > ScratchViewType;
|
||||
|
||||
return ScratchViewType::shmem_size(values_per_team);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
routines used by template reference classes
|
||||
|
||||
@ -141,6 +141,7 @@ inline
|
||||
void compute_bi_cpu(const typename Kokkos::TeamPolicy<DeviceType>::member_type& team, int); // ForceSNAP
|
||||
|
||||
// functions for derivatives, GPU only
|
||||
template<int dir>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void compute_fused_deidrj(const typename Kokkos::TeamPolicy<DeviceType>::member_type& team, const int, const int, const int, const int); //ForceSNAP
|
||||
|
||||
@ -164,10 +165,6 @@ inline
|
||||
static KOKKOS_FORCEINLINE_FUNCTION
|
||||
void sincos_wrapper(float x, float* sin_, float *cos_) { sincosf(x, sin_, cos_); }
|
||||
|
||||
// Set the direction for split ComputeDuidrj
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void set_dir(int);
|
||||
|
||||
#ifdef TIMING_INFO
|
||||
double* timers;
|
||||
timespec starttime, endtime;
|
||||
@ -298,9 +295,6 @@ inline
|
||||
|
||||
int bzero_flag; // 1 if bzero subtracted from barray
|
||||
Kokkos::View<real_type*, DeviceType> bzero; // array of B values for isolated atoms
|
||||
|
||||
// for per-direction dulist calculation, specify the direction.
|
||||
int dir;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -886,6 +886,7 @@ void SNAKokkos<DeviceType, real_type, vector_length>::compute_yi(int iatom_mod,
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
template<class DeviceType, typename real_type, int vector_length>
|
||||
template<int dir>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void SNAKokkos<DeviceType, real_type, vector_length>::compute_fused_deidrj(const typename Kokkos::TeamPolicy<DeviceType>::member_type& team, const int iatom_mod, const int j_bend, const int jnbor, const int iatom_div)
|
||||
{
|
||||
@ -2160,15 +2161,6 @@ void SNAKokkos<DeviceType, real_type, vector_length>::compute_s_dsfac(const real
|
||||
} else { sfac = zero; dsfac = zero; }
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
// set direction of batched Duidrj
|
||||
template<class DeviceType, typename real_type, int vector_length>
|
||||
KOKKOS_FORCEINLINE_FUNCTION
|
||||
void SNAKokkos<DeviceType, real_type, vector_length>::set_dir(int dir_) {
|
||||
dir = dir_;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
memory usage of arrays
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
@ -537,7 +537,6 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) :
|
||||
nmax = 0;
|
||||
partner = finalpartner = nullptr;
|
||||
distsq = nullptr;
|
||||
probability = nullptr;
|
||||
maxattempt = 0;
|
||||
attempt = nullptr;
|
||||
nattempt = nullptr;
|
||||
@ -585,7 +584,6 @@ FixBondReact::~FixBondReact()
|
||||
memory->destroy(finalpartner);
|
||||
memory->destroy(nattempt);
|
||||
memory->destroy(distsq);
|
||||
memory->destroy(probability);
|
||||
memory->destroy(attempt);
|
||||
memory->destroy(edge);
|
||||
memory->destroy(equivalences);
|
||||
@ -870,6 +868,9 @@ void FixBondReact::post_integrate()
|
||||
ghostly_rxn_count[i] = 0;
|
||||
nlocalskips[i] = 0;
|
||||
nghostlyskips[i] = 0;
|
||||
// update reaction probability
|
||||
if (var_flag[PROB][i])
|
||||
fraction[i] = input->variable->compute_equal(var_id[PROB][i]);
|
||||
}
|
||||
|
||||
if (nevery_check) {
|
||||
@ -890,16 +891,14 @@ void FixBondReact::post_integrate()
|
||||
memory->destroy(finalpartner);
|
||||
memory->destroy(distsq);
|
||||
memory->destroy(nattempt);
|
||||
memory->destroy(probability);
|
||||
nmax = atom->nmax;
|
||||
memory->create(partner,nmax,"bond/react:partner");
|
||||
memory->create(finalpartner,nmax,"bond/react:finalpartner");
|
||||
memory->create(distsq,nmax,2,"bond/react:distsq");
|
||||
memory->create(nattempt,nreacts,"bond/react:nattempt");
|
||||
memory->create(probability,nmax,"bond/react:probability");
|
||||
}
|
||||
|
||||
// reset create counts
|
||||
// reset 'attempt' counts
|
||||
for (int i = 0; i < nreacts; i++) {
|
||||
nattempt[i] = 0;
|
||||
}
|
||||
@ -962,25 +961,14 @@ void FixBondReact::post_integrate()
|
||||
comm->reverse_comm_fix(this);
|
||||
}
|
||||
|
||||
// update reaction probability
|
||||
if (var_flag[PROB][rxnID])
|
||||
fraction[rxnID] = input->variable->compute_equal(var_id[PROB][rxnID]);
|
||||
|
||||
// each atom now knows its winning partner
|
||||
// for prob check, generate random value for each atom with a bond partner
|
||||
// forward comm of partner and random value, so ghosts have it
|
||||
|
||||
if (fraction[rxnID] < 1.0) {
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (partner[i]) probability[i] = random[rxnID]->uniform();
|
||||
}
|
||||
// forward comm of partner, so ghosts have it
|
||||
|
||||
commflag = 2;
|
||||
comm->forward_comm_fix(this,2);
|
||||
|
||||
// consider for reaction:
|
||||
// only if both atoms list each other as winning bond partner
|
||||
// and probability constraint is satisfied
|
||||
// if other atom is owned by another proc, it should do same thing
|
||||
|
||||
int temp_nattempt = 0;
|
||||
@ -994,16 +982,6 @@ void FixBondReact::post_integrate()
|
||||
continue;
|
||||
}
|
||||
|
||||
// apply probability constraint using RN for atom with smallest ID
|
||||
|
||||
if (fraction[rxnID] < 1.0) {
|
||||
if (tag[i] < tag[j]) {
|
||||
if (probability[i] >= fraction[rxnID]) continue;
|
||||
} else {
|
||||
if (probability[j] >= fraction[rxnID]) continue;
|
||||
}
|
||||
}
|
||||
|
||||
// store final bond partners and count the rxn possibility once
|
||||
|
||||
finalpartner[i] = tag[j];
|
||||
@ -1345,10 +1323,14 @@ void FixBondReact::superimpose_algorithm()
|
||||
(nxspecial[local_atom1][0] == 0 ||
|
||||
xspecial[local_atom1][0] == atom->tag[local_atom2]) &&
|
||||
check_constraints()) {
|
||||
if (fraction[rxnID] < 1.0 &&
|
||||
random[rxnID]->uniform() >= fraction[rxnID]) {
|
||||
status = REJECT;
|
||||
} else {
|
||||
status = ACCEPT;
|
||||
glove_ghostcheck();
|
||||
} else
|
||||
status = REJECT;
|
||||
}
|
||||
} else status = REJECT;
|
||||
}
|
||||
|
||||
avail_guesses = 0;
|
||||
@ -1385,9 +1367,12 @@ void FixBondReact::superimpose_algorithm()
|
||||
}
|
||||
}
|
||||
|
||||
if (status == ACCEPT && check_constraints()) { // reaction site found successfully!
|
||||
glove_ghostcheck();
|
||||
}
|
||||
// reaction site found successfully!
|
||||
if (status == ACCEPT)
|
||||
if (fraction[rxnID] < 1.0 &&
|
||||
random[rxnID]->uniform() >= fraction[rxnID]) status = REJECT;
|
||||
else glove_ghostcheck();
|
||||
|
||||
hang_catch++;
|
||||
// let's go ahead and catch the simplest of hangs
|
||||
//if (hang_catch > onemol->natoms*4)
|
||||
@ -1627,8 +1612,8 @@ void FixBondReact::check_a_neighbor()
|
||||
|
||||
glove_counter++;
|
||||
if (glove_counter == onemol->natoms) {
|
||||
status = ACCEPT;
|
||||
ring_check();
|
||||
if (ring_check() && check_constraints()) status = ACCEPT;
|
||||
else status = GUESSFAIL;
|
||||
return;
|
||||
}
|
||||
// status should still == PROCEED
|
||||
@ -1679,8 +1664,8 @@ void FixBondReact::check_a_neighbor()
|
||||
|
||||
glove_counter++;
|
||||
if (glove_counter == onemol->natoms) {
|
||||
status = ACCEPT;
|
||||
ring_check();
|
||||
if (ring_check() && check_constraints()) status = ACCEPT;
|
||||
else status = GUESSFAIL;
|
||||
return;
|
||||
// will never complete here when there are edge atoms
|
||||
// ...actually that could be wrong if people get creative...shouldn't affect anything
|
||||
@ -1791,8 +1776,8 @@ void FixBondReact::inner_crosscheck_loop()
|
||||
}
|
||||
glove_counter++;
|
||||
if (glove_counter == onemol->natoms) {
|
||||
status = ACCEPT;
|
||||
ring_check();
|
||||
if (ring_check() && check_constraints()) status = ACCEPT;
|
||||
else status = GUESSFAIL;
|
||||
return;
|
||||
}
|
||||
status = CONTINUE;
|
||||
@ -1803,21 +1788,17 @@ void FixBondReact::inner_crosscheck_loop()
|
||||
Necessary for certain ringed structures
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void FixBondReact::ring_check()
|
||||
int FixBondReact::ring_check()
|
||||
{
|
||||
// ring_check can be made more efficient by re-introducing 'frozen' atoms
|
||||
// 'frozen' atoms have been assigned and also are no longer pioneers
|
||||
|
||||
// double check the number of neighbors match for all non-edge atoms
|
||||
// otherwise, atoms at 'end' of symmetric ring can behave like edge atoms
|
||||
for (int i = 0; i < onemol->natoms; i++) {
|
||||
if (edge[i][rxnID] == 0) {
|
||||
if (onemol_nxspecial[i][0] != nxspecial[atom->map(glove[i][1])][0]) {
|
||||
status = GUESSFAIL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < onemol->natoms; i++)
|
||||
if (edge[i][rxnID] == 0 &&
|
||||
onemol_nxspecial[i][0] != nxspecial[atom->map(glove[i][1])][0])
|
||||
return 0;
|
||||
|
||||
for (int i = 0; i < onemol->natoms; i++) {
|
||||
for (int j = 0; j < onemol_nxspecial[i][0]; j++) {
|
||||
@ -1829,12 +1810,10 @@ void FixBondReact::ring_check()
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ring_fail == 1) {
|
||||
status = GUESSFAIL;
|
||||
return;
|
||||
}
|
||||
if (ring_fail == 1) return 0;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -3952,20 +3931,10 @@ int FixBondReact::pack_forward_comm(int n, int *list, double *buf,
|
||||
|
||||
m = 0;
|
||||
|
||||
if (commflag == 1) {
|
||||
for (i = 0; i < n; i++) {
|
||||
j = list[i];
|
||||
printf("hello you shouldn't be here\n");
|
||||
//buf[m++] = ubuf(bondcount[j]).d;
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
||||
if (commflag == 2) {
|
||||
for (i = 0; i < n; i++) {
|
||||
j = list[i];
|
||||
buf[m++] = ubuf(partner[j]).d;
|
||||
buf[m++] = probability[j];
|
||||
}
|
||||
return m;
|
||||
}
|
||||
@ -3991,15 +3960,9 @@ void FixBondReact::unpack_forward_comm(int n, int first, double *buf)
|
||||
m = 0;
|
||||
last = first + n;
|
||||
|
||||
if (commflag == 1) {
|
||||
if (commflag == 2) {
|
||||
for (i = first; i < last; i++)
|
||||
printf("hello you shouldn't be here\n");
|
||||
// bondcount[i] = (int) ubuf(buf[m++]).i;
|
||||
} else if (commflag == 2) {
|
||||
for (i = first; i < last; i++) {
|
||||
partner[i] = (tagint) ubuf(buf[m++]).i;
|
||||
probability[i] = buf[m++];
|
||||
}
|
||||
} else {
|
||||
m = 0;
|
||||
last = first + n;
|
||||
@ -4040,7 +4003,6 @@ void FixBondReact::unpack_reverse_comm(int n, int *list, double *buf)
|
||||
|
||||
m = 0;
|
||||
|
||||
if (commflag != 1) {
|
||||
for (i = 0; i < n; i++) {
|
||||
j = list[i];
|
||||
if (closeneigh[rxnID] != 0) {
|
||||
@ -4055,7 +4017,6 @@ void FixBondReact::unpack_reverse_comm(int n, int *list, double *buf)
|
||||
} else m += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -86,7 +86,7 @@ class FixBondReact : public Fix {
|
||||
int nmax; // max num local atoms
|
||||
int max_natoms; // max natoms in a molecule template
|
||||
tagint *partner,*finalpartner;
|
||||
double **distsq,*probability;
|
||||
double **distsq;
|
||||
int *nattempt;
|
||||
int maxattempt;
|
||||
int allnattempt;
|
||||
@ -171,7 +171,7 @@ class FixBondReact : public Fix {
|
||||
void check_a_neighbor();
|
||||
void crosscheck_the_neighbor();
|
||||
void inner_crosscheck_loop();
|
||||
void ring_check();
|
||||
int ring_check();
|
||||
int check_constraints();
|
||||
void get_IDcoords(int, int, double *);
|
||||
double get_temperature(tagint **, int, int);
|
||||
|
||||
@ -1752,7 +1752,7 @@ void Atom::set_mass(const char *file, int line, int /*narg*/, char **arg)
|
||||
if (lo < 1 || hi > ntypes) error->all(file,line,"Invalid type for mass set");
|
||||
|
||||
for (int itype = lo; itype <= hi; itype++) {
|
||||
mass[itype] = atof(arg[1]);
|
||||
mass[itype] = utils::numeric(FLERR,arg[1],false,lmp);
|
||||
mass_setflag[itype] = 1;
|
||||
|
||||
if (mass[itype] <= 0.0) error->all(file,line,"Invalid mass value");
|
||||
|
||||
@ -118,7 +118,7 @@ void CiteMe::flush()
|
||||
if (!citefile.empty())
|
||||
logbuffer += fmt::format(cite_file,"file",citefile);
|
||||
if (screen_flag == VERBOSE)
|
||||
scrbuffer += fmt::format(cite_file,"screen","output");
|
||||
logbuffer += fmt::format(cite_file,"screen","output");
|
||||
logbuffer += cite_separator;
|
||||
if (logfile) fputs(logbuffer.c_str(),logfile);
|
||||
logbuffer.clear();
|
||||
|
||||
@ -148,8 +148,8 @@ ComputeReduce::ComputeReduce(LAMMPS *lmp, int narg, char **arg) :
|
||||
if (iarg+3 > narg) error->all(FLERR,"Illegal compute reduce command");
|
||||
if (mode != MINN && mode != MAXX)
|
||||
error->all(FLERR,"Compute reduce replace requires min or max mode");
|
||||
int col1 = atoi(arg[iarg+1]) - 1;
|
||||
int col2 = atoi(arg[iarg+2]) - 1;
|
||||
int col1 = utils::inumeric(FLERR,arg[iarg+1],false,lmp) - 1;
|
||||
int col2 = utils::inumeric(FLERR,arg[iarg+2],false,lmp) - 1;
|
||||
if (col1 < 0 || col1 >= nvalues || col2 < 0 || col2 >= nvalues)
|
||||
error->all(FLERR,"Illegal compute reduce command");
|
||||
if (col1 == col2) error->all(FLERR,"Illegal compute reduce command");
|
||||
|
||||
@ -36,6 +36,9 @@ void Deprecated::command(int /* narg */, char ** /* arg */)
|
||||
} else if (cmd == "reset_ids") {
|
||||
if (lmp->comm->me == 0)
|
||||
utils::logmesg(lmp,"\n'reset_ids' has been renamed to 'reset_atom_ids'\n\n");
|
||||
} else if (utils::strmatch(cmd,"^kim_")) {
|
||||
if (lmp->comm->me == 0)
|
||||
utils::logmesg(lmp,"\n'kim_<command>' has been renamed to 'kim <command>'\n\n");
|
||||
}
|
||||
error->all(FLERR,"This command is no longer available");
|
||||
}
|
||||
|
||||
@ -15,6 +15,11 @@
|
||||
|
||||
CommandStyle(DEPRECATED,Deprecated)
|
||||
CommandStyle(reset_ids,Deprecated)
|
||||
CommandStyle(kim_init,Deprecated)
|
||||
CommandStyle(kim_interactions,Deprecated)
|
||||
CommandStyle(kim_param,Deprecated)
|
||||
CommandStyle(kim_property,Deprecated)
|
||||
CommandStyle(kim_query,Deprecated)
|
||||
|
||||
#else
|
||||
|
||||
|
||||
@ -83,7 +83,7 @@ FixAddForce::FixAddForce(LAMMPS *lmp, int narg, char **arg) :
|
||||
while (iarg < narg) {
|
||||
if (strcmp(arg[iarg],"every") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal fix addforce command");
|
||||
nevery = atoi(arg[iarg+1]);
|
||||
nevery = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
|
||||
if (nevery <= 0) error->all(FLERR,"Illegal fix addforce command");
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"region") == 0) {
|
||||
|
||||
@ -254,13 +254,19 @@ void FixPropertyAtom::read_data_section(char *keyword, int n, char *buf,
|
||||
|
||||
if ((m = atom->map(itag)) >= 0) {
|
||||
for (j = 0; j < nvalue; j++) {
|
||||
if (style[j] == MOLECULE) atom->molecule[m] = ATOTAGINT(values[j+1]);
|
||||
else if (style[j] == CHARGE) atom->q[m] = atof(values[j+1]);
|
||||
else if (style[j] == RMASS) atom->rmass[m] = atof(values[j+1]);
|
||||
else if (style[j] == INTEGER)
|
||||
atom->ivector[index[j]][m] = atoi(values[j+1]);
|
||||
else if (style[j] == DOUBLE)
|
||||
atom->dvector[index[j]][m] = atof(values[j+1]);
|
||||
if (style[j] == MOLECULE) {
|
||||
atom->molecule[m] = utils::tnumeric(FLERR,values[j+1],false,lmp);
|
||||
} else if (style[j] == CHARGE) {
|
||||
atom->q[m] = utils::numeric(FLERR,values[j+1],false,lmp);
|
||||
} else if (style[j] == RMASS) {
|
||||
atom->rmass[m] = utils::numeric(FLERR,values[j+1],false,lmp);
|
||||
} else if (style[j] == INTEGER) {
|
||||
atom->ivector[index[j]][m] = utils::inumeric(FLERR,values[j+1],
|
||||
false,lmp);
|
||||
} else if (style[j] == DOUBLE) {
|
||||
atom->dvector[index[j]][m] = utils::numeric(FLERR,values[j+1],
|
||||
true,lmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -564,9 +564,9 @@ void KSpace::modify_params(int narg, char **arg)
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"kmax/ewald") == 0) {
|
||||
if (iarg+4 > narg) error->all(FLERR,"Illegal kspace_modify command");
|
||||
kx_ewald = atoi(arg[iarg+1]);
|
||||
ky_ewald = atoi(arg[iarg+2]);
|
||||
kz_ewald = atoi(arg[iarg+3]);
|
||||
kx_ewald = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
|
||||
ky_ewald = utils::inumeric(FLERR,arg[iarg+2],false,lmp);
|
||||
kz_ewald = utils::inumeric(FLERR,arg[iarg+3],false,lmp);
|
||||
if (kx_ewald < 0 || ky_ewald < 0 || kz_ewald < 0)
|
||||
error->all(FLERR,"Bad kspace_modify kmax/ewald parameter");
|
||||
if (kx_ewald > 0 && ky_ewald > 0 && kz_ewald > 0)
|
||||
@ -583,15 +583,15 @@ void KSpace::modify_params(int narg, char **arg)
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"force/disp/real") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal kspace_modify command");
|
||||
accuracy_real_6 = atof(arg[iarg+1]);
|
||||
accuracy_real_6 = utils::numeric(FLERR,arg[iarg+1],false,lmp);
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"force/disp/kspace") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal kspace_modify command");
|
||||
accuracy_kspace_6 = atof(arg[iarg+1]);
|
||||
accuracy_kspace_6 = utils::numeric(FLERR,arg[iarg+1],false,lmp);
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"eigtol") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal kspace_modify command");
|
||||
splittol = atof(arg[iarg+1]);
|
||||
splittol = utils::numeric(FLERR,arg[iarg+1],false,lmp);
|
||||
if (splittol >= 1.0)
|
||||
error->all(FLERR,"Kspace_modify eigtol must be smaller than one");
|
||||
iarg += 2;
|
||||
|
||||
@ -38,7 +38,6 @@ const bool have_openmpi = false;
|
||||
using LAMMPS_NS::utils::split_words;
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
using ::testing::ExitedWithCode;
|
||||
using ::testing::MatchesRegex;
|
||||
using ::testing::StrEq;
|
||||
|
||||
@ -79,31 +78,51 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(KimCommandsTest, kim)
|
||||
{
|
||||
if (!LAMMPS::is_installed_pkg("KIM")) GTEST_SKIP();
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal kim command.*",
|
||||
lmp->input->one("kim"););
|
||||
TEST_FAILURE(".*ERROR: Unknown kim subcommand.*",
|
||||
lmp->input->one("kim unknown"););
|
||||
TEST_FAILURE(".*kim_init.*has been renamed to.*",
|
||||
lmp->input->one("kim_init"););
|
||||
TEST_FAILURE(".*kim_interactions.*has been renamed to.*",
|
||||
lmp->input->one("kim_interactions"););
|
||||
TEST_FAILURE(".*kim_param.*has been renamed to.*",
|
||||
lmp->input->one("kim_param"););
|
||||
TEST_FAILURE(".*kim_property.*has been renamed to.*",
|
||||
lmp->input->one("kim_property"););
|
||||
TEST_FAILURE(".*kim_query.*has been renamed to.*",
|
||||
lmp->input->one("kim_query"););
|
||||
}
|
||||
|
||||
TEST_F(KimCommandsTest, kim_init)
|
||||
{
|
||||
if (!LAMMPS::is_installed_pkg("KIM")) GTEST_SKIP();
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal kim_init command.*",
|
||||
lmp->input->one("kim_init"););
|
||||
TEST_FAILURE(".*ERROR: Illegal kim_init command.*",
|
||||
lmp->input->one("kim_init LennardJones_Ar real si"););
|
||||
TEST_FAILURE(".*ERROR: Illegal 'kim init' command.*",
|
||||
lmp->input->one("kim init"););
|
||||
TEST_FAILURE(".*ERROR: Illegal 'kim init' command.*",
|
||||
lmp->input->one("kim init LennardJones_Ar real si"););
|
||||
TEST_FAILURE(".*ERROR: LAMMPS unit_style lj not supported by KIM models.*",
|
||||
lmp->input->one("kim_init LennardJones_Ar lj"););
|
||||
lmp->input->one("kim init LennardJones_Ar lj"););
|
||||
TEST_FAILURE(".*ERROR: LAMMPS unit_style micro not supported by KIM models.*",
|
||||
lmp->input->one("kim_init LennardJones_Ar micro"););
|
||||
lmp->input->one("kim init LennardJones_Ar micro"););
|
||||
TEST_FAILURE(".*ERROR: LAMMPS unit_style nano not supported by KIM models.*",
|
||||
lmp->input->one("kim_init LennardJones_Ar nano"););
|
||||
lmp->input->one("kim init LennardJones_Ar nano"););
|
||||
TEST_FAILURE(".*ERROR: Unknown unit_style.*",
|
||||
lmp->input->one("kim_init LennardJones_Ar new_style"););
|
||||
lmp->input->one("kim init LennardJones_Ar new_style"););
|
||||
TEST_FAILURE(".*ERROR: KIM Model name not found.*",
|
||||
lmp->input->one("kim_init Unknown_Model real"););
|
||||
lmp->input->one("kim init Unknown_Model real"););
|
||||
TEST_FAILURE(".*ERROR: Incompatible units for KIM Simulator Model, required units = metal.*",
|
||||
lmp->input->one("kim_init Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu real"););
|
||||
lmp->input->one("kim init Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu real"););
|
||||
// TEST_FAILURE(".*ERROR: KIM Model does not support the requested unit system.*",
|
||||
// lmp->input->one("kim_init ex_model_Ar_P_Morse real"););
|
||||
// lmp->input->one("kim init ex_model_Ar_P_Morse real"););
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("kim_init LennardJones_Ar real");
|
||||
lmp->input->one("kim init LennardJones_Ar real");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
int ifix = lmp->modify->find_fix("KIM_MODEL_STORE");
|
||||
@ -114,27 +133,27 @@ TEST_F(KimCommandsTest, kim_interactions)
|
||||
{
|
||||
if (!LAMMPS::is_installed_pkg("KIM")) GTEST_SKIP();
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal kim_interactions command.*",
|
||||
lmp->input->one("kim_interactions"););
|
||||
TEST_FAILURE(".*ERROR: Illegal 'kim interactions' command.*",
|
||||
lmp->input->one("kim interactions"););
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("kim_init LennardJones_Ar real");
|
||||
lmp->input->one("kim init LennardJones_Ar real");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
TEST_FAILURE(".*ERROR: Must use 'kim_interactions' command "
|
||||
TEST_FAILURE(".*ERROR: Must use 'kim interactions' command "
|
||||
"after simulation box is defined.*",
|
||||
lmp->input->one("kim_interactions Ar"););
|
||||
lmp->input->one("kim interactions Ar"););
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("kim_init LennardJones_Ar real");
|
||||
lmp->input->one("kim init LennardJones_Ar real");
|
||||
lmp->input->one("lattice fcc 4.4300");
|
||||
lmp->input->one("region box block 0 10 0 10 0 10");
|
||||
lmp->input->one("create_box 1 box");
|
||||
lmp->input->one("create_atoms 1 box");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal kim_interactions command.*",
|
||||
lmp->input->one("kim_interactions Ar Ar"););
|
||||
TEST_FAILURE(".*ERROR: Illegal 'kim interactions' command.*",
|
||||
lmp->input->one("kim interactions Ar Ar"););
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
@ -144,8 +163,8 @@ TEST_F(KimCommandsTest, kim_interactions)
|
||||
lmp->input->one("create_atoms 4 box");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal kim_interactions command.*",
|
||||
lmp->input->one("kim_interactions Ar Ar"););
|
||||
TEST_FAILURE(".*ERROR: Illegal 'kim interactions' command.*",
|
||||
lmp->input->one("kim interactions Ar Ar"););
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
@ -155,12 +174,12 @@ TEST_F(KimCommandsTest, kim_interactions)
|
||||
lmp->input->one("create_atoms 1 box");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
TEST_FAILURE(".*ERROR: Must use 'kim_init' before 'kim_interactions'.*",
|
||||
lmp->input->one("kim_interactions Ar"););
|
||||
TEST_FAILURE(".*ERROR: Must use 'kim init' before 'kim interactions'.*",
|
||||
lmp->input->one("kim interactions Ar"););
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
lmp->input->one("kim_init LennardJones_Ar real");
|
||||
lmp->input->one("kim init LennardJones_Ar real");
|
||||
lmp->input->one("lattice fcc 4.4300");
|
||||
lmp->input->one("region box block 0 10 0 10 0 10");
|
||||
lmp->input->one("create_box 1 box");
|
||||
@ -168,7 +187,7 @@ TEST_F(KimCommandsTest, kim_interactions)
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
TEST_FAILURE(".*ERROR: fixed_types cannot be used with a KIM Portable Model.*",
|
||||
lmp->input->one("kim_interactions fixed_types"););
|
||||
lmp->input->one("kim interactions fixed_types"););
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
@ -181,7 +200,7 @@ TEST_F(KimCommandsTest, kim_interactions)
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
lmp->input->one("kim_init Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu metal");
|
||||
lmp->input->one("kim init Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu metal");
|
||||
lmp->input->one("lattice fcc 4.920");
|
||||
lmp->input->one("region box block 0 10 0 10 0 10");
|
||||
lmp->input->one("create_box 1 box");
|
||||
@ -189,31 +208,31 @@ TEST_F(KimCommandsTest, kim_interactions)
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
TEST_FAILURE(".*ERROR: Species 'Ar' is not supported by this KIM Simulator Model.*",
|
||||
lmp->input->one("kim_interactions Ar"););
|
||||
lmp->input->one("kim interactions Ar"););
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
lmp->input->one("kim_init Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu metal");
|
||||
lmp->input->one("kim init Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu metal");
|
||||
lmp->input->one("lattice fcc 4.08");
|
||||
lmp->input->one("region box block 0 10 0 10 0 10");
|
||||
lmp->input->one("create_box 1 box");
|
||||
lmp->input->one("create_atoms 1 box");
|
||||
lmp->input->one("kim_interactions Au");
|
||||
lmp->input->one("kim interactions Au");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
// ASSERT_EQ(lmp->output->var_kim_periodic, 1);
|
||||
// TEST_FAILURE(".*ERROR: Incompatible units for KIM Simulator Model.*",
|
||||
// lmp->input->one("kim_interactions Au"););
|
||||
// lmp->input->one("kim interactions Au"););
|
||||
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
lmp->input->one("kim_init LennardJones_Ar real");
|
||||
lmp->input->one("kim init LennardJones_Ar real");
|
||||
lmp->input->one("lattice fcc 4.4300");
|
||||
lmp->input->one("region box block 0 10 0 10 0 10");
|
||||
lmp->input->one("create_box 1 box");
|
||||
lmp->input->one("create_atoms 1 box");
|
||||
lmp->input->one("kim_interactions Ar");
|
||||
lmp->input->one("kim interactions Ar");
|
||||
lmp->input->one("mass 1 39.95");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
@ -222,15 +241,15 @@ TEST_F(KimCommandsTest, kim_interactions)
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
lmp->input->one("kim_init LennardJones_Ar real");
|
||||
lmp->input->one("kim init LennardJones_Ar real");
|
||||
lmp->input->one("lattice fcc 4.4300");
|
||||
lmp->input->one("region box block 0 10 0 10 0 10");
|
||||
lmp->input->one("create_box 1 box");
|
||||
lmp->input->one("create_atoms 1 box");
|
||||
lmp->input->one("kim_interactions Ar");
|
||||
lmp->input->one("kim interactions Ar");
|
||||
lmp->input->one("mass 1 39.95");
|
||||
lmp->input->one("run 1");
|
||||
lmp->input->one("kim_interactions Ar");
|
||||
lmp->input->one("kim interactions Ar");
|
||||
lmp->input->one("run 1");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
}
|
||||
@ -239,94 +258,189 @@ TEST_F(KimCommandsTest, kim_param)
|
||||
{
|
||||
if (!LAMMPS::is_installed_pkg("KIM")) GTEST_SKIP();
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal kim_param command.*", lmp->input->one("kim_param"););
|
||||
TEST_FAILURE(".*ERROR: Incorrect arguments in kim_param command.\n"
|
||||
"'kim_param get/set' is mandatory.*",
|
||||
lmp->input->one("kim_param unknown shift 1 shift"););
|
||||
TEST_FAILURE(".*ERROR: Must use 'kim_init' before 'kim_param'.*",
|
||||
lmp->input->one("kim_param get shift 1 shift"););
|
||||
TEST_FAILURE(".*ERROR: Illegal 'kim param' command.*",
|
||||
lmp->input->one("kim param"););
|
||||
TEST_FAILURE(".*ERROR: Incorrect arguments in 'kim param' command.\n"
|
||||
"'kim param get/set' is mandatory.*",
|
||||
lmp->input->one("kim param unknown shift 1 shift"););
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
lmp->input->one("kim_init Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu metal");
|
||||
lmp->input->one("kim init Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu metal");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
TEST_FAILURE(".*ERROR: kim_param can only be used with a KIM Portable Model.*",
|
||||
lmp->input->one("kim_param get shift 1 shift"););
|
||||
TEST_FAILURE(".*ERROR: 'kim param' can only be used with a KIM Portable Model.*",
|
||||
lmp->input->one("kim param get shift 1 shift"););
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
lmp->input->one("kim_init LennardJones612_UniversalShifted__MO_959249795837_003 real");
|
||||
lmp->input->one("kim init LennardJones612_UniversalShifted__MO_959249795837_003 real");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal index '0' for "
|
||||
"'shift' parameter with the extent of '1'.*",
|
||||
lmp->input->one("kim_param get shift 0 shift"););
|
||||
TEST_FAILURE(".*ERROR: Illegal index '2' for "
|
||||
"'shift' parameter with the extent of '1'.*",
|
||||
lmp->input->one("kim_param get shift 2 shift"););
|
||||
TEST_FAILURE(".*ERROR: Illegal index_range.\nExpected integer "
|
||||
"parameter\\(s\\) instead of '1.' in index_range.*",
|
||||
lmp->input->one("kim_param get shift 1. shift"););
|
||||
TEST_FAILURE(".*ERROR: Illegal index_range '1-2' for 'shift' "
|
||||
"parameter with the extent of '1'.*",
|
||||
lmp->input->one("kim_param get shift 1:2 shift"););
|
||||
TEST_FAILURE(".*ERROR: Illegal index_range.\nExpected integer "
|
||||
"parameter\\(s\\) instead of '1-2' in index_range.*",
|
||||
lmp->input->one("kim_param get shift 1-2 shift"););
|
||||
TEST_FAILURE(".*ERROR: Wrong number of arguments in 'kim_param "
|
||||
"get' command.\nThe LAMMPS '3' variable names or "
|
||||
"'s1 split' is mandatory.*",
|
||||
lmp->input->one("kim_param get sigmas 1:3 s1 s2"););
|
||||
TEST_FAILURE(".*ERROR: Wrong argument in kim_param get command.\nThis "
|
||||
"Model does not have the requested 'unknown' parameter.*",
|
||||
lmp->input->one("kim_param get unknown 1 unknown"););
|
||||
TEST_FAILURE(".*ERROR: Wrong 'kim_param set' command.\n"
|
||||
"To set the new parameter values, pair style must "
|
||||
"be assigned.\nMust use 'kim_interactions' or"
|
||||
"'pair_style kim' before 'kim_param set'.*",
|
||||
lmp->input->one("kim_param set shift 1 2"););
|
||||
TEST_FAILURE(".*ERROR: Illegal 'kim param get' command.\nTo get the new "
|
||||
"parameter values, pair style must be assigned.\nMust use 'kim"
|
||||
" interactions' or 'pair_style kim' before 'kim param get'.*",
|
||||
lmp->input->one("kim param get shift 1 shift"););
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("kim_param get shift 1 shift");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
ASSERT_FALSE(lmp->input->variable->find("shift") == -1);
|
||||
ASSERT_TRUE(std::string(lmp->input->variable->retrieve("shift")) == std::string("1"));
|
||||
TEST_FAILURE(".*ERROR: Illegal 'kim param set' command.\nTo set the new "
|
||||
"parameter values, pair style must be assigned.\nMust use 'kim"
|
||||
" interactions' or 'pair_style kim' before 'kim param set'.*",
|
||||
lmp->input->one("kim param set shift 1 2"););
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
lmp->input->one("kim_init LennardJones612_UniversalShifted__MO_959249795837_003 real");
|
||||
lmp->input->one("kim init LennardJones612_UniversalShifted__MO_959249795837_003 real");
|
||||
lmp->input->one("lattice fcc 4.4300");
|
||||
lmp->input->one("region box block 0 10 0 10 0 10");
|
||||
lmp->input->one("create_box 1 box");
|
||||
lmp->input->one("create_atoms 1 box");
|
||||
lmp->input->one("kim_interactions Ar");
|
||||
lmp->input->one("kim interactions Ar");
|
||||
lmp->input->one("mass 1 39.95");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal index '0' for "
|
||||
"'shift' parameter with the extent of '1'.*",
|
||||
lmp->input->one("kim param get shift 0 shift"););
|
||||
TEST_FAILURE(".*ERROR: Illegal index '2' for "
|
||||
"'shift' parameter with the extent of '1'.*",
|
||||
lmp->input->one("kim_param set shift 2 2"););
|
||||
lmp->input->one("kim param get shift 2 shift"););
|
||||
TEST_FAILURE(".*ERROR: Illegal index_range.\nExpected integer "
|
||||
"parameter\\(s\\) instead of '1.' in index_range.*",
|
||||
lmp->input->one("kim_param set shift 1. shift"););
|
||||
lmp->input->one("kim param get shift 1. shift"););
|
||||
TEST_FAILURE(".*ERROR: Illegal index_range '1-2' for 'shift' "
|
||||
"parameter with the extent of '1'.*",
|
||||
lmp->input->one("kim param get shift 1:2 shift"););
|
||||
TEST_FAILURE(".*ERROR: Illegal index_range.\nExpected integer "
|
||||
"parameter\\(s\\) instead of '1-2' in index_range.*",
|
||||
lmp->input->one("kim param get shift 1-2 shift"););
|
||||
TEST_FAILURE(".*ERROR: Wrong number of arguments in 'kim param "
|
||||
"get' command.\nThe LAMMPS '3' variable names or "
|
||||
"'s1 split' is mandatory.*",
|
||||
lmp->input->one("kim param get sigmas 1:3 s1 s2"););
|
||||
TEST_FAILURE(".*ERROR: Wrong argument in 'kim param get' command.\nThis "
|
||||
"Model does not have the requested 'unknown' parameter.*",
|
||||
lmp->input->one("kim param get unknown 1 unknown"););
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("kim param get shift 1 shift");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
ASSERT_FALSE(lmp->input->variable->find("shift") == -1);
|
||||
ASSERT_TRUE(std::string(lmp->input->variable->retrieve("shift")) == "1");
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal index '2' for "
|
||||
"'shift' parameter with the extent of '1'.*",
|
||||
lmp->input->one("kim param set shift 2 2"););
|
||||
TEST_FAILURE(".*ERROR: Illegal index_range.\nExpected integer "
|
||||
"parameter\\(s\\) instead of '1.' in index_range.*",
|
||||
lmp->input->one("kim param set shift 1. shift"););
|
||||
TEST_FAILURE(".*ERROR: Illegal index_range '1-2' for "
|
||||
"'shift' parameter with the extent of '1'.*",
|
||||
lmp->input->one("kim_param set shift 1:2 2"););
|
||||
lmp->input->one("kim param set shift 1:2 2"););
|
||||
TEST_FAILURE(".*ERROR: Wrong number of variable values for pair coefficients.*",
|
||||
lmp->input->one("kim_param set sigmas 1:3 0.5523570 0.4989030"););
|
||||
lmp->input->one("kim param set sigmas 1:3 0.5523570 0.4989030"););
|
||||
TEST_FAILURE(".*ERROR: Wrong argument for pair coefficients.\nThis "
|
||||
"Model does not have the requested '0.4989030' parameter.*",
|
||||
lmp->input->one("kim_param set sigmas 1:1 0.5523570 0.4989030"););
|
||||
lmp->input->one("kim param set sigmas 1:1 0.5523570 0.4989030"););
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("variable new_shift equal 2");
|
||||
lmp->input->one("kim_param set shift 1 ${new_shift}");
|
||||
lmp->input->one("kim_param get shift 1 shift");
|
||||
lmp->input->one("kim param set shift 1 ${new_shift}");
|
||||
lmp->input->one("kim param get shift 1 shift");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
ASSERT_TRUE(std::string(lmp->input->variable->retrieve("shift")) == std::string("2"));
|
||||
ASSERT_TRUE(std::string(lmp->input->variable->retrieve("shift")) == "2");
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal variable name in 'kim param get'.*",
|
||||
lmp->input->one("kim param get cutoffs 1:3 list"););
|
||||
TEST_FAILURE(".*ERROR: Illegal variable name in 'kim param get'.*",
|
||||
lmp->input->one("kim param get cutoffs 1:3 cutoffs_1 cutoffs_2 list"););
|
||||
TEST_FAILURE(".*ERROR: Illegal variable name in 'kim param get'.*",
|
||||
lmp->input->one("kim param get cutoffs 1:3 split"););
|
||||
TEST_FAILURE(".*ERROR: Illegal variable name in 'kim param get'.*",
|
||||
lmp->input->one("kim param get cutoffs 1:3 cutoffs_1 cutoffs_2 split"););
|
||||
TEST_FAILURE(".*ERROR: Illegal variable name in 'kim param get'.*",
|
||||
lmp->input->one("kim param get cutoffs 1:3 explicit"););
|
||||
TEST_FAILURE(".*ERROR: Illegal variable name in 'kim param get'.*",
|
||||
lmp->input->one("kim param get cutoffs 1:3 cutoffs_1 cutoffs_2 explicit"););
|
||||
TEST_FAILURE(".*ERROR: Wrong number of arguments in 'kim param get' "
|
||||
"command.\nThe LAMMPS '3' variable names or 'cutoffs "
|
||||
"split/list' is mandatory.*",
|
||||
lmp->input->one("kim param get cutoffs 1:3 cutoffs"););
|
||||
TEST_FAILURE(".*ERROR: Wrong number of arguments in 'kim param get' "
|
||||
"command.\nThe LAMMPS '3' variable names or 'cutoffs_1 "
|
||||
"split' is mandatory.*",
|
||||
lmp->input->one("kim param get cutoffs 1:3 cutoffs_1 cutoffs_2"););
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("kim param get cutoffs 1:3 cutoffs_1 cutoffs_2 cutoffs_3");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs_1")) == "2.20943");
|
||||
ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs_2")) == "2.10252");
|
||||
ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs_3")) == "5.666115");
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("kim param get cutoffs 1:3 cutoffs_1 cutoffs_2 cutoffs_3 explicit");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs_1")) == "2.20943");
|
||||
ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs_2")) == "2.10252");
|
||||
ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs_3")) == "5.666115");
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("kim param get cutoffs 1:3 cutoffs split");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs_1")) == "2.20943");
|
||||
ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs_2")) == "2.10252");
|
||||
ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs_3")) == "5.666115");
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("kim param get cutoffs 1:3 cutoffs list");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs")) == "2.20943 2.10252 5.666115");
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("kim param set cutoffs 1 2.21 cutoffs 2 2.11");
|
||||
lmp->input->one("kim param get cutoffs 1:2 cutoffs list");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs")) == "2.21 2.11");
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("kim param set cutoffs 1:3 2.3 2.2 5.7");
|
||||
lmp->input->one("kim param get cutoffs 1:3 cutoffs list");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
ASSERT_TRUE(std::string(lmp->input->variable->retrieve("cutoffs")) == "2.3 2.2 5.7");
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
lmp->input->one("units real");
|
||||
lmp->input->one("lattice fcc 4.4300");
|
||||
lmp->input->one("region box block 0 10 0 10 0 10");
|
||||
lmp->input->one("create_box 1 box");
|
||||
lmp->input->one("create_atoms 1 box");
|
||||
lmp->input->one("mass 1 39.95");
|
||||
lmp->input->one("pair_style kim LennardJones612_UniversalShifted__MO_959249795837_003");
|
||||
lmp->input->one("pair_coeff * * Ar");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("kim param get shift 1 shift");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
ASSERT_TRUE(std::string(lmp->input->variable->retrieve("shift")) == "1");
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("variable new_shift equal 2");
|
||||
lmp->input->one("kim param set shift 1 ${new_shift}");
|
||||
lmp->input->one("kim param get shift 1 shift");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
ASSERT_TRUE(std::string(lmp->input->variable->retrieve("shift")) == "2");
|
||||
}
|
||||
|
||||
TEST_F(KimCommandsTest, kim_property)
|
||||
@ -338,38 +452,38 @@ TEST_F(KimCommandsTest, kim_property)
|
||||
TEST_FAILURE(".*ERROR: Invalid Python version.\n"
|
||||
"The kim-property Python package requires Python "
|
||||
"3 >= 3.6 support.*",
|
||||
lmp->input->one("kim_property"););
|
||||
lmp->input->one("kim property"););
|
||||
} else {
|
||||
TEST_FAILURE(".*ERROR: Invalid kim_property command.*",
|
||||
lmp->input->one("kim_property"););
|
||||
TEST_FAILURE(".*ERROR: Invalid kim_property command.*",
|
||||
lmp->input->one("kim_property create"););
|
||||
TEST_FAILURE(".*ERROR: Incorrect arguments in kim_property command.\n"
|
||||
"'kim_property create/destroy/modify/remove/dump' "
|
||||
TEST_FAILURE(".*ERROR: Invalid 'kim property' command.*",
|
||||
lmp->input->one("kim property"););
|
||||
TEST_FAILURE(".*ERROR: Invalid 'kim property' command.*",
|
||||
lmp->input->one("kim property create"););
|
||||
TEST_FAILURE(".*ERROR: Incorrect arguments in 'kim property' command."
|
||||
"\n'kim property create/destroy/modify/remove/dump' "
|
||||
"is mandatory.*",
|
||||
lmp->input->one("kim_property unknown 1 atomic-mass"););
|
||||
lmp->input->one("kim property unknown 1 atomic-mass"););
|
||||
}
|
||||
#if defined(KIM_EXTRA_UNITTESTS)
|
||||
TEST_FAILURE(".*ERROR: Invalid 'kim_property create' command.*",
|
||||
lmp->input->one("kim_property create 1"););
|
||||
TEST_FAILURE(".*ERROR: Invalid 'kim_property destroy' command.*",
|
||||
lmp->input->one("kim_property destroy 1 cohesive-potential-energy-cubic-crystal"););
|
||||
TEST_FAILURE(".*ERROR: Invalid 'kim_property modify' command.*",
|
||||
lmp->input->one("kim_property modify 1 key short-name"););
|
||||
TEST_FAILURE(".*ERROR: Invalid 'kim property create' command.*",
|
||||
lmp->input->one("kim property create 1"););
|
||||
TEST_FAILURE(".*ERROR: Invalid 'kim property destroy' command.*",
|
||||
lmp->input->one("kim property destroy 1 cohesive-potential-energy-cubic-crystal"););
|
||||
TEST_FAILURE(".*ERROR: Invalid 'kim property modify' command.*",
|
||||
lmp->input->one("kim property modify 1 key short-name"););
|
||||
TEST_FAILURE(".*ERROR: There is no property instance to modify the content.*",
|
||||
lmp->input->one("kim_property modify 1 key short-name source-value 1 fcc"););
|
||||
TEST_FAILURE(".*ERROR: Invalid 'kim_property remove' command.*",
|
||||
lmp->input->one("kim_property remove 1 key"););
|
||||
lmp->input->one("kim property modify 1 key short-name source-value 1 fcc"););
|
||||
TEST_FAILURE(".*ERROR: Invalid 'kim property remove' command.*",
|
||||
lmp->input->one("kim property remove 1 key"););
|
||||
TEST_FAILURE(".*ERROR: There is no property instance to remove the content.*",
|
||||
lmp->input->one("kim_property remove 1 key short-name"););
|
||||
lmp->input->one("kim property remove 1 key short-name"););
|
||||
TEST_FAILURE(".*ERROR: There is no property instance to dump the content.*",
|
||||
lmp->input->one("kim_property dump results.edn"););
|
||||
lmp->input->one("kim property dump results.edn"););
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
lmp->input->one("kim_init LennardJones612_UniversalShifted__MO_959249795837_003 real");
|
||||
lmp->input->one("kim_property create 1 cohesive-potential-energy-cubic-crystal");
|
||||
lmp->input->one("kim_property modify 1 key short-name source-value 1 fcc");
|
||||
lmp->input->one("kim_property destroy 1");
|
||||
lmp->input->one("kim init LennardJones612_UniversalShifted__MO_959249795837_003 real");
|
||||
lmp->input->one("kim property create 1 cohesive-potential-energy-cubic-crystal");
|
||||
lmp->input->one("kim property modify 1 key short-name source-value 1 fcc");
|
||||
lmp->input->one("kim property destroy 1");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
#endif
|
||||
}
|
||||
@ -378,129 +492,233 @@ TEST_F(KimCommandsTest, kim_query)
|
||||
{
|
||||
if (!LAMMPS::is_installed_pkg("KIM")) GTEST_SKIP();
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal kim_query command.*",
|
||||
lmp->input->one("kim_query"););
|
||||
TEST_FAILURE(".*ERROR: Must use 'kim_init' before 'kim_query'.*",
|
||||
lmp->input->one("kim_query a0 get_lattice_constant_cubic"););
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
lmp->input->one("kim_init LennardJones612_UniversalShifted__MO_959249795837_003 real");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal kim_query command.\nThe keyword 'split' "
|
||||
TEST_FAILURE(".*ERROR: Illegal 'kim query' command.*",
|
||||
lmp->input->one("kim query"););
|
||||
TEST_FAILURE(".*ERROR: Illegal 'kim query' command.\nThe keyword 'split' "
|
||||
"must be followed by the name of the query function.*",
|
||||
lmp->input->one("kim_query a0 split"););
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal kim_query command.\nThe 'list' keyword "
|
||||
lmp->input->one("kim query a0 split"););
|
||||
TEST_FAILURE(".*ERROR: Illegal 'kim query' command.\nThe keyword 'list' "
|
||||
"must be followed by the name of the query function.*",
|
||||
lmp->input->one("kim query a0 list"););
|
||||
TEST_FAILURE(".*ERROR: Illegal 'kim query' command.\nThe keyword 'index' "
|
||||
"must be followed by the name of the query function.*",
|
||||
lmp->input->one("kim query a0 index"););
|
||||
TEST_FAILURE(".*ERROR: Illegal 'kim query' command.\nThe 'list' keyword "
|
||||
"can not be used after 'split'.*",
|
||||
lmp->input->one("kim_query a0 split list"););
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal kim_query command.\nThe 'list' keyword "
|
||||
"must be followed by \\('split' and\\) the name of the query "
|
||||
"function.*", lmp->input->one("kim_query a0 list"););
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal 'model' key in kim_query command.*",
|
||||
lmp->input->one("kim_query a0 get_lattice_constant_cubic "
|
||||
"model=[MO_959249795837_003]"););
|
||||
|
||||
lmp->input->one("kim query a0 split list"););
|
||||
TEST_FAILURE(".*ERROR: Illegal 'kim query' command.\nThe 'index' keyword "
|
||||
"can not be used after 'split'.*",
|
||||
lmp->input->one("kim query a0 split index"););
|
||||
TEST_FAILURE(".*ERROR: Illegal 'kim query' command.\nThe 'split' keyword "
|
||||
"can not be used after 'list'.*",
|
||||
lmp->input->one("kim query a0 list split"););
|
||||
TEST_FAILURE(".*ERROR: Illegal 'kim query' command.\nThe 'index' keyword "
|
||||
"can not be used after 'list'.*",
|
||||
lmp->input->one("kim query a0 list index"););
|
||||
TEST_FAILURE(".*ERROR: Illegal 'kim query' command.\nThe 'list' keyword "
|
||||
"can not be used after 'index'.*",
|
||||
lmp->input->one("kim query a0 index list"););
|
||||
TEST_FAILURE(".*ERROR: Illegal 'kim query' command.\nThe 'split' keyword "
|
||||
"can not be used after 'index'.*",
|
||||
lmp->input->one("kim query a0 index split"););
|
||||
TEST_FAILURE(".*ERROR: Illegal query format.\nInput argument of `crystal` "
|
||||
"to kim_query is wrong. The query format is the "
|
||||
"to 'kim query' is wrong. The query format is the "
|
||||
"keyword=\\[value\\], where value is always an array of one "
|
||||
"or more comma-separated items.*",
|
||||
lmp->input->one("kim_query a0 get_lattice_constant_cubic "
|
||||
lmp->input->one("kim query a0 get_lattice_constant_cubic "
|
||||
"crystal"););
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal query format.\nInput argument of `"
|
||||
"crystal=fcc` to kim_query is wrong. The query format is the "
|
||||
"crystal=fcc` to 'kim query' is wrong. The query format is the "
|
||||
"keyword=\\[value\\], where value is always an array of one "
|
||||
"or more comma-separated items.*",
|
||||
lmp->input->one("kim_query a0 get_lattice_constant_cubic "
|
||||
lmp->input->one("kim query a0 get_lattice_constant_cubic "
|
||||
"crystal=fcc"););
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal query format.\nInput argument of `"
|
||||
"crystal=\\[fcc` to kim_query is wrong. The query format is "
|
||||
"crystal=\\[fcc` to 'kim query' is wrong. The query format is "
|
||||
"the keyword=\\[value\\], where value is always an array of "
|
||||
"one or more comma-separated items.*",
|
||||
lmp->input->one("kim_query a0 get_lattice_constant_cubic "
|
||||
lmp->input->one("kim query a0 get_lattice_constant_cubic "
|
||||
"crystal=[fcc"););
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal query format.\nInput argument of `"
|
||||
"crystal=fcc\\]` to kim_query is wrong. The query format is "
|
||||
"crystal=fcc\\]` to 'kim query' is wrong. The query format is "
|
||||
"the keyword=\\[value\\], where value is always an array of "
|
||||
"one or more comma-separated items.*",
|
||||
lmp->input->one("kim_query a0 get_lattice_constant_cubic "
|
||||
lmp->input->one("kim query a0 get_lattice_constant_cubic "
|
||||
"crystal=fcc]"););
|
||||
|
||||
std::string squery("kim_query a0 get_lattice_constant_cubic ");
|
||||
std::string squery("kim query a0 get_lattice_constant_cubic ");
|
||||
squery += "crystal=[\"fcc\"] species=\"Al\",\"Ni\" units=[\"angstrom\"]";
|
||||
|
||||
TEST_FAILURE(".*ERROR: Illegal query format.\nInput argument of `species="
|
||||
"\"Al\",\"Ni\"` to kim_query is wrong. The query format is "
|
||||
"\"Al\",\"Ni\"` to 'kim query' is wrong. The query format is "
|
||||
"the keyword=\\[value\\], where value is always an array of "
|
||||
"one or more comma-separated items.*",
|
||||
lmp->input->one(squery););
|
||||
|
||||
squery = "kim_query a0 get_lattice_constant_cubic ";
|
||||
squery += "crystal=[\"fcc\"] species=\"Al\",\"Ni\", units=[\"angstrom\"]";
|
||||
|
||||
squery = "kim query a0 get_lattice_constant_cubic ";
|
||||
squery += "crystal=[fcc] species=Al,Ni units=[angstrom]";
|
||||
TEST_FAILURE(".*ERROR: Illegal query format.\nInput argument of `species="
|
||||
"\"Al\",\"Ni\",` to kim_query is wrong. The query format is "
|
||||
"Al,Ni` to 'kim query' is wrong. The query format is "
|
||||
"the keyword=\\[value\\], where value is always an array of "
|
||||
"one or more comma-separated items.*",
|
||||
lmp->input->one(squery););
|
||||
|
||||
squery = "kim_query a0 get_lattice_constant_cubic crystal=[fcc] "
|
||||
squery = "kim query a0 get_lattice_constant_cubic ";
|
||||
squery += "crystal=[fcc] species=Al,Ni, units=[angstrom]";
|
||||
TEST_FAILURE(".*ERROR: Illegal query format.\nInput argument of `species="
|
||||
"Al,Ni,` to 'kim query' is wrong. The query format is "
|
||||
"the keyword=\\[value\\], where value is always an array of "
|
||||
"one or more comma-separated items.*",
|
||||
lmp->input->one(squery););
|
||||
|
||||
squery = "kim query a0 get_lattice_constant_cubic crystal=[\"fcc\"] "
|
||||
"species=[\"Al\"]";
|
||||
TEST_FAILURE(".*ERROR: Illegal query format.\nMust use 'kim init' before "
|
||||
"'kim query' or must provide the model name after query "
|
||||
"function with the format of 'model=\\[model_name\\]'.*",
|
||||
lmp->input->one(squery););
|
||||
|
||||
squery = "kim query a0 get_lattice_constant_cubic crystal=[fcc] "
|
||||
"species=[Al]";
|
||||
TEST_FAILURE(".*ERROR: OpenKIM query failed:.*", lmp->input->one(squery););
|
||||
TEST_FAILURE(".*ERROR: Illegal query format.\nMust use 'kim init' before "
|
||||
"'kim query' or must provide the model name after query "
|
||||
"function with the format of 'model=\\[model_name\\]'.*",
|
||||
lmp->input->one(squery););
|
||||
|
||||
squery = "kim_query a0 get_lattice_constant_cubic crystal=[fcc] "
|
||||
"units=[\"angstrom\"]";
|
||||
TEST_FAILURE(".*ERROR: OpenKIM query failed:.*", lmp->input->one(squery););
|
||||
squery = "kim query a0 get_lattice_constant_cubic crystal=[\"fcc\"] "
|
||||
"species=[Al]";
|
||||
TEST_FAILURE(".*ERROR: Illegal query format.\nMust use 'kim init' before "
|
||||
"'kim query' or must provide the model name after query "
|
||||
"function with the format of 'model=\\[model_name\\]'.*",
|
||||
lmp->input->one(squery););
|
||||
|
||||
#if defined(KIM_EXTRA_UNITTESTS)
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
lmp->input->one("kim_init EAM_Dynamo_Mendelev_2007_Zr__MO_848899341753_000 metal");
|
||||
|
||||
squery = "kim_query latconst split get_lattice_constant_hexagonal ";
|
||||
squery += "crystal=[\"hcp\"] species=[\"Zr\"] units=[\"angstrom\"]";
|
||||
squery = "kim query latconst_1 get_lattice_constant_cubic ";
|
||||
squery += "crystal=[fcc] species=[Al] units=[angstrom] ";
|
||||
squery += "model=[EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005]";
|
||||
lmp->input->one(squery);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
ASSERT_TRUE((std::string(lmp->input->variable->retrieve("latconst_1")) ==
|
||||
std::string("3.234055244384789")));
|
||||
ASSERT_TRUE((std::string(lmp->input->variable->retrieve("latconst_2")) ==
|
||||
std::string("5.167650199630013")));
|
||||
"4.032082033157349"));
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
lmp->input->one("kim_init EAM_Dynamo_Mendelev_2007_Zr__MO_848899341753_000 metal");
|
||||
lmp->input->one("kim init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal");
|
||||
|
||||
squery = "kim_query latconst list get_lattice_constant_hexagonal ";
|
||||
squery = "kim query latconst_1 get_lattice_constant_cubic ";
|
||||
squery += "crystal=[fcc] species=[Al] units=[angstrom]";
|
||||
lmp->input->one(squery);
|
||||
|
||||
squery = "kim query latconst_2 get_lattice_constant_cubic ";
|
||||
squery += "crystal=[fcc] species=[Al] units=[angstrom] ";
|
||||
squery += "model=[LennardJones612_UniversalShifted__MO_959249795837_003]";
|
||||
lmp->input->one(squery);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
ASSERT_TRUE((std::string(lmp->input->variable->retrieve("latconst_1")) ==
|
||||
"4.032082033157349"));
|
||||
ASSERT_TRUE((std::string(lmp->input->variable->retrieve("latconst_2")) ==
|
||||
"3.328125931322575"));
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
lmp->input->one("kim init EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000 metal");
|
||||
|
||||
squery = "kim query latconst split get_lattice_constant_hexagonal ";
|
||||
squery += "crystal=[hcp] species=[Zr] units=[angstrom]";
|
||||
lmp->input->one(squery);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
ASSERT_TRUE((std::string(lmp->input->variable->retrieve("latconst_1")) ==
|
||||
"3.234055244384789"));
|
||||
ASSERT_TRUE((std::string(lmp->input->variable->retrieve("latconst_2")) ==
|
||||
"5.167650199630013"));
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
|
||||
squery = "kim query latconst index get_lattice_constant_hexagonal ";
|
||||
squery += "crystal=[hcp] species=[Zr] units=[angstrom] ";
|
||||
squery += "model=[EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000]";
|
||||
lmp->input->one(squery);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
ASSERT_TRUE((std::string(lmp->input->variable->retrieve("latconst")) ==
|
||||
"3.234055244384789"));
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("variable latconst delete");
|
||||
lmp->input->one("clear");
|
||||
lmp->input->one("kim init EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000 metal");
|
||||
|
||||
squery = "kim query latconst list get_lattice_constant_hexagonal ";
|
||||
squery += "crystal=[hcp] species=[Zr] units=[angstrom]";
|
||||
lmp->input->one(squery);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
ASSERT_TRUE((std::string(lmp->input->variable->retrieve("latconst")) ==
|
||||
std::string("3.234055244384789 5.167650199630013")));
|
||||
|
||||
squery = "kim_query latconst list get_lattice_constant_hexagonal ";
|
||||
squery += "crystal=[bcc] species=[Zr] units=[angstrom]";
|
||||
TEST_FAILURE(".*ERROR: OpenKIM query failed:.*", lmp->input->one(squery););
|
||||
"3.234055244384789 5.167650199630013"));
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
lmp->input->one("kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal");
|
||||
lmp->input->one("kim init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal");
|
||||
|
||||
squery = "kim_query alpha get_linear_thermal_expansion_coefficient_cubic ";
|
||||
squery = "kim query alpha get_linear_thermal_expansion_coefficient_cubic ";
|
||||
squery += "crystal=[fcc] species=[Al] units=[1/K] temperature=[293.15] ";
|
||||
squery += "temperature_units=[K]";
|
||||
lmp->input->one(squery);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
ASSERT_TRUE((std::string(lmp->input->variable->retrieve("alpha")) ==
|
||||
std::string("1.654960564704273e-05")));
|
||||
"1.654960564704273e-05"));
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
|
||||
squery = "kim query model_list list get_available_models ";
|
||||
squery += "species=[Al]";
|
||||
lmp->input->one(squery);
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
std::string model_list = lmp->input->variable->retrieve("model_list");
|
||||
auto n = model_list.find("EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005");
|
||||
ASSERT_TRUE(n != std::string::npos);
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
|
||||
squery = "kim query model_name index get_available_models ";
|
||||
squery += "species=[Al]";
|
||||
lmp->input->one(squery);
|
||||
lmp->input->one("variable model_name delete");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("clear");
|
||||
|
||||
squery = "kim query model_name index get_available_models ";
|
||||
squery += "species=[Al] potential_type=[eam,meam]";
|
||||
lmp->input->one(squery);
|
||||
lmp->input->one("variable model_name delete");
|
||||
|
||||
squery = "kim query model_name index get_available_models ";
|
||||
squery += "species=[Al] potential_type=[\"eam\",\"meam\"]";
|
||||
lmp->input->one(squery);
|
||||
lmp->input->one("variable model_name delete");
|
||||
|
||||
squery = "kim query model_name index get_available_models ";
|
||||
squery += "species=[Al] potential_type=[eam,\"meam\"]";
|
||||
lmp->input->one(squery);
|
||||
lmp->input->one("variable model_name delete");
|
||||
|
||||
squery = "kim query model_name index get_available_models ";
|
||||
squery += "species=[Al] potential_type=[\"eam\",meam]";
|
||||
lmp->input->one(squery);
|
||||
lmp->input->one("variable model_name delete");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
#endif
|
||||
}
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
Reference in New Issue
Block a user