Unverified Commit e8f94447 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

Merge branch 'master' into hybrid-svector-fix

parents 5a07db84 be0587ea
Loading
Loading
Loading
Loading
+27 −1
Original line number Diff line number Diff line
@@ -37,6 +37,26 @@
# KIM-API-CMAKE_Fortran_COMPILER
#

function(_KIMAPI_GET_VERSION _OUT_ver _version_hdr)
  if(NOT EXISTS ${_version_hdr})
    message(FATAL_ERROR "Header file ${_version_hdr} not found (check value of KIM-API_INCLUDE_DIR)")
  endif()
  foreach(_var KIM_VERSION_MAJOR KIM_VERSION_MINOR KIM_VERSION_PATCH)  
    file(STRINGS ${_version_hdr} _contents REGEX "#define ${_var}[ \t]+")
    if(_contents)
      string(REGEX REPLACE ".*#define ${_var}[ \t]+([0-9]+).*" "\\1" _${_var} "${_contents}")
      if(${_${_var}} STREQUAL "")
        message(FATAL_ERROR "Version parsing failed for ${_var} in ${_version_hdr}, got empty return!")
      elseif(NOT ${_${_var}} MATCHES "^[0-9]+$")
        message(FATAL_ERROR "Version parsing failed for ${_var} in ${_version_hdr}, excepted a number but got ${_${_var}}!")
      endif()
    else()
      message(FATAL_ERROR "No ${_var} line found in include file ${_version_hdr}")
    endif()
  endforeach()
  set(${_OUT_ver} ${_KIM_VERSION_MAJOR}.${_KIM_VERSION_MINOR}.${_KIM_VERSION_PATCH} PARENT_SCOPE)
endfunction()

if(KIM-API_FIND_QUIETLY)
  set(REQ_OR_QUI "QUIET")
else()
@@ -54,6 +74,12 @@ if(KIM-API_FOUND)
  pkg_get_variable(KIM-API_CMAKE_Fortran_COMPILER libkim-api CMAKE_Fortran_COMPILER)
endif()

if(KIM-API_INCLUDEDIR)
  _KIMAPI_GET_VERSION(KIM-API_VERSION ${KIM-API_INCLUDEDIR}/KIM_Version.h)
else()
  set(KIM-API_VERSION 0)
endif()

# handle the QUIETLY and REQUIRED arguments and set KIM-API_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(KIM-API REQUIRED_VARS KIM-API_LIBRARIES)
find_package_handle_standard_args(KIM-API REQUIRED_VARS KIM-API_LIBRARIES VERSION_VAR KIM-API_VERSION)
+12 −4
Original line number Diff line number Diff line
if(PKG_KIM)
  set(KIM-API_MIN_VERSION 2.1)
  find_package(CURL)
  if(CURL_FOUND)
    include_directories(${CURL_INCLUDE_DIRS})
@@ -7,10 +8,17 @@ if(PKG_KIM)
  endif()
  find_package(KIM-API QUIET)
  if(KIM-API_FOUND)
    if (KIM-API_VERSION VERSION_LESS ${KIM-API_MIN_VERSION})
      if ("${DOWNLOAD_KIM}" STREQUAL "")
        message(WARNING "Unsuitable KIM-API version \"${KIM-API_VERSION}\" found, but required is at least \"${KIM-API_MIN_VERSION}\".  Default behavior set to download and build our own.")
      endif()
      set(DOWNLOAD_KIM_DEFAULT ON)
    else()
      set(DOWNLOAD_KIM_DEFAULT OFF)
    endif()
  else()
    if (NOT DOWNLOAD_KIM)
      message(WARNING "KIM-API package not found.  We will download and build our own")
    if ("${DOWNLOAD_KIM}" STREQUAL "")
      message(WARNING "KIM-API package not found.  Default behavior set to download and build our own")
    endif()
    set(DOWNLOAD_KIM_DEFAULT ON)
  endif()
@@ -42,7 +50,7 @@ if(PKG_KIM)
    set(KIM-API_LDFLAGS ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libkim-api${CMAKE_SHARED_LIBRARY_SUFFIX})
    list(APPEND LAMMPS_DEPS kim_build)
  else()
    find_package(KIM-API REQUIRED)
    find_package(KIM-API ${KIM-API_MIN_VERSION} REQUIRED)
  endif()
  list(APPEND LAMMPS_LINK_LIBS "${KIM-API_LDFLAGS}")
  include_directories(${KIM-API_INCLUDE_DIRS})
+2 −1
Original line number Diff line number Diff line
@@ -126,9 +126,10 @@ are intended for computational work like running LAMMPS. By default
Ng = 1 and Ns is not set.

Depending on which flavor of MPI you are running, LAMMPS will look for
one of these 3 environment variables
one of these 4 environment variables

SLURM_LOCALID (various MPI variants compiled with SLURM support)
MPT_LRANK (HPE MPI)
MV2_COMM_WORLD_LOCAL_RANK (Mvapich)
OMPI_COMM_WORLD_LOCAL_RANK (OpenMPI) :pre

+5 −4
Original line number Diff line number Diff line
@@ -40,11 +40,12 @@ coordinates and other properties are exchanged between neighboring
processors and stored as properties of ghost atoms.

NOTE: These options apply to the currently defined comm style.  When
you specify a "comm_style"_comm_style.html command, all communication
settings are restored to their default values, including those
you specify a "comm_style"_comm_style.html or
"read_restart"_read_restart.html command, all communication settings
are restored to their default or stored values, including those
previously reset by a comm_modify command.  Thus if your input script
specifies a comm_style command, you should use the comm_modify command
after it.
specifies a comm_style or read_restart command, you should use the
comm_modify command after it.

The {mode} keyword determines whether a single or multiple cutoff
distances are used to determine which atoms to communicate.
+6 −1
Original line number Diff line number Diff line
@@ -15,10 +15,11 @@ compute ID group-ID bond/local value1 value2 ... keyword args ... :pre
ID, group-ID are documented in "compute"_compute.html command :ulb,l
bond/local = style name of this compute command :l
one or more values may be appended :l
value = {dist} or {engpot} or {force} or {engvib} or {engrot} or {engtrans} or {omega} or {velvib} or {v_name} :l
value = {dist} or {engpot} or {force} or {fx} or {fy} or {fz} or {engvib} or {engrot} or {engtrans} or {omega} or {velvib} or {v_name} :l
  {dist} = bond distance
  {engpot} = bond potential energy
  {force} = bond force :pre
  {fx},{fy},{fz} = components of bond force
  {engvib} = bond kinetic energy of vibration
  {engrot} = bond kinetic energy of rotation
  {engtrans} = bond kinetic energy of translation
@@ -38,6 +39,7 @@ keyword = {set} :l

compute 1 all bond/local engpot
compute 1 all bond/local dist engpot force :pre
compute 1 all bond/local dist fx fy fz :pre
compute 1 all angle/local dist v_distsq set dist d :pre

[Description:]
@@ -59,6 +61,9 @@ based on the current separation of the pair of atoms in the bond.
The value {force} is the magnitude of the force acting between the
pair of atoms in the bond.

The values {fx}, {fy}, and {fz} are the xyz components of
{force} between the pair of atoms in the bond.

The remaining properties are all computed for motion of the two atoms
relative to the center of mass (COM) velocity of the 2 atoms in the
bond.
Loading