Merge pull request #2654 from akohlmey/collected-small-changes
Collected small changes
This commit is contained in:
@ -35,7 +35,7 @@ if(GPU_API STREQUAL "CUDA")
|
||||
if(NOT BIN2C)
|
||||
message(FATAL_ERROR "Could not find bin2c, use -DBIN2C=/path/to/bin2c to help cmake finding it.")
|
||||
endif()
|
||||
option(CUDPP_OPT "Enable CUDPP_OPT" ON)
|
||||
option(CUDPP_OPT "Enable GPU binning via CUDAPP (should be off for modern GPUs)" OFF)
|
||||
option(CUDA_MPS_SUPPORT "Enable tweaks to support CUDA Multi-process service (MPS)" OFF)
|
||||
if(CUDA_MPS_SUPPORT)
|
||||
if(CUDPP_OPT)
|
||||
|
||||
@ -51,10 +51,12 @@ if(DOWNLOAD_KOKKOS)
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${INSTALL_DIR}/include"
|
||||
INTERFACE_LINK_LIBRARIES ${CMAKE_DL_LIBS})
|
||||
target_link_libraries(lammps PRIVATE LAMMPS::KOKKOS)
|
||||
target_link_libraries(lmp PRIVATE LAMMPS::KOKKOS)
|
||||
add_dependencies(LAMMPS::KOKKOS kokkos_build)
|
||||
elseif(EXTERNAL_KOKKOS)
|
||||
find_package(Kokkos 3.3.01 REQUIRED CONFIG)
|
||||
target_link_libraries(lammps PRIVATE Kokkos::kokkos)
|
||||
target_link_libraries(lmp PRIVATE Kokkos::kokkos)
|
||||
else()
|
||||
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
|
||||
set(LAMMPS_LIB_KOKKOS_BIN_DIR ${LAMMPS_LIB_BINARY_DIR}/kokkos)
|
||||
@ -66,6 +68,7 @@ else()
|
||||
${LAMMPS_LIB_KOKKOS_BIN_DIR})
|
||||
target_include_directories(lammps PRIVATE ${Kokkos_INCLUDE_DIRS})
|
||||
target_link_libraries(lammps PRIVATE kokkos)
|
||||
target_link_libraries(lmp PRIVATE kokkos)
|
||||
endif()
|
||||
target_compile_definitions(lammps PRIVATE -DLMP_KOKKOS)
|
||||
|
||||
|
||||
18
cmake/presets/oneapi.cmake
Normal file
18
cmake/presets/oneapi.cmake
Normal file
@ -0,0 +1,18 @@
|
||||
# preset that will enable the LLVM based Intel compilers with support for MPI and OpenMP (on Linux boxes)
|
||||
|
||||
set(CMAKE_CXX_COMPILER "icpx" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_COMPILER "icx" CACHE STRING "" FORCE)
|
||||
set(CMAKE_Fortran_COMPILER "ifx" CACHE STRING "" FORCE)
|
||||
set(MPI_CXX "icpx" CACHE STRING "" FORCE)
|
||||
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
|
||||
unset(HAVE_OMP_H_INCLUDE CACHE)
|
||||
|
||||
set(OpenMP_C "icx" CACHE STRING "" FORCE)
|
||||
set(OpenMP_C_FLAGS "-qopenmp" CACHE STRING "" FORCE)
|
||||
set(OpenMP_C_LIB_NAMES "omp" CACHE STRING "" FORCE)
|
||||
set(OpenMP_CXX "icpx" CACHE STRING "" FORCE)
|
||||
set(OpenMP_CXX_FLAGS "-qopenmp" CACHE STRING "" FORCE)
|
||||
set(OpenMP_CXX_LIB_NAMES "omp" CACHE STRING "" FORCE)
|
||||
set(OpenMP_Fortran_FLAGS "-qopenmp" CACHE STRING "" FORCE)
|
||||
set(OpenMP_omp_LIBRARY "libiomp5.so" CACHE PATH "" FORCE)
|
||||
|
||||
@ -234,6 +234,8 @@ LAMMPS.
|
||||
cmake ../cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_Fortran_COMPILER=gfortran
|
||||
# Building with Intel Compilers:
|
||||
cmake ../cmake -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc -DCMAKE_Fortran_COMPILER=ifort
|
||||
# Building with Intel oneAPI Compilers:
|
||||
cmake ../cmake -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DCMAKE_Fortran_COMPILER=ifx
|
||||
# Building with LLVM/Clang Compilers:
|
||||
cmake ../cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_Fortran_COMPILER=flang
|
||||
# Building with PGI/Nvidia Compilers:
|
||||
@ -243,8 +245,10 @@ LAMMPS.
|
||||
provided that can be loaded with
|
||||
`-C ../cmake/presets/clang.cmake`. Similarly,
|
||||
`-C ../cmake/presets/intel.cmake` should switch the compiler
|
||||
toolchain to the Intel compilers and `-C ../cmake/presets/pgi.cmake`
|
||||
should switch the compiler to the PGI compilers.
|
||||
toolchain to the legacy Intel compilers, `-C ../cmake/presets/oneapi.cmake`
|
||||
will switch to the LLVM based oneAPI Intel compilers,
|
||||
and `-C ../cmake/presets/pgi.cmake`
|
||||
will switch the compiler to the PGI compilers.
|
||||
|
||||
In addition you can set ``CMAKE_TUNE_FLAGS`` to specifically add
|
||||
compiler flags to tune for optimal performance on given hosts. By
|
||||
|
||||
@ -128,9 +128,9 @@ CMake build
|
||||
# default is 'gfx906' for HIP_PLATFORM=hcc and 'sm_50' for HIP_PLATFORM=nvcc
|
||||
-D HIP_USE_DEVICE_SORT=value # enables GPU sorting
|
||||
# value = yes (default) or no
|
||||
-D CUDPP_OPT=value # optimization setting for GPU_API=cuda
|
||||
# enables CUDA Performance Primitives Optimizations, must be "no" for CUDA_MPS_SUPPORT=yes
|
||||
# value = yes (default) or no
|
||||
-D CUDPP_OPT=value # use GPU binning on with CUDA (should be off for modern GPUs)
|
||||
# enables CUDA Performance Primitives, must be "no" for CUDA_MPS_SUPPORT=yes
|
||||
# value = yes or no (default)
|
||||
-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
|
||||
@ -230,11 +230,12 @@ GPU architectures as supported by the CUDA toolkit in use. This is done
|
||||
through using the "--gencode " flag, which can be used multiple times and
|
||||
thus support all GPU architectures supported by your CUDA compiler.
|
||||
|
||||
To include CUDA performance primitives set the Makefile variable
|
||||
``CUDPP_OPT = -DUSE_CUDPP -Icudpp_mini``.
|
||||
To enable GPU binning via CUDA performance primitives set the Makefile variable
|
||||
``CUDPP_OPT = -DUSE_CUDPP -Icudpp_mini``. This should **not** be used with
|
||||
most modern GPUs.
|
||||
|
||||
To support the CUDA multiprocessor server you can set the define
|
||||
``-DCUDA_PROXY``. Please note that in this case you should **not** use
|
||||
``-DCUDA_PROXY``. Please note that in this case you must **not** use
|
||||
the CUDA performance primitives and thus set the variable ``CUDPP_OPT``
|
||||
to empty.
|
||||
|
||||
|
||||
@ -411,10 +411,10 @@ interface (``ccmake`` or ``cmake-gui``).
|
||||
.. note::
|
||||
|
||||
Using a preset to select a compiler package (``clang.cmake``,
|
||||
``gcc.cmake``, or ``intel.cmake``) are an exception to the option
|
||||
of updating the configuration incrementally, as they will trigger
|
||||
a reset of cached internal CMake settings and thus reset them to
|
||||
their default values.
|
||||
``gcc.cmake``, ``intel.cmake``, ``oneapi.cmake``, or ``pgi.cmake``)
|
||||
are an exception to the mechanism of updating the configuration incrementally,
|
||||
as they will trigger a reset of cached internal CMake settings and thus
|
||||
reset settings to their default values.
|
||||
|
||||
Compilation and build targets
|
||||
-----------------------------
|
||||
|
||||
@ -93,6 +93,7 @@ Miscellaneous tools
|
||||
* :ref:`i-pi <ipi>`
|
||||
* :ref:`kate <kate>`
|
||||
* :ref:`LAMMPS shell <lammps_shell>`
|
||||
* :ref:`LAMMPS magic patterns for file(1) <magic>`
|
||||
* :ref:`singularity <singularity_tool>`
|
||||
* :ref:`SWIG interface <swig>`
|
||||
* :ref:`vim <vim>`
|
||||
@ -641,6 +642,39 @@ This tool was written by Ara Kooser at Sandia (askoose at sandia.gov).
|
||||
|
||||
----------
|
||||
|
||||
.. _magic:
|
||||
|
||||
Magic patterns for the "file" command
|
||||
-------------------------------------
|
||||
|
||||
.. versionadded:: 10Mar2021
|
||||
|
||||
The file ``magic`` contains patterns that are used by the
|
||||
`file program <https://en.wikipedia.org/wiki/File_(command)>`_
|
||||
available on most Unix-like operating systems which enables it
|
||||
to detect various LAMMPS files and print some useful information
|
||||
about them. To enable these patterns, append or copy the contents
|
||||
of the file to either the file ``.magic`` in your home directory
|
||||
or (as administrator) to ``/etc/magic`` (for a system-wide
|
||||
installation). Afterwards the ``file`` command should be able to
|
||||
detect most LAMMPS restarts, dump, data and log files. Examples:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ file *.*
|
||||
dihedral-quadratic.restart: LAMMPS binary restart file (rev 2), Version 10 Mar 2021, Little Endian
|
||||
mol-pair-wf_cut.restart: LAMMPS binary restart file (rev 2), Version 24 Dec 2020, Little Endian
|
||||
atom.bin: LAMMPS atom style binary dump (rev 2), Little Endian, First time step: 445570
|
||||
custom.bin: LAMMPS custom style binary dump (rev 2), Little Endian, First time step: 100
|
||||
bn1.lammpstrj: LAMMPS text mode dump, First time step: 5000
|
||||
data.fourmol: LAMMPS data file written by LAMMPS
|
||||
pnc.data: LAMMPS data file written by msi2lmp
|
||||
data.spce: LAMMPS data file written by TopoTools
|
||||
B.data: LAMMPS data file written by OVITO
|
||||
log.lammps: LAMMPS log file written by version 10 Feb 2021
|
||||
|
||||
----------
|
||||
|
||||
.. _matlab:
|
||||
|
||||
matlab tool
|
||||
|
||||
@ -160,6 +160,7 @@ atwt
|
||||
augt
|
||||
AuO
|
||||
automagically
|
||||
Auvergne
|
||||
Avalos
|
||||
avalue
|
||||
aveforce
|
||||
@ -1740,6 +1741,7 @@ lwsock
|
||||
lx
|
||||
ly
|
||||
Lybrand
|
||||
lyon
|
||||
Lyulin
|
||||
lz
|
||||
Maaravi
|
||||
@ -3256,6 +3258,7 @@ Tz
|
||||
Tzou
|
||||
ub
|
||||
Uberuaga
|
||||
uca
|
||||
uChem
|
||||
uCond
|
||||
uef
|
||||
|
||||
@ -29,7 +29,8 @@ LIB_DIR = ./
|
||||
AR = ar
|
||||
BSH = /bin/sh
|
||||
|
||||
CUDPP_OPT = -DUSE_CUDPP -Icudpp_mini
|
||||
# GPU binning not recommended for modern GPUs
|
||||
CUDPP_OPT = # -DUSE_CUDPP -Icudpp_mini
|
||||
CUDA_MPS =
|
||||
|
||||
# device code compiler and settings
|
||||
|
||||
@ -70,7 +70,8 @@ LIB_DIR = ./
|
||||
AR = ar
|
||||
BSH = /bin/sh
|
||||
|
||||
CUDPP_OPT = -DUSE_CUDPP -Icudpp_mini
|
||||
# GPU binning not recommended with modern GPUs
|
||||
CUDPP_OPT = #-DUSE_CUDPP -Icudpp_mini
|
||||
|
||||
include Nvidia.makefile
|
||||
|
||||
|
||||
@ -77,7 +77,8 @@ LIB_DIR = ./
|
||||
AR = ar
|
||||
BSH = /bin/sh
|
||||
|
||||
CUDPP_OPT = -DUSE_CUDPP -Icudpp_mini
|
||||
# GPU binning not recommended with modern GPUs
|
||||
CUDPP_OPT = #-DUSE_CUDPP -Icudpp_mini
|
||||
|
||||
include Nvidia.makefile_multi
|
||||
|
||||
|
||||
@ -66,7 +66,8 @@ LIB_DIR = ./
|
||||
AR = ar
|
||||
BSH = /bin/sh
|
||||
|
||||
CUDPP_OPT = -DUSE_CUDPP -Icudpp_mini
|
||||
# GPU binning not recommended for most modern GPUs
|
||||
CUDPP_OPT = #-DUSE_CUDPP -Icudpp_mini
|
||||
|
||||
include Nvidia.makefile
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ LIB_DIR = .
|
||||
AR = ar
|
||||
BSH = /bin/sh
|
||||
|
||||
# GPU binning not recommended with most modern GPUs
|
||||
CUDPP_OPT = #-DUSE_CUDPP -Icudpp_mini
|
||||
|
||||
include Nvidia.makefile
|
||||
|
||||
@ -24,6 +24,10 @@
|
||||
#ifndef NVD_DEVICE
|
||||
#define NVD_DEVICE
|
||||
|
||||
// workaround after GPU package Feb2021 update
|
||||
// todo: make new neighbor code work with CUDA
|
||||
#define LAL_USE_OLD_NEIGHBOR
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
@ -158,7 +158,7 @@ void PairBeckGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = beck_gpu_init(atom->ntypes+1, cutsq, aa, alpha, beta,
|
||||
|
||||
@ -194,7 +194,7 @@ void PairBornCoulLongCSGPU::init_style()
|
||||
g_ewald = force->kspace->g_ewald;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = bornclcs_gpu_init(atom->ntypes+1, cutsq, rhoinv,
|
||||
|
||||
@ -193,7 +193,7 @@ void PairBornCoulLongGPU::init_style()
|
||||
if (ncoultablebits) init_tables(cut_coul,cut_respa);
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = borncl_gpu_init(atom->ntypes+1, cutsq, rhoinv,
|
||||
|
||||
@ -179,7 +179,7 @@ void PairBornCoulWolfCSGPU::init_style()
|
||||
cut_coul;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = borncwcs_gpu_init(atom->ntypes+1, cutsq, rhoinv,
|
||||
|
||||
@ -177,7 +177,7 @@ void PairBornCoulWolfGPU::init_style()
|
||||
cut_coul;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = borncw_gpu_init(atom->ntypes+1, cutsq, rhoinv,
|
||||
|
||||
@ -161,7 +161,7 @@ void PairBornGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = born_gpu_init(atom->ntypes+1, cutsq, rhoinv,
|
||||
|
||||
@ -165,7 +165,7 @@ void PairBuckCoulCutGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = buckc_gpu_init(atom->ntypes+1, cutsq, rhoinv, buck1, buck2,
|
||||
|
||||
@ -189,7 +189,7 @@ void PairBuckCoulLongGPU::init_style()
|
||||
if (ncoultablebits) init_tables(cut_coul,cut_respa);
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = buckcl_gpu_init(atom->ntypes+1, cutsq, rhoinv, buck1, buck2,
|
||||
|
||||
@ -159,7 +159,7 @@ void PairBuckGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = buck_gpu_init(atom->ntypes+1, cutsq, rhoinv, buck1, buck2,
|
||||
|
||||
@ -169,7 +169,7 @@ void PairColloidGPU::init_style()
|
||||
}
|
||||
}
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = colloid_gpu_init(atom->ntypes+1, cutsq, lj1, lj2, lj3, lj4,
|
||||
|
||||
@ -164,7 +164,7 @@ void PairCoulCutGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = coul_gpu_init(atom->ntypes+1, scale, cutsq,
|
||||
|
||||
@ -165,7 +165,7 @@ void PairCoulDebyeGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = cdebye_gpu_init(atom->ntypes+1, scale, cutsq,
|
||||
|
||||
@ -182,7 +182,7 @@ void PairCoulDSFGPU::init_style()
|
||||
e_shift = erfcc/cut_coul - f_shift*cut_coul;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = cdsf_gpu_init(atom->ntypes+1, atom->nlocal,
|
||||
|
||||
@ -184,7 +184,7 @@ void PairCoulLongCSGPU::init_style()
|
||||
if (ncoultablebits) init_tables(cut_coul,cut_respa);
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = clcs_gpu_init(atom->ntypes+1, scale,
|
||||
|
||||
@ -179,7 +179,7 @@ void PairCoulLongGPU::init_style()
|
||||
if (ncoultablebits) init_tables(cut_coul,cut_respa);
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = cl_gpu_init(atom->ntypes+1, scale,
|
||||
|
||||
@ -306,7 +306,7 @@ void PairDPDGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = dpd_gpu_init(atom->ntypes+1, cutsq, a0, gamma, sigma,
|
||||
|
||||
@ -325,7 +325,7 @@ void PairDPDTstatGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = dpd_tstat_gpu_init(atom->ntypes+1, cutsq, a0, gamma, sigma,
|
||||
|
||||
@ -181,7 +181,7 @@ void PairEAMAlloyGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int fp_size;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
|
||||
@ -180,7 +180,7 @@ void PairEAMFSGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int fp_size;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
|
||||
@ -182,7 +182,7 @@ void PairEAMGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int fp_size;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
|
||||
@ -157,7 +157,7 @@ void PairGaussGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = gauss_gpu_init(atom->ntypes+1, cutsq, a, b,
|
||||
|
||||
@ -205,7 +205,7 @@ void PairGayBerneGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = gb_gpu_init(atom->ntypes+1, gamma, upsilon, mu,
|
||||
|
||||
@ -158,7 +158,7 @@ void PairLJ96CutGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = lj96_gpu_init(atom->ntypes+1, cutsq, lj1, lj2, lj3, lj4,
|
||||
|
||||
@ -165,7 +165,7 @@ void PairLJCharmmCoulCharmmGPU::init_style()
|
||||
double cell_size = sqrt(cut_bothsq) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
|
||||
bool arithmetic = true;
|
||||
|
||||
@ -191,7 +191,7 @@ void PairLJCharmmCoulLongGPU::init_style()
|
||||
if (ncoultablebits) init_tables(cut_coul,cut_respa);
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
|
||||
bool arithmetic = true;
|
||||
|
||||
@ -186,7 +186,7 @@ void PairLJClass2CoulLongGPU::init_style()
|
||||
if (ncoultablebits) init_tables(cut_coul,cut_respa);
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = c2cl_gpu_init(atom->ntypes+1, cutsq, lj1, lj2, lj3, lj4,
|
||||
|
||||
@ -155,7 +155,7 @@ void PairLJClass2GPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = lj96_gpu_init(atom->ntypes+1, cutsq, lj1, lj2, lj3, lj4,
|
||||
|
||||
@ -163,7 +163,7 @@ void PairLJCubicGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = ljcb_gpu_init(atom->ntypes+1, cutsq, cut_inner_sq,
|
||||
|
||||
@ -166,7 +166,7 @@ void PairLJCutCoulCutGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = ljc_gpu_init(atom->ntypes+1, cutsq, lj1, lj2, lj3, lj4,
|
||||
|
||||
@ -168,7 +168,7 @@ void PairLJCutCoulDebyeGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = ljcd_gpu_init(atom->ntypes+1, cutsq, lj1, lj2, lj3, lj4,
|
||||
|
||||
@ -183,7 +183,7 @@ void PairLJCutCoulDSFGPU::init_style()
|
||||
e_shift = erfcc/cut_coul - f_shift*cut_coul;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = ljd_gpu_init(atom->ntypes+1, cutsq, lj1, lj2, lj3, lj4,
|
||||
|
||||
@ -191,7 +191,7 @@ void PairLJCutCoulLongGPU::init_style()
|
||||
if (ncoultablebits) init_tables(cut_coul,cut_respa);
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = ljcl_gpu_init(atom->ntypes+1, cutsq, lj1, lj2, lj3, lj4,
|
||||
|
||||
@ -177,7 +177,7 @@ void PairLJCutCoulMSMGPU::init_style()
|
||||
if (ncoultablebits) init_tables(cut_coul,cut_respa);
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = ljcm_gpu_init(atom->ntypes+1, cutsq, lj1, lj2, lj3, lj4,
|
||||
|
||||
@ -171,7 +171,7 @@ void PairLJCutDipoleCutGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = dpl_gpu_init(atom->ntypes+1, cutsq, lj1, lj2, lj3, lj4,
|
||||
|
||||
@ -195,7 +195,7 @@ void PairLJCutDipoleLongGPU::init_style()
|
||||
if (ncoultablebits) init_tables(cut_coul,nullptr);
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = dplj_gpu_init(atom->ntypes+1, cutsq, lj1, lj2, lj3, lj4,
|
||||
|
||||
@ -162,7 +162,7 @@ void PairLJCutGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = ljl_gpu_init(atom->ntypes+1, cutsq, lj1, lj2, lj3, lj4,
|
||||
|
||||
@ -210,7 +210,7 @@ void PairLJCutTIP4PLongGPU::init_style()
|
||||
if (ncoultablebits) init_tables(cut_coul,cut_respa);
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
|
||||
// set alpha parameter
|
||||
|
||||
@ -191,7 +191,7 @@ void PairLJExpandCoulLongGPU::init_style()
|
||||
if (ncoultablebits) init_tables(cut_coul,cut_respa);
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = ljecl_gpu_init(atom->ntypes+1, cutsq, lj1, lj2, lj3, lj4,
|
||||
|
||||
@ -159,7 +159,7 @@ void PairLJExpandGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = lje_gpu_init(atom->ntypes+1, cutsq, lj1, lj2, lj3, lj4,
|
||||
|
||||
@ -162,7 +162,7 @@ void PairLJGromacsGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
|
||||
@ -195,7 +195,7 @@ void PairLJSDKCoulLongGPU::init_style()
|
||||
if (ncoultablebits) init_tables(cut_coul,nullptr);
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = sdkl_gpu_init(atom->ntypes+1, cutsq, lj_type, lj1, lj2, lj3,
|
||||
|
||||
@ -164,7 +164,7 @@ void PairLJSDKGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = sdk_gpu_init(atom->ntypes+1,cutsq,lj_type,lj1,lj2,lj3,lj4,
|
||||
|
||||
@ -170,7 +170,7 @@ void PairLJSFDipoleSFGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = dplsf_gpu_init(atom->ntypes+1, cutsq, lj1, lj2, lj3, lj4,
|
||||
|
||||
@ -159,7 +159,7 @@ void PairMIECutGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = mie_gpu_init(atom->ntypes+1, cutsq, mie1, mie2, mie3, mie4,
|
||||
|
||||
@ -155,7 +155,7 @@ void PairMorseGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = mor_gpu_init(atom->ntypes+1, cutsq, morse1, r0, alpha, d0,
|
||||
|
||||
@ -203,7 +203,7 @@ void PairRESquaredGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = re_gpu_init(atom->ntypes+1, shape1, well, cutsq, sigma,
|
||||
|
||||
@ -160,7 +160,7 @@ void PairSoftGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = soft_gpu_init(atom->ntypes+1, cutsq, prefactor, cut,
|
||||
|
||||
@ -229,7 +229,7 @@ void PairTableGPU::init_style()
|
||||
}
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = table_gpu_init(atom->ntypes+1, cutsq, table_coeffs, table_data,
|
||||
|
||||
@ -163,7 +163,7 @@ void PairUFMGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = ufml_gpu_init(atom->ntypes+1, cutsq, uf1, uf2, uf3,
|
||||
|
||||
@ -168,7 +168,7 @@ void PairYukawaColloidGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = ykcolloid_gpu_init(atom->ntypes+1, cutsq, a,
|
||||
|
||||
@ -157,7 +157,7 @@ void PairYukawaGPU::init_style()
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = yukawa_gpu_init(atom->ntypes+1, cutsq, kappa, a,
|
||||
|
||||
@ -163,7 +163,7 @@ void PairZBLGPU::init_style()
|
||||
cut_globalsq = cut_global * cut_global;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
maxspecial=atom->maxspecial;
|
||||
int mnf = 5e-2 * neighbor->oneatom;
|
||||
int success = zbl_gpu_init(atom->ntypes+1, cutsq, sw1, sw2, sw3, sw4,
|
||||
|
||||
@ -462,7 +462,7 @@ double MinKokkos::energy_force(int resetflag)
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
|
||||
if (atom->molecular) {
|
||||
if (atom->molecular != Atom::ATOMIC) {
|
||||
if (force->bond) {
|
||||
atomKK->sync(force->bond->execution_space,force->bond->datamask_read);
|
||||
force->bond->compute(eflag,vflag);
|
||||
|
||||
@ -189,7 +189,7 @@ void NPairKokkos<DeviceType,HALF_NEIGH,GHOST,TRI,SIZE>::build(NeighList *list_)
|
||||
k_bins.sync<DeviceType>();
|
||||
k_atom2bin.sync<DeviceType>();
|
||||
|
||||
if (atom->molecular) {
|
||||
if (atom->molecular != Atom::ATOMIC) {
|
||||
if (exclude)
|
||||
atomKK->sync(Device,X_MASK|RADIUS_MASK|TYPE_MASK|MASK_MASK|MOLECULE_MASK|TAG_MASK|SPECIAL_MASK);
|
||||
else
|
||||
|
||||
@ -504,7 +504,7 @@ double FixAtomSwap::energy_full()
|
||||
|
||||
if (force->pair) force->pair->compute(eflag,vflag);
|
||||
|
||||
if (atom->molecular) {
|
||||
if (atom->molecular != Atom::ATOMIC) {
|
||||
if (force->bond) force->bond->compute(eflag,vflag);
|
||||
if (force->angle) force->angle->compute(eflag,vflag);
|
||||
if (force->dihedral) force->dihedral->compute(eflag,vflag);
|
||||
|
||||
@ -80,7 +80,7 @@ FixBondBreak::FixBondBreak(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
// error check
|
||||
|
||||
if (atom->molecular != 1)
|
||||
if (atom->molecular != Atom::MOLECULAR)
|
||||
error->all(FLERR,"Cannot use fix bond/break with non-molecular systems");
|
||||
|
||||
// initialize Marsaglia RNG with processor-unique seed
|
||||
|
||||
@ -148,7 +148,7 @@ FixBondCreate::FixBondCreate(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
// error check
|
||||
|
||||
if (atom->molecular != 1)
|
||||
if (atom->molecular != Atom::MOLECULAR)
|
||||
error->all(FLERR,"Cannot use fix bond/create with non-molecular systems");
|
||||
if (iatomtype == jatomtype &&
|
||||
((imaxbond != jmaxbond) || (inewtype != jnewtype)))
|
||||
|
||||
@ -80,7 +80,7 @@ FixBondSwap::FixBondSwap(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
// error check
|
||||
|
||||
if (atom->molecular != 1)
|
||||
if (atom->molecular != Atom::MOLECULAR)
|
||||
error->all(FLERR,"Cannot use fix bond/swap with non-molecular systems");
|
||||
|
||||
// create a new compute temp style
|
||||
|
||||
@ -2318,7 +2318,7 @@ double FixGCMC::energy_full()
|
||||
|
||||
if (force->pair) force->pair->compute(eflag,vflag);
|
||||
|
||||
if (atom->molecular) {
|
||||
if (atom->molecular != Atom::ATOMIC) {
|
||||
if (force->bond) force->bond->compute(eflag,vflag);
|
||||
if (force->angle) force->angle->compute(eflag,vflag);
|
||||
if (force->dihedral) force->dihedral->compute(eflag,vflag);
|
||||
|
||||
@ -1045,7 +1045,7 @@ double FixWidom::energy_full()
|
||||
|
||||
if (force->pair) force->pair->compute(eflag,vflag);
|
||||
|
||||
if (atom->molecular) {
|
||||
if (atom->molecular != Atom::ATOMIC) {
|
||||
if (force->bond) force->bond->compute(eflag,vflag);
|
||||
if (force->angle) force->angle->compute(eflag,vflag);
|
||||
if (force->dihedral) force->dihedral->compute(eflag,vflag);
|
||||
|
||||
@ -378,7 +378,7 @@ void MLIAPModelNN::compute_gradients(MLIAPData* data)
|
||||
egradient is derivative of energy w.r.t. parameters
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
void MLIAPModelNN::compute_gradgrads(class MLIAPData* data)
|
||||
void MLIAPModelNN::compute_gradgrads(class MLIAPData * /*data*/)
|
||||
{
|
||||
error->all(FLERR,"compute_gradgrads not implemented");
|
||||
}
|
||||
@ -388,7 +388,7 @@ void MLIAPModelNN::compute_gradgrads(class MLIAPData* data)
|
||||
egradient is derivative of energy w.r.t. parameters
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
void MLIAPModelNN::compute_force_gradients(class MLIAPData* data)
|
||||
void MLIAPModelNN::compute_force_gradients(class MLIAPData * /*data*/)
|
||||
{
|
||||
error->all(FLERR,"compute_force_gradients not implemented");
|
||||
}
|
||||
@ -397,7 +397,7 @@ void MLIAPModelNN::compute_force_gradients(class MLIAPData* data)
|
||||
count the number of non-zero entries in gamma matrix
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
int MLIAPModelNN::get_gamma_nnz(class MLIAPData* data)
|
||||
int MLIAPModelNN::get_gamma_nnz(class MLIAPData * /*data*/)
|
||||
{
|
||||
// todo: get_gamma_nnz
|
||||
return 0;
|
||||
|
||||
@ -367,7 +367,7 @@ void VerletSplit::run(int n)
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
|
||||
if (atom->molecular) {
|
||||
if (atom->molecular != Atom::ATOMIC) {
|
||||
if (force->bond) force->bond->compute(eflag,vflag);
|
||||
if (force->angle) force->angle->compute(eflag,vflag);
|
||||
if (force->dihedral) force->dihedral->compute(eflag,vflag);
|
||||
|
||||
@ -74,7 +74,7 @@ fbi(NeighList *list, IntelBuffers<flt_t,acc_t> *buffers) {
|
||||
_fix->nbor_pack_width());
|
||||
|
||||
int need_ic = 0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
dminimum_image_check(need_ic, neighbor->cutneighmax, neighbor->cutneighmax,
|
||||
neighbor->cutneighmax);
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ hbni(NeighList *list, IntelBuffers<flt_t,acc_t> *buffers) {
|
||||
buffers->grow_list(list, atom->nlocal, comm->nthreads, 0, off_end);
|
||||
|
||||
int need_ic = 0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
dminimum_image_check(need_ic, neighbor->cutneighmax, neighbor->cutneighmax,
|
||||
neighbor->cutneighmax);
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ hbnti(NeighList *list, IntelBuffers<flt_t,acc_t> *buffers) {
|
||||
buffers->grow_list(list, atom->nlocal, comm->nthreads, 0, off_end);
|
||||
|
||||
int need_ic = 0;
|
||||
if (atom->molecular)
|
||||
if (atom->molecular != Atom::ATOMIC)
|
||||
dminimum_image_check(need_ic, neighbor->cutneighmax, neighbor->cutneighmax,
|
||||
neighbor->cutneighmax);
|
||||
|
||||
|
||||
@ -316,7 +316,7 @@ void VerletLRTIntel::run(int n)
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
|
||||
if (atom->molecular) {
|
||||
if (atom->molecular != Atom::ATOMIC) {
|
||||
if (force->bond) force->bond->compute(eflag,vflag);
|
||||
if (force->angle) force->angle->compute(eflag,vflag);
|
||||
if (force->dihedral) force->dihedral->compute(eflag,vflag);
|
||||
|
||||
@ -139,20 +139,6 @@ void ThrData::init_adp(int nall, double *rho, double **mu, double **lambda)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void ThrData::init_cdeam(int nall, double *rho, double *rhoB, double *D_values)
|
||||
{
|
||||
init_eam(nall, rho);
|
||||
|
||||
if (nall >= 0 && rhoB && D_values) {
|
||||
_rhoB = rhoB + _tid*nall;
|
||||
_D_values = D_values + _tid*nall;
|
||||
memset(_rhoB, 0, nall*sizeof(double));
|
||||
memset(_D_values, 0, nall*sizeof(double));
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void ThrData::init_eim(int nall, double *rho, double *fp)
|
||||
{
|
||||
init_eam(nall, rho);
|
||||
|
||||
@ -52,7 +52,6 @@ class ThrData {
|
||||
|
||||
// setup and erase per atom arrays
|
||||
void init_adp(int, double *, double **, double **); // ADP (+ EAM)
|
||||
void init_cdeam(int, double *, double *, double *); // CDEAM (+ EAM)
|
||||
void init_eam(int, double *); // EAM
|
||||
void init_eim(int, double *, double *); // EIM (+ EAM)
|
||||
|
||||
|
||||
@ -67,14 +67,14 @@ namespace LAMMPS_NS {
|
||||
/*! get dimension of reference
|
||||
*
|
||||
* This will return either 0, 1, 2 depending on whether the
|
||||
* reference has no, one or two "[<number>]" postfixes.
|
||||
* reference has no, one or two "[{number}]" postfixes.
|
||||
*
|
||||
* \return integer with the dimensionality of the reference */
|
||||
int get_dim() const { return dim; }
|
||||
|
||||
/*! get index of first dimension
|
||||
*
|
||||
* This will return the <number> in the first "[<number>]"
|
||||
* This will return the number in the first "[{number}]"
|
||||
* postfix or 0 if there is no postfix.
|
||||
*
|
||||
* \return integer with index or the postfix or 0 */
|
||||
@ -82,7 +82,7 @@ namespace LAMMPS_NS {
|
||||
|
||||
/*! get index of second dimension
|
||||
*
|
||||
* This will return the <number> in the second "[<number>]"
|
||||
* This will return the number in the second "[{number}]"
|
||||
* postfix or -1 if there is no second postfix.
|
||||
*
|
||||
* \return integer with index of the postfix or -1 */
|
||||
|
||||
@ -663,7 +663,7 @@ void Atom::create_avec(const std::string &style, int narg, char **arg, int trysu
|
||||
// map style will be reset to array vs hash to by map_init()
|
||||
|
||||
molecular = avec->molecular;
|
||||
if (molecular && tag_enable == 0)
|
||||
if ((molecular != Atom::ATOMIC) && (tag_enable == 0))
|
||||
error->all(FLERR,"Atom IDs must be used for molecular systems");
|
||||
if (molecular != Atom::ATOMIC) map_style = MAP_YES;
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ void ComputeFragmentAtom::init()
|
||||
{
|
||||
if (atom->tag_enable == 0)
|
||||
error->all(FLERR,"Cannot use compute fragment/atom unless atoms have IDs");
|
||||
if (!atom->molecular)
|
||||
if (atom->molecular != Atom::MOLECULAR)
|
||||
error->all(FLERR,"Compute fragment/atom requires a molecular system");
|
||||
|
||||
int count = 0;
|
||||
|
||||
@ -83,7 +83,7 @@ double ComputePE::compute_scalar()
|
||||
if (pairflag && force->pair)
|
||||
one += force->pair->eng_vdwl + force->pair->eng_coul;
|
||||
|
||||
if (atom->molecular) {
|
||||
if (atom->molecular != Atom::ATOMIC) {
|
||||
if (bondflag && force->bond) one += force->bond->energy;
|
||||
if (angleflag && force->angle) one += force->angle->energy;
|
||||
if (dihedralflag && force->dihedral) one += force->dihedral->energy;
|
||||
|
||||
@ -48,7 +48,7 @@ void CreateBonds::command(int narg, char **arg)
|
||||
error->all(FLERR,"Create_bonds command before simulation box is defined");
|
||||
if (atom->tag_enable == 0)
|
||||
error->all(FLERR,"Cannot use create_bonds unless atoms have IDs");
|
||||
if (atom->molecular != 1)
|
||||
if (atom->molecular != Atom::MOLECULAR)
|
||||
error->all(FLERR,"Cannot use create_bonds with non-molecular system");
|
||||
|
||||
if (narg < 4) error->all(FLERR,"Illegal create_bonds command");
|
||||
|
||||
@ -83,7 +83,7 @@ void CreateBox::command(int narg, char **arg)
|
||||
|
||||
// if molecular, zero out topology info
|
||||
|
||||
if (atom->molecular) {
|
||||
if (atom->molecular != Atom::ATOMIC) {
|
||||
atom->bond_per_atom = 0;
|
||||
atom->angle_per_atom = 0;
|
||||
atom->dihedral_per_atom = 0;
|
||||
|
||||
@ -40,7 +40,7 @@ void DeleteBonds::command(int narg, char **arg)
|
||||
error->all(FLERR,"Delete_bonds command before simulation box is defined");
|
||||
if (atom->natoms == 0)
|
||||
error->all(FLERR,"Delete_bonds command with no atoms existing");
|
||||
if (atom->molecular != 1)
|
||||
if (atom->molecular != Atom::MOLECULAR)
|
||||
error->all(FLERR,"Cannot use delete_bonds with non-molecular system");
|
||||
|
||||
if (narg < 2) error->all(FLERR,"Illegal delete_bonds command");
|
||||
|
||||
@ -25,7 +25,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Deprecated::command(int /* narg */, char ** /* arg */)
|
||||
void Deprecated::command(int narg, char **arg)
|
||||
{
|
||||
const std::string cmd = input->command;
|
||||
|
||||
@ -38,7 +38,15 @@ void Deprecated::command(int /* narg */, char ** /* arg */)
|
||||
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");
|
||||
utils::logmesg(lmp,"\nWARNING: 'kim_<command>' has been renamed to "
|
||||
"'kim <command>'. Please update your input.\n\n");
|
||||
std::string newcmd("kim");
|
||||
newcmd += " " + cmd.substr(4);
|
||||
for (int i=0; i < narg; ++i) {
|
||||
newcmd.append(1,' ');
|
||||
newcmd.append(arg[i]);
|
||||
}
|
||||
input->one(newcmd);
|
||||
}
|
||||
error->all(FLERR,"This command is no longer available");
|
||||
}
|
||||
|
||||
@ -292,7 +292,7 @@ double FixNumDiff::update_energy()
|
||||
|
||||
if (pair_compute_flag) force->pair->compute(eflag,0);
|
||||
|
||||
if (atom->molecular) {
|
||||
if (atom->molecular != Atom::ATOMIC) {
|
||||
if (force->bond) force->bond->compute(eflag,0);
|
||||
if (force->angle) force->angle->compute(eflag,0);
|
||||
if (force->dihedral) force->dihedral->compute(eflag,0);
|
||||
|
||||
@ -375,11 +375,7 @@ struct ostream_params {
|
||||
};
|
||||
} // namespace detail
|
||||
|
||||
#if defined(__PGI)
|
||||
static detail::buffer_size buffer_size;
|
||||
#else
|
||||
static constexpr detail::buffer_size buffer_size;
|
||||
#endif
|
||||
|
||||
// A fast output stream which is not thread-safe.
|
||||
class ostream final : private detail::buffer<char> {
|
||||
|
||||
11
src/info.cpp
11
src/info.cpp
@ -432,7 +432,7 @@ void Info::command(int narg, char **arg)
|
||||
fmt::print(out,"Units = {}\n", update->unit_style);
|
||||
fmt::print(out,"Atom style = {}\n", atom->atom_style);
|
||||
fmt::print(out,"Atom map = {}\n", mapstyles[atom->map_style]);
|
||||
if (atom->molecular > 0) {
|
||||
if (atom->molecular != Atom::ATOMIC) {
|
||||
const char *msg;
|
||||
msg = (atom->molecular == Atom::TEMPLATE) ? "template" : "standard";
|
||||
fmt::print(out,"Molecule type = {}\n",msg);
|
||||
@ -447,7 +447,7 @@ void Info::command(int narg, char **arg)
|
||||
fmt::print(out," {}", hybrid->keywords[i]);
|
||||
fputc('\n',out);
|
||||
}
|
||||
if (atom->molecular > 0) {
|
||||
if (atom->molecular != Atom::ATOMIC) {
|
||||
const char *msg;
|
||||
msg = force->bond_style ? force->bond_style : "none";
|
||||
fmt::print(out,"Bonds = {:12}, types = {:8}, style = {}\n",
|
||||
@ -1316,13 +1316,16 @@ std::string Info::get_os_info()
|
||||
std::string Info::get_compiler_info()
|
||||
{
|
||||
std::string buf;
|
||||
#if __clang__
|
||||
#if __INTEL_LLVM_COMPILER
|
||||
double version = static_cast<double>(__INTEL_LLVM_COMPILER)*0.01;
|
||||
buf = fmt::format("Intel LLVM C++ {:.1f} / {}", version, __VERSION__);
|
||||
#elif __clang__
|
||||
buf = fmt::format("Clang C++ {}", __VERSION__);
|
||||
#elif __PGI
|
||||
buf = fmt::format("PGI C++ {}.{}",__PGIC__,__PGIC_MINOR__);
|
||||
#elif __INTEL_COMPILER
|
||||
double version = static_cast<double>(__INTEL_COMPILER)*0.01;
|
||||
buf = fmt::format("Intel C++ {:.2f}.{} / {}", version,
|
||||
buf = fmt::format("Intel Classic C++ {:.2f}.{} / {}", version,
|
||||
__INTEL_COMPILER_UPDATE, __VERSION__);
|
||||
#elif __GNUC__
|
||||
buf = fmt::format("GNU C++ {}", __VERSION__);
|
||||
|
||||
@ -483,11 +483,15 @@ void lammps_commands_string(void *handle, const char *str)
|
||||
{
|
||||
LAMMPS *lmp = (LAMMPS *) handle;
|
||||
|
||||
// make copy of str so can strtok() it
|
||||
// copy str and convert from CR-LF (DOS-style) to LF (Unix style) line
|
||||
int n = strlen(str);
|
||||
char *ptr, *copy = new char[n+1];
|
||||
|
||||
int n = strlen(str) + 1;
|
||||
char *copy = new char[n];
|
||||
strcpy(copy,str);
|
||||
for (ptr = copy; *str != '\0'; ++str) {
|
||||
if ((str[0] == '\r') && (str[1] == '\n')) continue;
|
||||
*ptr++ = *str;
|
||||
}
|
||||
*ptr = '\0';
|
||||
|
||||
BEGIN_CAPTURE
|
||||
{
|
||||
@ -495,8 +499,9 @@ void lammps_commands_string(void *handle, const char *str)
|
||||
lmp->error->all(FLERR,"Library error: issuing LAMMPS command during run");
|
||||
}
|
||||
|
||||
char *ptr = copy;
|
||||
for (int i=0; i < n-1; ++i) {
|
||||
n = strlen(copy);
|
||||
ptr = copy;
|
||||
for (int i=0; i < n; ++i) {
|
||||
|
||||
// handle continuation character as last character in line or string
|
||||
if ((copy[i] == '&') && (copy[i+1] == '\n'))
|
||||
|
||||
@ -242,7 +242,7 @@ The typecasts prevent compiler warnings about possible truncation issues.
|
||||
|
||||
// define stack variable alignment
|
||||
|
||||
#if defined(__INTEL_COMPILER)
|
||||
#if defined(__INTEL_LLVM_COMPILER) || defined(__INTEL_COMPILER)
|
||||
#define _alignvar(expr,val) __declspec(align(val)) expr
|
||||
#elif defined(__GNUC__)
|
||||
#define _alignvar(expr,val) expr __attribute((aligned(val)))
|
||||
@ -252,7 +252,7 @@ The typecasts prevent compiler warnings about possible truncation issues.
|
||||
|
||||
// declaration to lift aliasing restrictions
|
||||
|
||||
#if defined(__INTEL_COMPILER)
|
||||
#if defined(__INTEL_LLVM_COMPILER) || defined(__INTEL_COMPILER)
|
||||
#define _noalias restrict
|
||||
#elif defined(__GNUC__)
|
||||
#define _noalias __restrict
|
||||
|
||||
@ -304,7 +304,7 @@ void Min::setup(int flag)
|
||||
if (pair_compute_flag) force->pair->compute(eflag,vflag);
|
||||
else if (force->pair) force->pair->compute_dummy(eflag,vflag);
|
||||
|
||||
if (atom->molecular) {
|
||||
if (atom->molecular != Atom::ATOMIC) {
|
||||
if (force->bond) force->bond->compute(eflag,vflag);
|
||||
if (force->angle) force->angle->compute(eflag,vflag);
|
||||
if (force->dihedral) force->dihedral->compute(eflag,vflag);
|
||||
@ -386,7 +386,7 @@ void Min::setup_minimal(int flag)
|
||||
if (pair_compute_flag) force->pair->compute(eflag,vflag);
|
||||
else if (force->pair) force->pair->compute_dummy(eflag,vflag);
|
||||
|
||||
if (atom->molecular) {
|
||||
if (atom->molecular != Atom::ATOMIC) {
|
||||
if (force->bond) force->bond->compute(eflag,vflag);
|
||||
if (force->angle) force->angle->compute(eflag,vflag);
|
||||
if (force->dihedral) force->dihedral->compute(eflag,vflag);
|
||||
@ -558,7 +558,7 @@ double Min::energy_force(int resetflag)
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
|
||||
if (atom->molecular) {
|
||||
if (atom->molecular != Atom::ATOMIC) {
|
||||
if (force->bond) force->bond->compute(eflag,vflag);
|
||||
if (force->angle) force->angle->compute(eflag,vflag);
|
||||
if (force->dihedral) force->dihedral->compute(eflag,vflag);
|
||||
|
||||
@ -29,7 +29,9 @@
|
||||
// autodetect OpenMP compatibility if not explicitly set
|
||||
|
||||
#ifndef LAMMPS_OMP_COMPAT
|
||||
# if defined(__INTEL_COMPILER)
|
||||
# if defined(__INTEL_LLVM_COMPILER)
|
||||
# define LAMMPS_OMP_COMPAT 4
|
||||
# elif defined(__INTEL_COMPILER)
|
||||
# if __INTEL_COMPILER > 18
|
||||
# define LAMMPS_OMP_COMPAT 4
|
||||
# endif
|
||||
|
||||
@ -221,7 +221,7 @@ void Pair::init()
|
||||
// for manybody potentials
|
||||
// check if bonded exclusions could invalidate the neighbor list
|
||||
|
||||
if (manybody_flag && atom->molecular) {
|
||||
if (manybody_flag && (atom->molecular != Atom::ATOMIC)) {
|
||||
int flag = 0;
|
||||
if (atom->nbonds > 0 && force->special_lj[1] == 0.0 &&
|
||||
force->special_coul[1] == 0.0) flag = 1;
|
||||
|
||||
@ -221,7 +221,7 @@ void ReadData::command(int narg, char **arg)
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"extra/bond/per/atom") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal read_data command");
|
||||
if (! atom->molecular)
|
||||
if (atom->molecular == Atom::ATOMIC)
|
||||
error->all(FLERR,"No bonds allowed with this atom style");
|
||||
atom->extra_bond_per_atom = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
|
||||
if (atom->extra_bond_per_atom < 0)
|
||||
@ -229,7 +229,7 @@ void ReadData::command(int narg, char **arg)
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"extra/angle/per/atom") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal read_data command");
|
||||
if (! atom->molecular)
|
||||
if (atom->molecular == Atom::ATOMIC)
|
||||
error->all(FLERR,"No angles allowed with this atom style");
|
||||
atom->extra_angle_per_atom = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
|
||||
if (atom->extra_angle_per_atom < 0)
|
||||
@ -237,7 +237,7 @@ void ReadData::command(int narg, char **arg)
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"extra/dihedral/per/atom") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal read_data command");
|
||||
if (! atom->molecular)
|
||||
if (atom->molecular == Atom::ATOMIC)
|
||||
error->all(FLERR,"No dihedrals allowed with this atom style");
|
||||
atom->extra_dihedral_per_atom = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
|
||||
if (atom->extra_dihedral_per_atom < 0)
|
||||
@ -245,7 +245,7 @@ void ReadData::command(int narg, char **arg)
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"extra/improper/per/atom") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal read_data command");
|
||||
if (! atom->molecular)
|
||||
if (atom->molecular == Atom::ATOMIC)
|
||||
error->all(FLERR,"No impropers allowed with this atom style");
|
||||
atom->extra_improper_per_atom = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
|
||||
if (atom->extra_improper_per_atom < 0)
|
||||
@ -253,7 +253,7 @@ void ReadData::command(int narg, char **arg)
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"extra/special/per/atom") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal read_data command");
|
||||
if (! atom->molecular)
|
||||
if (atom->molecular == Atom::ATOMIC)
|
||||
error->all(FLERR,"No bonded interactions allowed with this atom style");
|
||||
force->special_extra = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
|
||||
if (force->special_extra < 0)
|
||||
|
||||
@ -602,7 +602,7 @@ void Replicate::command(int narg, char **arg)
|
||||
atom->tag[i] += atom_offset;
|
||||
atom->image[i] = image;
|
||||
|
||||
if (atom->molecular) {
|
||||
if (atom->molecular != Atom::ATOMIC) {
|
||||
if (atom->molecule[i] > 0)
|
||||
atom->molecule[i] += mol_offset;
|
||||
if (atom->molecular == Atom::MOLECULAR) {
|
||||
@ -704,7 +704,7 @@ void Replicate::command(int narg, char **arg)
|
||||
atom->tag[i] += atom_offset;
|
||||
atom->image[i] = image;
|
||||
|
||||
if (atom->molecular) {
|
||||
if (atom->molecular != Atom::ATOMIC) {
|
||||
if (atom->molecule[i] > 0)
|
||||
atom->molecule[i] += mol_offset;
|
||||
if (atom->molecular == Atom::MOLECULAR) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user