Merge branch 'develop' into group-bitmap-accessor

This commit is contained in:
Axel Kohlmeyer
2024-09-06 17:10:27 -04:00
87 changed files with 5113 additions and 3509 deletions

89
.github/workflows/check-vla.yml vendored Normal file
View File

@ -0,0 +1,89 @@
# GitHub action to build LAMMPS on Linux with gcc and -Werror=vla
name: "Check for Variable Length Arrays"
on:
push:
branches:
- develop
pull_request:
branches:
- develop
workflow_dispatch:
jobs:
build:
name: Build with -Werror=vla
if: ${{ github.repository == 'lammps/lammps' }}
runs-on: ubuntu-latest
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install extra packages
run: |
sudo apt-get install -y ccache \
libeigen3-dev \
libgsl-dev \
libcurl4-openssl-dev \
mold \
mpi-default-bin \
mpi-default-dev \
ninja-build \
python3-dev
- name: Create Build Environment
run: mkdir build
- name: Set up ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: linux-vla-ccache-${{ github.sha }}
restore-keys: linux-vla-ccache-
- name: Building LAMMPS via CMake
shell: bash
run: |
ccache -z
python3 -m venv linuxenv
source linuxenv/bin/activate
python3 -m pip install numpy
python3 -m pip install pyyaml
cmake -S cmake -B build \
-C cmake/presets/most.cmake \
-D CMAKE_CXX_COMPILER=g++ \
-D CMAKE_C_COMPILER=gcc \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D CMAKE_BUILD_TYPE=Debug \
-D CMAKE_CXX_FLAGS_DEBUG="-Og -g -Werror=vla" \
-D DOWNLOAD_POTENTIALS=off \
-D BUILD_MPI=on \
-D BUILD_SHARED_LIBS=off \
-D BUILD_TOOLS=off \
-D ENABLE_TESTING=off \
-D MLIAP_ENABLE_ACE=on \
-D MLIAP_ENABLE_PYTHON=off \
-D PKG_AWPMD=on \
-D PKG_GPU=on \
-D GPU_API=opencl \
-D PKG_LATBOLTZ=on \
-D PKG_MDI=on \
-D PKG_MANIFOLD=on \
-D PKG_ML-PACE=on \
-D PKG_ML-RANN=off \
-D PKG_MOLFILE=on \
-D PKG_RHEO=on \
-D PKG_PTM=on \
-D PKG_PYTHON=on \
-D PKG_QTB=on \
-D PKG_SMTBQ=on \
-G Ninja
cmake --build build
ccache -s

View File

@ -1,5 +1,5 @@
# GitHub action to build LAMMPS on Windows with Visual C++
name: "Native Windows Compilation and Unit Tests"
name: "Windows Unit Tests"
on:
push:
@ -16,6 +16,8 @@ jobs:
name: Windows Compilation Test
if: ${{ github.repository == 'lammps/lammps' }}
runs-on: windows-latest
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
steps:
- name: Checkout repository
@ -23,36 +25,41 @@ jobs:
with:
fetch-depth: 2
- name: Enable MSVC++
uses: lammps/setup-msvc-dev@v3
with:
arch: x64
- name: Install Ccache
run: |
choco install ccache ninja -y
- name: Set up ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: win-unit-ccache-${{ github.sha }}
restore-keys: win-unit-ccache-
- name: Select Python version
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Building LAMMPS via CMake
shell: bash
run: |
ccache -z
python3 -m pip install numpy
python3 -m pip install pyyaml
nuget install MSMPIsdk
nuget install MSMPIDIST
cmake -C cmake/presets/windows.cmake \
-D DOWNLOAD_POTENTIALS=off \
-D PKG_PYTHON=on \
-D WITH_PNG=off \
-D WITH_JPEG=off \
-S cmake -B build \
-D BUILD_SHARED_LIBS=on \
-D LAMMPS_EXCEPTIONS=on \
-D ENABLE_TESTING=on
cmake --build build --config Release --parallel 2
cmake -C cmake\presets\windows.cmake -D CMAKE_CXX_COMPILER=cl -D CMAKE_CXX_COMPILER_LAUNCHER=ccache -D CMAKE_C_COMPILER=cl -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_Fortran_COMPILER="" -D DOWNLOAD_POTENTIALS=off -D PKG_PYTHON=on -D WITH_PNG=off -D WITH_JPEG=off -S cmake -B build -D BUILD_SHARED_LIBS=on -D ENABLE_TESTING=on -D CMAKE_BUILD_TYPE=Release -G Ninja
cmake --build build
ccache -s
- name: Run LAMMPS executable
shell: bash
run: |
./build/Release/lmp.exe -h
./build/Release/lmp.exe -in bench/in.lj
build\lmp.exe -h
build\lmp.exe -in bench\in.lj
- name: Run Unit Tests
working-directory: build
shell: bash
run: ctest -V -C Release -E FixTimestep:python_move_nve
run: ctest -V -E FixTimestep:python_move_nve

82
.github/workflows/unittest-linux.yml vendored Normal file
View File

@ -0,0 +1,82 @@
# GitHub action to build LAMMPS on Linux and run standard unit tests
name: "Unittest for Linux /w LAMMPS_BIGBIG"
on:
push:
branches:
- develop
pull_request:
branches:
- develop
workflow_dispatch:
jobs:
build:
name: Linux Unit Test
if: ${{ github.repository == 'lammps/lammps' }}
runs-on: ubuntu-latest
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install extra packages
run: |
sudo apt-get install -y ccache \
libeigen3-dev \
libgsl-dev \
libcurl4-openssl-dev \
mold \
ninja-build \
python3-dev
- name: Create Build Environment
run: mkdir build
- name: Set up ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: linux-unit-ccache-${{ github.sha }}
restore-keys: linux-unit-ccache-
- name: Building LAMMPS via CMake
shell: bash
run: |
ccache -z
python3 -m venv linuxenv
source linuxenv/bin/activate
python3 -m pip install numpy
python3 -m pip install pyyaml
cmake -S cmake -B build \
-C cmake/presets/gcc.cmake \
-C cmake/presets/most.cmake \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D BUILD_SHARED_LIBS=on \
-D LAMMPS_SIZES=bigbig \
-D DOWNLOAD_POTENTIALS=off \
-D ENABLE_TESTING=on \
-D MLIAP_ENABLE_ACE=on \
-D MLIAP_ENABLE_PYTHON=off \
-D PKG_MANIFOLD=on \
-D PKG_ML-PACE=on \
-D PKG_ML-RANN=on \
-D PKG_RHEO=on \
-D PKG_PTM=on \
-D PKG_PYTHON=on \
-D PKG_QTB=on \
-D PKG_SMTBQ=on \
-G Ninja
cmake --build build
ccache -s
- name: Run Tests
working-directory: build
shell: bash
run: ctest -V

View File

@ -474,13 +474,13 @@ if(BUILD_OMP)
if(CMAKE_VERSION VERSION_LESS 3.28)
get_filename_component(_exe "${CMAKE_CXX_COMPILER}" NAME)
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (_exe STREQUAL "crayCC"))
set(CMAKE_SHARED_LINKER_FLAGS_${BTYPE} "${CMAKE_SHARED_LINKER_FLAGS_${BTYPE} -fopenmp")
set(CMAKE_STATIC_LINKER_FLAGS_${BTYPE} "${CMAKE_STATIC_LINKER_FLAGS_${BTYPE} -fopenmp")
set(CMAKE_SHARED_LINKER_FLAGS_${BTYPE} "${CMAKE_SHARED_LINKER_FLAGS_${BTYPE}} -fopenmp")
set(CMAKE_STATIC_LINKER_FLAGS_${BTYPE} "${CMAKE_STATIC_LINKER_FLAGS_${BTYPE}} -fopenmp")
endif()
else()
if(CMAKE_CXX_COMPILER_ID STREQUAL "CrayClang")
set(CMAKE_SHARED_LINKER_FLAGS_${BTYPE} "${CMAKE_SHARED_LINKER_FLAGS_${BTYPE} -fopenmp")
set(CMAKE_STATIC_LINKER_FLAGS_${BTYPE} "${CMAKE_STATIC_LINKER_FLAGS_${BTYPE} -fopenmp")
set(CMAKE_SHARED_LINKER_FLAGS_${BTYPE} "${CMAKE_SHARED_LINKER_FLAGS_${BTYPE}} -fopenmp")
set(CMAKE_STATIC_LINKER_FLAGS_${BTYPE} "${CMAKE_STATIC_LINKER_FLAGS_${BTYPE}} -fopenmp")
endif()
endif()
endif()
@ -515,14 +515,6 @@ if(PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_ELECTRODE OR BUILD_T
endif()
endif()
find_package(CURL QUIET COMPONENTS HTTP HTTPS)
option(WITH_CURL "Enable libcurl support" ${CURL_FOUND})
if(WITH_CURL)
find_package(CURL REQUIRED COMPONENTS HTTP HTTPS)
target_compile_definitions(lammps PRIVATE -DLAMMPS_CURL)
target_link_libraries(lammps PRIVATE CURL::libcurl)
endif()
# tweak jpeg library names to avoid linker errors with MinGW cross-compilation
set(JPEG_NAMES libjpeg libjpeg-62)
find_package(JPEG QUIET)
@ -580,7 +572,7 @@ else()
endif()
foreach(PKG_WITH_INCL KSPACE PYTHON ML-IAP VORONOI COLVARS ML-HDNNP MDI MOLFILE NETCDF
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM COMPRESS ML-PACE LEPTON RHEO)
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM COMPRESS ML-PACE LEPTON RHEO EXTRA-COMMAND)
if(PKG_${PKG_WITH_INCL})
include(Packages/${PKG_WITH_INCL})
endif()
@ -973,6 +965,9 @@ message(STATUS "<<< Compilers and Flags: >>>
C++ Standard: ${CMAKE_CXX_STANDARD}
C++ Flags: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BTYPE}}
Defines: ${DEFINES}")
if(CMAKE_CXX_COMPILER_LAUNCHER)
message(STATUS " Launcher: ${CMAKE_CXX_COMPILER_LAUNCHER}")
endif()
get_target_property(OPTIONS lammps COMPILE_OPTIONS)
if(OPTIONS)
message(" Options: ${OPTIONS}")
@ -991,6 +986,9 @@ if(_index GREATER -1)
Type: ${CMAKE_C_COMPILER_ID}
Version: ${CMAKE_C_COMPILER_VERSION}
C Flags: ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${BTYPE}}")
if(CMAKE_C_COMPILER_LAUNCHER)
message(STATUS " Launcher: ${CMAKE_C_COMPILER_LAUNCHER}")
endif()
endif()
message(STATUS "<<< Linker flags: >>>")
message(STATUS "Executable name: ${LAMMPS_BINARY}")

View File

@ -0,0 +1,10 @@
# the geturl command needs libcurl
find_package(CURL QUIET COMPONENTS HTTP HTTPS)
option(WITH_CURL "Enable libcurl support" ${CURL_FOUND})
if(WITH_CURL)
find_package(CURL REQUIRED COMPONENTS HTTP HTTPS)
target_compile_definitions(lammps PRIVATE -DLAMMPS_CURL)
target_link_libraries(lammps PRIVATE CURL::libcurl)
endif()

View File

@ -127,7 +127,7 @@ if(PKG_KSPACE)
${KOKKOS_PKG_SOURCES_DIR}/grid3d_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/remap_kokkos.cpp)
set(FFT_KOKKOS "KISS" CACHE STRING "FFT library for Kokkos-enabled KSPACE package")
set(FFT_KOKKOS_VALUES KISS FFTW3 MKL HIPFFT CUFFT)
set(FFT_KOKKOS_VALUES KISS FFTW3 MKL NVPL HIPFFT CUFFT MKL_GPU)
set_property(CACHE FFT_KOKKOS PROPERTY STRINGS ${FFT_KOKKOS_VALUES})
validate_option(FFT_KOKKOS FFT_KOKKOS_VALUES)
string(TOUPPER ${FFT_KOKKOS} FFT_KOKKOS)
@ -137,10 +137,8 @@ if(PKG_KSPACE)
message(FATAL_ERROR "The CUDA backend of Kokkos requires either KISS FFT or CUFFT.")
elseif(FFT_KOKKOS STREQUAL "KISS")
message(WARNING "Using KISS FFT with the CUDA backend of Kokkos may be sub-optimal.")
target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_KISS)
elseif(FFT_KOKKOS STREQUAL "CUFFT")
find_package(CUDAToolkit REQUIRED)
target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_CUFFT)
target_link_libraries(lammps PRIVATE CUDA::cufft)
endif()
elseif(Kokkos_ENABLE_HIP)
@ -152,10 +150,21 @@ if(PKG_KSPACE)
elseif(FFT_KOKKOS STREQUAL "HIPFFT")
include(DetectHIPInstallation)
find_package(hipfft REQUIRED)
target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_HIPFFT)
target_link_libraries(lammps PRIVATE hip::hipfft)
endif()
elseif(FFT_KOKKOS STREQUAL "MKL_GPU")
if(NOT Kokkos_ENABLE_SYCL)
message(FATAL_ERROR "Using MKL_GPU FFT currently requires the SYCL backend of Kokkos.")
endif()
find_package(MKL REQUIRED)
target_link_libraries(lammps PRIVATE mkl_sycl_dft mkl_intel_ilp64 mkl_tbb_thread mkl_core tbb)
elseif(FFT_KOKKOS STREQUAL "MKL")
find_package(MKL REQUIRED)
elseif(FFT_KOKKOS STREQUAL "NVPL")
find_package(nvpl_fft REQUIRED)
target_link_libraries(lammps PRIVATE nvpl::fftw)
endif()
target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_${FFT_KOKKOS})
endif()
if(PKG_ML-IAP)

View File

@ -10,7 +10,7 @@ if(${FFTW}_FOUND)
else()
set(FFT "KISS" CACHE STRING "FFT library for KSPACE package")
endif()
set(FFT_VALUES KISS FFTW3 MKL)
set(FFT_VALUES KISS FFTW3 MKL NVPL)
set_property(CACHE FFT PROPERTY STRINGS ${FFT_VALUES})
validate_option(FFT FFT_VALUES)
string(TOUPPER ${FFT} FFT)
@ -41,6 +41,10 @@ elseif(FFT STREQUAL "MKL")
target_compile_definitions(lammps PRIVATE -DFFT_MKL_THREADS)
endif()
target_link_libraries(lammps PRIVATE MKL::MKL)
elseif(FFT STREQUAL "NVPL")
find_package(nvpl_fft REQUIRED)
target_compile_definitions(lammps PRIVATE -DFFT_NVPL)
target_link_libraries(lammps PRIVATE nvpl::fftw)
else()
# last option is KISSFFT
target_compile_definitions(lammps PRIVATE -DFFT_KISS)

View File

@ -32,9 +32,9 @@ endif()
# Note: must also adjust check for supported API versions in
# fix_plumed.cpp when version changes from v2.n.x to v2.n+1.y
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.9.1/plumed-src-2.9.1.tgz"
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.9.2/plumed-src-2.9.2.tgz"
CACHE STRING "URL for PLUMED tarball")
set(PLUMED_MD5 "c3b2d31479c1e9ce211719d40e9efbd7" CACHE STRING "MD5 checksum of PLUMED tarball")
set(PLUMED_MD5 "04862602a372c1013bdfee2d6d03bace" CACHE STRING "MD5 checksum of PLUMED tarball")
mark_as_advanced(PLUMED_URL)
mark_as_advanced(PLUMED_MD5)

View File

@ -0,0 +1,18 @@
# preset that enables KOKKOS and selects SYCL compilation with OpenMP
# enabled as well. Also sets some performance related compiler flags.
set(PKG_KOKKOS ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_OPENMP ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_SYCL ON CACHE BOOL "" FORCE)
# hide deprecation warnings temporarily for stable release
set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE)
set(CMAKE_CXX_COMPILER icpx CACHE STRING "" FORCE)
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
set(CMAKE_CXX_STANDARD 17 CACHE STRING "" FORCE)
# Silence everything
set(CMAKE_CXX_FLAGS "-w" CACHE STRING "" FORCE)
set(CMAKE_EXE_LINKER_FLAGS "-fsycl -flink-huge-device-code -fsycl-max-parallel-link-jobs=32 -fsycl-targets=spir64_gen -Xsycl-target-backend \"-device 12.60.7\" " CACHE STRING "" FORCE)
set(CMAKE_TUNE_FLAGS "-O3 -fsycl -fsycl-device-code-split=per_kernel -fsycl-targets=spir64_gen" CACHE STRING "" FORCE)

View File

@ -1,4 +1,4 @@
.TH MSI2LMP "1" "v3.9.10" "2023-03-10"
.TH MSI2LMP "1" "v3.9.11" "2024-09-06"
.SH NAME
.B MSI2LMP
\- Converter for Materials Studio files to LAMMPS
@ -101,7 +101,7 @@ msi2lmp decane -c 0 -f oplsaa
.SH COPYRIGHT
© 2003--2022 Sandia Corporation
© 2003--2024 Sandia Corporation
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as

View File

@ -630,11 +630,35 @@ The following target are available for both, GNU make and CMake:
GitHub command line interface
-----------------------------
GitHub is developing a `tool for the command line
<https://cli.github.com>`_ that interacts with the GitHub website via a
command called ``gh``. This can be extremely convenient when working
with a Git repository hosted on GitHub (like LAMMPS). It is thus highly
recommended to install it when doing LAMMPS development.
GitHub has developed a `command line tool <https://cli.github.com>`_
to interact with the GitHub website via a command called ``gh``.
This is extremely convenient when working with a Git repository hosted
on GitHub (like LAMMPS). It is thus highly recommended to install it
when doing LAMMPS development. To use ``gh`` you must be within a git
checkout of a repository and you must obtain an authentication token
to connect your checkout with a GitHub user. This is done with the
command: ``gh auth login`` where you then have to follow the prompts.
Here are some examples:
The capabilities of the ``gh`` command is continually expanding, so
please see the documentation at https://cli.github.com/manual/
.. list-table::
:header-rows: 1
:widths: 34 66
* - Command
- Description
* - ``gh pr list``
- List currently open pull requests
* - ``gh pr checks 404``
- Shows the status of all checks for pull request #404
* - ``gh pr view 404``
- Shows the description and recent comments for pull request #404
* - ``gh co 404``
- Check out the branch from pull request #404; set up for pushing changes
* - ``gh issue list``
- List currently open issues
* - ``gh issue view 430 --comments``
- Shows the description and all comments for issue #430
The capabilities of the ``gh`` command are continually expanding, so
for more details please see the documentation at https://cli.github.com/manual/
or use ``gh --help`` or ``gh <command> --help`` for embedded help.

View File

@ -7,6 +7,8 @@ in addition to
.. list-table::
:align: center
:header-rows: 1
:widths: 50 50
:width: 80%
* - CMake build
- Traditional make
@ -115,7 +117,7 @@ GPU package
To build with this package, you must choose options for precision and
which GPU hardware to build for. The GPU package currently supports
three different types of backends: OpenCL, CUDA and HIP.
three different types of back ends: OpenCL, CUDA and HIP.
CMake build
^^^^^^^^^^^
@ -205,7 +207,7 @@ necessary for ``hipcc`` and the linker to work correctly.
.. versionadded:: 3Aug2022
Using the CHIP-SPV implementation of HIP is supported. It allows one to
run HIP code on Intel GPUs via the OpenCL or Level Zero backends. To use
run HIP code on Intel GPUs via the OpenCL or Level Zero back ends. To use
CHIP-SPV, you must set ``-DHIP_USE_DEVICE_SORT=OFF`` in your CMake
command line as CHIP-SPV does not yet support hipCUB. As of Summer 2022,
the use of HIP for Intel GPUs is experimental. You should only use this
@ -751,14 +753,27 @@ This list was last updated for version 4.3.0 of the Kokkos library.
platform-appropriate vendor library: rocFFT on AMD GPUs or cuFFT on
NVIDIA GPUs.
To simplify compilation, five preset files are included in the
For Intel GPUs using SYCL, set these variables:
.. code-block:: bash
-D Kokkos_ARCH_HOSTARCH=yes # HOSTARCH = HOST from list above
-D Kokkos_ARCH_GPUARCH=yes # GPUARCH = GPU from list above
-D Kokkos_ENABLE_SYCL=yes
-D Kokkos_ENABLE_OPENMP=yes
-D FFT_KOKKOS=MKL_GPU
This will enable FFTs on the GPU using the oneMKL library.
To simplify compilation, six preset files are included in the
``cmake/presets`` folder, ``kokkos-serial.cmake``,
``kokkos-openmp.cmake``, ``kokkos-cuda.cmake``,
``kokkos-hip.cmake``, and ``kokkos-sycl.cmake``. They will enable
the KOKKOS package and enable some hardware choices. For GPU
support those preset files must be customized to match the
hardware used. So to compile with CUDA device parallelization with
some common packages enabled, you can do the following:
``kokkos-hip.cmake``, ``kokkos-sycl-nvidia.cmake``, and
``kokkos-sycl-intel.cmake``. They will enable the KOKKOS
package and enable some hardware choices. For GPU support those
preset files must be customized to match the hardware used. So
to compile with CUDA device parallelization with some common
packages enabled, you can do the following:
.. code-block:: bash
@ -830,6 +845,18 @@ This list was last updated for version 4.3.0 of the Kokkos library.
FFT_INC = -DFFT_HIPFFT # enable use of hipFFT (optional)
FFT_LIB = -lhipfft # link to hipFFT library
For Intel GPUs using SYCL:
.. code-block:: make
KOKKOS_DEVICES = SYCL
KOKKOS_ARCH = HOSTARCH,GPUARCH # HOSTARCH = HOST from list above that is
# hosting the GPU
# GPUARCH = GPU from list above
FFT_INC = -DFFT_KOKKOS_MKL_GPU # enable use of oneMKL for Intel GPUs (optional)
# link to oneMKL FFT library
FFT_LIB = -lmkl_sycl_dft -lmkl_intel_ilp64 -lmkl_tbb_thread -mkl_core -ltbb
Advanced KOKKOS compilation settings
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -67,10 +67,10 @@ libraries and better pipelining for packing and communication.
.. code-block:: bash
-D FFT=value # FFTW3 or MKL or KISS, default is FFTW3 if found,
# else KISS
-D FFT_KOKKOS=value # FFTW3 or MKL or KISS or CUFFT or HIPFFT,
# default is KISS
-D FFT=value # FFTW3 or MKL or NVPL or KISS,
# default is FFTW3 if found, else KISS
-D FFT_KOKKOS=value # FFTW3 or MKL or NVPL or KISS or CUFFT
# or HIPFFT or MKL_GPU, default is KISS
-D FFT_SINGLE=value # yes or no (default), no = double precision
-D FFT_PACK=value # array (default) or pointer or memcpy
-D FFT_USE_HEFFTE=value # yes or no (default), yes links to heFFTe
@ -103,6 +103,8 @@ libraries and better pipelining for packing and communication.
-D FFT_HEFFTE_BACKEND=value # FFTW or MKL or empty/undefined for the stock
# heFFTe back end
-D Heffte_ROOT=path # path to an existing heFFTe installation
-D nvpl_fft_INCLUDE_DIR=path # path to NVPL FFT include files
-D nvpl_fft_LIBRARY_DIR=path # path to NVPL FFT libraries
.. note::
@ -121,9 +123,10 @@ libraries and better pipelining for packing and communication.
.. code-block:: make
FFT_INC = -DFFT_<NAME> # where <NAME> is KISS (default), FFTW3,
# FFTW (same as FFTW3), or MKL
# FFTW (same as FFTW3), NVPL, or MKL
FFT_INC = -DFFT_KOKKOS_<NAME> # where <NAME> is KISS (default), FFTW3,
# FFTW (same as FFTW3), MKL, CUFFT, or HIPFFT
# FFTW (same as FFTW3), NVPL, MKL, CUFFT,
# HIPFFT, or MKL_GPU
FFT_INC = -DFFT_SINGLE # do not specify for double precision
FFT_INC = -DFFT_FFTW_THREADS # enable using threaded FFTW3 libraries
FFT_INC = -DFFT_MKL_THREADS # enable using threaded FFTs with MKL libraries
@ -141,6 +144,9 @@ libraries and better pipelining for packing and communication.
# cuFFT either precision
FFT_LIB = -lcufft
# MKL_GPU either precision
FFT_LIB = -lmkl_sycl_dft -lmkl_intel_ilp64 -lmkl_tbb_thread -lmkl_core -ltbb
# FFTW3 double precision
FFT_LIB = -lfftw3
@ -165,6 +171,10 @@ libraries and better pipelining for packing and communication.
# MKL with automatic runtime selection of interface libs
FFT_LIB = -lmkl_rt
# threaded NVPL FFT
FFT_LIB = -lnvpl_fftw
As with CMake, you do not need to set paths in ``FFT_INC`` or
``FFT_PATH``, if the compiler can find the FFT header and library
files in its default search path. You must specify ``FFT_LIB``
@ -218,10 +228,16 @@ The Intel MKL math library is part of the Intel compiler suite. It
can be used with the Intel or GNU compiler (see the ``FFT_LIB`` setting
above).
The NVIDIA Performance Libraries (NVPL) FFT library is optimized for NVIDIA
Grace Armv9.0 architecture. You can download it from
`https://docs.nvidia.com/nvpl/`_.
The cuFFT and hipFFT FFT libraries are packaged with NVIDIA's CUDA and
AMD's HIP installations, respectively. These FFT libraries require the
Kokkos acceleration package to be enabled and the Kokkos back end to be
GPU-resident (i.e., HIP or CUDA).
GPU-resident (i.e., HIP or CUDA). Similarly, GPU offload of FFTs on
Intel GPUs with oneMKL currently requires the Kokkos acceleration
package to be enabled with the SYCL back end.
Performing 3d FFTs in parallel can be time-consuming due to data access
and required communication. This cost can be reduced by performing

View File

@ -12,3 +12,4 @@ details are provided for writing code for LAMMPS.
Developer_write_pair
Developer_write_fix
Developer_write_command

View File

@ -0,0 +1,348 @@
Writing a new command style
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Command styles allow to do system manipulations or interfaces to the
operating system.
In the text below, we will discuss the implementation of one example. As
shown on the page for :doc:`writing or extending command styles
<Modify_command>`, in order to implement a new command style, a new class
must be written that is either directly or indirectly derived from the
``Command`` class. There is just one method that must be implemented:
``Command::command()``. In addition, a custom constructor is needed to get
access to the members of the ``LAMMPS`` class like the ``Error`` class to
print out error messages. The ``Command::command()`` method processes the
arguments passed to the command in the input and executes it. Any other
methods would be for the convenience of implementation of the new command.
In general, new command styles should be added to the :ref:`EXTRA-COMMAND
package <PKG-EXTRA-COMMAND>`. If you feel that your contribution should be
added to a different package, please consult with the :doc:`LAMMPS
developers <Intro_authors>` first. The contributed code needs to support
the :doc:`traditional GNU make build process <Build_make>` **and** the
:doc:`CMake build process <Build_cmake>`.
----
Case 1: Implementing the geturl command
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In this section, we will describe the procedure of adding a simple command
style to LAMMPS: the :doc:`geturl command <geturl>` that allows to download
files directly without having to rely on an external program like "wget" or
"curl". The complete implementation can be found in the files
``src/EXTRA-COMMAND/geturl.cpp`` and ``src/EXTRA-COMMAND/geturl.h`` of the
LAMMPS source code.
Interfacing the *libcurl* library
"""""""""""""""""""""""""""""""""
Rather than implementing the various protocols for downloading files, we
rely on an external library: `libcurl library <https:://curl.se/libcurl/>`_.
This requires that the library and its headers are installed. For the
traditional GNU make build system, this simply requires edits to the machine
makefile to add compilation flags like for other libraries. For the CMake
based build system, we need to add some lines to the file
``cmake/Modules/Packages/EXTRA-COMMAND.cmake``:
.. code-block:: cmake
find_package(CURL QUIET COMPONENTS HTTP HTTPS)
option(WITH_CURL "Enable libcurl support" ${CURL_FOUND})
if(WITH_CURL)
find_package(CURL REQUIRED COMPONENTS HTTP HTTPS)
target_compile_definitions(lammps PRIVATE -DLAMMPS_CURL)
target_link_libraries(lammps PRIVATE CURL::libcurl)
endif()
The first ``find_package()`` command uses a built-in CMake module to find
an existing *libcurl* installation with development headers and support for
using the HTTP and HTTPS protocols. The "QUIET" flag ensures that there is
no screen output and no error if the search fails. The status of the search
is recorded in the "${CURL_FOUND}" variable. That variable sets the default
of the WITH_CURL option, which toggles whether support for *libcurl* is included
or not.
The second ``find_package()`` uses the "REQUIRED" flag to produce an error
if the WITH_CURL option was set to ``True``, but no suitable *libcurl*
implementation with development support was found. This construct is used
so that the CMake script code inside the ``if(WITH_CURL)`` and ``endif()``
block can be expanded later to download and compile *libcurl* as part of the
LAMMPS build process, if it is not found locally. The
``target_compile_definitions()`` function added the define ``-DLAMMPS_CURL``
to the compilation flags when compiling objects for the LAMMPS library.
This allows to always compile the :doc:`geturl command <geturl>`, but use
pre-processing to compile in the interface to *libcurl* only when it is
present and usable and otherwise stop with an error message about the
unavailability of *libcurl* to execute the functionality of the command.
Header file
"""""""""""
The first segment of any LAMMPS source should be the copyright and
license statement. Note the marker in the first line to indicate to
editors like emacs that this file is a C++ source, even though the .h
extension suggests a C source (this is a convention inherited from the
very beginning of the C++ version of LAMMPS).
.. code-block:: c++
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
LAMMPS development team: developers@lammps.org
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.
------------------------------------------------------------------------- */
Every command style must be registered in LAMMPS by including the following
lines of code in the second part of the header after the copyright
message and before the include guards for the class definition:
.. code-block:: c++
#ifdef COMMAND_CLASS
// clang-format off
CommandStyle(geturl,GetURL);
// clang-format on
#else
This block between ``#ifdef COMMAND_CLASS`` and ``#else`` will be
included by the ``Input`` class in ``input.cpp`` to build a map of
"factory functions" that will create an instance of a Command class
and call its ``command()`` method. The map connects the name of the
command ``geturl`` with the name of the class ``GetURL``. During
compilation, LAMMPS constructs a file ``style_command.h`` that contains
``#include`` statements for all "installed" command styles. Before
including ``style_command.h`` into ``input.cpp``, the ``COMMAND_CLASS``
define is set and the ``CommandStyle(name,class)`` macro defined. The
code of the macro adds the installed command styles to the "factory map"
which enables the ``Input`` to execute the command.
The list of header files to include in ``style_command.h`` is automatically
updated by the build system if there are new files, so the presence of the
new header file in the ``src/EXTRA-COMMAND`` folder and the enabling of the
EXTRA-COMMAND package will trigger LAMMPS to include the new command style
when it is (re-)compiled. The "// clang-format" format comments are needed
so that running :ref:`clang-format <clang-format>` on the file will not
insert unwanted blanks which would break the ``CommandStyle`` macro.
The third part of the header file is the actual class definition of the
``GetURL`` class. This has the custom constructor and the ``command()``
method implemented by this command style. For the constructor there is
nothing to do but to pass the ``lmp`` pointer to the base class. Since the
``command()`` method is labeled "virtual" in the base class, it must be
given the "override" property.
.. code-block:: c++
#ifndef LMP_GETURL_H
#define LMP_GETURL_H
#include "command.h"
namespace LAMMPS_NS {
class GetURL : public Command {
public:
GetURL(class LAMMPS *lmp) : Command(lmp) {};
void command(int, char **) override;
};
} // namespace LAMMPS_NS
#endif
#endif
The "override" property helps to detect unexpected mismatches because
compilation will stop with an error in case the signature of a function
is changed in the base class without also changing it in all derived
classes.
Implementation file
"""""""""""""""""""
We move on to the implementation of the ``GetURL`` class in the
``geturl.cpp`` file. This file also starts with a LAMMPS copyright and
license header. Below that notice is typically the space where comments may
be added with additional information about this specific file, the
author(s), affiliation(s), and email address(es). This way the contributing
author(s) can be easily contacted, when there are questions about the
implementation later. Since the file(s) may be around for a long time, it
is beneficial to use some kind of "permanent" email address, if possible.
.. code-block:: c++
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
LAMMPS development team: developers@lammps.org
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),
------------------------------------------------------------------------- */
#include "geturl.h"
#include "comm.h"
#include "error.h"
#if defined(LAMMPS_CURL)
#include <curl/curl.h>
#endif
using namespace LAMMPS_NS;
The second section of the implementation file has various include
statements. The include file for the class header has to come first, then a
couple of LAMMPS classes (sorted alphabetically) followed by the header for
the *libcurl* interface. This is wrapped into an ``#ifdef`` block so that
LAMMPS will compile this file without error when the *libcurl* header is not
available and thus the define not set. The final statement of this segment
imports the ``LAMMPS_NS::`` namespace globally for this file. This way, all
LAMMPS specific functions and classes do not have to be prefixed with
``LAMMPS_NS::``.
The command() function (required)
"""""""""""""""""""""""""""""""""
Since the required custom constructor is trivial and implemented in the
header, there is only one function that must be implemented for a command
style and that is the ``command()`` function.
.. code-block:: c++
void GetURL::command(int narg, char **arg)
{
#if !defined(LAMMPS_CURL)
error->all(FLERR, "LAMMPS has not been compiled with libcurl support");
#else
if (narg < 1) utils::missing_cmd_args(FLERR, "geturl", error);
int verify = 1;
int overwrite = 1;
int verbose = 0;
This first part also has the ``#ifdef`` block depending on the LAMMPS_CURL
define. This way the command will simply print an error, if *libcurl* is
not available but will not fail to compile. Furthermore, it sets the
defaults for the following optional arguments.
.. code-block:: c++
// process arguments
std::string url = arg[0];
// sanity check
if ((url.find(':') == std::string::npos) || (url.find('/') == std::string::npos))
error->all(FLERR, "URL '{}' is not a supported URL", url);
std::string output = url.substr(url.find_last_of('/') + 1);
if (output.empty()) error->all(FLERR, "URL '{}' must end in a file string", url);
This block stores the positional, i.e. non-optional argument of the URL to
be downloaded and adds a couple of sanity checks on the string to make sure it is
a valid URL. Also it derives the default name of the output file from the URL.
.. code-block:: c++
int iarg = 1;
while (iarg < narg) {
if (strcmp(arg[iarg], "output") == 0) {
if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "geturl output", error);
output = arg[iarg + 1];
++iarg;
} else if (strcmp(arg[iarg], "overwrite") == 0) {
if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "geturl overwrite", error);
overwrite = utils::logical(FLERR, arg[iarg + 1], false, lmp);
++iarg;
} else if (strcmp(arg[iarg], "verify") == 0) {
if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "geturl verify", error);
verify = utils::logical(FLERR, arg[iarg + 1], false, lmp);
++iarg;
} else if (strcmp(arg[iarg], "verbose") == 0) {
if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "geturl verbose", error);
verbose = utils::logical(FLERR, arg[iarg + 1], false, lmp);
++iarg;
} else {
error->all(FLERR, "Unknown geturl keyword: {}", arg[iarg]);
}
++iarg;
}
This block parses the optional arguments following the URL and stops with an
error if there are arguments missing or an unknown argument is encountered.
.. code-block:: c++
// only download files from rank 0
if (comm->me != 0) return;
if (!overwrite && platform::file_is_readable(output)) return;
// open output file for writing
FILE *out = fopen(output.c_str(), "wb");
if (!out)
error->all(FLERR, "Cannot open output file {} for writing: {}", output, utils::getsyserror());
Here all MPI ranks other than 0 will return, so that the URL download will
only happen from a single MPI rank. For that rank the output file is opened
for writing using the C library function ``fopen()``.
.. code-block:: c++
// initialize curl and perform download
CURL *curl;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if (curl) {
(void) curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
(void) curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *) out);
(void) curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
(void) curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1L);
if (verbose && screen) {
(void) curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
(void) curl_easy_setopt(curl, CURLOPT_STDERR, (void *) screen);
}
if (!verify) {
(void) curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
(void) curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
}
auto res = curl_easy_perform(curl);
if (res != CURLE_OK) {
long response = 0L;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
error->one(FLERR, "Download of {} failed with: {} {}", output, curl_easy_strerror(res),
response);
}
curl_easy_cleanup(curl);
This block now implements the actual URL download with the selected options
via the "easy" interface of *libcurl*. For the details of what these
function calls do, please have a look at the `*libcurl documentation
<https://curl.se/libcurl/c/allfuncs.html>`_.
.. code-block:: c++
}
curl_global_cleanup();
fclose(out);
#endif
}
Finally, the previously opened file is closed and the command is complete.

View File

@ -160,7 +160,7 @@ message and before the include guards for the class definition:
#endif
This block of between ``#ifdef PAIR_CLASS`` and ``#else`` will be
This block between ``#ifdef PAIR_CLASS`` and ``#else`` will be
included by the ``Force`` class in ``force.cpp`` to build a map of
"factory functions" that will create an instance of these classes and
return a pointer to it. The map connects the name of the pair style,

View File

@ -348,7 +348,7 @@ Some common LAMMPS specific variables
* - ``FFT``
- select which FFT library to use: ``FFTW3``, ``MKL``, ``KISS`` (default, unless FFTW3 is found)
* - ``FFT_KOKKOS``
- select which FFT library to use in Kokkos-enabled styles: ``FFTW3``, ``MKL``, ``HIPFFT``, ``CUFFT``, ``KISS`` (default)
- select which FFT library to use in Kokkos-enabled styles: ``FFTW3``, ``MKL``, ``HIPFFT``, ``CUFFT``, ``MKL_GPU``, ``KISS`` (default)
* - ``FFT_SINGLE``
- select whether to use single precision FFTs (default: ``off``)
* - ``WITH_JPEG``

View File

@ -39,16 +39,18 @@ lammps.lammps
* interface modeled after the LAMMPS :ref:`C language library interface API <lammps_c_api>`
* requires knowledge of how LAMMPS internally works (C pointers, etc)
* full support for running Python with MPI using `mpi4py <https://mpi4py.readthedocs.io>`_
* no overhead from creating a more Python-like interface
lammps.PyLammps
"""""""""""""""
* higher-level abstraction built on *top* of original :py:class:`ctypes based interface <lammps.lammps>`
* higher-level abstraction built on *top* of the original :py:class:`ctypes based interface <lammps.lammps>`
* manipulation of Python objects
* communication with LAMMPS is hidden from API user
* shorter, more concise Python
* better IPython integration, designed for quick prototyping
* designed for serial execution
* additional overhead from capturing and parsing the LAMMPS screen output
Quick Start
-----------

View File

@ -4,6 +4,7 @@ Per-atom properties
This section documents the following functions:
- :cpp:func:`lammps_extract_atom_datatype`
- :cpp:func:`lammps_extract_atom_size`
- :cpp:func:`lammps_extract_atom`
-----------------------
@ -13,6 +14,11 @@ This section documents the following functions:
-----------------------
.. doxygenfunction:: lammps_extract_atom_size
:project: progguide
-----------------------
.. doxygenfunction:: lammps_extract_atom
:project: progguide

View File

@ -18,28 +18,27 @@ Syntax
.. code-block:: LAMMPS
pair_style style N inner_distance_cutoff outer_distance_cutoff angle_cutof
pair_style style N inner_distance_cutoff outer_distance_cutoff angle_cutoff
* style = *hbond/dreiding/lj* or *hbond/dreiding/morse*
* n = cosine angle periodicity
* N = power of cosine of angle theta (integer)
* inner_distance_cutoff = global inner cutoff for Donor-Acceptor interactions (distance units)
* outer_distance_cutoff = global cutoff for Donor-Acceptor interactions (distance units)
* angle_cutoff = global angle cutoff for Acceptor-Hydrogen-Donor
* interactions (degrees)
* angle_cutoff = global angle cutoff for Acceptor-Hydrogen-Donor interactions (degrees)
Examples
""""""""
.. code-block:: LAMMPS
pair_style hybrid/overlay lj/cut 10.0 hbond/dreiding/lj 4 9.0 11.0 90
pair_style hybrid/overlay lj/cut 10.0 hbond/dreiding/lj 4 9.0 11.0 90.0
pair_coeff 1 2 hbond/dreiding/lj 3 i 9.5 2.75 4 9.0 11.0 90.0
pair_style hybrid/overlay lj/cut 10.0 hbond/dreiding/morse 2 9.0 11.0 90
pair_coeff 1 2 hbond/dreiding/morse 3 i 3.88 1.7241379 2.9 2 9 11 90
pair_style hybrid/overlay lj/cut 10.0 hbond/dreiding/morse 2 9.0 11.0 90.0
pair_coeff 1 2 hbond/dreiding/morse 3 i 3.88 1.7241379 2.9 2 9.0 11.0 90.0
labelmap atom 1 C 2 O 3 H
pair_coeff C O hbond/dreiding/morse H i 3.88 1.7241379 2.9 2 9 11 90
pair_coeff C O hbond/dreiding/morse H i 3.88 1.7241379 2.9 2 9.0 11.0 90.0
Description
"""""""""""
@ -65,7 +64,8 @@ force field, given by:
where :math:`r_{\rm in}` is the inner spline distance cutoff,
:math:`r_{\rm out}` is the outer distance cutoff, :math:`\theta_c` is
the angle cutoff, and *n* is the cosine periodicity.
the angle cutoff, and :math:`n` is the power of the cosine of the angle
:math:`\theta`.
Here, *r* is the radial distance between the donor (D) and acceptor
(A) atoms and :math:`\theta` is the bond angle between the acceptor, the
@ -217,7 +217,8 @@ These pair styles do not support the :doc:`pair_modify <pair_modify>`
tail option for adding long-range tail corrections to energy and
pressure.
These pair styles do not write their information to :doc:`binary restart files <restart>`, so pair_style and pair_coeff commands need to be
These pair styles do not write their information to :doc:`binary restart
files <restart>`, so pair_style and pair_coeff commands need to be
re-specified in an input script that reads a restart file.
These pair styles can only be used via the *pair* keyword of the

View File

@ -215,7 +215,6 @@ ba
Babadi
Babaei
backcolor
backends
Baczewski
Bagchi
Bagi
@ -1539,6 +1538,7 @@ idx
ie
ielement
ieni
ifdef
ifdefs
iff
ifort
@ -2725,6 +2725,7 @@ OMP
oneAPI
onebody
onelevel
oneMKL
oneway
onlysalt
ons

View File

@ -105,6 +105,7 @@ liblammpsplugin_t *liblammpsplugin_load(const char *lib)
ADDSYM(map_atom);
ADDSYM(extract_atom_datatype);
ADDSYM(extract_atom_size);
ADDSYM(extract_atom);
ADDSYM(extract_compute);

View File

@ -151,6 +151,7 @@ struct _liblammpsplugin {
int (*map_atom)(void *, const void *);
int (*extract_atom_datatype)(void *, const char *);
int (*extract_atom_size)(void *, const char *, int);
void *(*extract_atom)(void *, const char *);
void *(*extract_compute)(void *, const char *, int, int);

View File

@ -5,7 +5,7 @@
cmake_minimum_required(VERSION 3.16)
project(paceplugin VERSION 1.0 LANGUAGES CXX)
project(paceplugin VERSION 1.1 LANGUAGES CXX)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
include(CheckIncludeFileCXX)
@ -15,7 +15,11 @@ include(ML-PACE)
##########################
# building the plugins
add_library(paceplugin MODULE paceplugin.cpp ${LAMMPS_SOURCE_DIR}/ML-PACE/pair_pace.cpp)
add_library(paceplugin MODULE paceplugin.cpp
${LAMMPS_SOURCE_DIR}/ML-PACE/pair_pace.cpp
${LAMMPS_SOURCE_DIR}/ML-PACE/pair_pace_extrapolation.cpp
${LAMMPS_SOURCE_DIR}/ML-PACE/compute_pace.cpp)
target_link_libraries(paceplugin PRIVATE pace)
target_link_libraries(paceplugin PRIVATE lammps)
target_include_directories(paceplugin PRIVATE ${LAMMPS_SOURCE_DIR}/ML-PACE)

View File

@ -3,6 +3,8 @@
#include "version.h"
#include "pair_pace.h"
#include "pair_pace_extrapolation.h"
#include "compute_pace.h"
using namespace LAMMPS_NS;
@ -11,6 +13,16 @@ static Pair *pair_pace_creator(LAMMPS *lmp)
return new PairPACE(lmp);
}
static Pair *pair_pace_extrapolation_creator(LAMMPS *lmp)
{
return new PairPACEExtrapolation(lmp);
}
static Compute *compute_pace_creator(LAMMPS *lmp, int argc, char **argv)
{
return new ComputePACE(lmp, argc, argv);
}
extern "C" void lammpsplugin_init(void *lmp, void *handle, void *regfunc)
{
lammpsplugin_t plugin;
@ -25,4 +37,24 @@ extern "C" void lammpsplugin_init(void *lmp, void *handle, void *regfunc)
plugin.creator.v1 = (lammpsplugin_factory1 *) &pair_pace_creator;
plugin.handle = handle;
(*register_plugin)(&plugin, lmp);
// register pace/extrapolation pair style
plugin.version = LAMMPS_VERSION;
plugin.style = "pair";
plugin.name = "pace/extrapolation";
plugin.info = "PACE plugin extrapolation pair style v1.0";
plugin.author = "Axel Kohlmeyer (akohlmey@gmail.com)";
plugin.creator.v1 = (lammpsplugin_factory1 *) &pair_pace_extrapolation_creator;
plugin.handle = handle;
(*register_plugin)(&plugin, lmp);
// register pace compute style
plugin.version = LAMMPS_VERSION;
plugin.style = "compute";
plugin.name = "pace";
plugin.info = "PACE plugin compute style v1.0";
plugin.author = "Axel Kohlmeyer (akohlmey@gmail.com)";
plugin.creator.v2 = (lammpsplugin_factory2 *) &compute_pace_creator;
plugin.handle = handle;
(*register_plugin)(&plugin, lmp);
}

View File

@ -542,6 +542,14 @@ MODULE LIBLAMMPS
INTEGER(c_int) :: lammps_extract_atom_datatype
END FUNCTION lammps_extract_atom_datatype
FUNCTION lammps_extract_atom_size(handle, name, dtype) BIND(C)
IMPORT :: c_ptr, c_int
IMPLICIT NONE
TYPE(c_ptr), INTENT(IN), VALUE :: handle, name
INTEGER(c_int), INTENT(IN), VALUE :: dtype
INTEGER(c_int) :: lammps_extract_atom_size
END FUNCTION lammps_extract_atom_size
FUNCTION lammps_extract_atom(handle, name) BIND(C)
IMPORT :: c_ptr
IMPLICIT NONE
@ -1435,7 +1443,7 @@ CONTAINS
IF (SIZE_TAGINT == 8) THEN
Cptr = C_LOC(id)
ELSE
id32 = id
id32 = INT(id, c_int)
Cptr = C_LOC(id32)
END IF
lmp_map_atom_big = lammps_map_atom(self%handle, Cptr) + 1
@ -1461,43 +1469,35 @@ CONTAINS
ntypes = lmp_extract_setting(self, 'ntypes')
Cname = f2c_string(name)
datatype = lammps_extract_atom_datatype(self%handle, Cname)
nrows = lammps_extract_atom_size(self%handle, Cname, LMP_SIZE_ROWS)
ncols = lammps_extract_atom_size(self%handle, Cname, LMP_SIZE_COLS)
Cptr = lammps_extract_atom(self%handle, Cname)
CALL lammps_free(Cname)
SELECT CASE (name)
CASE ('mass')
ncols = ntypes + 1
nrows = 1
CASE ('x','v','f','mu','omega','torque','angmom')
ncols = nmax
nrows = 3
CASE DEFAULT
ncols = nmax
nrows = 1
END SELECT
peratom_data%lammps_instance => self
SELECT CASE (datatype)
CASE (LAMMPS_INT)
peratom_data%datatype = DATA_INT_1D
CALL C_F_POINTER(Cptr, peratom_data%i32_vec, [ncols])
CALL C_F_POINTER(Cptr, peratom_data%i32_vec, [nrows])
CASE (LAMMPS_INT64)
peratom_data%datatype = DATA_INT64_1D
CALL C_F_POINTER(Cptr, peratom_data%i64_vec, [ncols])
CALL C_F_POINTER(Cptr, peratom_data%i64_vec, [nrows])
CASE (LAMMPS_DOUBLE)
peratom_data%datatype = DATA_DOUBLE_1D
! The mass array is allocated from 0, but only used from 1. We also want to use it from 1.
IF (name == 'mass') THEN
CALL C_F_POINTER(Cptr, dummy, [ncols])
CALL C_F_POINTER(Cptr, dummy, [nrows])
peratom_data%r64_vec(0:) => dummy
ELSE
CALL C_F_POINTER(Cptr, peratom_data%r64_vec, [ncols])
CALL C_F_POINTER(Cptr, peratom_data%r64_vec, [nrows])
END IF
CASE (LAMMPS_DOUBLE_2D)
peratom_data%datatype = DATA_DOUBLE_2D
! First, we dereference the void** pointer to point to the void*
CALL C_F_POINTER(Cptr, Catomptr, [ncols])
CALL C_F_POINTER(Cptr, Catomptr, [nrows])
! Catomptr(1) now points to the first element of the array
CALL C_F_POINTER(Catomptr(1), peratom_data%r64_mat, [nrows,ncols])
! rows and columns are swapped in Fortran
CALL C_F_POINTER(Catomptr(1), peratom_data%r64_mat, [ncols,nrows])
CASE (-1)
CALL lmp_error(self, LMP_ERROR_ALL + LMP_ERROR_WORLD, &
'per-atom property ' // name // ' not found in extract_setting')
@ -2604,6 +2604,8 @@ CONTAINS
TYPE(c_ptr) :: Cid, Ctype, Cx, Cv, Cimage
INTEGER(c_int) :: tagint_size, atoms_created
Ctype = c_null_ptr
Cx = c_null_ptr
! type is actually NOT optional, but we can't make id optional without it,
! so we check at run-time
IF (.NOT. PRESENT(type)) THEN

31
lib/gpu/Makefile.aurora Normal file
View File

@ -0,0 +1,31 @@
# /* ----------------------------------------------------------------------
# Generic Linux Makefile for OpenCL
# ------------------------------------------------------------------------- */
# which file will be copied to Makefile.lammps
EXTRAMAKE = Makefile.lammps.opencl
# OCL_TUNE = -DFERMI_OCL # -- Uncomment for NVIDIA Fermi
# OCL_TUNE = -DKEPLER_OCL # -- Uncomment for NVIDIA Kepler
# OCL_TUNE = -DCYPRESS_OCL # -- Uncomment for AMD Cypress
OCL_TUNE = -DGENERIC_OCL # -- Uncomment for generic device
# this setting should match LAMMPS Makefile
# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL
LMP_INC = -DLAMMPS_SMALLBIG
OCL_INC = -I/opt/intel/oneapi/compiler/latest/linux/include/sycl/ # Path to CL directory
OCL_CPP = mpicxx -cxx=icpx -DCUDA_PROXY $(DEFAULT_DEVICE) -xHost -O2 -ffp-model=fast -qoverride-limits -DMPI_GERYON -DGERYON_NUMA_FISSION -DUCL_NO_EXIT -DMPICH_IGNORE_CXX_SEEK $(LMP_INC) $(OCL_INC) -DGERYON_NO_PROF
OCL_LINK = -L/opt/intel/oneapi/compiler/latest/linux/lib/ -lOpenCL
OCL_PREC = -D_SINGLE_DOUBLE
BIN_DIR = ./
OBJ_DIR = ./
LIB_DIR = ./
AR = ar
BSH = /bin/sh
include Opencl.makefile

View File

@ -19,7 +19,7 @@ parser = ArgumentParser(prog='Install.py',
# Note: must also adjust check for supported API versions in
# fix_plumed.cpp when version changes from v2.n.x to v2.n+1.y
version = "2.9.1"
version = "2.9.2"
mode = "static"
# help message
@ -51,6 +51,7 @@ checksums = { \
'2.8.4' : '9f59c4f9bda86fe5bef19543c295a981', \
'2.9.0' : '661eabeebee05cf84bbf9dc23d7d5f46', \
'2.9.1' : 'c3b2d31479c1e9ce211719d40e9efbd7', \
'2.9.2' : '04862602a372c1013bdfee2d6d03bace', \
}
# parse and process arguments

View File

@ -18,12 +18,21 @@ from __future__ import print_function
import os
import sys
from ctypes import * # lgtm [py/polluting-import]
from os.path import dirname,abspath,join
from ctypes import CDLL, POINTER, RTLD_GLOBAL, CFUNCTYPE, py_object, byref, cast, sizeof, \
create_string_buffer, c_int, c_int32, c_int64, c_double, c_void_p, c_char_p, pythonapi, \
pointer
from os.path import dirname, abspath, join
from inspect import getsourcefile
from .constants import * # lgtm [py/polluting-import]
from .data import * # lgtm [py/polluting-import]
from lammps.constants import LAMMPS_AUTODETECT, LAMMPS_STRING, \
LAMMPS_INT, LAMMPS_INT_2D, LAMMPS_DOUBLE, LAMMPS_DOUBLE_2D, LAMMPS_INT64, LAMMPS_INT64_2D, \
LMP_STYLE_GLOBAL, LMP_STYLE_ATOM, LMP_STYLE_LOCAL, \
LMP_TYPE_SCALAR, LMP_TYPE_VECTOR, LMP_TYPE_ARRAY, \
LMP_SIZE_VECTOR, LMP_SIZE_ROWS, LMP_SIZE_COLS, \
LMP_VAR_EQUAL, LMP_VAR_ATOM, LMP_VAR_VECTOR, LMP_VAR_STRING, \
get_ctypes_int
from lammps.data import NeighList
# -------------------------------------------------------------------------
@ -318,6 +327,8 @@ class lammps(object):
self.lib.lammps_extract_atom.argtypes = [c_void_p, c_char_p]
self.lib.lammps_extract_atom_datatype.argtypes = [c_void_p, c_char_p]
self.lib.lammps_extract_atom_datatype.restype = c_int
self.lib.lammps_extract_atom_size.argtypes = [c_void_p, c_char_p, c_int]
self.lib.lammps_extract_atom_size.restype = c_int
self.lib.lammps_extract_fix.argtypes = [c_void_p, c_char_p, c_int, c_int, c_int, c_int]
@ -1070,31 +1081,59 @@ class lammps(object):
else: return None
return self.lib.lammps_extract_atom_datatype(self.lmp, newname)
# -------------------------------------------------------------------------
# extract per-atom info datatype
def extract_atom_size(self, name, dtype):
"""Retrieve per-atom property dimensions from LAMMPS
This is a wrapper around the :cpp:func:`lammps_extract_atom_size`
function of the C-library interface. Its documentation includes a
list of the supported keywords.
This function returns ``None`` if the keyword is not
recognized. Otherwise it will return an integer value with the size
of the per-atom vector or array. If *name* corresponds to a per-atom
array, the *dtype* keyword must be either LMP_SIZE_ROWS or LMP_SIZE_COLS
from the :ref:`type <py_type_constants>` constants defined in the
:py:mod:`lammps` module. The return value is the requested size.
If *name* corresponds to a per-atom vector the *dtype* keyword is ignored.
:param name: name of the property
:type name: string
:param type: either LMP_SIZE_ROWS or LMP_SIZE_COLS for arrays, otherwise ignored
:type type: int
:return: data type of per-atom property (see :ref:`py_datatype_constants`)
:rtype: int
"""
if name: newname = name.encode()
else: return None
return self.lib.lammps_extract_atom_size(self.lmp, newname, dtype)
# -------------------------------------------------------------------------
# extract per-atom info
def extract_atom(self, name, dtype=LAMMPS_AUTODETECT):
"""Retrieve per-atom properties from LAMMPS
This is a wrapper around the :cpp:func:`lammps_extract_atom`
function of the C-library interface. Its documentation includes a
list of the supported keywords and their data types.
Since Python needs to know the data type to be able to interpret
the result, by default, this function will try to auto-detect the data type
by asking the library. You can also force a specific data type by setting ``dtype``
to one of the :ref:`data type <py_datatype_constants>` constants defined in the
:py:mod:`lammps` module.
This function returns ``None`` if either the keyword is not
recognized, or an invalid data type constant is used.
This is a wrapper around the :cpp:func:`lammps_extract_atom` function of the
C-library interface. Its documentation includes a list of the supported
keywords and their data types. Since Python needs to know the data type to
be able to interpret the result, by default, this function will try to
auto-detect the data type by asking the library. You can also force a
specific data type by setting ``dtype`` to one of the :ref:`data type
<py_datatype_constants>` constants defined in the :py:mod:`lammps` module.
This function returns ``None`` if either the keyword is not recognized, or
an invalid data type constant is used.
.. note::
While the returned arrays of per-atom data are dimensioned
for the range [0:nmax] - as is the underlying storage -
the data is usually only valid for the range of [0:nlocal],
unless the property of interest is also updated for ghost
atoms. In some cases, this depends on a LAMMPS setting, see
for example :doc:`comm_modify vel yes <comm_modify>`.
While the returned vectors or arrays of per-atom data are dimensioned for
the range [0:nmax] - as is the underlying storage - the data is usually
only valid for the range of [0:nlocal], unless the property of interest
is also updated for ghost atoms. In some cases, this depends on a LAMMPS
setting, see for example :doc:`comm_modify vel yes <comm_modify>`.
The actual size can be determined by calling
py:meth:`extract_atom_size() <lammps.lammps.extract_atom_size>`.
:param name: name of the property
:type name: string
@ -1105,6 +1144,7 @@ class lammps(object):
ctypes.POINTER(ctypes.c_int64), ctypes.POINTER(ctypes.POINTER(ctypes.c_int64)),
ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.POINTER(ctypes.c_double)),
or NoneType
"""
if dtype == LAMMPS_AUTODETECT:
dtype = self.extract_atom_datatype(name)
@ -2227,7 +2267,6 @@ class lammps(object):
:param caller: reference to some object passed to the callback function
:type: object, optional
"""
import numpy as np
def callback_wrapper(caller, ntimestep, nlocal, tag_ptr, x_ptr, fext_ptr):
tag = self.numpy.iarray(self.c_tagint, tag_ptr, nlocal, 1)
@ -2522,3 +2561,7 @@ class lammps(object):
newcomputeid = computeid.encode()
idx = self.lib.lammps_find_compute_neighlist(self.lmp, newcomputeid, reqid)
return idx
# Local Variables:
# fill-column: 80
# End:

View File

@ -16,14 +16,17 @@
# Written by Richard Berger <richard.berger@temple.edu>
################################################################################
import warnings
from ctypes import POINTER, c_void_p, c_char_p, c_double, c_int, c_int32, c_int64, cast
from .constants import LAMMPS_AUTODETECT, LAMMPS_INT, LAMMPS_INT_2D, \
LAMMPS_DOUBLE, LAMMPS_DOUBLE_2D, LAMMPS_INT64, LAMMPS_INT64_2D, \
LMP_STYLE_GLOBAL, LMP_STYLE_ATOM, LMP_STYLE_LOCAL, \
LMP_TYPE_SCALAR, LMP_TYPE_VECTOR, LMP_TYPE_ARRAY, \
LMP_SIZE_VECTOR, LMP_SIZE_ROWS, LMP_SIZE_COLS, \
LMP_VAR_EQUAL, LMP_VAR_ATOM, LMP_VAR_VECTOR, LMP_VAR_STRING
from .constants import * # lgtm [py/polluting-import]
from .data import NeighList
class numpy_wrapper:
"""lammps API NumPy Wrapper
@ -54,7 +57,8 @@ class numpy_wrapper:
# -------------------------------------------------------------------------
def extract_atom(self, name, dtype=LAMMPS_AUTODETECT, nelem=LAMMPS_AUTODETECT, dim=LAMMPS_AUTODETECT):
def extract_atom(self, name, dtype=LAMMPS_AUTODETECT, nelem=LAMMPS_AUTODETECT,
dim=LAMMPS_AUTODETECT):
"""Retrieve per-atom properties from LAMMPS as NumPy arrays
This is a wrapper around the :py:meth:`lammps.extract_atom()` method.
@ -63,16 +67,16 @@ class numpy_wrapper:
.. note::
The returned arrays of per-atom data are by default dimensioned
for the range [0:nlocal] since that data is *always* valid. The
underlying storage for the data, however, is typically allocated
for the range of [0:nmax]. Whether there is valid data in the range
[nlocal:nlocal+nghost] depends on whether the property of interest
is also updated for ghost atoms. This is not often the case. In
some cases, it depends on a LAMMPS setting, see for example
:doc:`comm_modify vel yes <comm_modify>`. By using the optional
*nelem* parameter the size of the returned NumPy can be overridden.
There is no check whether the number of elements chosen is valid.
The returned vectors or arrays of per-atom data are dimensioned
according to the return value of :py:meth:`lammps.extract_atom_size()`.
Except for the "mass" property, the underlying storage will always be
dimensioned for the range [0:nmax]. The actual usable data may be
only in the range [0:nlocal] or [0:nlocal][0:dim]. Whether there is
valid data in the range [nlocal:nlocal+nghost] or [nlocal:local+nghost][0:dim]
depends on whether the property of interest is also updated for ghost atoms.
Also the value of *dim* depends on the value of *name*. By using the optional
*nelem* and *dim* parameters the dimensions of the returned NumPy array can
be overridden. There is no check whether the number of elements chosen is valid.
:param name: name of the property
:type name: string
@ -89,21 +93,10 @@ class numpy_wrapper:
dtype = self.lmp.extract_atom_datatype(name)
if nelem == LAMMPS_AUTODETECT:
if name == "mass":
nelem = self.lmp.extract_global("ntypes") + 1
else:
nelem = self.lmp.extract_global("nlocal")
nelem = self.lmp.extract_atom_size(name, LMP_SIZE_ROWS)
if dim == LAMMPS_AUTODETECT:
if dtype in (LAMMPS_INT_2D, LAMMPS_DOUBLE_2D, LAMMPS_INT64_2D):
# TODO add other fields
if name in ("x", "v", "f", "x0","omega", "angmom", "torque", "csforce", "vforce", "vest"):
dim = 3
elif name == "smd_data_9":
dim = 9
elif name == "smd_stress":
dim = 6
else:
dim = 2
dim = self.lmp.extract_atom_size(name, LMP_SIZE_COLS)
else:
dim = 1
@ -119,37 +112,6 @@ class numpy_wrapper:
# -------------------------------------------------------------------------
def extract_atom_iarray(self, name, nelem, dim=1):
warnings.warn("deprecated, use extract_atom instead", DeprecationWarning)
if name in ['id', 'molecule']:
c_int_type = self.lmp.c_tagint
elif name in ['image']:
c_int_type = self.lmp.c_imageint
else:
c_int_type = c_int
if dim == 1:
raw_ptr = self.lmp.extract_atom(name, LAMMPS_INT)
else:
raw_ptr = self.lmp.extract_atom(name, LAMMPS_INT_2D)
return self.iarray(c_int_type, raw_ptr, nelem, dim)
# -------------------------------------------------------------------------
def extract_atom_darray(self, name, nelem, dim=1):
warnings.warn("deprecated, use extract_atom instead", DeprecationWarning)
if dim == 1:
raw_ptr = self.lmp.extract_atom(name, LAMMPS_DOUBLE)
else:
raw_ptr = self.lmp.extract_atom(name, LAMMPS_DOUBLE_2D)
return self.darray(raw_ptr, nelem, dim)
# -------------------------------------------------------------------------
def extract_compute(self, cid, cstyle, ctype):
"""Retrieve data from a LAMMPS compute

View File

@ -27,8 +27,8 @@ import sys
import tempfile
from collections import namedtuple
from .core import lammps
from .constants import * # lgtm [py/polluting-import]
from lammps.core import lammps
from lammps.constants import LMP_VAR_EQUAL, LMP_VAR_ATOM, LMP_VAR_VECTOR, LMP_VAR_STRING
# -------------------------------------------------------------------------

View File

@ -37,6 +37,7 @@ AtomVecOxdna::AtomVecOxdna(LAMMPS *lmp) : AtomVec(lmp)
fields_grow = {"id5p"};
fields_copy = {"id5p"};
fields_border = {"id5p"};
fields_border_vel = {"id5p"};
fields_exchange = {"id5p"};
fields_restart = {"id5p"};
fields_data_atom = {"id", "type", "x"};

View File

@ -401,7 +401,7 @@ void ComputeSAED::compute_vector()
// Setting up OMP
#if defined(_OPENMP)
if (me == 0 && echo) utils::logmesg(lmp," using {}OMP threads\n",comm->nthreads);
if (me == 0 && echo) utils::logmesg(lmp," using {} OMP thread(s)\n",comm->nthreads);
#endif
if (me == 0 && echo) utils::logmesg(lmp,"\n");
@ -478,7 +478,7 @@ void ComputeSAED::compute_vector()
}
}
} // End of pragma omp for region
delete [] f;
delete[] f;
}
auto scratch = new double[2*nRows];
@ -499,10 +499,10 @@ void ComputeSAED::compute_vector()
utils::logmesg(lmp," 100% \nTime elapsed during compute_saed = {:.2f} sec "
"using {:.2f} Mbytes/processor\n-----\n", t2-t0, bytes/1024.0/1024.0);
delete [] xlocal;
delete [] typelocal;
delete [] scratch;
delete [] Fvec;
delete[] xlocal;
delete[] typelocal;
delete[] scratch;
delete[] Fvec;
}
/* ----------------------------------------------------------------------

View File

@ -332,7 +332,7 @@ void ComputeXRD::compute_array()
// Setting up OMP
#if defined(_OPENMP)
if ((me == 0) && echo) utils::logmesg(lmp," using {} OMP threads\n",comm->nthreads);
if ((me == 0) && echo) utils::logmesg(lmp," using {} OMP thread(s)\n",comm->nthreads);
#endif
if ((me == 0) && echo) {
@ -482,7 +482,7 @@ void ComputeXRD::compute_array()
}
} // End of pragma omp for region
} // End of if LP=1 check
delete [] f;
delete[] f;
} // End of pragma omp parallel region
auto scratch = new double[2*size_array_rows];
@ -503,10 +503,10 @@ void ComputeXRD::compute_array()
utils::logmesg(lmp," 100% \nTime elapsed during compute_xrd = {:.2f} sec "
"using {:.2f} Mbytes/processor\n-----\n", t2-t0, bytes/1024.0/1024.0);
delete [] scratch;
delete [] Fvec;
delete [] xlocal;
delete [] typelocal;
delete[] scratch;
delete[] Fvec;
delete[] xlocal;
delete[] typelocal;
}
/* ----------------------------------------------------------------------

View File

@ -114,6 +114,7 @@ FixSAEDVTK::FixSAEDVTK(LAMMPS *lmp, int narg, char **arg) :
memory->create(vector_total,nrows,"saed/vtk:vector_total");
vector_flag = 1;
extvector = 0;
size_vector = nrows;
if (nOutput == 0) {
@ -248,8 +249,8 @@ FixSAEDVTK::FixSAEDVTK(LAMMPS *lmp, int narg, char **arg) :
FixSAEDVTK::~FixSAEDVTK()
{
delete [] filename;
delete [] ids;
delete[] filename;
delete[] ids;
memory->destroy(vector);
memory->destroy(vector_total);
if (fp && comm->me == 0) fclose(fp);

View File

@ -33,7 +33,8 @@ static std::string find_section(FILE *fp, const std::string &name)
{
char linebuf[BUFLEN];
fgets(linebuf, BUFLEN, fp);
if (!fgets(linebuf, BUFLEN, fp))
throw TokenizerException("Read error", utils::getsyserror());
while (!feof(fp)) {
if (utils::strmatch(linebuf, "^\\s*\\[.*\\]\\s*$")) {
auto words = Tokenizer(linebuf).as_vector();

View File

@ -44,12 +44,18 @@ FFT3dKokkos<DeviceType>::FFT3dKokkos(LAMMPS *lmp, MPI_Comm comm, int nfast, int
int ngpus = lmp->kokkos->ngpus;
ExecutionSpace execution_space = ExecutionSpaceFromDevice<DeviceType>::space;
#if defined(FFT_KOKKOS_MKL)
#if defined(FFT_KOKKOS_MKL_GPU)
if (ngpus > 0 && execution_space == Host)
lmp->error->all(FLERR,"Cannot use the MKL library with Kokkos on the host CPUs in a GPU build");
#elif defined(FFT_KOKKOS_MKL)
if (ngpus > 0 && execution_space == Device)
lmp->error->all(FLERR,"Cannot use the MKL library with Kokkos on GPUs");
#elif defined(FFT_KOKKOS_FFTW3)
if (ngpus > 0 && execution_space == Device)
lmp->error->all(FLERR,"Cannot use the FFTW library with Kokkos on GPUs");
#elif defined(FFT_KOKKOS_NVPL)
if (ngpus > 0 && execution_space == Device)
lmp->error->all(FLERR,"Cannot use the NVPL FFT library with Kokkos on GPUs");
#elif defined(FFT_KOKKOS_CUFFT)
if (ngpus > 0 && execution_space == Host)
lmp->error->all(FLERR,"Cannot use the cuFFT library with Kokkos on the host CPUs");
@ -151,7 +157,7 @@ public:
KOKKOS_INLINE_FUNCTION
void operator() (const int &i) const {
#if defined(FFT_KOKKOS_FFTW3) || defined(FFT_KOKKOS_CUFFT) || defined(FFT_KOKKOS_HIPFFT)
#if defined(FFT_KOKKOS_FFTW3) || defined(FFT_KOKKOS_CUFFT) || defined(FFT_KOKKOS_HIPFFT) || defined(FFT_KOKKOS_MKL_GPU) || defined(FFT_KOKKOS_NVPL)
FFT_SCALAR* out_ptr = (FFT_SCALAR *)(d_out.data()+i);
*(out_ptr++) *= norm;
*(out_ptr++) *= norm;
@ -221,12 +227,17 @@ void FFT3dKokkos<DeviceType>::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in,
total = plan->total1;
length = plan->length1;
#if defined(FFT_KOKKOS_MKL)
#if defined(FFT_KOKKOS_MKL_GPU)
if (flag == 1)
oneapi::mkl::dft::compute_forward(*(plan->desc_fast), (FFT_SCALAR*)d_data.data());
else
oneapi::mkl::dft::compute_backward(*(plan->desc_fast), (FFT_SCALAR*)d_data.data());
#elif defined(FFT_KOKKOS_MKL)
if (flag == 1)
DftiComputeForward(plan->handle_fast,d_data.data());
else
DftiComputeBackward(plan->handle_fast,d_data.data());
#elif defined(FFT_KOKKOS_FFTW3)
#elif defined(FFT_KOKKOS_FFTW3) || defined(FFT_KOKKOS_NVPL)
if (flag == 1)
FFTW_API(execute_dft)(plan->plan_fast_forward,(FFT_KOKKOS_DATA*)d_data.data(),(FFT_KOKKOS_DATA*)d_data.data());
else
@ -267,12 +278,17 @@ void FFT3dKokkos<DeviceType>::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in,
total = plan->total2;
length = plan->length2;
#if defined(FFT_KOKKOS_MKL)
#if defined(FFT_KOKKOS_MKL_GPU)
if (flag == 1)
oneapi::mkl::dft::compute_forward(*(plan->desc_mid), (FFT_SCALAR*)d_data.data());
else
oneapi::mkl::dft::compute_backward(*(plan->desc_mid), (FFT_SCALAR*)d_data.data());
#elif defined(FFT_KOKKOS_MKL)
if (flag == 1)
DftiComputeForward(plan->handle_mid,d_data.data());
else
DftiComputeBackward(plan->handle_mid,d_data.data());
#elif defined(FFT_KOKKOS_FFTW3)
#elif defined(FFT_KOKKOS_FFTW3) || defined(FFT_KOKKOS_NVPL)
if (flag == 1)
FFTW_API(execute_dft)(plan->plan_mid_forward,(FFT_KOKKOS_DATA*)d_data.data(),(FFT_KOKKOS_DATA*)d_data.data());
else
@ -311,12 +327,17 @@ void FFT3dKokkos<DeviceType>::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in,
total = plan->total3;
length = plan->length3;
#if defined(FFT_KOKKOS_MKL)
#if defined(FFT_KOKKOS_MKL_GPU)
if (flag == 1)
oneapi::mkl::dft::compute_forward(*(plan->desc_slow), (FFT_SCALAR*)d_data.data());
else
oneapi::mkl::dft::compute_backward(*(plan->desc_slow), (FFT_SCALAR*)d_data.data());
#elif defined(FFT_KOKKOS_MKL)
if (flag == 1)
DftiComputeForward(plan->handle_slow,d_data.data());
else
DftiComputeBackward(plan->handle_slow,d_data.data());
#elif defined(FFT_KOKKOS_FFTW3)
#elif defined(FFT_KOKKOS_FFTW3) || defined(FFT_KOKKOS_NVPL)
if (flag == 1)
FFTW_API(execute_dft)(plan->plan_slow_forward,(FFT_KOKKOS_DATA*)d_data.data(),(FFT_KOKKOS_DATA*)d_data.data());
else
@ -610,7 +631,28 @@ struct fft_plan_3d_kokkos<DeviceType>* FFT3dKokkos<DeviceType>::fft_3d_create_pl
// system specific pre-computation of 1d FFT coeffs
// and scaling normalization
#if defined(FFT_KOKKOS_MKL)
#if defined(FFT_KOKKOS_MKL_GPU)
sycl::queue queue = LMPDeviceType().sycl_queue();
plan->desc_fast = new descriptor_t (nfast);
plan->desc_fast->set_value(oneapi::mkl::dft::config_param::NUMBER_OF_TRANSFORMS, plan->total1/nfast);
plan->desc_fast->set_value(oneapi::mkl::dft::config_param::FWD_DISTANCE, plan->length1);
plan->desc_fast->set_value(oneapi::mkl::dft::config_param::BWD_DISTANCE, plan->length1);
plan->desc_fast->commit(queue);
plan->desc_mid = new descriptor_t (nmid);
plan->desc_mid->set_value(oneapi::mkl::dft::config_param::NUMBER_OF_TRANSFORMS, plan->total2/nmid);
plan->desc_mid->set_value(oneapi::mkl::dft::config_param::FWD_DISTANCE, plan->length2);
plan->desc_mid->set_value(oneapi::mkl::dft::config_param::BWD_DISTANCE, plan->length2);
plan->desc_mid->commit(queue);
plan->desc_slow = new descriptor_t (nslow);
plan->desc_slow->set_value(oneapi::mkl::dft::config_param::NUMBER_OF_TRANSFORMS, plan->total3/nslow);
plan->desc_slow->set_value(oneapi::mkl::dft::config_param::FWD_DISTANCE, plan->length3);
plan->desc_slow->set_value(oneapi::mkl::dft::config_param::BWD_DISTANCE, plan->length3);
plan->desc_slow->commit(queue);
#elif defined(FFT_KOKKOS_MKL)
DftiCreateDescriptor( &(plan->handle_fast), FFT_KOKKOS_MKL_PREC, DFTI_COMPLEX, 1,
(MKL_LONG)nfast);
DftiSetValue(plan->handle_fast, DFTI_NUMBER_OF_TRANSFORMS,
@ -647,7 +689,7 @@ struct fft_plan_3d_kokkos<DeviceType>* FFT3dKokkos<DeviceType>::fft_3d_create_pl
#endif
DftiCommitDescriptor(plan->handle_slow);
#elif defined(FFT_KOKKOS_FFTW3)
#elif defined(FFT_KOKKOS_FFTW3) || defined(FFT_KOKKOS_NVPL)
#if defined (FFT_KOKKOS_FFTW_THREADS)
if (nthreads > 1) {
@ -782,11 +824,15 @@ void FFT3dKokkos<DeviceType>::fft_3d_destroy_plan_kokkos(struct fft_plan_3d_kokk
if (plan->mid2_plan) remapKK->remap_3d_destroy_plan_kokkos(plan->mid2_plan);
if (plan->post_plan) remapKK->remap_3d_destroy_plan_kokkos(plan->post_plan);
#if defined(FFT_KOKKOS_MKL)
#if defined(FFT_KOKKOS_MKL_GPU)
delete plan->desc_fast;
delete plan->desc_mid;
delete plan->desc_slow;
#elif defined(FFT_KOKKOS_MKL)
DftiFreeDescriptor(&(plan->handle_fast));
DftiFreeDescriptor(&(plan->handle_mid));
DftiFreeDescriptor(&(plan->handle_slow));
#elif defined(FFT_KOKKOS_FFTW3)
#elif defined(FFT_KOKKOS_FFTW3) || defined(FFT_KOKKOS_NVPL)
FFTW_API(destroy_plan)(plan->plan_slow_forward);
FFTW_API(destroy_plan)(plan->plan_slow_backward);
FFTW_API(destroy_plan)(plan->plan_mid_forward);
@ -857,7 +903,7 @@ void FFT3dKokkos<DeviceType>::fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_DATA_
// fftw3 and Dfti in MKL encode the number of transforms
// into the plan, so we cannot operate on a smaller data set
#if defined(FFT_KOKKOS_MKL) || defined(FFT_KOKKOS_FFTW3)
#if defined(FFT_KOKKOS_MKL_GPU) || defined(FFT_KOKKOS_MKL) || defined(FFT_KOKKOS_FFTW3) || defined(FFT_KOKKOS_NVPL)
if ((total1 > nsize) || (total2 > nsize) || (total3 > nsize))
return;
#endif
@ -868,7 +914,17 @@ void FFT3dKokkos<DeviceType>::fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_DATA_
// perform 1d FFTs in each of 3 dimensions
// data is just an array of 0.0
#if defined(FFT_KOKKOS_MKL)
#if defined(FFT_KOKKOS_MKL_GPU)
if (flag == -1) {
oneapi::mkl::dft::compute_forward(*(plan->desc_fast), (FFT_SCALAR*)d_data.data());
oneapi::mkl::dft::compute_forward(*(plan->desc_mid), (FFT_SCALAR*)d_data.data());
oneapi::mkl::dft::compute_forward(*(plan->desc_slow), (FFT_SCALAR*)d_data.data());
} else {
oneapi::mkl::dft::compute_backward(*(plan->desc_fast), (FFT_SCALAR*)d_data.data());
oneapi::mkl::dft::compute_backward(*(plan->desc_mid), (FFT_SCALAR*)d_data.data());
oneapi::mkl::dft::compute_backward(*(plan->desc_slow), (FFT_SCALAR*)d_data.data());
}
#elif defined(FFT_KOKKOS_MKL)
if (flag == -1) {
DftiComputeForward(plan->handle_fast,d_data.data());
DftiComputeForward(plan->handle_mid,d_data.data());
@ -878,7 +934,7 @@ void FFT3dKokkos<DeviceType>::fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_DATA_
DftiComputeBackward(plan->handle_mid,d_data.data());
DftiComputeBackward(plan->handle_slow,d_data.data());
}
#elif defined(FFT_KOKKOS_FFTW3)
#elif defined(FFT_KOKKOS_FFTW3) || defined(FFT_KOKKOS_NVPL)
if (flag == -1) {
FFTW_API(execute_dft)(plan->plan_fast_forward,(FFT_KOKKOS_DATA*)d_data.data(),(FFT_KOKKOS_DATA*)d_data.data());
FFTW_API(execute_dft)(plan->plan_mid_forward,(FFT_KOKKOS_DATA*)d_data.data(),(FFT_KOKKOS_DATA*)d_data.data());

View File

@ -21,6 +21,14 @@
namespace LAMMPS_NS {
#if defined(FFT_KOKKOS_MKL_GPU)
#ifdef FFT_SINGLE
typedef oneapi::mkl::dft::descriptor<oneapi::mkl::dft::precision::SINGLE, oneapi::mkl::dft::domain::COMPLEX> descriptor_t;
#else
typedef oneapi::mkl::dft::descriptor<oneapi::mkl::dft::precision::DOUBLE, oneapi::mkl::dft::domain::COMPLEX> descriptor_t;
#endif
#endif
// -------------------------------------------------------------------------
// plan for how to perform a 3d FFT
@ -45,11 +53,15 @@ struct fft_plan_3d_kokkos {
double norm; // normalization factor for rescaling
// system specific 1d FFT info
#if defined(FFT_KOKKOS_MKL)
#if defined(FFT_KOKKOS_MKL_GPU)
descriptor_t *desc_fast;
descriptor_t *desc_mid;
descriptor_t *desc_slow;
#elif defined(FFT_KOKKOS_MKL)
DFTI_DESCRIPTOR *handle_fast;
DFTI_DESCRIPTOR *handle_mid;
DFTI_DESCRIPTOR *handle_slow;
#elif defined(FFT_KOKKOS_FFTW3)
#elif defined(FFT_KOKKOS_FFTW3) || defined(FFT_KOKKOS_NVPL)
FFTW_API(plan) plan_fast_forward;
FFTW_API(plan) plan_fast_backward;
FFTW_API(plan) plan_mid_forward;

View File

@ -36,8 +36,8 @@
# endif
#endif
// with KOKKOS in CUDA or HIP mode we can only have
// CUFFT/HIPFFT or KISS, thus undefine all other
// with KOKKOS in CUDA, HIP, or SYCL mode we can only have
// CUFFT/HIPFFT/MKL_GPU or KISS, thus undefine all other
// FFTs here
#ifdef KOKKOS_ENABLE_CUDA
@ -60,12 +60,28 @@
# if defined(FFT_KOKKOS_FFTW3)
# undef FFT_KOKKOS_FFTW3
# endif
# if defined(FFT_KOKKOS_NVPL)
# undef FFT_KOKKOS_NVPL
# endif
# if defined(FFT_KOKKOS_MKL)
# undef FFT_KOKKOS_MKL
# endif
# if !defined(FFT_KOKKOS_HIPFFT) && !defined(FFT_KOKKOS_KISS)
# define FFT_KOKKOS_KISS
# endif
#elif defined(KOKKOS_ENABLE_SYCL)
# if defined(FFT_KOKKOS_FFTW)
# undef FFT_KOKKOS_FFTW
# endif
# if defined(FFT_KOKKOS_FFTW3)
# undef FFT_KOKKOS_FFTW3
# endif
# if defined(FFT_KOKKOS_MKL)
# undef FFT_KOKKOS_MKL
# endif
# if !defined(FFT_KOKKOS_MKL_GPU) && !defined(FFT_KOKKOS_KISS)
# define FFT_KOKKOS_KISS
# endif
#else
# if defined(FFT_KOKKOS_CUFFT)
# error "Must enable CUDA with KOKKOS to use -DFFT_KOKKOS_CUFFT"
@ -73,6 +89,9 @@
# if defined(FFT_KOKKOS_HIPFFT)
# error "Must enable HIP with KOKKOS to use -DFFT_KOKKOS_HIPFFT"
# endif
# if defined(FFT_KOKKOS_MKL_GPU)
# error "Must enable SYCL with KOKKOS to use -DFFT_KOKKOS_MKL_GPU"
# endif
#endif
// set strings for library info output
@ -85,12 +104,27 @@
#define LMP_FFT_KOKKOS_LIB "FFTW3"
#elif defined(FFT_KOKKOS_MKL)
#define LMP_FFT_KOKKOS_LIB "MKL FFT"
#elif defined(FFT_KOKKOS_MKL_GPU)
#define LMP_FFT_KOKKOS_LIB "MKL_GPU FFT"
#elif defined(FFT_KOKKOS_NVPL)
#define LMP_FFT_KOKKOS_LIB "NVPL FFT"
#else
#define LMP_FFT_KOKKOS_LIB "KISS FFT"
#endif
#if defined(FFT_KOKKOS_MKL)
#if defined(FFT_KOKKOS_MKL_GPU)
#include "CL/sycl.hpp"
#include "oneapi/mkl/dfti.hpp"
#include "mkl.h"
#if defined(FFT_SINGLE)
typedef std::complex<float> FFT_KOKKOS_DATA;
#define FFT_KOKKOS_MKL_PREC DFTI_SINGLE
#else
typedef std::complex<double> FFT_KOKKOS_DATA;
#define FFT_KOKKOS_MKL_PREC DFTI_DOUBLE
#endif
#elif defined(FFT_KOKKOS_MKL)
#include "mkl_dfti.h"
#if defined(FFT_SINGLE)
typedef float _Complex FFT_KOKKOS_DATA;
@ -108,6 +142,15 @@
typedef fftw_complex FFT_KOKKOS_DATA;
#define FFTW_API(function) fftw_ ## function
#endif
#elif defined(FFT_KOKKOS_NVPL)
#include "nvpl_fftw.h"
#if defined(FFT_SINGLE)
typedef fftwf_complex FFT_KOKKOS_DATA;
#define FFTW_API(function) fftwf_ ## function
#else
typedef fftw_complex FFT_KOKKOS_DATA;
#define FFTW_API(function) fftw_ ## function
#endif
#elif defined(FFT_KOKKOS_CUFFT)
#include "cufft.h"
#if defined(FFT_SINGLE)
@ -146,7 +189,7 @@
#endif
// (double[2]*) is not a 1D pointer
#if defined(FFT_KOKKOS_FFTW3)
#if defined(FFT_KOKKOS_FFTW3) || defined(FFT_KOKKOS_NVPL)
typedef FFT_SCALAR* FFT_KOKKOS_DATA_POINTER;
#else
typedef FFT_KOKKOS_DATA* FFT_KOKKOS_DATA_POINTER;

View File

@ -172,7 +172,6 @@ void FixShakeKokkos<DeviceType>::init()
k_angle_distance.sync<DeviceType>();
}
/* ----------------------------------------------------------------------
run setup for minimization.
------------------------------------------------------------------------- */

View File

@ -149,6 +149,14 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
set_flag = 1;
}
}
if ((str = getenv("PALS_LOCAL_RANKID"))) {
if (ngpus > 0) {
int local_rank = atoi(str);
device = local_rank % ngpus;
if (device >= skip_gpu) device++;
set_flag = 1;
}
}
if (ngpus > 1 && !set_flag)
error->all(FLERR,"Could not determine local MPI rank for multiple "

View File

@ -341,17 +341,17 @@ public:
// define precision
// handle global precision, force, energy, positions, kspace separately
#ifndef PRECISION
#define PRECISION 2
#ifndef LMP_PRECISION
#define LMP_PRECISION 2
#endif
#if PRECISION==1
#if LMP_PRECISION==1
typedef float LMP_FLOAT;
#else
typedef double LMP_FLOAT;
#endif
#ifndef PREC_FORCE
#define PREC_FORCE PRECISION
#define PREC_FORCE LMP_PRECISION
#endif
#if PREC_FORCE==1
@ -361,7 +361,7 @@ typedef double F_FLOAT;
#endif
#ifndef PREC_ENERGY
#define PREC_ENERGY PRECISION
#define PREC_ENERGY LMP_PRECISION
#endif
#if PREC_ENERGY==1
@ -521,7 +521,7 @@ struct BinOp3DLAMMPS {
};
#ifndef PREC_POS
#define PREC_POS PRECISION
#define PREC_POS LMP_PRECISION
#endif
#if PREC_POS==1
@ -531,7 +531,7 @@ typedef double X_FLOAT;
#endif
#ifndef PREC_VELOCITIES
#define PREC_VELOCITIES PRECISION
#define PREC_VELOCITIES LMP_PRECISION
#endif
#if PREC_VELOCITIES==1

View File

@ -162,8 +162,10 @@ void VerletKokkos::setup(int flag)
lmp->kokkos->auto_sync = 0;
modify->setup(vflag);
output->setup(flag);
lmp->kokkos->auto_sync = 1;
atomKK->sync(Host,ALL_MASK);
output->setup(flag);
update->setupflag = 0;
}
@ -252,6 +254,7 @@ void VerletKokkos::setup_minimal(int flag)
lmp->kokkos->auto_sync = 0;
modify->setup(vflag);
lmp->kokkos->auto_sync = 1;
update->setupflag = 0;
}

View File

@ -72,14 +72,14 @@
void fft_3d(FFT_DATA *in, FFT_DATA *out, int flag, struct fft_plan_3d *plan)
{
FFT_SCALAR norm;
#if defined(FFT_FFTW3)
#if defined(FFT_FFTW3) || defined(FFT_NVPL)
FFT_SCALAR *out_ptr;
#endif
FFT_DATA *data,*copy;
// system specific constants
#if defined(FFT_FFTW3)
#if defined(FFT_FFTW3) || defined(FFT_NVPL)
FFTW_API(plan) theplan;
#else
// nothing to do for other FFTs
@ -105,7 +105,7 @@ void fft_3d(FFT_DATA *in, FFT_DATA *out, int flag, struct fft_plan_3d *plan)
DftiComputeForward(plan->handle_fast,data);
else
DftiComputeBackward(plan->handle_fast,data);
#elif defined(FFT_FFTW3)
#elif defined(FFT_FFTW3) || defined(FFT_NVPL)
if (flag == 1)
theplan=plan->plan_fast_forward;
else
@ -139,7 +139,7 @@ void fft_3d(FFT_DATA *in, FFT_DATA *out, int flag, struct fft_plan_3d *plan)
DftiComputeForward(plan->handle_mid,data);
else
DftiComputeBackward(plan->handle_mid,data);
#elif defined(FFT_FFTW3)
#elif defined(FFT_FFTW3) || defined(FFT_NVPL)
if (flag == 1)
theplan=plan->plan_mid_forward;
else
@ -173,7 +173,7 @@ void fft_3d(FFT_DATA *in, FFT_DATA *out, int flag, struct fft_plan_3d *plan)
DftiComputeForward(plan->handle_slow,data);
else
DftiComputeBackward(plan->handle_slow,data);
#elif defined(FFT_FFTW3)
#elif defined(FFT_FFTW3) || defined(FFT_NVPL)
if (flag == 1)
theplan=plan->plan_slow_forward;
else
@ -203,11 +203,11 @@ void fft_3d(FFT_DATA *in, FFT_DATA *out, int flag, struct fft_plan_3d *plan)
if (flag == -1 && plan->scaled) {
norm = plan->norm;
const int num = plan->normnum;
#if defined(FFT_FFTW3)
#if defined(FFT_FFTW3) || defined(FFT_NVPL)
out_ptr = (FFT_SCALAR *)out;
#endif
for (int i = 0; i < num; i++) {
#if defined(FFT_FFTW3)
#if defined(FFT_FFTW3) || defined(FFT_NVPL)
*(out_ptr++) *= norm;
*(out_ptr++) *= norm;
#elif defined(FFT_MKL)
@ -515,7 +515,7 @@ struct fft_plan_3d *fft_3d_create_plan(
#endif
DftiCommitDescriptor(plan->handle_slow);
#elif defined(FFT_FFTW3)
#elif defined(FFT_FFTW3) || defined(FFT_NVPL)
#if defined(FFT_FFTW_THREADS)
if (nthreads > 1) {
FFTW_API(init_threads)();
@ -613,7 +613,7 @@ void fft_3d_destroy_plan(struct fft_plan_3d *plan)
DftiFreeDescriptor(&(plan->handle_fast));
DftiFreeDescriptor(&(plan->handle_mid));
DftiFreeDescriptor(&(plan->handle_slow));
#elif defined(FFT_FFTW3)
#elif defined(FFT_FFTW3) || defined(FFT_NVPL)
FFTW_API(destroy_plan)(plan->plan_slow_forward);
FFTW_API(destroy_plan)(plan->plan_slow_backward);
FFTW_API(destroy_plan)(plan->plan_mid_forward);
@ -714,7 +714,7 @@ void fft_1d_only(FFT_DATA *data, int nsize, int flag, struct fft_plan_3d *plan)
{
int i,num;
FFT_SCALAR norm;
#if defined(FFT_FFTW3)
#if defined(FFT_FFTW3) || defined(FFT_NVPL)
FFT_SCALAR *data_ptr;
#endif
@ -733,7 +733,7 @@ void fft_1d_only(FFT_DATA *data, int nsize, int flag, struct fft_plan_3d *plan)
// fftw3 and Dfti in MKL encode the number of transforms
// into the plan, so we cannot operate on a smaller data set
#if defined(FFT_MKL) || defined(FFT_FFTW3)
#if defined(FFT_MKL) || defined(FFT_FFTW3) || defined(FFT_NVPL)
if ((total1 > nsize) || (total2 > nsize) || (total3 > nsize))
return;
#endif
@ -754,7 +754,7 @@ void fft_1d_only(FFT_DATA *data, int nsize, int flag, struct fft_plan_3d *plan)
DftiComputeBackward(plan->handle_mid,data);
DftiComputeBackward(plan->handle_slow,data);
}
#elif defined(FFT_FFTW3)
#elif defined(FFT_FFTW3) || defined(FFT_NVPL)
FFTW_API(plan) theplan;
if (flag == 1)
theplan=plan->plan_fast_forward;
@ -795,11 +795,11 @@ void fft_1d_only(FFT_DATA *data, int nsize, int flag, struct fft_plan_3d *plan)
if (flag == -1 && plan->scaled) {
norm = plan->norm;
num = MIN(plan->normnum,nsize);
#if defined(FFT_FFTW3)
#if defined(FFT_FFTW3) || defined(FFT_NVPL)
data_ptr = (FFT_SCALAR *)data;
#endif
for (i = 0; i < num; i++) {
#if defined(FFT_FFTW3)
#if defined(FFT_FFTW3) || defined(FFT_NVPL)
*(data_ptr++) *= norm;
*(data_ptr++) *= norm;
#elif defined(FFT_MKL)

View File

@ -31,6 +31,10 @@ typedef MKL_Complex8 FFT_DATA;
typedef fftwf_complex FFT_DATA;
#define FFTW_API(function) fftwf_##function
#elif defined(FFT_NVPL)
#include "nvpl_fftw.h"
typedef fftwf_complex FFT_DATA;
#define FFTW_API(function) fftwf_##function
#else
/* use a stripped down version of kiss fft as default fft */
@ -64,6 +68,11 @@ typedef MKL_Complex16 FFT_DATA;
typedef fftw_complex FFT_DATA;
#define FFTW_API(function) fftw_##function
#elif defined(FFT_NVPL)
#include "nvpl_fftw.h"
typedef fftw_complex FFT_DATA;
#define FFTW_API(function) fftw_##function
#else
/* use a stripped down version of kiss fft as default fft */
@ -108,7 +117,7 @@ struct fft_plan_3d {
DFTI_DESCRIPTOR *handle_fast;
DFTI_DESCRIPTOR *handle_mid;
DFTI_DESCRIPTOR *handle_slow;
#elif defined(FFT_FFTW3)
#elif defined(FFT_FFTW3) || defined(FFT_NVPL)
FFTW_API(plan) plan_fast_forward;
FFTW_API(plan) plan_fast_backward;
FFTW_API(plan) plan_mid_forward;

View File

@ -0,0 +1,121 @@
# aurora = Intel Sapphire Rapids CPU, mpicxx compiler (compatible w/ GPU package)
SHELL = /bin/sh
# ---------------------------------------------------------------------
# compiler/linker settings
# specify flags and libraries needed for your compiler
CC = mpicxx
OPTFLAGS = -DSHAKEATOMIC -DCOMMPARA -xSAPPHIRERAPIDS -O2 -ffp-model=fast -qoverride-limits -qopt-zmm-usage=high
CCFLAGS = -qopenmp -DLMP_INTEL_USELRT -DLMP_USE_MKL_RNG $(OPTFLAGS)
CCFLAGS += -I$(MKLROOT)/include
SHFLAGS = -fPIC
DEPFLAGS = -M
LINK = mpicxx
LINKFLAGS = -qopenmp $(OPTFLAGS)
LIB = -ltbbmalloc -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core
SIZE = size
ARCHIVE = ar
ARFLAGS = -rc
SHLIBFLAGS = -shared
# ---------------------------------------------------------------------
# LAMMPS-specific settings, all OPTIONAL
# specify settings for LAMMPS features you will use
# if you change any -D setting, do full re-compile after "make clean"
# LAMMPS ifdef settings
# see possible settings in Section 3.5 of the manual
LMP_INC = -DLAMMPS_GZIP
# MPI library
# see discussion in Section 3.4 of the manual
# MPI wrapper compiler/linker can provide this info
# can point to dummy MPI library in src/STUBS as in Makefile.serial
# use -D MPICH and OMPI settings in INC to avoid C++ lib conflicts
# INC = path for mpi.h, MPI compiler settings
# PATH = path for MPI library
# LIB = name of MPI library
MPI_INC = -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1
MPI_PATH =
MPI_LIB =
# FFT library
# see discussion in Section 3.5.2 of manual
# can be left blank to use provided KISS FFT library
# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
# PATH = path for FFT library
# LIB = name of FFT library
FFT_INC = -DFFT_MKL -DFFT_SINGLE
FFT_PATH =
FFT_LIB =
# JPEG and/or PNG library
# see discussion in Section 3.5.4 of manual
# only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC
# INC = path(s) for jpeglib.h and/or png.h
# PATH = path(s) for JPEG library and/or PNG library
# LIB = name(s) of JPEG library and/or PNG library
JPG_INC =
JPG_PATH =
JPG_LIB =
# ---------------------------------------------------------------------
# build rules and dependencies
# do not edit this section
include Makefile.package.settings
include Makefile.package
EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(PKG_SYSINC)
EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH)
EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB)
EXTRA_CPP_DEPENDS = $(PKG_CPP_DEPENDS)
EXTRA_LINK_DEPENDS = $(PKG_LINK_DEPENDS)
# Path to src files
vpath %.cpp ..
vpath %.h ..
# Link target
$(EXE): main.o $(LMPLIB) $(EXTRA_LINK_DEPENDS)
$(LINK) $(LINKFLAGS) main.o $(EXTRA_PATH) $(LMPLINK) $(EXTRA_LIB) $(LIB) -o $@
$(SIZE) $@
# Library targets
$(ARLIB): $(OBJ) $(EXTRA_LINK_DEPENDS)
@rm -f ../$(ARLIB)
$(ARCHIVE) $(ARFLAGS) ../$(ARLIB) $(OBJ)
@rm -f $(ARLIB)
@ln -s ../$(ARLIB) $(ARLIB)
$(SHLIB): $(OBJ) $(EXTRA_LINK_DEPENDS)
$(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o ../$(SHLIB) \
$(OBJ) $(EXTRA_LIB) $(LIB)
@rm -f $(SHLIB)
@ln -s ../$(SHLIB) $(SHLIB)
# Compilation rules
%.o:%.cpp
$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
# Individual dependencies
depend : fastdep.exe $(SRC)
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
fastdep.exe: ../DEPEND/fastdep.c
icx -O -o $@ $<
sinclude .depend

View File

@ -7,12 +7,14 @@ SHELL = /bin/sh
# specify flags and libraries needed for your compiler
CC = mpicxx
CCFLAGS = -g -O3 -DNDEBUG
CCFLAGS = -g -O3 -DNDEBUG -w
CCFLAGS += -fsycl-device-code-split=per_kernel
SHFLAGS = -fPIC
DEPFLAGS = -M
LINK = mpicxx
LINKFLAGS = -g -O3
LINKFLAGS += -flink-huge-device-code -fsycl-max-parallel-link-jobs=64
LIB =
SIZE = size
@ -52,9 +54,9 @@ MPI_LIB =
# PATH = path for FFT library
# LIB = name of FFT library
FFT_INC =
FFT_PATH =
FFT_LIB =
FFT_INC = -DFFT_KOKKOS_MKL_GPU -DFFT_SINGLE -I${MKL_ROOT}/include
FFT_PATH = -L${MKL_ROOT}/lib -L${TBB_ROOT}/lib/intel64/gcc4.8
FFT_LIB = -lmkl_sycl_dft -lmkl_intel_ilp64 -lmkl_tbb_thread -lmkl_core -ltbb
# JPEG and/or PNG library
# see discussion in Section 3.5.4 of manual
@ -116,6 +118,6 @@ depend : fastdep.exe $(SRC)
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
fastdep.exe: ../DEPEND/fastdep.c
cc -O -o $@ $<
icx -O -o $@ $<
sinclude .depend

View File

@ -218,7 +218,7 @@ void FixChargeRegulation::init() {
int flagall = flag;
MPI_Allreduce(&flag, &flagall, 1, MPI_INT, MPI_SUM, world);
if (flagall && comm->me == 0)
if (flagall)
error->all(FLERR, "fix charge/regulation cannot exchange "
"individual atoms (ions) belonging to a molecule");
}

View File

@ -564,7 +564,7 @@ void FixGCMC::init()
if (molecule[i]) flag = 1;
int flagall;
MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world);
if (flagall && comm->me == 0)
if (flagall)
error->all(FLERR, "Fix gcmc cannot exchange individual atoms belonging to a molecule");
}
@ -579,7 +579,7 @@ void FixGCMC::init()
if (molecule[i] == 0) flag = 1;
int flagall;
MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world);
if (flagall && comm->me == 0)
if (flagall)
error->all(FLERR, "All mol IDs should be set for fix gcmc group atoms");
}

View File

@ -356,7 +356,7 @@ void FixWidom::init()
if (molecule[i] == 0) flag = 1;
int flagall;
MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world);
if (flagall && comm->me == 0)
if (flagall)
error->all(FLERR, "All mol IDs should be set for fix widom group atoms");
}

View File

@ -28,6 +28,7 @@ MLIAPDescriptor::MLIAPDescriptor(LAMMPS *lmp) :
cutghost(nullptr), radelem(nullptr), wjelem(nullptr)
{
cutmax = 0.0;
allocated_elements = 0;
}
/* ---------------------------------------------------------------------- */

View File

@ -57,7 +57,6 @@ MLIAPDescriptorACE::MLIAPDescriptorACE(LAMMPS *_lmp, char *yacefilename) :
{
acemlimpl = new ACE_ML_impl;
allocated_elements = 0;
//read in file with CG coefficients or c_tilde coefficients
ctilde_file = yacefilename;
delete acemlimpl->basis_set;

View File

@ -286,7 +286,7 @@ void PairQUIP::coeff(int narg, char **arg)
// and returns the necessary size of quip_potential. This behavior
// is invoked by setting n_potential_quip to 0.
n_quip_potential = 0;
quip_potential = new int[0];
quip_potential = new int[1];
quip_lammps_potential_initialise(quip_potential, &n_quip_potential, &cutoff, quip_file,
&n_quip_file, quip_string, &n_quip_string);
delete[] quip_potential;

View File

@ -396,14 +396,14 @@ void PairHbondDreidingLJ::init_style()
// and computing forces on A,H which may be on different procs
if (atom->molecular == Atom::ATOMIC)
error->all(FLERR,"Pair style hbond/dreiding requires molecular system");
error->all(FLERR,"Pair style hbond/dreiding/lj requires molecular system");
if (atom->tag_enable == 0)
error->all(FLERR,"Pair style hbond/dreiding requires atom IDs");
error->all(FLERR,"Pair style hbond/dreiding/lj requires atom IDs");
if (atom->map_style == Atom::MAP_NONE)
error->all(FLERR,"Pair style hbond/dreiding requires an atom map, "
error->all(FLERR,"Pair style hbond/dreiding/lj requires an atom map, "
"see atom_modify");
if (force->newton_pair == 0)
error->all(FLERR,"Pair style hbond/dreiding requires newton pair on");
error->all(FLERR,"Pair style hbond/dreiding/lj requires newton pair on");
// set donor[M]/acceptor[M] if any atom of type M is a donor/acceptor
@ -419,7 +419,7 @@ void PairHbondDreidingLJ::init_style()
acceptor[j] = 1;
}
if (!anyflag) error->all(FLERR,"No pair hbond/dreiding coefficients set");
if (!anyflag) error->all(FLERR,"No pair hbond/dreiding/lj coefficients set");
// set additional param values
// offset is for LJ only, angle term is not included

View File

@ -323,14 +323,14 @@ void PairHbondDreidingMorse::init_style()
// and computing forces on A,H which may be on different procs
if (atom->molecular == Atom::ATOMIC)
error->all(FLERR,"Pair style hbond/dreiding requires molecular system");
error->all(FLERR,"Pair style hbond/dreiding/morse requires molecular system");
if (atom->tag_enable == 0)
error->all(FLERR,"Pair style hbond/dreiding requires atom IDs");
error->all(FLERR,"Pair style hbond/dreiding/morse requires atom IDs");
if (atom->map_style == Atom::MAP_NONE)
error->all(FLERR,"Pair style hbond/dreiding requires an atom map, "
error->all(FLERR,"Pair style hbond/dreiding/morse requires an atom map, "
"see atom_modify");
if (force->newton_pair == 0)
error->all(FLERR,"Pair style hbond/dreiding requires newton pair on");
error->all(FLERR,"Pair style hbond/dreiding/morse requires newton pair on");
// set donor[M]/acceptor[M] if any atom of type M is a donor/acceptor
@ -346,7 +346,7 @@ void PairHbondDreidingMorse::init_style()
acceptor[j] = 1;
}
if (!anyflag) error->all(FLERR,"No pair hbond/dreiding coefficients set");
if (!anyflag) error->all(FLERR,"No pair hbond/dreiding/morse coefficients set");
// set additional param values
// offset is for Morse only, angle term is not included

View File

@ -148,8 +148,10 @@ void AngleWrite::command(int narg, char **arg)
FILE *coeffs;
char line[MAXLINE] = {'\0'};
coeffs = fopen(coeffs_file.c_str(), "r");
if (!coeffs)
error->one(FLERR, "Unable to open temporary file {}: {}", coeffs_file, utils::getsyserror());
for (int i = 0; i < atom->nangletypes; ++i) {
fgets(line, MAXLINE, coeffs);
utils::sfgets(FLERR, line, MAXLINE, coeffs, coeffs_file.c_str(), error);
writer->input->one(fmt::format("angle_coeff {}", line));
}
fclose(coeffs);

View File

@ -1911,7 +1911,11 @@ void Atom::allocate_type_arrays()
if (avec->mass_type == AtomVec::PER_TYPE) {
mass = new double[ntypes+1];
mass_setflag = new int[ntypes+1];
for (int itype = 1; itype <= ntypes; itype++) mass_setflag[itype] = 0;
// start loop from 0 to avoid uninitialized access when operating on the whole array
for (int itype = 0; itype <= ntypes; itype++) {
mass_setflag[itype] = 0;
mass[itype] = 0.0;
}
}
}
@ -2748,11 +2752,12 @@ for an example where checking ghost communication is necessary.
int Atom::find_custom_ghost(const char *name, int &flag, int &cols, int &ghost)
{
int i = find_custom(name, flag, cols);
ghost = 0;
if (i == -1) return i;
if ((flag == 0) && (cols == 0)) ghost = ivghost[i];
else if ((flag == 1) && (cols == 0)) ghost = dvghost[i];
else if ((flag == 0) && (cols == 1)) ghost = iaghost[i];
else if ((flag == 1) && (cols == 1)) ghost = daghost[i];
else if ((flag == 0) && (cols > 0)) ghost = iaghost[i];
else if ((flag == 1) && (cols > 0)) ghost = daghost[i];
return i;
}
@ -2999,11 +3004,13 @@ length of the data area, and a short description.
- N double values defined by fix property/atom array name
*See also*
:cpp:func:`lammps_extract_atom`
:cpp:func:`lammps_extract_atom`,
:cpp:func:`lammps_extract_atom_datatype`,
:cpp:func:`lammps_extract_atom_size`
\endverbatim
*
* \sa extract_datatype
* \sa extract_datatype, extract_size
*
* \param name string with the keyword of the desired property.
Typically the name of the pointer variable returned
@ -3142,7 +3149,7 @@ void *Atom::extract(const char *name)
\endverbatim
*
* \sa extract
* \sa extract extract_size
*
* \param name string with the keyword of the desired property.
* \return data type constant for desired property or -1 */
@ -3177,10 +3184,14 @@ int Atom::extract_datatype(const char *name)
if (strcmp(name,"temperature") == 0) return LAMMPS_DOUBLE;
if (strcmp(name,"heatflow") == 0) return LAMMPS_DOUBLE;
// PERI package (and in part MACHDYN)
if (strcmp(name,"vfrac") == 0) return LAMMPS_DOUBLE;
if (strcmp(name,"s0") == 0) return LAMMPS_DOUBLE;
if (strcmp(name,"x0") == 0) return LAMMPS_DOUBLE_2D;
// AWPMD package (and in part EFF and ELECTRODE)
if (strcmp(name,"espin") == 0) return LAMMPS_INT;
if (strcmp(name,"spin") == 0) return LAMMPS_INT; // backwards compatibility
if (strcmp(name,"eradius") == 0) return LAMMPS_DOUBLE;
@ -3248,14 +3259,255 @@ int Atom::extract_datatype(const char *name)
if (!array) index = find_custom(&name[2],flag,cols);
else index = find_custom(&name[3],flag,cols);
// consistency checks
if (index < 0) return -1;
if (which != flag) return -1;
if ((!array && cols) || (array && !cols)) return -1;
if (which == 0) return LAMMPS_INT;
else return LAMMPS_DOUBLE;
if (!which && !array) return LAMMPS_INT;
if (which && !array) return LAMMPS_DOUBLE;
if (!which && array) return LAMMPS_INT_2D;
if (which && array) return LAMMPS_DOUBLE_2D;
}
return -1;
}
/** Provide vector or array size info of internal data of the Atom class
*
\verbatim embed:rst
.. versionadded:: TBD
\endverbatim
*
* \sa extract extract_datatype
*
* \param name string with the keyword of the desired property.
* \param type either LMP_SIZE_ROWS or LMP_SIZE_COLS for per-atom array or ignored
* \return size of the vector or size of the array for the requested dimension or -1 */
int Atom::extract_size(const char *name, int type)
{
// --------------------------------------------------------------------
// 6th customization section: customize by adding new variable name
const auto datatype = extract_datatype(name);
const auto nall = nlocal + nghost;
const auto ghost_vel = comm->ghost_velocity;
if ((datatype == LAMMPS_DOUBLE_2D) || (datatype == LAMMPS_INT_2D)) {
if (type == LMP_SIZE_ROWS) {
if (strcmp(name,"x") == 0) return nall;
if (strcmp(name,"v") == 0) {
if (ghost_vel) return nall;
else return nlocal;
}
if (strcmp(name,"f") == 0) return nall;
if (strcmp(name,"mu") == 0) return nall;
if (strcmp(name,"omega") == 0) {
if (ghost_vel) return nall;
else return nlocal;
}
if (strcmp(name,"angmom") == 0) {
if (ghost_vel) return nall;
else return nlocal;
}
if (strcmp(name,"torque") == 0) return nlocal;
if (strcmp(name,"quat") == 0) {
if (ghost_vel) return nall;
else return nlocal;
}
// PERI package
if (strcmp(name,"x0") == 0) return nall;
// SPIN package
if (strcmp(name,"sp") == 0) return nall;
if (strcmp(name,"fm") == 0) return nlocal;
if (strcmp(name,"fm_long") == 0) return nlocal;
// AWPMD package
if (strcmp(name,"cs") == 0) {
if (ghost_vel) return nall;
else return nlocal;
}
if (strcmp(name,"csforce") == 0) return nlocal;
if (strcmp(name,"vforce") == 0) return nlocal;
// SPH package
if (strcmp(name,"vest") == 0) return nall;
// MACHDYN package
if (strcmp(name, "smd_data_9") == 0) return LAMMPS_DOUBLE_2D;
if (strcmp(name, "smd_stress") == 0) return LAMMPS_DOUBLE_2D;
} else if (type == LMP_SIZE_COLS) {
if (strcmp(name,"x") == 0) return 3;
if (strcmp(name,"v") == 0) return 3;
if (strcmp(name,"f") == 0) return 3;
if (strcmp(name,"mu") == 0) return 4;
if (strcmp(name,"omega") == 0) return 3;
if (strcmp(name,"angmom") == 0) return 3;
if (strcmp(name,"torque") == 0) return 3;
if (strcmp(name,"quat") == 0) return 4;
// PERI package
if (strcmp(name,"x0") == 0) return 3;
// SPIN package
if (strcmp(name,"sp") == 0) return 4;
if (strcmp(name,"fm") == 0) return 3;
if (strcmp(name,"fm_long") == 0) return 3;
// AWPMD package
if (strcmp(name,"cs") == 0) return 2;
if (strcmp(name,"csforce") == 0) return 2;
if (strcmp(name,"vforce") == 0) return 3;
// SPH package
if (strcmp(name,"vest") == 0) return 3;
// MACHDYN package
if (strcmp(name, "smd_data_9") == 0) return 9;
if (strcmp(name, "smd_stress") == 0) return 6;
}
// custom arrays
if (utils::strmatch(name,"^[id]2_")) {
int which = 0;
if (name[0] == 'd') which = 1;
int index,flag,cols,ghost;
index = find_custom_ghost(&name[3],flag,cols,ghost);
// consistency checks
if (index < 0) return -1;
if (which != flag) return -1;
if (!cols) return -1;
if (type == LMP_SIZE_ROWS) {
if (ghost) return nall;
else return nlocal;
} else if (type == LMP_SIZE_COLS) {
return cols;
}
}
} else {
if (strcmp(name,"mass") == 0) return ntypes + 1;
if (strcmp(name,"id") == 0) return nall;
if (strcmp(name,"type") == 0) return nall;
if (strcmp(name,"mask") == 0) return nall;
if (strcmp(name,"image") == 0) return nlocal;
if (strcmp(name,"molecule") == 0) return nall;
if (strcmp(name,"q") == 0) return nall;
if (strcmp(name,"radius") == 0) return nall;
if (strcmp(name,"rmass") == 0) return nall;
// ASPHERE package
if (strcmp(name,"ellipsoid") == 0) return nlocal;
// BODY package
if (strcmp(name,"line") == 0) return nlocal;
if (strcmp(name,"tri") == 0) return nlocal;
if (strcmp(name,"body") == 0) return nlocal;
// PERI package (and in part MACHDYN)
if (strcmp(name,"vfrac") == 0) return nall;
if (strcmp(name,"s0") == 0) return nall;
// AWPMD package (and in part EFF and ELECTRODE)
if (strcmp(name,"espin") == 0) return nall;
if (strcmp(name,"spin") == 0) return nall; // backwards compatibility
if (strcmp(name,"eradius") == 0) return nall;
if (strcmp(name,"ervel") == 0) return nlocal;
if (strcmp(name,"erforce") == 0) return nlocal;
if (strcmp(name,"ervelforce") == 0) return nlocal;
if (strcmp(name,"etag") == 0) return nall;
// CG-DNA package
if (strcmp(name,"id5p") == 0) return nall;
// RHEO package
if (strcmp(name,"temperature") == 0) return nlocal;
if (strcmp(name,"heatflow") == 0) return nlocal;
if (strcmp(name,"rheo_status") == 0) return nall;
if (strcmp(name,"conductivity") == 0) return nlocal;
if (strcmp(name,"pressure") == 0) return nlocal;
if (strcmp(name,"viscosity") == 0) return nlocal;
// SPH package
if (strcmp(name,"rho") == 0) return nall;
if (strcmp(name,"drho") == 0) return nlocal;
if (strcmp(name,"esph") == 0) return nall;
if (strcmp(name,"desph") == 0) return nlocal;
if (strcmp(name,"cv") == 0) return nall;
// MACHDYN package
if (strcmp(name, "contact_radius") == 0) return nall;
if (strcmp(name, "eff_plastic_strain") == 0) return nlocal;
if (strcmp(name, "eff_plastic_strain_rate") == 0) return nlocal;
if (strcmp(name, "damage") == 0) return nlocal;
// DPD-REACT package
if (strcmp(name,"dpdTheta") == 0) return nall;
// DPD-MESO package
if (strcmp(name,"edpd_temp") == 0) return nall;
// DIELECTRIC package
if (strcmp(name,"area") == 0) return nall;
if (strcmp(name,"ed") == 0) return nall;
if (strcmp(name,"em") == 0) return nall;
if (strcmp(name,"epsilon") == 0) return nall;
if (strcmp(name,"curvature") == 0) return nall;
if (strcmp(name,"q_unscaled") == 0) return nall;
// end of customization section
// --------------------------------------------------------------------
// custom vectors
if (utils::strmatch(name,"^[id]_")) {
int which = 0;
if (name[0] == 'd') which = 1;
int index,flag,cols,ghost;
index = find_custom_ghost(&name[2],flag,cols,ghost);
// consistency checks
if (index < 0) return -1;
if (which != flag) return -1;
if (cols) return -1;
if (ghost) return nall;
else return nlocal;
}
}
return -1;
}

View File

@ -378,6 +378,7 @@ class Atom : protected Pointers {
void *extract(const char *);
int extract_datatype(const char *);
int extract_size(const char *, int);
inline int *get_map_array() { return map_array; };
inline int get_map_size() { return map_tag_max + 1; };

View File

@ -149,8 +149,10 @@ void DihedralWrite::command(int narg, char **arg)
FILE *coeffs;
char line[MAXLINE] = {'\0'};
coeffs = fopen(coeffs_file.c_str(), "r");
if (!coeffs)
error->one(FLERR, "Unable to open temporary file {}: {}", utils::getsyserror());
for (int i = 0; i < atom->ndihedraltypes; ++i) {
fgets(line, MAXLINE, coeffs);
utils::sfgets(FLERR, line, MAXLINE, coeffs, coeffs_file.c_str(), error);
writer->input->one(fmt::format("dihedral_coeff {}", line));
}
fclose(coeffs);

View File

@ -29,14 +29,14 @@ class Error : protected Pointers {
[[noreturn]] void all(const std::string &, int, const std::string &);
template <typename... Args>
void all(const std::string &file, int line, const std::string &format, Args &&...args)
[[noreturn]] void all(const std::string &file, int line, const std::string &format, Args &&...args)
{
_all(file, line, format, fmt::make_format_args(args...));
}
[[noreturn]] void one(const std::string &, int, const std::string &);
template <typename... Args>
void one(const std::string &file, int line, const std::string &format, Args &&...args)
[[noreturn]] void one(const std::string &file, int line, const std::string &format, Args &&...args)
{
_one(file, line, format, fmt::make_format_args(args...));
}

View File

@ -1316,6 +1316,10 @@ std::string Info::get_fft_info()
#else
fft_info += "FFT library = MKL\n";
#endif
#elif defined(FFT_MKL_GPU)
fft_info += "FFT library = MKL GPU\n";
#elif defined(FFT_NVPL)
fft_info += "FFT library = NVPL\n";
#elif defined(FFT_FFTW3)
#if defined(FFT_FFTW_THREADS)
fft_info += "FFT library = FFTW3 with threads\n";
@ -1338,12 +1342,16 @@ std::string Info::get_fft_info()
#else
fft_info += "KOKKOS FFT library = FFTW3\n";
#endif
#elif defined(FFT_KOKKOS_NVPL)
fft_info += "KOKKOS FFT library = NVPL\n";
#elif defined(FFT_KOKKOS_MKL)
#if defined(FFT_KOKKOS_MKL_THREADS)
fft_info += "KOKKOS FFT library = MKL with threads\n";
#else
fft_info += "KOKKOS FFT library = MKL\n";
#endif
#elif defined(FFT_KOKKOS_MKL_GPU)
fft_info += "KOKKOS FFT library = MKL GPU\n";
#else
fft_info += "KOKKOS FFT library = KISS\n";
#endif

View File

@ -2087,10 +2087,13 @@ int lammps_map_atom(void *handle, const void *id)
.. versionadded:: 18Sep2020
This function returns an integer that encodes the data type of the per-atom
property with the specified name. See :cpp:enum:`_LMP_DATATYPE_CONST` for valid
values. Callers of :cpp:func:`lammps_extract_atom` can use this information
to then decide how to cast the ``void *`` pointer and access the data.
This function returns an integer that encodes the data type of the
per-atom property with the specified name. See
:cpp:enum:`_LMP_DATATYPE_CONST` for valid values. Callers of
:cpp:func:`lammps_extract_atom` can use this information to decide how
to cast the ``void *`` pointer and access the data. In addition,
:cpp:func:`lammps_extract_atom_size` can be used to get information
about the vector or array dimensions.
\endverbatim
*
@ -2108,18 +2111,53 @@ int lammps_extract_atom_datatype(void *handle, const char *name)
/* ---------------------------------------------------------------------- */
/** Get dimension info of a LAMMPS per-atom property
*
\verbatim embed:rst
.. versionadded:: TBD
This function returns an integer with the size of the per-atom
property with the specified name. This allows to accurately determine
the size of the per-atom data vectors or arrays. For per-atom arrays,
the *type* argument is required to return either the number of rows or the
number of columns. It is ignored for per-atom vectors.
Callers of :cpp:func:`lammps_extract_atom` can use this information in
combination with the result from :cpp:func:`lammps_extract_atom_datatype`
to decide how to cast the ``void *`` pointer and access the data.
\endverbatim
*
* \param handle pointer to a previously created LAMMPS instance
* \param name string with the name of the extracted property
* \param type either LMP_SIZE_ROWS or LMP_SIZE_COLS if *name* refers
to a per-atom array otherwise ignored
* \return integer with the size of the vector or array dimension or -1
* */
int lammps_extract_atom_size(void *handle, const char *name, int type)
{
auto lmp = (LAMMPS *) handle;
return lmp->atom->extract_size(name, type);
}
/* ---------------------------------------------------------------------- */
/** Get pointer to a LAMMPS per-atom property.
*
\verbatim embed:rst
This function returns a pointer to the location of per-atom properties
(and per-atom-type properties in the case of the 'mass' keyword).
Per-atom data is distributed across sub-domains and thus MPI ranks. The
returned pointer is cast to ``void *`` and needs to be cast to a pointer
of data type that the entity represents.
This function returns a pointer to the location of per-atom properties (and
per-atom-type properties in the case of the 'mass' keyword). Per-atom data is
distributed across sub-domains and thus MPI ranks. The returned pointer is cast
to ``void *`` and needs to be cast to a pointer of data type that the entity
represents. You can use the functions :cpp:func:`lammps_extract_atom_datatype`
and :cpp:func:`lammps_extract_atom_size` to determine data type, dimensions and
sizes of the storage pointed to by the returned pointer.
A table with supported keywords is included in the documentation
of the :cpp:func:`Atom::extract() <LAMMPS_NS::Atom::extract>` function.
A table with supported keywords is included in the documentation of the
:cpp:func:`Atom::extract() <LAMMPS_NS::Atom::extract>` function.
.. warning::
@ -7027,5 +7065,5 @@ int lammps_python_api_version() {
}
// Local Variables:
// fill-column: 72
// fill-column: 80
// End:

View File

@ -172,6 +172,7 @@ int lammps_map_atom(void *handle, const void *id);
* ---------------------------------------------------------------------- */
int lammps_extract_atom_datatype(void *handle, const char *name);
int lammps_extract_atom_size(void *handle, const char *name, int type);
void *lammps_extract_atom(void *handle, const char *name);
/* ----------------------------------------------------------------------

View File

@ -39,6 +39,8 @@
#define LMP_FFT_LIB "FFTW3"
#elif defined(FFT_MKL)
#define LMP_FFT_LIB "MKL FFT"
#elif defined(FFT_MKL_GPU)
#define LMP_FFT_LIB "MKL GPU FFT"
#elif defined(FFT_CUFFT)
#define LMP_FFT_LIB "cuFFT"
#elif defined(FFT_HIPFFT)

View File

@ -1 +1,2 @@
#define LAMMPS_VERSION "29 Aug 2024"
#define LAMMPS_UPDATE "Development"

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.16)
project(lammps-gui VERSION 1.6.10 LANGUAGES CXX)
project(lammps-gui VERSION 1.6.11 LANGUAGES CXX)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
@ -86,10 +86,8 @@ else()
add_compile_options(/wd4244)
add_compile_options(/wd4267)
add_compile_options(/wd4250)
if(LAMMPS_EXCEPTIONS)
add_compile_options(/EHsc)
endif()
endif()
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
endif()
endif()

View File

@ -54,6 +54,10 @@
</provides>
<releases>
<release version="1.6.11" timestamp="1725080055">
<description>
</description>
</release>
<release version="1.6.10" timestamp="1724585189">
<description>
Resolve plugin mode issues.

View File

@ -44,7 +44,7 @@ void GetParameters()
for (i=0; i < no_atom_types; i++) {
backwards = -1;
strncpy(potential_types[0],atomtypes[i].potential,5);
memcpy(potential_types[0],atomtypes[i].potential,5);
k = find_match(1,potential_types,ff_atomtypes,&backwards);
if (k < 0) {
printf(" Unable to find mass for %s\n",atomtypes[i].potential);
@ -63,7 +63,7 @@ void GetParameters()
for (i=0; i < no_atom_types; i++) {
backwards = 0;
for (j=0; j < 2; j++) atomtypes[i].params[j] = 0.0;
strncpy(potential_types[0],atomtypes[i].potential,5);
memcpy(potential_types[0],atomtypes[i].potential,5);
k = find_match(1,potential_types,ff_vdw,&backwards);
if (k < 0) {
get_equivs(1,potential_types,equiv_types);
@ -101,7 +101,7 @@ void GetParameters()
printf("\n Atom Types, Masses and VDW Parameters\n");
for (i=0; i < no_atom_types; i++) {
printf(" %3s %8.4f %8.4f %8.4f\n",
atomtypes[i].potential,atomtypes[i].mass, atomtypes[i].params[0],atomtypes[i].params[1]);
atomtypes[i].potential,atomtypes[i].mass,atomtypes[i].params[0],atomtypes[i].params[1]);
}
}
@ -115,8 +115,7 @@ void GetParameters()
backwards = 0;
for (j=0; j < 4; j++) bondtypes[i].params[j] = 0.0;
for (j=0; j < 2; j++)
strncpy(potential_types[j],
atomtypes[bondtypes[i].types[j]].potential,5);
memcpy(potential_types[j],atomtypes[bondtypes[i].types[j]].potential,5);
k = find_match(2,potential_types,ff_bond,&backwards);
if (k < 0) {
get_equivs(2,potential_types,equiv_types);
@ -172,7 +171,7 @@ void GetParameters()
backwards = 0;
for (j=0; j < 4; j++) angletypes[i].params[j] = 0.0;
for (j=0; j < 3; j++)
strncpy(potential_types[j],atomtypes[angletypes[i].types[j]].potential,5);
memcpy(potential_types[j],atomtypes[angletypes[i].types[j]].potential,5);
k = find_match(3,potential_types,ff_ang,&backwards);
if (k < 0) {
get_equivs(3,potential_types,equiv_types);
@ -295,8 +294,7 @@ void GetParameters()
for (j=0; j < 6; j++)
dihedraltypes[i].params[j] = 0.0;
for (j=0; j < 4; j++)
strncpy(potential_types[j],
atomtypes[dihedraltypes[i].types[j]].potential,5);
memcpy(potential_types[j],atomtypes[dihedraltypes[i].types[j]].potential,5);
backwards = 0;
k = find_match(4,potential_types,ff_tor,&backwards);
@ -614,8 +612,7 @@ void GetParameters()
for (i=0; i < no_oop_types; i++) {
for (j=0; j < 3; j++) ooptypes[i].params[j] = 0.0;
for (j=0; j < 4; j++)
strncpy(potential_types[j],
atomtypes[ooptypes[i].types[j]].potential,5);
memcpy(potential_types[j],atomtypes[ooptypes[i].types[j]].potential,5);
k = find_improper_body_data(potential_types,ff_oop,&rearrange);
if (k < 0) {
@ -658,8 +655,7 @@ void GetParameters()
for (j=0; j < 3; j++)
ooptypes[i].params[j] = 0.0;
for (j=0; j < 4; j++)
strncpy(potential_types[j],
atomtypes[ooptypes[i].types[j]].potential,5);
memcpy(potential_types[j],atomtypes[ooptypes[i].types[j]].potential,5);
k = find_trigonal_body_data(potential_types,ff_oop);
if (k < 0) {
get_equivs(5,potential_types,equiv_types);
@ -715,8 +711,7 @@ void GetParameters()
for (j=0; j < 6; j++) ooptypes[i].angleangle_params[j] = 0.0;
for (j=0; j < 4; j++)
strncpy(potential_types[j],
atomtypes[ooptypes[i].types[j]].potential,5);
memcpy(potential_types[j],atomtypes[ooptypes[i].types[j]].potential,5);
tabc = get_t0(ooptypes[i].types[0],
@ -763,8 +758,7 @@ void GetParameters()
for (i=0; i < no_angleangle_types; i++) {
for (j=0; j < 6; j++) angleangletypes[i].params[j] = 0.0;
for (j=0; j < 4; j++)
strncpy(potential_types[j],
atomtypes[angleangletypes[i].types[j]].potential,5);
memcpy(potential_types[j],atomtypes[angleangletypes[i].types[j]].potential,5);
tabc = get_t0(angleangletypes[i].types[0],
angleangletypes[i].types[1],
@ -841,44 +835,44 @@ int find_improper_body_data(char types1[][5],struct FrcFieldItem item,
/* a b d c */
*rearrange_ptr = 1;
strncpy(mirror_types[0],types1[0],5);
strncpy(mirror_types[1],types1[1],5);
strncpy(mirror_types[2],types1[3],5);
strncpy(mirror_types[3],types1[2],5);
memcpy(mirror_types[0],types1[0],5);
memcpy(mirror_types[1],types1[1],5);
memcpy(mirror_types[2],types1[3],5);
memcpy(mirror_types[3],types1[2],5);
k = find_match(4,mirror_types,item,&backwards);
if (k >= 0) return k;
/* d b a c */
*rearrange_ptr = 2;
strncpy(mirror_types[0],types1[3],5);
strncpy(mirror_types[2],types1[0],5);
strncpy(mirror_types[3],types1[2],5);
memcpy(mirror_types[0],types1[3],5);
memcpy(mirror_types[2],types1[0],5);
memcpy(mirror_types[3],types1[2],5);
k = find_match(4,mirror_types,item,&backwards);
if (k >= 0) return k;
/* d b c a */
*rearrange_ptr = 3;
strncpy(mirror_types[2],types1[2],5);
strncpy(mirror_types[3],types1[0],5);
memcpy(mirror_types[2],types1[2],5);
memcpy(mirror_types[3],types1[0],5);
k = find_match(4,mirror_types,item,&backwards);
if (k >= 0) return k;
/* c b a d */
*rearrange_ptr = 4;
strncpy(mirror_types[0],types1[2],5);
strncpy(mirror_types[2],types1[0],5);
strncpy(mirror_types[3],types1[3],5);
memcpy(mirror_types[0],types1[2],5);
memcpy(mirror_types[2],types1[0],5);
memcpy(mirror_types[3],types1[3],5);
k = find_match(4,mirror_types,item,&backwards);
if (k >= 0) return k;
/* c b d a */
*rearrange_ptr = 5;
strncpy(mirror_types[2],types1[3],5);
strncpy(mirror_types[3],types1[0],5);
memcpy(mirror_types[2],types1[3],5);
memcpy(mirror_types[3],types1[0],5);
k = find_match(4,mirror_types,item,&backwards);
return k;
}
@ -973,39 +967,39 @@ int find_trigonal_body_data(char types1[][5],struct FrcFieldItem item)
/* a b d c */
strncpy(mirror_types[0],types1[0],5);
strncpy(mirror_types[1],types1[1],5);
strncpy(mirror_types[2],types1[3],5);
strncpy(mirror_types[3],types1[2],5);
memcpy(mirror_types[0],types1[0],5);
memcpy(mirror_types[1],types1[1],5);
memcpy(mirror_types[2],types1[3],5);
memcpy(mirror_types[3],types1[2],5);
k = find_match(4,mirror_types,item,&backwards);
if (k >= 0) return k;
/* d b a c */
strncpy(mirror_types[0],types1[3],5);
strncpy(mirror_types[2],types1[0],5);
strncpy(mirror_types[3],types1[2],5);
memcpy(mirror_types[0],types1[3],5);
memcpy(mirror_types[2],types1[0],5);
memcpy(mirror_types[3],types1[2],5);
k = find_match(4,mirror_types,item,&backwards);
if (k >= 0) return k;
/* d b c a */
strncpy(mirror_types[2],types1[2],5);
strncpy(mirror_types[3],types1[0],5);
memcpy(mirror_types[2],types1[2],5);
memcpy(mirror_types[3],types1[0],5);
k = find_match(4,mirror_types,item,&backwards);
if (k >= 0) return k;
/* c b a d */
strncpy(mirror_types[0],types1[2],5);
strncpy(mirror_types[2],types1[0],5);
strncpy(mirror_types[3],types1[3],5);
memcpy(mirror_types[0],types1[2],5);
memcpy(mirror_types[2],types1[0],5);
memcpy(mirror_types[3],types1[3],5);
k = find_match(4,mirror_types,item,&backwards);
if (k >= 0) return k;
/* c b d a */
strncpy(mirror_types[2],types1[3],5);
strncpy(mirror_types[3],types1[0],5);
memcpy(mirror_types[2],types1[3],5);
memcpy(mirror_types[3],types1[0],5);
k = find_match(4,mirror_types,item,&backwards);
return k;
}
@ -1015,41 +1009,41 @@ int find_angleangle_data(char types1[][5],struct FrcFieldItem item,int kloc[3])
int k,backwards = -1;
char mirror_types[4][5];
strncpy(mirror_types[1],types1[1],5);
memcpy(mirror_types[1],types1[1],5);
/* go for first parameter a b c d or d b c a */
k = find_match(4,types1,item,&backwards);
if (k < 0) {
strncpy(mirror_types[0],types1[3],5);
strncpy(mirror_types[2],types1[2],5);
strncpy(mirror_types[3],types1[0],5);
memcpy(mirror_types[0],types1[3],5);
memcpy(mirror_types[2],types1[2],5);
memcpy(mirror_types[3],types1[0],5);
k = find_match(4,mirror_types,item,&backwards);
}
kloc[0] = k;
/* go for second parameter d b a c or c b a d */
strncpy(mirror_types[0],types1[3],5);
strncpy(mirror_types[2],types1[0],5);
strncpy(mirror_types[3],types1[2],5);
memcpy(mirror_types[0],types1[3],5);
memcpy(mirror_types[2],types1[0],5);
memcpy(mirror_types[3],types1[2],5);
k = find_match(4,mirror_types,item,&backwards);
if (k < 0) {
strncpy(mirror_types[0],types1[2],5);
strncpy(mirror_types[3],types1[3],5);
memcpy(mirror_types[0],types1[2],5);
memcpy(mirror_types[3],types1[3],5);
k = find_match(4,mirror_types,item,&backwards);
}
kloc[1] = k;
/* go for third parameter a b d c or c b d a */
strncpy(mirror_types[0],types1[0],5);
strncpy(mirror_types[2],types1[3],5);
strncpy(mirror_types[3],types1[2],5);
memcpy(mirror_types[0],types1[0],5);
memcpy(mirror_types[2],types1[3],5);
memcpy(mirror_types[3],types1[2],5);
k = find_match(4,mirror_types,item,&backwards);
if (k < 0) {
strncpy(mirror_types[0],types1[2],5);
strncpy(mirror_types[3],types1[0],5);
memcpy(mirror_types[0],types1[2],5);
memcpy(mirror_types[3],types1[0],5);
k = find_match(4,mirror_types,item,&backwards);
}
kloc[2] = k;
@ -1250,25 +1244,25 @@ void get_equivs(int ic,char potential_types[][5],char equiv_types[][5])
switch (ic) {
case 1:
k = find_equiv_type(potential_types[0]);
if (k > -1) strncpy(equiv_types[0],equivalence.data[k].ff_types[1],5);
if (k > -1) memcpy(equiv_types[0],equivalence.data[k].ff_types[1],5);
break;
case 2:
for (i=0; i < 2; i++) {
k = find_equiv_type(potential_types[i]);
if (k > -1) strncpy(equiv_types[i],equivalence.data[k].ff_types[2],5);
if (k > -1) memcpy(equiv_types[i],equivalence.data[k].ff_types[2],5);
}
break;
case 3:
for (i=0; i < 3; i++) {
k = find_equiv_type(potential_types[i]);
if (k > -1) strncpy(equiv_types[i],equivalence.data[k].ff_types[3],5);
if (k > -1) memcpy(equiv_types[i],equivalence.data[k].ff_types[3],5);
}
break;
case 4:
for (i=0; i < 4; i++) {
k = find_equiv_type(potential_types[i]);
if (k > -1) strncpy(equiv_types[i],equivalence.data[k].ff_types[4],5);
if (k > -1) memcpy(equiv_types[i],equivalence.data[k].ff_types[4],5);
}
break;
@ -1276,7 +1270,7 @@ void get_equivs(int ic,char potential_types[][5],char equiv_types[][5])
for (i=0; i < 4; i++) {
k = find_equiv_type(potential_types[i]);
if (k > -1)
strncpy(equiv_types[i],equivalence.data[k].ff_types[5],5);
memcpy(equiv_types[i],equivalence.data[k].ff_types[5],5);
}
break;
default:

View File

@ -476,7 +476,7 @@ void build_atomtypes_list()
{
int j,k,n,match,atom_type=0;
strncpy(atomtypes[0].potential,atoms[0].potential,5);
memcpy(atomtypes[0].potential,atoms[0].potential,5);
atoms[0].type = 0;
atomtypes[0].no_connect = atoms[0].no_connect;
@ -497,7 +497,7 @@ void build_atomtypes_list()
if (match == 0) {
atom_type = n;
atomtypes[n].no_connect = atoms[j].no_connect;
strncpy(atomtypes[n++].potential,atoms[j].potential,5);
memcpy(atomtypes[n++].potential,atoms[j].potential,5);
}
if (n >= MAX_ATOM_TYPES) {
fprintf(stderr,"Too many atom types (> 100) - error\n");

View File

@ -144,7 +144,7 @@ void ReadMdfFile(void)
molecule[n].residue[j].end = i;
molecule[n].residue[++j].start = i;
strncpy(molecule[n].residue[j].name,atoms[i].residue_string,MAX_NAME);
memcpy(molecule[n].residue[j].name,atoms[i].residue_string,MAX_NAME);
}
}
molecule[n].residue[j].end = molecule[n].end;
@ -167,10 +167,9 @@ void ReadMdfFile(void)
for (n=0; n < no_molecules; n++) {
for (j=0; j < molecule[n].no_residues; j++) {
for (i=molecule[n].residue[j].start; i < molecule[n].residue[j].end;
i++) {
for (i=molecule[n].residue[j].start; i < molecule[n].residue[j].end; i++) {
for (l=0; l < atoms[i].no_connect; l++) {
strncpy(temp_string,atoms[i].connections[l],MAX_STRING);
memcpy(temp_string,atoms[i].connections[l],MAX_STRING);
temp_residue = strtok(temp_string,":");
temp_atom_name = strtok(NULL,"%");

View File

@ -212,7 +212,7 @@ void SearchAndFill(struct FrcFieldItem *item)
item->data[replace].ver = version;
item->data[replace].ref = reference;
for (i=0; i < item->number_of_members; i++) {
strncpy(item->data[replace].ff_types[i],atom_types[i],5);
memcpy(item->data[replace].ff_types[i],atom_types[i],5);
}
for (i=0; i < item->number_of_parameters; i++) {
item->data[replace].ff_param[i] = parameters[i];
@ -230,7 +230,7 @@ void SearchAndFill(struct FrcFieldItem *item)
item->data[ctr].ver = version;
item->data[ctr].ref = reference;
for (i=0; i < item->number_of_members; i++) {
strncpy(item->data[ctr].ff_types[i],atom_types[i],5);
memcpy(item->data[ctr].ff_types[i],atom_types[i],5);
}
for (i=0; i < item->number_of_parameters; i++) {
item->data[ctr].ff_param[i] = parameters[i];

View File

@ -2,6 +2,10 @@
*
* msi2lmp.exe
*
* v3.9.11 AK - Replace call to strncpy() with memcpy() when copying atom type strings
* to avoid problems with fixed array sizes
* - update tests for newer LAMMPS versions
*
* v3.9.10 AK - Substitute UTF-8 characters in .frc files with known ASCII equivalents
* - add help message output
*

View File

@ -36,7 +36,7 @@
#include <stdio.h> /* IWYU pragma: export */
#define MSI2LMP_VERSION "v3.9.10 / 10 Mar 2023"
#define MSI2LMP_VERSION "v3.9.11 / 6 Sep 2024"
#define PI_180 0.01745329251994329576

View File

@ -2,11 +2,12 @@
# Tool to validate and compare two LAMMPS data files
# with "inexact" floating point comparisons
# July 2013 by Axel Kohlmeyer <akohlmey@gmail.com>
# last update September 2024 by Axel Kohlmeyer <akohlmey@gmail.com>
use strict;
use warnings;
my $version = 'v0.3';
my $version = 'v0.4';
# delta for floating point comparisons.
my $small = 1.0e-4;
@ -596,6 +597,26 @@ sub read_data {
last;
}
# apply sort
if ($data->{nbonds} > 1) {
my ($did_swap, $num) = (1, $data->{nbonds});
while ($did_swap) {
$did_swap = 0;
for ($i=0; $i < $num-1; ++$i) {
$j = $i+1;
if (($data->{bond1}[$i] > $data->{bond1}[$j])
or (($data->{bond1}[$i] == $data->{bond1}[$j])
and ($data->{bond2}[$i] > $data->{bond2}[$j]))) {
$did_swap = 1;
my @tmp = ($data->{bondt}[$i], $data->{bond1}[$i], $data->{bond2}[$i]);
($data->{bondt}[$i], $data->{bond1}[$i], $data->{bond2}[$i]) =
($data->{bondt}[$j], $data->{bond1}[$j], $data->{bond2}[$j]);
($data->{bondt}[$j], $data->{bond1}[$j], $data->{bond2}[$j]) = @tmp;
}
}
--$num;
}
}
} elsif ($1 eq "Angles") {
$data->{anglet} = [];
$data->{angle1} = [];
@ -638,6 +659,33 @@ sub read_data {
last;
}
# apply sort
if ($data->{nangles} > 1) {
my ($did_swap, $num) = (1, $data->{nangles});
while ($did_swap) {
$did_swap = 0;
for ($i=0; $i < $num-1; ++$i) {
$j = $i+1;
if (($data->{angle1}[$i] > $data->{angle1}[$j])
or (($data->{angle1}[$i] == $data->{angle1}[$j])
and ($data->{angle2}[$i] > $data->{angle2}[$j]))
or (($data->{angle1}[$i] == $data->{angle1}[$j])
and ($data->{angle2}[$i] == $data->{angle2}[$j])
and ($data->{angle3}[$i] > $data->{angle3}[$j]))) {
$did_swap = 1;
my @tmp = ($data->{anglet}[$i], $data->{angle1}[$i],
$data->{angle2}[$i], $data->{angle3}[$i]);
($data->{anglet}[$i], $data->{angle1}[$i],
$data->{angle2}[$i], $data->{angle3}[$i]) =
($data->{anglet}[$j], $data->{angle1}[$j],
$data->{angle2}[$j], $data->{angle3}[$j]);
($data->{anglet}[$j], $data->{angle1}[$j],
$data->{angle2}[$j], $data->{angle3}[$j]) = @tmp;
}
}
--$num;
}
}
} elsif ($1 eq "Dihedrals") {
$data->{dihedralt} = [];
$data->{dihedral1} = [];
@ -684,6 +732,38 @@ sub read_data {
last;
}
# apply sort
if ($data->{ndihedrals} > 1) {
my ($did_swap, $num) = (1, $data->{ndihedrals});
while ($did_swap) {
$did_swap = 0;
for ($i=0; $i < $num-1; ++$i) {
$j = $i+1;
if (($data->{dihedral1}[$i] > $data->{dihedral1}[$j])
or (($data->{dihedral1}[$i] == $data->{dihedral1}[$j])
and ($data->{dihedral2}[$i] > $data->{dihedral2}[$j]))
or (($data->{dihedral1}[$i] == $data->{dihedral1}[$j])
and ($data->{dihedral2}[$i] == $data->{dihedral2}[$j])
and ($data->{dihedral3}[$i] > $data->{dihedral3}[$j]))
or (($data->{dihedral1}[$i] == $data->{dihedral1}[$j])
and ($data->{dihedral2}[$i] == $data->{dihedral2}[$j])
and ($data->{dihedral3}[$i] == $data->{dihedral3}[$j])
and ($data->{dihedral4}[$i] > $data->{dihedral4}[$j]))) {
$did_swap = 1;
my @tmp = ($data->{dihedralt}[$i], $data->{dihedral1}[$i],
$data->{dihedral2}[$i], $data->{dihedral3}[$i],
$data->{dihedral4}[$i]);
($data->{dihedralt}[$i], $data->{dihedral1}[$i], $data->{dihedral2}[$i],
$data->{dihedral3}[$i], $data->{dihedral4}[$i]) =
($data->{dihedralt}[$j], $data->{dihedral1}[$j],
$data->{dihedral2}[$j], $data->{dihedral3}[$j], $data->{dihedral4}[$j]);
($data->{dihedralt}[$j], $data->{dihedral1}[$j], $data->{dihedral2}[$j],
$data->{dihedral3}[$j], $data->{dihedral4}[$j]) = @tmp;
}
}
--$num;
}
}
} elsif ($1 eq "Impropers") {
$data->{impropert} = [];
$data->{improper1} = [];
@ -730,6 +810,39 @@ sub read_data {
last;
}
# apply sort
if ($data->{nimpropers} > 1) {
my ($did_swap, $num) = (1, $data->{nimpropers});
while ($did_swap) {
$did_swap = 0;
for ($i=0; $i < $num-1; ++$i) {
$j = $i+1;
if (($data->{improper1}[$i] > $data->{improper1}[$j])
or (($data->{improper1}[$i] == $data->{improper1}[$j])
and ($data->{improper2}[$i] > $data->{improper2}[$j]))
or (($data->{improper1}[$i] == $data->{improper1}[$j])
and ($data->{improper2}[$i] == $data->{improper2}[$j])
and ($data->{improper3}[$i] > $data->{improper3}[$j]))
or (($data->{improper1}[$i] == $data->{improper1}[$j])
and ($data->{improper2}[$i] == $data->{improper2}[$j])
and ($data->{improper3}[$i] == $data->{improper3}[$j])
and ($data->{improper4}[$i] > $data->{improper4}[$j]))) {
$did_swap = 1;
my @tmp = ($data->{impropert}[$i], $data->{improper1}[$i],
$data->{improper2}[$i], $data->{improper3}[$i],
$data->{improper4}[$i]);
($data->{impropert}[$i], $data->{improper1}[$i], $data->{improper2}[$i],
$data->{improper3}[$i], $data->{improper4}[$i]) =
($data->{impropert}[$j], $data->{improper1}[$j],
$data->{improper2}[$j], $data->{improper3}[$j], $data->{improper4}[$j]);
($data->{impropert}[$j], $data->{improper1}[$j], $data->{improper2}[$j],
$data->{improper3}[$j], $data->{improper4}[$j]) = @tmp;
}
}
--$num;
}
}
} else {
die "Bad data: $_";
}

View File

@ -5,9 +5,9 @@ atom_style full
pair_style lj/cut/coul/long 15.0
pair_modify mix geometric
bond_style harmonic
kspace_style pppm 1.0e-5
read_data PyAC_bulk-clayff.data
kspace_style pppm 1.0e-5
thermo_style multi
minimize 0.0 0.0 100 1000

View File

@ -1,4 +1,4 @@
LAMMPS data file. msi2lmp v3.9.8 / 06 Oct 2016 / CGCMM for PyAC_bulk-clayff
LAMMPS data file. msi2lmp v3.9.10 / 10 Mar 2023 / CGCMM for PyAC_bulk-clayff
1280 atoms
128 bonds
@ -11,7 +11,7 @@ LAMMPS data file. msi2lmp v3.9.8 / 06 Oct 2016 / CGCMM for PyAC_bulk-clayff
-10.320000000 10.320000000 xlo xhi
-17.931646038 17.931646038 ylo yhi
-9.196614681 9.196614681 zlo zhi
-9.189871922 9.189871922 zlo zhi
0.225338675 -3.393877748 -0.363656523 xy xz yz
Masses
@ -676,27 +676,27 @@ Atoms # full
638 1 3 -1.050000 -0.590722660 -5.885450799 -3.293650032 1 1 0 # ob
639 1 3 -1.050000 0.277898824 -8.390728187 -3.055632561 1 1 0 # ob
640 1 5 0.425000 -4.694842406 -6.184112754 -1.194847627 1 1 0 # ho
641 1 1 1.575000 0.889889112 1.315464043 9.189872068 0 0 0 # ao
642 1 2 2.100000 5.101961261 9.067732250 -6.523590700 0 0 1 # st
643 1 2 2.100000 5.138292081 3.048848378 -6.517157818 0 0 1 # st
644 1 3 -1.050000 4.852463935 0.176965538 -8.141927041 0 0 1 # ob
645 1 3 -1.050000 5.291802919 2.921349398 -8.139170101 0 0 1 # ob
646 1 4 -0.950000 2.692063605 1.889886595 -8.209932150 0 0 1 # oh
647 1 3 -1.050000 1.366795516 3.605171499 -5.905112111 0 0 1 # ob
648 1 3 -1.050000 4.839493963 1.584366125 -5.909707262 0 0 1 # ob
649 1 3 -1.050000 3.970872479 4.089643514 -6.147724732 0 0 1 # ob
650 1 5 0.425000 3.783613862 1.883028080 -8.008509666 0 0 1 # ho
651 1 1 1.575000 3.498056417 5.798375353 9.189872068 0 0 0 # ao
652 1 2 2.100000 2.493793956 4.584820940 -6.523590700 0 0 1 # st
653 1 2 2.100000 2.586459538 7.531759689 -6.517157818 0 0 1 # st
654 1 3 -1.050000 2.300631392 4.659876849 -8.141927041 0 0 1 # ob
655 1 3 -1.050000 2.739970376 7.404260709 -8.139170101 0 0 1 # ob
656 1 4 -0.950000 5.300230909 6.372797905 -8.209932150 0 0 1 # oh
657 1 3 -1.050000 3.974962821 8.088082810 -5.905112111 0 0 1 # ob
658 1 3 -1.050000 2.287661420 6.067277436 -5.909707262 0 0 1 # ob
659 1 3 -1.050000 1.419039936 8.572554825 -6.147724732 0 0 1 # ob
660 1 5 0.425000 6.391781167 6.365939391 -8.008509666 0 0 1 # ho
661 1 1 1.575000 0.932567998 7.286701985 9.189872068 0 0 0 # ao
641 1 1 1.575000 4.283766860 1.679120566 -9.189871776 0 0 1 # ao
642 1 2 2.100000 5.101961261 9.067732250 -6.510105182 0 0 1 # st
643 1 2 2.100000 5.138292081 3.048848378 -6.503672300 0 0 1 # st
644 1 3 -1.050000 4.852463935 0.176965538 -8.128441523 0 0 1 # ob
645 1 3 -1.050000 5.291802919 2.921349398 -8.125684583 0 0 1 # ob
646 1 4 -0.950000 2.692063605 1.889886595 -8.196446632 0 0 1 # oh
647 1 3 -1.050000 1.366795516 3.605171499 -5.891626593 0 0 1 # ob
648 1 3 -1.050000 4.839493963 1.584366125 -5.896221744 0 0 1 # ob
649 1 3 -1.050000 3.970872479 4.089643514 -6.134239214 0 0 1 # ob
650 1 5 0.425000 3.783613862 1.883028080 -7.995024148 0 0 1 # ho
651 1 1 1.575000 6.891934165 6.162031876 -9.189871776 0 0 1 # ao
652 1 2 2.100000 2.493793956 4.584820940 -6.510105182 0 0 1 # st
653 1 2 2.100000 2.586459538 7.531759689 -6.503672300 0 0 1 # st
654 1 3 -1.050000 2.300631392 4.659876849 -8.128441523 0 0 1 # ob
655 1 3 -1.050000 2.739970376 7.404260709 -8.125684583 0 0 1 # ob
656 1 4 -0.950000 5.300230909 6.372797905 -8.196446632 0 0 1 # oh
657 1 3 -1.050000 3.974962821 8.088082810 -5.891626593 0 0 1 # ob
658 1 3 -1.050000 2.287661420 6.067277436 -5.896221744 0 0 1 # ob
659 1 3 -1.050000 1.419039936 8.572554825 -6.134239214 0 0 1 # ob
660 1 5 0.425000 6.391781167 6.365939391 -7.995024148 0 0 1 # ho
661 1 1 1.575000 4.326445746 7.650358508 -9.189871776 0 0 1 # ao
662 1 2 2.100000 0.114373597 -0.101909699 6.510105475 0 0 0 # st
663 1 2 2.100000 0.078042778 5.916974173 6.503672592 0 0 0 # st
664 1 3 -1.050000 0.363870923 8.788857013 8.128441816 0 0 0 # ob
@ -706,7 +706,7 @@ Atoms # full
668 1 3 -1.050000 0.376840895 7.381456426 5.896222036 0 0 0 # ob
669 1 3 -1.050000 1.245462379 4.876179037 6.134239507 0 0 0 # ob
670 1 5 0.425000 1.432720996 7.082794471 7.995024441 0 0 0 # ho
671 1 1 1.575000 -1.675599307 2.803790675 9.189872068 0 0 0 # ao
671 1 1 1.575000 1.718278441 3.167447198 -9.189871776 0 0 1 # ao
672 1 2 2.100000 2.722540902 4.381001611 6.510105475 0 0 0 # st
673 1 2 2.100000 2.629875320 1.434062862 6.503672592 0 0 0 # st
674 1 3 -1.050000 2.915703466 4.305945702 8.128441816 0 0 0 # ob
@ -716,27 +716,27 @@ Atoms # full
678 1 3 -1.050000 2.928673438 2.898545115 5.896222036 0 0 0 # ob
679 1 3 -1.050000 3.797294922 0.393267726 6.134239507 0 0 0 # ob
680 1 5 0.425000 -1.175446309 2.599883160 7.995024441 0 0 0 # ho
681 1 1 1.575000 6.049888960 1.315464043 9.189872068 0 0 0 # ao
682 1 2 2.100000 -10.378038892 9.067732250 -6.523590700 1 0 1 # st
683 1 2 2.100000 -10.341708072 3.048848378 -6.517157818 1 0 1 # st
684 1 3 -1.050000 10.012463782 0.176965538 -8.141927041 0 0 1 # ob
685 1 3 -1.050000 -10.188197233 2.921349398 -8.139170101 1 0 1 # ob
686 1 4 -0.950000 7.852063452 1.889886595 -8.209932150 0 0 1 # oh
687 1 3 -1.050000 6.526795364 3.605171499 -5.905112111 0 0 1 # ob
688 1 3 -1.050000 -10.640506189 1.584366125 -5.909707262 1 0 1 # ob
689 1 3 -1.050000 9.130872326 4.089643514 -6.147724732 0 0 1 # ob
690 1 5 0.425000 8.943613710 1.883028080 -8.008509666 0 0 1 # ho
691 1 1 1.575000 -11.981943736 5.798375353 9.189872068 1 0 0 # ao
692 1 2 2.100000 7.653793804 4.584820940 -6.523590700 0 0 1 # st
693 1 2 2.100000 7.746459385 7.531759689 -6.517157818 0 0 1 # st
694 1 3 -1.050000 7.460631240 4.659876849 -8.141927041 0 0 1 # ob
695 1 3 -1.050000 7.899970224 7.404260709 -8.139170101 0 0 1 # ob
696 1 4 -0.950000 -10.179769243 6.372797905 -8.209932150 1 0 1 # oh
697 1 3 -1.050000 9.134962668 8.088082810 -5.905112111 0 0 1 # ob
698 1 3 -1.050000 7.447661268 6.067277436 -5.909707262 0 0 1 # ob
699 1 3 -1.050000 6.579039784 8.572554825 -6.147724732 0 0 1 # ob
700 1 5 0.425000 -9.088218986 6.365939391 -8.008509666 1 0 1 # ho
701 1 1 1.575000 6.092567845 7.286701985 9.189872068 0 0 0 # ao
681 1 1 1.575000 9.443766708 1.679120566 -9.189871776 0 0 1 # ao
682 1 2 2.100000 -10.378038892 9.067732250 -6.510105182 1 0 1 # st
683 1 2 2.100000 -10.341708072 3.048848378 -6.503672300 1 0 1 # st
684 1 3 -1.050000 10.012463782 0.176965538 -8.128441523 0 0 1 # ob
685 1 3 -1.050000 -10.188197233 2.921349398 -8.125684583 1 0 1 # ob
686 1 4 -0.950000 7.852063452 1.889886595 -8.196446632 0 0 1 # oh
687 1 3 -1.050000 6.526795364 3.605171499 -5.891626593 0 0 1 # ob
688 1 3 -1.050000 -10.640506189 1.584366125 -5.896221744 1 0 1 # ob
689 1 3 -1.050000 9.130872326 4.089643514 -6.134239214 0 0 1 # ob
690 1 5 0.425000 8.943613710 1.883028080 -7.995024148 0 0 1 # ho
691 1 1 1.575000 -8.588065988 6.162031876 -9.189871776 1 0 1 # ao
692 1 2 2.100000 7.653793804 4.584820940 -6.510105182 0 0 1 # st
693 1 2 2.100000 7.746459385 7.531759689 -6.503672300 0 0 1 # st
694 1 3 -1.050000 7.460631240 4.659876849 -8.128441523 0 0 1 # ob
695 1 3 -1.050000 7.899970224 7.404260709 -8.125684583 0 0 1 # ob
696 1 4 -0.950000 -10.179769243 6.372797905 -8.196446632 1 0 1 # oh
697 1 3 -1.050000 9.134962668 8.088082810 -5.891626593 0 0 1 # ob
698 1 3 -1.050000 7.447661268 6.067277436 -5.896221744 0 0 1 # ob
699 1 3 -1.050000 6.579039784 8.572554825 -6.134239214 0 0 1 # ob
700 1 5 0.425000 -9.088218986 6.365939391 -7.995024148 1 0 1 # ho
701 1 1 1.575000 9.486445593 7.650358508 -9.189871776 0 0 1 # ao
702 1 2 2.100000 5.274373445 -0.101909699 6.510105475 0 0 0 # st
703 1 2 2.100000 5.238042625 5.916974173 6.503672592 0 0 0 # st
704 1 3 -1.050000 5.523870771 8.788857013 8.128441816 0 0 0 # ob
@ -746,7 +746,7 @@ Atoms # full
708 1 3 -1.050000 5.536840742 7.381456426 5.896222036 0 0 0 # ob
709 1 3 -1.050000 6.405462227 4.876179037 6.134239507 0 0 0 # ob
710 1 5 0.425000 6.592720843 7.082794471 7.995024441 0 0 0 # ho
711 1 1 1.575000 3.484400541 2.803790675 9.189872068 0 0 0 # ao
711 1 1 1.575000 6.878278289 3.167447198 -9.189871776 0 0 1 # ao
712 1 2 2.100000 -12.757459251 4.381001611 6.510105475 1 0 0 # st
713 1 2 2.100000 -12.850124832 1.434062862 6.503672592 1 0 0 # st
714 1 3 -1.050000 -12.564296687 4.305945702 8.128441816 1 0 0 # ob
@ -756,27 +756,27 @@ Atoms # full
718 1 3 -1.050000 -12.551326715 2.898545115 5.896222036 1 0 0 # ob
719 1 3 -1.050000 -11.682705231 0.393267726 6.134239507 1 0 0 # ob
720 1 5 0.425000 3.984553539 2.599883160 7.995024441 0 0 0 # ho
721 1 1 1.575000 -9.430111193 1.315464043 9.189872068 1 0 0 # ao
722 1 2 2.100000 -5.218039044 9.067732250 -6.523590700 1 0 1 # st
723 1 2 2.100000 -5.181708225 3.048848378 -6.517157818 1 0 1 # st
724 1 3 -1.050000 -5.467536370 0.176965538 -8.141927041 1 0 1 # ob
725 1 3 -1.050000 -5.028197386 2.921349398 -8.139170101 1 0 1 # ob
726 1 4 -0.950000 -7.627936701 1.889886595 -8.209932150 1 0 1 # oh
727 1 3 -1.050000 -8.953204789 3.605171499 -5.905112111 1 0 1 # ob
728 1 3 -1.050000 -5.480506342 1.584366125 -5.909707262 1 0 1 # ob
729 1 3 -1.050000 -6.349127826 4.089643514 -6.147724732 1 0 1 # ob
730 1 5 0.425000 -6.536386443 1.883028080 -8.008509666 1 0 1 # ho
731 1 1 1.575000 -6.821943888 5.798375353 9.189872068 1 0 0 # ao
732 1 2 2.100000 -7.826206349 4.584820940 -6.523590700 1 0 1 # st
733 1 2 2.100000 -7.733540767 7.531759689 -6.517157818 1 0 1 # st
734 1 3 -1.050000 -8.019368913 4.659876849 -8.141927041 1 0 1 # ob
735 1 3 -1.050000 -7.580029929 7.404260709 -8.139170101 1 0 1 # ob
736 1 4 -0.950000 -5.019769396 6.372797905 -8.209932150 1 0 1 # oh
737 1 3 -1.050000 -6.345037484 8.088082810 -5.905112111 1 0 1 # ob
738 1 3 -1.050000 -8.032338885 6.067277436 -5.909707262 1 0 1 # ob
739 1 3 -1.050000 -8.900960369 8.572554825 -6.147724732 1 0 1 # ob
740 1 5 0.425000 -3.928219138 6.365939391 -8.008509666 1 0 1 # ho
741 1 1 1.575000 -9.387432307 7.286701985 9.189872068 1 0 0 # ao
721 1 1 1.575000 -6.036233445 1.679120566 -9.189871776 1 0 1 # ao
722 1 2 2.100000 -5.218039044 9.067732250 -6.510105182 1 0 1 # st
723 1 2 2.100000 -5.181708225 3.048848378 -6.503672300 1 0 1 # st
724 1 3 -1.050000 -5.467536370 0.176965538 -8.128441523 1 0 1 # ob
725 1 3 -1.050000 -5.028197386 2.921349398 -8.125684583 1 0 1 # ob
726 1 4 -0.950000 -7.627936701 1.889886595 -8.196446632 1 0 1 # oh
727 1 3 -1.050000 -8.953204789 3.605171499 -5.891626593 1 0 1 # ob
728 1 3 -1.050000 -5.480506342 1.584366125 -5.896221744 1 0 1 # ob
729 1 3 -1.050000 -6.349127826 4.089643514 -6.134239214 1 0 1 # ob
730 1 5 0.425000 -6.536386443 1.883028080 -7.995024148 1 0 1 # ho
731 1 1 1.575000 -3.428066140 6.162031876 -9.189871776 1 0 1 # ao
732 1 2 2.100000 -7.826206349 4.584820940 -6.510105182 1 0 1 # st
733 1 2 2.100000 -7.733540767 7.531759689 -6.503672300 1 0 1 # st
734 1 3 -1.050000 -8.019368913 4.659876849 -8.128441523 1 0 1 # ob
735 1 3 -1.050000 -7.580029929 7.404260709 -8.125684583 1 0 1 # ob
736 1 4 -0.950000 -5.019769396 6.372797905 -8.196446632 1 0 1 # oh
737 1 3 -1.050000 -6.345037484 8.088082810 -5.891626593 1 0 1 # ob
738 1 3 -1.050000 -8.032338885 6.067277436 -5.896221744 1 0 1 # ob
739 1 3 -1.050000 -8.900960369 8.572554825 -6.134239214 1 0 1 # ob
740 1 5 0.425000 -3.928219138 6.365939391 -7.995024148 1 0 1 # ho
741 1 1 1.575000 -5.993554559 7.650358508 -9.189871776 1 0 1 # ao
742 1 2 2.100000 -10.205626708 -0.101909699 6.510105475 1 0 0 # st
743 1 2 2.100000 -10.241957528 5.916974173 6.503672592 1 0 0 # st
744 1 3 -1.050000 -9.956129382 8.788857013 8.128441816 1 0 0 # ob
@ -786,7 +786,7 @@ Atoms # full
748 1 3 -1.050000 -9.943159410 7.381456426 5.896222036 1 0 0 # ob
749 1 3 -1.050000 -9.074537926 4.876179037 6.134239507 1 0 0 # ob
750 1 5 0.425000 -8.887279309 7.082794471 7.995024441 1 0 0 # ho
751 1 1 1.575000 -11.995599612 2.803790675 9.189872068 1 0 0 # ao
751 1 1 1.575000 -8.601721864 3.167447198 -9.189871776 1 0 1 # ao
752 1 2 2.100000 -7.597459403 4.381001611 6.510105475 1 0 0 # st
753 1 2 2.100000 -7.690124985 1.434062862 6.503672592 1 0 0 # st
754 1 3 -1.050000 -7.404296839 4.305945702 8.128441816 1 0 0 # ob
@ -796,27 +796,27 @@ Atoms # full
758 1 3 -1.050000 -7.391326867 2.898545115 5.896222036 1 0 0 # ob
759 1 3 -1.050000 -6.522705383 0.393267726 6.134239507 1 0 0 # ob
760 1 5 0.425000 -11.495446614 2.599883160 7.995024441 1 0 0 # ho
761 1 1 1.575000 -4.270111345 1.315464043 9.189872068 1 0 0 # ao
762 1 2 2.100000 -0.058039197 9.067732250 -6.523590700 1 0 1 # st
763 1 2 2.100000 -0.021708377 3.048848378 -6.517157818 1 0 1 # st
764 1 3 -1.050000 -0.307536523 0.176965538 -8.141927041 1 0 1 # ob
765 1 3 -1.050000 0.131802461 2.921349398 -8.139170101 1 0 1 # ob
766 1 4 -0.950000 -2.467936853 1.889886595 -8.209932150 1 0 1 # oh
767 1 3 -1.050000 -3.793204941 3.605171499 -5.905112111 1 0 1 # ob
768 1 3 -1.050000 -0.320506495 1.584366125 -5.909707262 1 0 1 # ob
769 1 3 -1.050000 -1.189127979 4.089643514 -6.147724732 1 0 1 # ob
770 1 5 0.425000 -1.376386596 1.883028080 -8.008509666 1 0 1 # ho
771 1 1 1.575000 -1.661944041 5.798375353 9.189872068 1 0 0 # ao
772 1 2 2.100000 -2.666206502 4.584820940 -6.523590700 1 0 1 # st
773 1 2 2.100000 -2.573540920 7.531759689 -6.517157818 1 0 1 # st
774 1 3 -1.050000 -2.859369065 4.659876849 -8.141927041 1 0 1 # ob
775 1 3 -1.050000 -2.420030081 7.404260709 -8.139170101 1 0 1 # ob
776 1 4 -0.950000 0.140230451 6.372797905 -8.209932150 1 0 1 # oh
777 1 3 -1.050000 -1.185037637 8.088082810 -5.905112111 1 0 1 # ob
778 1 3 -1.050000 -2.872339037 6.067277436 -5.909707262 1 0 1 # ob
779 1 3 -1.050000 -3.740960522 8.572554825 -6.147724732 1 0 1 # ob
780 1 5 0.425000 1.231780709 6.365939391 -8.008509666 1 0 1 # ho
781 1 1 1.575000 -4.227432460 7.286701985 9.189872068 1 0 0 # ao
761 1 1 1.575000 -0.876233597 1.679120566 -9.189871776 1 0 1 # ao
762 1 2 2.100000 -0.058039197 9.067732250 -6.510105182 1 0 1 # st
763 1 2 2.100000 -0.021708377 3.048848378 -6.503672300 1 0 1 # st
764 1 3 -1.050000 -0.307536523 0.176965538 -8.128441523 1 0 1 # ob
765 1 3 -1.050000 0.131802461 2.921349398 -8.125684583 1 0 1 # ob
766 1 4 -0.950000 -2.467936853 1.889886595 -8.196446632 1 0 1 # oh
767 1 3 -1.050000 -3.793204941 3.605171499 -5.891626593 1 0 1 # ob
768 1 3 -1.050000 -0.320506495 1.584366125 -5.896221744 1 0 1 # ob
769 1 3 -1.050000 -1.189127979 4.089643514 -6.134239214 1 0 1 # ob
770 1 5 0.425000 -1.376386596 1.883028080 -7.995024148 1 0 1 # ho
771 1 1 1.575000 1.731933707 6.162031876 -9.189871776 1 0 1 # ao
772 1 2 2.100000 -2.666206502 4.584820940 -6.510105182 1 0 1 # st
773 1 2 2.100000 -2.573540920 7.531759689 -6.503672300 1 0 1 # st
774 1 3 -1.050000 -2.859369065 4.659876849 -8.128441523 1 0 1 # ob
775 1 3 -1.050000 -2.420030081 7.404260709 -8.125684583 1 0 1 # ob
776 1 4 -0.950000 0.140230451 6.372797905 -8.196446632 1 0 1 # oh
777 1 3 -1.050000 -1.185037637 8.088082810 -5.891626593 1 0 1 # ob
778 1 3 -1.050000 -2.872339037 6.067277436 -5.896221744 1 0 1 # ob
779 1 3 -1.050000 -3.740960522 8.572554825 -6.134239214 1 0 1 # ob
780 1 5 0.425000 1.231780709 6.365939391 -7.995024148 1 0 1 # ho
781 1 1 1.575000 -0.833554712 7.650358508 -9.189871776 1 0 1 # ao
782 1 2 2.100000 -5.045626860 -0.101909699 6.510105475 1 0 0 # st
783 1 2 2.100000 -5.081957680 5.916974173 6.503672592 1 0 0 # st
784 1 3 -1.050000 -4.796129535 8.788857013 8.128441816 1 0 0 # ob
@ -826,7 +826,7 @@ Atoms # full
788 1 3 -1.050000 -4.783159563 7.381456426 5.896222036 1 0 0 # ob
789 1 3 -1.050000 -3.914538079 4.876179037 6.134239507 1 0 0 # ob
790 1 5 0.425000 -3.727279462 7.082794471 7.995024441 1 0 0 # ho
791 1 1 1.575000 -6.835599765 2.803790675 9.189872068 1 0 0 # ao
791 1 1 1.575000 -3.441722017 3.167447198 -9.189871776 1 0 1 # ao
792 1 2 2.100000 -2.437459556 4.381001611 6.510105475 1 0 0 # st
793 1 2 2.100000 -2.530125137 1.434062862 6.503672592 1 0 0 # st
794 1 3 -1.050000 -2.244296992 4.305945702 8.128441816 1 0 0 # ob
@ -836,27 +836,27 @@ Atoms # full
798 1 3 -1.050000 -2.231327020 2.898545115 5.896222036 1 0 0 # ob
799 1 3 -1.050000 -1.362705536 0.393267726 6.134239507 1 0 0 # ob
800 1 5 0.425000 -6.335446766 2.599883160 7.995024441 1 0 0 # ho
801 1 1 1.575000 0.946223874 10.281286664 9.189872068 0 0 0 # ao
802 1 2 2.100000 4.932957348 -17.829737203 -6.523590700 0 1 1 # st
803 1 2 2.100000 5.194626842 12.014671000 -6.517157818 0 0 1 # st
804 1 3 -1.050000 4.908798697 9.142788159 -8.141927041 0 0 1 # ob
805 1 3 -1.050000 5.348137681 11.887172019 -8.139170101 0 0 1 # ob
806 1 4 -0.950000 2.748398366 10.855709216 -8.209932150 0 0 1 # oh
807 1 3 -1.050000 1.423130278 12.570994121 -5.905112111 0 0 1 # ob
808 1 3 -1.050000 4.895828725 10.550188747 -5.909707262 0 0 1 # ob
809 1 3 -1.050000 4.027207241 13.055466135 -6.147724732 0 0 1 # ob
810 1 5 0.425000 3.839948624 10.848850702 -8.008509666 0 0 1 # ho
811 1 1 1.575000 3.554391179 14.764197975 9.189872068 0 0 0 # ao
812 1 2 2.100000 2.550128718 13.550643561 -6.523590700 0 0 1 # st
813 1 2 2.100000 2.642794300 16.497582311 -6.517157818 0 0 1 # st
814 1 3 -1.050000 2.356966154 13.625699470 -8.141927041 0 0 1 # ob
815 1 3 -1.050000 2.796305138 16.370083330 -8.139170101 0 0 1 # ob
816 1 4 -0.950000 5.356565671 15.338620527 -8.209932150 0 0 1 # oh
817 1 3 -1.050000 4.031297583 17.053905432 -5.905112111 0 0 1 # ob
818 1 3 -1.050000 2.343996182 15.033100058 -5.909707262 0 0 1 # ob
819 1 3 -1.050000 1.475374698 17.538377446 -6.147724732 0 0 1 # ob
820 1 5 0.425000 6.448115929 15.331762013 -8.008509666 0 0 1 # ho
821 1 1 1.575000 0.988902760 16.252524607 9.189872068 0 0 0 # ao
801 1 1 1.575000 4.340101622 10.644943187 -9.189871776 0 0 1 # ao
802 1 2 2.100000 4.932957348 -17.829737203 -6.510105182 0 1 1 # st
803 1 2 2.100000 5.194626842 12.014671000 -6.503672300 0 0 1 # st
804 1 3 -1.050000 4.908798697 9.142788159 -8.128441523 0 0 1 # ob
805 1 3 -1.050000 5.348137681 11.887172019 -8.125684583 0 0 1 # ob
806 1 4 -0.950000 2.748398366 10.855709216 -8.196446632 0 0 1 # oh
807 1 3 -1.050000 1.423130278 12.570994121 -5.891626593 0 0 1 # ob
808 1 3 -1.050000 4.895828725 10.550188747 -5.896221744 0 0 1 # ob
809 1 3 -1.050000 4.027207241 13.055466135 -6.134239214 0 0 1 # ob
810 1 5 0.425000 3.839948624 10.848850702 -7.995024148 0 0 1 # ho
811 1 1 1.575000 6.948268927 15.127854498 -9.189871776 0 0 1 # ao
812 1 2 2.100000 2.550128718 13.550643561 -6.510105182 0 0 1 # st
813 1 2 2.100000 2.642794300 16.497582311 -6.503672300 0 0 1 # st
814 1 3 -1.050000 2.356966154 13.625699470 -8.128441523 0 0 1 # ob
815 1 3 -1.050000 2.796305138 16.370083330 -8.125684583 0 0 1 # ob
816 1 4 -0.950000 5.356565671 15.338620527 -8.196446632 0 0 1 # oh
817 1 3 -1.050000 4.031297583 17.053905432 -5.891626593 0 0 1 # ob
818 1 3 -1.050000 2.343996182 15.033100058 -5.896221744 0 0 1 # ob
819 1 3 -1.050000 1.475374698 17.538377446 -6.134239214 0 0 1 # ob
820 1 5 0.425000 6.448115929 15.331762013 -7.995024148 0 0 1 # ho
821 1 1 1.575000 4.382780508 16.616181130 -9.189871776 0 0 1 # ao
822 1 2 2.100000 0.170708359 8.863912922 6.510105475 0 0 0 # st
823 1 2 2.100000 0.134377539 14.882796794 6.503672592 0 0 0 # st
824 1 3 -1.050000 0.194867010 -18.108612440 8.128441816 0 1 0 # ob
@ -866,7 +866,7 @@ Atoms # full
828 1 3 -1.050000 0.433175657 16.347279047 5.896222036 0 0 0 # ob
829 1 3 -1.050000 1.301797141 13.842001659 6.134239507 0 0 0 # ob
830 1 5 0.425000 1.489055758 16.048617092 7.995024441 0 0 0 # ho
831 1 1 1.575000 -1.619264545 11.769613296 9.189872068 0 0 0 # ao
831 1 1 1.575000 1.774613203 12.133269819 -9.189871776 0 0 1 # ao
832 1 2 2.100000 2.778875664 13.346824233 6.510105475 0 0 0 # st
833 1 2 2.100000 2.686210082 10.399885483 6.503672592 0 0 0 # st
834 1 3 -1.050000 2.972038228 13.271768324 8.128441816 0 0 0 # ob
@ -876,27 +876,27 @@ Atoms # full
838 1 3 -1.050000 2.985008200 11.864367737 5.896222036 0 0 0 # ob
839 1 3 -1.050000 3.853629684 9.359090348 6.134239507 0 0 0 # ob
840 1 5 0.425000 -1.119111547 11.565705782 7.995024441 0 0 0 # ho
841 1 1 1.575000 6.106223722 10.281286664 9.189872068 0 0 0 # ao
842 1 2 2.100000 -10.547042805 -17.829737203 -6.523590700 1 1 1 # st
843 1 2 2.100000 -10.285373310 12.014671000 -6.517157818 1 0 1 # st
844 1 3 -1.050000 10.068798544 9.142788159 -8.141927041 0 0 1 # ob
845 1 3 -1.050000 -10.131862472 11.887172019 -8.139170101 1 0 1 # ob
846 1 4 -0.950000 7.908398214 10.855709216 -8.209932150 0 0 1 # oh
847 1 3 -1.050000 6.583130126 12.570994121 -5.905112111 0 0 1 # ob
848 1 3 -1.050000 -10.584171428 10.550188747 -5.909707262 1 0 1 # ob
849 1 3 -1.050000 9.187207088 13.055466135 -6.147724732 0 0 1 # ob
850 1 5 0.425000 8.999948471 10.848850702 -8.008509666 0 0 1 # ho
851 1 1 1.575000 -11.925608974 14.764197975 9.189872068 1 0 0 # ao
852 1 2 2.100000 7.710128565 13.550643561 -6.523590700 0 0 1 # st
853 1 2 2.100000 7.802794147 16.497582311 -6.517157818 0 0 1 # st
854 1 3 -1.050000 7.516966002 13.625699470 -8.141927041 0 0 1 # ob
855 1 3 -1.050000 7.956304986 16.370083330 -8.139170101 0 0 1 # ob
856 1 4 -0.950000 -10.123434482 15.338620527 -8.209932150 1 0 1 # oh
857 1 3 -1.050000 9.191297430 17.053905432 -5.905112111 0 0 1 # ob
858 1 3 -1.050000 7.503996030 15.033100058 -5.909707262 0 0 1 # ob
859 1 3 -1.050000 6.635374545 17.538377446 -6.147724732 0 0 1 # ob
860 1 5 0.425000 -9.031884224 15.331762013 -8.008509666 1 0 1 # ho
861 1 1 1.575000 6.148902607 16.252524607 9.189872068 0 0 0 # ao
841 1 1 1.575000 9.500101470 10.644943187 -9.189871776 0 0 1 # ao
842 1 2 2.100000 -10.547042805 -17.829737203 -6.510105182 1 1 1 # st
843 1 2 2.100000 -10.285373310 12.014671000 -6.503672300 1 0 1 # st
844 1 3 -1.050000 10.068798544 9.142788159 -8.128441523 0 0 1 # ob
845 1 3 -1.050000 -10.131862472 11.887172019 -8.125684583 1 0 1 # ob
846 1 4 -0.950000 7.908398214 10.855709216 -8.196446632 0 0 1 # oh
847 1 3 -1.050000 6.583130126 12.570994121 -5.891626593 0 0 1 # ob
848 1 3 -1.050000 -10.584171428 10.550188747 -5.896221744 1 0 1 # ob
849 1 3 -1.050000 9.187207088 13.055466135 -6.134239214 0 0 1 # ob
850 1 5 0.425000 8.999948471 10.848850702 -7.995024148 0 0 1 # ho
851 1 1 1.575000 -8.531731226 15.127854498 -9.189871776 1 0 1 # ao
852 1 2 2.100000 7.710128565 13.550643561 -6.510105182 0 0 1 # st
853 1 2 2.100000 7.802794147 16.497582311 -6.503672300 0 0 1 # st
854 1 3 -1.050000 7.516966002 13.625699470 -8.128441523 0 0 1 # ob
855 1 3 -1.050000 7.956304986 16.370083330 -8.125684583 0 0 1 # ob
856 1 4 -0.950000 -10.123434482 15.338620527 -8.196446632 1 0 1 # oh
857 1 3 -1.050000 9.191297430 17.053905432 -5.891626593 0 0 1 # ob
858 1 3 -1.050000 7.503996030 15.033100058 -5.896221744 0 0 1 # ob
859 1 3 -1.050000 6.635374545 17.538377446 -6.134239214 0 0 1 # ob
860 1 5 0.425000 -9.031884224 15.331762013 -7.995024148 1 0 1 # ho
861 1 1 1.575000 9.542780355 16.616181130 -9.189871776 0 0 1 # ao
862 1 2 2.100000 5.330708207 8.863912922 6.510105475 0 0 0 # st
863 1 2 2.100000 5.294377387 14.882796794 6.503672592 0 0 0 # st
864 1 3 -1.050000 5.354866857 -18.108612440 8.128441816 0 1 0 # ob
@ -906,7 +906,7 @@ Atoms # full
868 1 3 -1.050000 5.593175504 16.347279047 5.896222036 0 0 0 # ob
869 1 3 -1.050000 6.461796988 13.842001659 6.134239507 0 0 0 # ob
870 1 5 0.425000 6.649055605 16.048617092 7.995024441 0 0 0 # ho
871 1 1 1.575000 3.540735302 11.769613296 9.189872068 0 0 0 # ao
871 1 1 1.575000 6.934613050 12.133269819 -9.189871776 0 0 1 # ao
872 1 2 2.100000 -12.701124489 13.346824233 6.510105475 1 0 0 # st
873 1 2 2.100000 -12.793790070 10.399885483 6.503672592 1 0 0 # st
874 1 3 -1.050000 -12.507961925 13.271768324 8.128441816 1 0 0 # ob
@ -916,27 +916,27 @@ Atoms # full
878 1 3 -1.050000 -12.494991953 11.864367737 5.896222036 1 0 0 # ob
879 1 3 -1.050000 -11.626370469 9.359090348 6.134239507 1 0 0 # ob
880 1 5 0.425000 4.040888301 11.565705782 7.995024441 0 0 0 # ho
881 1 1 1.575000 -9.373776431 10.281286664 9.189872068 1 0 0 # ao
882 1 2 2.100000 -5.387042958 -17.829737203 -6.523590700 1 1 1 # st
883 1 2 2.100000 -5.125373463 12.014671000 -6.517157818 1 0 1 # st
884 1 3 -1.050000 -5.411201608 9.142788159 -8.141927041 1 0 1 # ob
885 1 3 -1.050000 -4.971862624 11.887172019 -8.139170101 1 0 1 # ob
886 1 4 -0.950000 -7.571601939 10.855709216 -8.209932150 1 0 1 # oh
887 1 3 -1.050000 -8.896870027 12.570994121 -5.905112111 1 0 1 # ob
888 1 3 -1.050000 -5.424171580 10.550188747 -5.909707262 1 0 1 # ob
889 1 3 -1.050000 -6.292793064 13.055466135 -6.147724732 1 0 1 # ob
890 1 5 0.425000 -6.480051681 10.848850702 -8.008509666 1 0 1 # ho
891 1 1 1.575000 -6.765609126 14.764197975 9.189872068 1 0 0 # ao
892 1 2 2.100000 -7.769871587 13.550643561 -6.523590700 1 0 1 # st
893 1 2 2.100000 -7.677206006 16.497582311 -6.517157818 1 0 1 # st
894 1 3 -1.050000 -7.963034151 13.625699470 -8.141927041 1 0 1 # ob
895 1 3 -1.050000 -7.523695167 16.370083330 -8.139170101 1 0 1 # ob
896 1 4 -0.950000 -4.963434634 15.338620527 -8.209932150 1 0 1 # oh
897 1 3 -1.050000 -6.288702722 17.053905432 -5.905112111 1 0 1 # ob
898 1 3 -1.050000 -7.976004123 15.033100058 -5.909707262 1 0 1 # ob
899 1 3 -1.050000 -8.844625607 17.538377446 -6.147724732 1 0 1 # ob
900 1 5 0.425000 -3.871884377 15.331762013 -8.008509666 1 0 1 # ho
901 1 1 1.575000 -9.331097546 16.252524607 9.189872068 1 0 0 # ao
881 1 1 1.575000 -5.979898683 10.644943187 -9.189871776 1 0 1 # ao
882 1 2 2.100000 -5.387042958 -17.829737203 -6.510105182 1 1 1 # st
883 1 2 2.100000 -5.125373463 12.014671000 -6.503672300 1 0 1 # st
884 1 3 -1.050000 -5.411201608 9.142788159 -8.128441523 1 0 1 # ob
885 1 3 -1.050000 -4.971862624 11.887172019 -8.125684583 1 0 1 # ob
886 1 4 -0.950000 -7.571601939 10.855709216 -8.196446632 1 0 1 # oh
887 1 3 -1.050000 -8.896870027 12.570994121 -5.891626593 1 0 1 # ob
888 1 3 -1.050000 -5.424171580 10.550188747 -5.896221744 1 0 1 # ob
889 1 3 -1.050000 -6.292793064 13.055466135 -6.134239214 1 0 1 # ob
890 1 5 0.425000 -6.480051681 10.848850702 -7.995024148 1 0 1 # ho
891 1 1 1.575000 -3.371731378 15.127854498 -9.189871776 1 0 1 # ao
892 1 2 2.100000 -7.769871587 13.550643561 -6.510105182 1 0 1 # st
893 1 2 2.100000 -7.677206006 16.497582311 -6.503672300 1 0 1 # st
894 1 3 -1.050000 -7.963034151 13.625699470 -8.128441523 1 0 1 # ob
895 1 3 -1.050000 -7.523695167 16.370083330 -8.125684583 1 0 1 # ob
896 1 4 -0.950000 -4.963434634 15.338620527 -8.196446632 1 0 1 # oh
897 1 3 -1.050000 -6.288702722 17.053905432 -5.891626593 1 0 1 # ob
898 1 3 -1.050000 -7.976004123 15.033100058 -5.896221744 1 0 1 # ob
899 1 3 -1.050000 -8.844625607 17.538377446 -6.134239214 1 0 1 # ob
900 1 5 0.425000 -3.871884377 15.331762013 -7.995024148 1 0 1 # ho
901 1 1 1.575000 -5.937219798 16.616181130 -9.189871776 1 0 1 # ao
902 1 2 2.100000 -10.149291946 8.863912922 6.510105475 1 0 0 # st
903 1 2 2.100000 -10.185622766 14.882796794 6.503672592 1 0 0 # st
904 1 3 -1.050000 -10.125133295 -18.108612440 8.128441816 1 1 0 # ob
@ -946,7 +946,7 @@ Atoms # full
908 1 3 -1.050000 -9.886824648 16.347279047 5.896222036 1 0 0 # ob
909 1 3 -1.050000 -9.018203164 13.842001659 6.134239507 1 0 0 # ob
910 1 5 0.425000 -8.830944547 16.048617092 7.995024441 1 0 0 # ho
911 1 1 1.575000 -11.939264850 11.769613296 9.189872068 1 0 0 # ao
911 1 1 1.575000 -8.545387102 12.133269819 -9.189871776 1 0 1 # ao
912 1 2 2.100000 -7.541124641 13.346824233 6.510105475 1 0 0 # st
913 1 2 2.100000 -7.633790223 10.399885483 6.503672592 1 0 0 # st
914 1 3 -1.050000 -7.347962077 13.271768324 8.128441816 1 0 0 # ob
@ -956,27 +956,27 @@ Atoms # full
918 1 3 -1.050000 -7.334992106 11.864367737 5.896222036 1 0 0 # ob
919 1 3 -1.050000 -6.466370621 9.359090348 6.134239507 1 0 0 # ob
920 1 5 0.425000 -11.439111852 11.565705782 7.995024441 1 0 0 # ho
921 1 1 1.575000 -4.213776583 10.281286664 9.189872068 1 0 0 # ao
922 1 2 2.100000 -0.227043110 -17.829737203 -6.523590700 1 1 1 # st
923 1 2 2.100000 0.034626385 12.014671000 -6.517157818 1 0 1 # st
924 1 3 -1.050000 -0.251201761 9.142788159 -8.141927041 1 0 1 # ob
925 1 3 -1.050000 0.188137223 11.887172019 -8.139170101 1 0 1 # ob
926 1 4 -0.950000 -2.411602091 10.855709216 -8.209932150 1 0 1 # oh
927 1 3 -1.050000 -3.736870180 12.570994121 -5.905112111 1 0 1 # ob
928 1 3 -1.050000 -0.264171733 10.550188747 -5.909707262 1 0 1 # ob
929 1 3 -1.050000 -1.132793217 13.055466135 -6.147724732 1 0 1 # ob
930 1 5 0.425000 -1.320051834 10.848850702 -8.008509666 1 0 1 # ho
931 1 1 1.575000 -1.605609279 14.764197975 9.189872068 1 0 0 # ao
932 1 2 2.100000 -2.609871740 13.550643561 -6.523590700 1 0 1 # st
933 1 2 2.100000 -2.517206158 16.497582311 -6.517157818 1 0 1 # st
934 1 3 -1.050000 -2.803034304 13.625699470 -8.141927041 1 0 1 # ob
935 1 3 -1.050000 -2.363695320 16.370083330 -8.139170101 1 0 1 # ob
936 1 4 -0.950000 0.196565213 15.338620527 -8.209932150 1 0 1 # oh
937 1 3 -1.050000 -1.128702875 17.053905432 -5.905112111 1 0 1 # ob
938 1 3 -1.050000 -2.816004275 15.033100058 -5.909707262 1 0 1 # ob
939 1 3 -1.050000 -3.684625760 17.538377446 -6.147724732 1 0 1 # ob
940 1 5 0.425000 1.288115471 15.331762013 -8.008509666 1 0 1 # ho
941 1 1 1.575000 -4.171097698 16.252524607 9.189872068 1 0 0 # ao
921 1 1 1.575000 -0.819898835 10.644943187 -9.189871776 1 0 1 # ao
922 1 2 2.100000 -0.227043110 -17.829737203 -6.510105182 1 1 1 # st
923 1 2 2.100000 0.034626385 12.014671000 -6.503672300 1 0 1 # st
924 1 3 -1.050000 -0.251201761 9.142788159 -8.128441523 1 0 1 # ob
925 1 3 -1.050000 0.188137223 11.887172019 -8.125684583 1 0 1 # ob
926 1 4 -0.950000 -2.411602091 10.855709216 -8.196446632 1 0 1 # oh
927 1 3 -1.050000 -3.736870180 12.570994121 -5.891626593 1 0 1 # ob
928 1 3 -1.050000 -0.264171733 10.550188747 -5.896221744 1 0 1 # ob
929 1 3 -1.050000 -1.132793217 13.055466135 -6.134239214 1 0 1 # ob
930 1 5 0.425000 -1.320051834 10.848850702 -7.995024148 1 0 1 # ho
931 1 1 1.575000 1.788268469 15.127854498 -9.189871776 1 0 1 # ao
932 1 2 2.100000 -2.609871740 13.550643561 -6.510105182 1 0 1 # st
933 1 2 2.100000 -2.517206158 16.497582311 -6.503672300 1 0 1 # st
934 1 3 -1.050000 -2.803034304 13.625699470 -8.128441523 1 0 1 # ob
935 1 3 -1.050000 -2.363695320 16.370083330 -8.125684583 1 0 1 # ob
936 1 4 -0.950000 0.196565213 15.338620527 -8.196446632 1 0 1 # oh
937 1 3 -1.050000 -1.128702875 17.053905432 -5.891626593 1 0 1 # ob
938 1 3 -1.050000 -2.816004275 15.033100058 -5.896221744 1 0 1 # ob
939 1 3 -1.050000 -3.684625760 17.538377446 -6.134239214 1 0 1 # ob
940 1 5 0.425000 1.288115471 15.331762013 -7.995024148 1 0 1 # ho
941 1 1 1.575000 -0.777219950 16.616181130 -9.189871776 1 0 1 # ao
942 1 2 2.100000 -4.989292099 8.863912922 6.510105475 1 0 0 # st
943 1 2 2.100000 -5.025622918 14.882796794 6.503672592 1 0 0 # st
944 1 3 -1.050000 -4.965133448 -18.108612440 8.128441816 1 1 0 # ob
@ -986,7 +986,7 @@ Atoms # full
948 1 3 -1.050000 -4.726824801 16.347279047 5.896222036 1 0 0 # ob
949 1 3 -1.050000 -3.858203317 13.842001659 6.134239507 1 0 0 # ob
950 1 5 0.425000 -3.670944700 16.048617092 7.995024441 1 0 0 # ho
951 1 1 1.575000 -6.779265003 11.769613296 9.189872068 1 0 0 # ao
951 1 1 1.575000 -3.385387255 12.133269819 -9.189871776 1 0 1 # ao
952 1 2 2.100000 -2.381124794 13.346824233 6.510105475 1 0 0 # st
953 1 2 2.100000 -2.473790376 10.399885483 6.503672592 1 0 0 # st
954 1 3 -1.050000 -2.187962230 13.271768324 8.128441816 1 0 0 # ob
@ -996,27 +996,27 @@ Atoms # full
958 1 3 -1.050000 -2.174992258 11.864367737 5.896222036 1 0 0 # ob
959 1 3 -1.050000 -1.306370774 9.359090348 6.134239507 1 0 0 # ob
960 1 5 0.425000 -6.279112005 11.565705782 7.995024441 1 0 0 # ho
961 1 1 1.575000 0.777219961 -16.616182789 9.189872068 0 1 0 # ao
962 1 2 2.100000 4.989292109 -8.863914582 -6.523590700 0 1 1 # st
963 1 2 2.100000 5.025622929 -14.882798454 -6.517157818 0 1 1 # st
964 1 3 -1.050000 4.739794784 -17.754681294 -8.141927041 0 1 1 # ob
965 1 3 -1.050000 5.179133768 -15.010297434 -8.139170101 0 1 1 # ob
966 1 4 -0.950000 2.579394453 -16.041760237 -8.209932150 0 1 1 # oh
967 1 3 -1.050000 1.254126365 -14.326475333 -5.905112111 0 1 1 # ob
968 1 3 -1.050000 4.726824812 -16.347280707 -5.909707262 0 1 1 # ob
969 1 3 -1.050000 3.858203328 -13.842003318 -6.147724732 0 1 1 # ob
970 1 5 0.425000 3.670944711 -16.048618752 -8.008509666 0 1 1 # ho
971 1 1 1.575000 3.385387266 -12.133271479 9.189872068 0 1 0 # ao
972 1 2 2.100000 2.381124805 -13.346825892 -6.523590700 0 1 1 # st
973 1 2 2.100000 2.473790386 -10.399887143 -6.517157818 0 1 1 # st
974 1 3 -1.050000 2.187962241 -13.271769983 -8.141927041 0 1 1 # ob
975 1 3 -1.050000 2.627301225 -10.527386123 -8.139170101 0 1 1 # ob
976 1 4 -0.950000 5.187561758 -11.558848927 -8.209932150 0 1 1 # oh
977 1 3 -1.050000 3.862293670 -9.843564022 -5.905112111 0 1 1 # ob
978 1 3 -1.050000 2.174992269 -11.864369396 -5.909707262 0 1 1 # ob
979 1 3 -1.050000 1.306370785 -9.359092007 -6.147724732 0 1 1 # ob
980 1 5 0.425000 6.279112015 -11.565707441 -8.008509666 0 1 1 # ho
981 1 1 1.575000 0.819898846 -10.644944847 9.189872068 0 1 0 # ao
961 1 1 1.575000 4.171097709 -16.252526266 -9.189871776 0 1 1 # ao
962 1 2 2.100000 4.989292109 -8.863914582 -6.510105182 0 1 1 # st
963 1 2 2.100000 5.025622929 -14.882798454 -6.503672300 0 1 1 # st
964 1 3 -1.050000 4.739794784 -17.754681294 -8.128441523 0 1 1 # ob
965 1 3 -1.050000 5.179133768 -15.010297434 -8.125684583 0 1 1 # ob
966 1 4 -0.950000 2.579394453 -16.041760237 -8.196446632 0 1 1 # oh
967 1 3 -1.050000 1.254126365 -14.326475333 -5.891626593 0 1 1 # ob
968 1 3 -1.050000 4.726824812 -16.347280707 -5.896221744 0 1 1 # ob
969 1 3 -1.050000 3.858203328 -13.842003318 -6.134239214 0 1 1 # ob
970 1 5 0.425000 3.670944711 -16.048618752 -7.995024148 0 1 1 # ho
971 1 1 1.575000 6.779265014 -11.769614956 -9.189871776 0 1 1 # ao
972 1 2 2.100000 2.381124805 -13.346825892 -6.510105182 0 1 1 # st
973 1 2 2.100000 2.473790386 -10.399887143 -6.503672300 0 1 1 # st
974 1 3 -1.050000 2.187962241 -13.271769983 -8.128441523 0 1 1 # ob
975 1 3 -1.050000 2.627301225 -10.527386123 -8.125684583 0 1 1 # ob
976 1 4 -0.950000 5.187561758 -11.558848927 -8.196446632 0 1 1 # oh
977 1 3 -1.050000 3.862293670 -9.843564022 -5.891626593 0 1 1 # ob
978 1 3 -1.050000 2.174992269 -11.864369396 -5.896221744 0 1 1 # ob
979 1 3 -1.050000 1.306370785 -9.359092007 -6.134239214 0 1 1 # ob
980 1 5 0.425000 6.279112015 -11.565707441 -7.995024148 0 1 1 # ho
981 1 1 1.575000 4.213776594 -10.281288324 -9.189871776 0 1 1 # ao
982 1 2 2.100000 0.001704446 -18.033556531 6.510105475 0 1 0 # st
983 1 2 2.100000 -0.034626374 -12.014672659 6.503672592 0 1 0 # st
984 1 3 -1.050000 0.251201772 -9.142789819 8.128441816 0 1 0 # ob
@ -1026,7 +1026,7 @@ Atoms # full
988 1 3 -1.050000 0.264171744 -10.550190406 5.896222036 0 1 0 # ob
989 1 3 -1.050000 1.132793228 -13.055467795 6.134239507 0 1 0 # ob
990 1 5 0.425000 1.320051845 -10.848852361 7.995024441 0 1 0 # ho
991 1 1 1.575000 -1.788268458 -15.127856157 9.189872068 0 1 0 # ao
991 1 1 1.575000 1.605609290 -14.764199634 -9.189871776 0 1 1 # ao
992 1 2 2.100000 2.609871751 -13.550645221 6.510105475 0 1 0 # st
993 1 2 2.100000 2.517206169 -16.497583970 6.503672592 0 1 0 # st
994 1 3 -1.050000 2.803034315 -13.625701130 8.128441816 0 1 0 # ob
@ -1036,27 +1036,27 @@ Atoms # full
998 1 3 -1.050000 2.816004286 -15.033101717 5.896222036 0 1 0 # ob
999 1 3 -1.050000 3.684625771 -17.538379106 6.134239507 0 1 0 # ob
1000 1 5 0.425000 -1.288115460 -15.331763672 7.995024441 0 1 0 # ho
1001 1 1 1.575000 5.937219808 -16.616182789 9.189872068 0 1 0 # ao
1002 1 2 2.100000 -10.490708043 -8.863914582 -6.523590700 1 1 1 # st
1003 1 2 2.100000 -10.454377223 -14.882798454 -6.517157818 1 1 1 # st
1004 1 3 -1.050000 9.899794631 -17.754681294 -8.141927041 0 1 1 # ob
1005 1 3 -1.050000 -10.300866385 -15.010297434 -8.139170101 1 1 1 # ob
1006 1 4 -0.950000 7.739394301 -16.041760237 -8.209932150 0 1 1 # oh
1007 1 3 -1.050000 6.414126212 -14.326475333 -5.905112111 0 1 1 # ob
1008 1 3 -1.050000 -10.753175341 -16.347280707 -5.909707262 1 1 1 # ob
1009 1 3 -1.050000 9.018203175 -13.842003318 -6.147724732 0 1 1 # ob
1010 1 5 0.425000 8.830944558 -16.048618752 -8.008509666 0 1 1 # ho
1011 1 1 1.575000 -12.094612887 -12.133271479 9.189872068 1 1 0 # ao
1012 1 2 2.100000 7.541124652 -13.346825892 -6.523590700 0 1 1 # st
1013 1 2 2.100000 7.633790234 -10.399887143 -6.517157818 0 1 1 # st
1014 1 3 -1.050000 7.347962088 -13.271769983 -8.141927041 0 1 1 # ob
1015 1 3 -1.050000 7.787301072 -10.527386123 -8.139170101 0 1 1 # ob
1016 1 4 -0.950000 -10.292438395 -11.558848927 -8.209932150 1 1 1 # oh
1017 1 3 -1.050000 9.022293517 -9.843564022 -5.905112111 0 1 1 # ob
1018 1 3 -1.050000 7.334992116 -11.864369396 -5.909707262 0 1 1 # ob
1019 1 3 -1.050000 6.466370632 -9.359092007 -6.147724732 0 1 1 # ob
1020 1 5 0.425000 -9.200888137 -11.565707441 -8.008509666 1 1 1 # ho
1021 1 1 1.575000 5.979898694 -10.644944847 9.189872068 0 1 0 # ao
1001 1 1 1.575000 9.331097556 -16.252526266 -9.189871776 0 1 1 # ao
1002 1 2 2.100000 -10.490708043 -8.863914582 -6.510105182 1 1 1 # st
1003 1 2 2.100000 -10.454377223 -14.882798454 -6.503672300 1 1 1 # st
1004 1 3 -1.050000 9.899794631 -17.754681294 -8.128441523 0 1 1 # ob
1005 1 3 -1.050000 -10.300866385 -15.010297434 -8.125684583 1 1 1 # ob
1006 1 4 -0.950000 7.739394301 -16.041760237 -8.196446632 0 1 1 # oh
1007 1 3 -1.050000 6.414126212 -14.326475333 -5.891626593 0 1 1 # ob
1008 1 3 -1.050000 -10.753175341 -16.347280707 -5.896221744 1 1 1 # ob
1009 1 3 -1.050000 9.018203175 -13.842003318 -6.134239214 0 1 1 # ob
1010 1 5 0.425000 8.830944558 -16.048618752 -7.995024148 0 1 1 # ho
1011 1 1 1.575000 -8.700735139 -11.769614956 -9.189871776 1 1 1 # ao
1012 1 2 2.100000 7.541124652 -13.346825892 -6.510105182 0 1 1 # st
1013 1 2 2.100000 7.633790234 -10.399887143 -6.503672300 0 1 1 # st
1014 1 3 -1.050000 7.347962088 -13.271769983 -8.128441523 0 1 1 # ob
1015 1 3 -1.050000 7.787301072 -10.527386123 -8.125684583 0 1 1 # ob
1016 1 4 -0.950000 -10.292438395 -11.558848927 -8.196446632 1 1 1 # oh
1017 1 3 -1.050000 9.022293517 -9.843564022 -5.891626593 0 1 1 # ob
1018 1 3 -1.050000 7.334992116 -11.864369396 -5.896221744 0 1 1 # ob
1019 1 3 -1.050000 6.466370632 -9.359092007 -6.134239214 0 1 1 # ob
1020 1 5 0.425000 -9.200888137 -11.565707441 -7.995024148 1 1 1 # ho
1021 1 1 1.575000 9.373776442 -10.281288324 -9.189871776 0 1 1 # ao
1022 1 2 2.100000 5.161704293 -18.033556531 6.510105475 0 1 0 # st
1023 1 2 2.100000 5.125373474 -12.014672659 6.503672592 0 1 0 # st
1024 1 3 -1.050000 5.411201619 -9.142789819 8.128441816 0 1 0 # ob
@ -1066,7 +1066,7 @@ Atoms # full
1028 1 3 -1.050000 5.424171591 -10.550190406 5.896222036 0 1 0 # ob
1029 1 3 -1.050000 6.292793075 -13.055467795 6.134239507 0 1 0 # ob
1030 1 5 0.425000 6.480051692 -10.848852361 7.995024441 0 1 0 # ho
1031 1 1 1.575000 3.371731389 -15.127856157 9.189872068 0 1 0 # ao
1031 1 1 1.575000 6.765609137 -14.764199634 -9.189871776 0 1 1 # ao
1032 1 2 2.100000 -12.870128402 -13.550645221 6.510105475 1 1 0 # st
1033 1 2 2.100000 -12.962793984 -16.497583970 6.503672592 1 1 0 # st
1034 1 3 -1.050000 -12.676965838 -13.625701130 8.128441816 1 1 0 # ob
@ -1076,27 +1076,27 @@ Atoms # full
1038 1 3 -1.050000 -12.663995866 -15.033101717 5.896222036 1 1 0 # ob
1039 1 3 -1.050000 -11.795374382 -17.538379106 6.134239507 1 1 0 # ob
1040 1 5 0.425000 3.871884387 -15.331763672 7.995024441 0 1 0 # ho
1041 1 1 1.575000 -9.542780344 -16.616182789 9.189872068 1 1 0 # ao
1042 1 2 2.100000 -5.330708196 -8.863914582 -6.523590700 1 1 1 # st
1043 1 2 2.100000 -5.294377376 -14.882798454 -6.517157818 1 1 1 # st
1044 1 3 -1.050000 -5.580205521 -17.754681294 -8.141927041 1 1 1 # ob
1045 1 3 -1.050000 -5.140866537 -15.010297434 -8.139170101 1 1 1 # ob
1046 1 4 -0.950000 -7.740605852 -16.041760237 -8.209932150 1 1 1 # oh
1047 1 3 -1.050000 -9.065873940 -14.326475333 -5.905112111 1 1 1 # ob
1048 1 3 -1.050000 -5.593175493 -16.347280707 -5.909707262 1 1 1 # ob
1049 1 3 -1.050000 -6.461796978 -13.842003318 -6.147724732 1 1 1 # ob
1050 1 5 0.425000 -6.649055594 -16.048618752 -8.008509666 1 1 1 # ho
1051 1 1 1.575000 -6.934613039 -12.133271479 9.189872068 1 1 0 # ao
1052 1 2 2.100000 -7.938875500 -13.346825892 -6.523590700 1 1 1 # st
1053 1 2 2.100000 -7.846209919 -10.399887143 -6.517157818 1 1 1 # st
1054 1 3 -1.050000 -8.132038064 -13.271769983 -8.141927041 1 1 1 # ob
1055 1 3 -1.050000 -7.692699080 -10.527386123 -8.139170101 1 1 1 # ob
1056 1 4 -0.950000 -5.132438547 -11.558848927 -8.209932150 1 1 1 # oh
1057 1 3 -1.050000 -6.457706636 -9.843564022 -5.905112111 1 1 1 # ob
1058 1 3 -1.050000 -8.145008036 -11.864369396 -5.909707262 1 1 1 # ob
1059 1 3 -1.050000 -9.013629520 -9.359092007 -6.147724732 1 1 1 # ob
1060 1 5 0.425000 -4.040888290 -11.565707441 -8.008509666 1 1 1 # ho
1061 1 1 1.575000 -9.500101459 -10.644944847 9.189872068 1 1 0 # ao
1041 1 1 1.575000 -6.148902596 -16.252526266 -9.189871776 1 1 1 # ao
1042 1 2 2.100000 -5.330708196 -8.863914582 -6.510105182 1 1 1 # st
1043 1 2 2.100000 -5.294377376 -14.882798454 -6.503672300 1 1 1 # st
1044 1 3 -1.050000 -5.580205521 -17.754681294 -8.128441523 1 1 1 # ob
1045 1 3 -1.050000 -5.140866537 -15.010297434 -8.125684583 1 1 1 # ob
1046 1 4 -0.950000 -7.740605852 -16.041760237 -8.196446632 1 1 1 # oh
1047 1 3 -1.050000 -9.065873940 -14.326475333 -5.891626593 1 1 1 # ob
1048 1 3 -1.050000 -5.593175493 -16.347280707 -5.896221744 1 1 1 # ob
1049 1 3 -1.050000 -6.461796978 -13.842003318 -6.134239214 1 1 1 # ob
1050 1 5 0.425000 -6.649055594 -16.048618752 -7.995024148 1 1 1 # ho
1051 1 1 1.575000 -3.540735291 -11.769614956 -9.189871776 1 1 1 # ao
1052 1 2 2.100000 -7.938875500 -13.346825892 -6.510105182 1 1 1 # st
1053 1 2 2.100000 -7.846209919 -10.399887143 -6.503672300 1 1 1 # st
1054 1 3 -1.050000 -8.132038064 -13.271769983 -8.128441523 1 1 1 # ob
1055 1 3 -1.050000 -7.692699080 -10.527386123 -8.125684583 1 1 1 # ob
1056 1 4 -0.950000 -5.132438547 -11.558848927 -8.196446632 1 1 1 # oh
1057 1 3 -1.050000 -6.457706636 -9.843564022 -5.891626593 1 1 1 # ob
1058 1 3 -1.050000 -8.145008036 -11.864369396 -5.896221744 1 1 1 # ob
1059 1 3 -1.050000 -9.013629520 -9.359092007 -6.134239214 1 1 1 # ob
1060 1 5 0.425000 -4.040888290 -11.565707441 -7.995024148 1 1 1 # ho
1061 1 1 1.575000 -6.106223711 -10.281288324 -9.189871776 1 1 1 # ao
1062 1 2 2.100000 -10.318295859 -18.033556531 6.510105475 1 1 0 # st
1063 1 2 2.100000 -10.354626679 -12.014672659 6.503672592 1 1 0 # st
1064 1 3 -1.050000 -10.068798533 -9.142789819 8.128441816 1 1 0 # ob
@ -1106,7 +1106,7 @@ Atoms # full
1068 1 3 -1.050000 -10.055828562 -10.550190406 5.896222036 1 1 0 # ob
1069 1 3 -1.050000 -9.187207077 -13.055467795 6.134239507 1 1 0 # ob
1070 1 5 0.425000 -8.999948461 -10.848852361 7.995024441 1 1 0 # ho
1071 1 1 1.575000 -12.108268763 -15.127856157 9.189872068 1 1 0 # ao
1071 1 1 1.575000 -8.714391015 -14.764199634 -9.189871776 1 1 1 # ao
1072 1 2 2.100000 -7.710128554 -13.550645221 6.510105475 1 1 0 # st
1073 1 2 2.100000 -7.802794136 -16.497583970 6.503672592 1 1 0 # st
1074 1 3 -1.050000 -7.516965991 -13.625701130 8.128441816 1 1 0 # ob
@ -1116,27 +1116,27 @@ Atoms # full
1078 1 3 -1.050000 -7.503996019 -15.033101717 5.896222036 1 1 0 # ob
1079 1 3 -1.050000 -6.635374534 -17.538379106 6.134239507 1 1 0 # ob
1080 1 5 0.425000 -11.608115765 -15.331763672 7.995024441 1 1 0 # ho
1081 1 1 1.575000 -4.382780497 -16.616182789 9.189872068 1 1 0 # ao
1082 1 2 2.100000 -0.170708348 -8.863914582 -6.523590700 1 1 1 # st
1083 1 2 2.100000 -0.134377529 -14.882798454 -6.517157818 1 1 1 # st
1084 1 3 -1.050000 -0.420205674 -17.754681294 -8.141927041 1 1 1 # ob
1085 1 3 -1.050000 0.019133310 -15.010297434 -8.139170101 1 1 1 # ob
1086 1 4 -0.950000 -2.580606005 -16.041760237 -8.209932150 1 1 1 # oh
1087 1 3 -1.050000 -3.905874093 -14.326475333 -5.905112111 1 1 1 # ob
1088 1 3 -1.050000 -0.433175646 -16.347280707 -5.909707262 1 1 1 # ob
1089 1 3 -1.050000 -1.301797130 -13.842003318 -6.147724732 1 1 1 # ob
1090 1 5 0.425000 -1.489055747 -16.048618752 -8.008509666 1 1 1 # ho
1091 1 1 1.575000 -1.774613192 -12.133271479 9.189872068 1 1 0 # ao
1092 1 2 2.100000 -2.778875653 -13.346825892 -6.523590700 1 1 1 # st
1093 1 2 2.100000 -2.686210071 -10.399887143 -6.517157818 1 1 1 # st
1094 1 3 -1.050000 -2.972038217 -13.271769983 -8.141927041 1 1 1 # ob
1095 1 3 -1.050000 -2.532699233 -10.527386123 -8.139170101 1 1 1 # ob
1096 1 4 -0.950000 0.027561300 -11.558848927 -8.209932150 1 1 1 # oh
1097 1 3 -1.050000 -1.297706788 -9.843564022 -5.905112111 1 1 1 # ob
1098 1 3 -1.050000 -2.985008189 -11.864369396 -5.909707262 1 1 1 # ob
1099 1 3 -1.050000 -3.853629673 -9.359092007 -6.147724732 1 1 1 # ob
1100 1 5 0.425000 1.119111558 -11.565707441 -8.008509666 1 1 1 # ho
1101 1 1 1.575000 -4.340101611 -10.644944847 9.189872068 1 1 0 # ao
1081 1 1 1.575000 -0.988902749 -16.252526266 -9.189871776 1 1 1 # ao
1082 1 2 2.100000 -0.170708348 -8.863914582 -6.510105182 1 1 1 # st
1083 1 2 2.100000 -0.134377529 -14.882798454 -6.503672300 1 1 1 # st
1084 1 3 -1.050000 -0.420205674 -17.754681294 -8.128441523 1 1 1 # ob
1085 1 3 -1.050000 0.019133310 -15.010297434 -8.125684583 1 1 1 # ob
1086 1 4 -0.950000 -2.580606005 -16.041760237 -8.196446632 1 1 1 # oh
1087 1 3 -1.050000 -3.905874093 -14.326475333 -5.891626593 1 1 1 # ob
1088 1 3 -1.050000 -0.433175646 -16.347280707 -5.896221744 1 1 1 # ob
1089 1 3 -1.050000 -1.301797130 -13.842003318 -6.134239214 1 1 1 # ob
1090 1 5 0.425000 -1.489055747 -16.048618752 -7.995024148 1 1 1 # ho
1091 1 1 1.575000 1.619264556 -11.769614956 -9.189871776 1 1 1 # ao
1092 1 2 2.100000 -2.778875653 -13.346825892 -6.510105182 1 1 1 # st
1093 1 2 2.100000 -2.686210071 -10.399887143 -6.503672300 1 1 1 # st
1094 1 3 -1.050000 -2.972038217 -13.271769983 -8.128441523 1 1 1 # ob
1095 1 3 -1.050000 -2.532699233 -10.527386123 -8.125684583 1 1 1 # ob
1096 1 4 -0.950000 0.027561300 -11.558848927 -8.196446632 1 1 1 # oh
1097 1 3 -1.050000 -1.297706788 -9.843564022 -5.891626593 1 1 1 # ob
1098 1 3 -1.050000 -2.985008189 -11.864369396 -5.896221744 1 1 1 # ob
1099 1 3 -1.050000 -3.853629673 -9.359092007 -6.134239214 1 1 1 # ob
1100 1 5 0.425000 1.119111558 -11.565707441 -7.995024148 1 1 1 # ho
1101 1 1 1.575000 -0.946223863 -10.281288324 -9.189871776 1 1 1 # ao
1102 1 2 2.100000 -5.158296012 -18.033556531 6.510105475 1 1 0 # st
1103 1 2 2.100000 -5.194626832 -12.014672659 6.503672592 1 1 0 # st
1104 1 3 -1.050000 -4.908798686 -9.142789819 8.128441816 1 1 0 # ob
@ -1146,7 +1146,7 @@ Atoms # full
1108 1 3 -1.050000 -4.895828714 -10.550190406 5.896222036 1 1 0 # ob
1109 1 3 -1.050000 -4.027207230 -13.055467795 6.134239507 1 1 0 # ob
1110 1 5 0.425000 -3.839948613 -10.848852361 7.995024441 1 1 0 # ho
1111 1 1 1.575000 -6.948268916 -15.127856157 9.189872068 1 1 0 # ao
1111 1 1 1.575000 -3.554391168 -14.764199634 -9.189871776 1 1 1 # ao
1112 1 2 2.100000 -2.550128707 -13.550645221 6.510105475 1 1 0 # st
1113 1 2 2.100000 -2.642794289 -16.497583970 6.503672592 1 1 0 # st
1114 1 3 -1.050000 -2.356966143 -13.625701130 8.128441816 1 1 0 # ob
@ -1156,27 +1156,27 @@ Atoms # full
1118 1 3 -1.050000 -2.343996171 -15.033101717 5.896222036 1 1 0 # ob
1119 1 3 -1.050000 -1.475374687 -17.538379106 6.134239507 1 1 0 # ob
1120 1 5 0.425000 -6.448115918 -15.331763672 7.995024441 1 1 0 # ho
1121 1 1 1.575000 0.833554723 -7.650360168 9.189872068 0 1 0 # ao
1122 1 2 2.100000 5.045626871 0.101908040 -6.523590700 0 1 1 # st
1123 1 2 2.100000 5.081957691 -5.916975832 -6.517157818 0 1 1 # st
1124 1 3 -1.050000 4.796129546 -8.788858673 -8.141927041 0 1 1 # ob
1125 1 3 -1.050000 5.235468530 -6.044474812 -8.139170101 0 1 1 # ob
1126 1 4 -0.950000 2.635729215 -7.075937616 -8.209932150 0 1 1 # oh
1127 1 3 -1.050000 1.310461127 -5.360652711 -5.905112111 0 1 1 # ob
1128 1 3 -1.050000 4.783159574 -7.381458085 -5.909707262 0 1 1 # ob
1129 1 3 -1.050000 3.914538089 -4.876180697 -6.147724732 0 1 1 # ob
1130 1 5 0.425000 3.727279473 -7.082796130 -8.008509666 0 1 1 # ho
1131 1 1 1.575000 3.441722028 -3.167448857 9.189872068 0 1 0 # ao
1132 1 2 2.100000 2.437459567 -4.381003271 -6.523590700 0 1 1 # st
1133 1 2 2.100000 2.530125148 -1.434064521 -6.517157818 0 1 1 # st
1134 1 3 -1.050000 2.244297003 -4.305947362 -8.141927041 0 1 1 # ob
1135 1 3 -1.050000 2.683635987 -1.561563502 -8.139170101 0 1 1 # ob
1136 1 4 -0.950000 5.243896520 -2.593026305 -8.209932150 0 1 1 # oh
1137 1 3 -1.050000 3.918628431 -0.877741400 -5.905112111 0 1 1 # ob
1138 1 3 -1.050000 2.231327031 -2.898546774 -5.909707262 0 1 1 # ob
1139 1 3 -1.050000 1.362705547 -0.393269386 -6.147724732 0 1 1 # ob
1140 1 5 0.425000 6.335446777 -2.599884819 -8.008509666 0 1 1 # ho
1141 1 1 1.575000 0.876233608 -1.679122225 9.189872068 0 1 0 # ao
1121 1 1 1.575000 4.227432471 -7.286703645 -9.189871776 0 1 1 # ao
1122 1 2 2.100000 5.045626871 0.101908040 -6.510105182 0 1 1 # st
1123 1 2 2.100000 5.081957691 -5.916975832 -6.503672300 0 1 1 # st
1124 1 3 -1.050000 4.796129546 -8.788858673 -8.128441523 0 1 1 # ob
1125 1 3 -1.050000 5.235468530 -6.044474812 -8.125684583 0 1 1 # ob
1126 1 4 -0.950000 2.635729215 -7.075937616 -8.196446632 0 1 1 # oh
1127 1 3 -1.050000 1.310461127 -5.360652711 -5.891626593 0 1 1 # ob
1128 1 3 -1.050000 4.783159574 -7.381458085 -5.896221744 0 1 1 # ob
1129 1 3 -1.050000 3.914538089 -4.876180697 -6.134239214 0 1 1 # ob
1130 1 5 0.425000 3.727279473 -7.082796130 -7.995024148 0 1 1 # ho
1131 1 1 1.575000 6.835599776 -2.803792334 -9.189871776 0 1 1 # ao
1132 1 2 2.100000 2.437459567 -4.381003271 -6.510105182 0 1 1 # st
1133 1 2 2.100000 2.530125148 -1.434064521 -6.503672300 0 1 1 # st
1134 1 3 -1.050000 2.244297003 -4.305947362 -8.128441523 0 1 1 # ob
1135 1 3 -1.050000 2.683635987 -1.561563502 -8.125684583 0 1 1 # ob
1136 1 4 -0.950000 5.243896520 -2.593026305 -8.196446632 0 1 1 # oh
1137 1 3 -1.050000 3.918628431 -0.877741400 -5.891626593 0 1 1 # ob
1138 1 3 -1.050000 2.231327031 -2.898546774 -5.896221744 0 1 1 # ob
1139 1 3 -1.050000 1.362705547 -0.393269386 -6.134239214 0 1 1 # ob
1140 1 5 0.425000 6.335446777 -2.599884819 -7.995024148 0 1 1 # ho
1141 1 1 1.575000 4.270111356 -1.315465702 -9.189871776 0 1 1 # ao
1142 1 2 2.100000 0.058039208 -9.067733910 6.510105475 0 1 0 # st
1143 1 2 2.100000 0.021708388 -3.048850038 6.503672592 0 1 0 # st
1144 1 3 -1.050000 0.307536534 -0.176967197 8.128441816 0 1 0 # ob
@ -1186,7 +1186,7 @@ Atoms # full
1148 1 3 -1.050000 0.320506505 -1.584367785 5.896222036 0 1 0 # ob
1149 1 3 -1.050000 1.189127990 -4.089645173 6.134239507 0 1 0 # ob
1150 1 5 0.425000 1.376386606 -1.883029740 7.995024441 0 1 0 # ho
1151 1 1 1.575000 -1.731933696 -6.162033536 9.189872068 0 1 0 # ao
1151 1 1 1.575000 1.661944052 -5.798377013 -9.189871776 0 1 1 # ao
1152 1 2 2.100000 2.666206512 -4.584822599 6.510105475 0 1 0 # st
1153 1 2 2.100000 2.573540931 -7.531761349 6.503672592 0 1 0 # st
1154 1 3 -1.050000 2.859369076 -4.659878508 8.128441816 0 1 0 # ob
@ -1196,27 +1196,27 @@ Atoms # full
1158 1 3 -1.050000 2.872339048 -6.067279095 5.896222036 0 1 0 # ob
1159 1 3 -1.050000 3.740960532 -8.572556484 6.134239507 0 1 0 # ob
1160 1 5 0.425000 -1.231780698 -6.365941050 7.995024441 0 1 0 # ho
1161 1 1 1.575000 5.993554570 -7.650360168 9.189872068 0 1 0 # ao
1162 1 2 2.100000 -10.434373281 0.101908040 -6.523590700 1 1 1 # st
1163 1 2 2.100000 -10.398042462 -5.916975832 -6.517157818 1 1 1 # st
1164 1 3 -1.050000 9.956129393 -8.788858673 -8.141927041 0 1 1 # ob
1165 1 3 -1.050000 -10.244531623 -6.044474812 -8.139170101 1 1 1 # ob
1166 1 4 -0.950000 7.795729062 -7.075937616 -8.209932150 0 1 1 # oh
1167 1 3 -1.050000 6.470460974 -5.360652711 -5.905112111 0 1 1 # ob
1168 1 3 -1.050000 -10.696840579 -7.381458085 -5.909707262 1 1 1 # ob
1169 1 3 -1.050000 9.074537937 -4.876180697 -6.147724732 0 1 1 # ob
1170 1 5 0.425000 8.887279320 -7.082796130 -8.008509666 0 1 1 # ho
1171 1 1 1.575000 -12.038278125 -3.167448857 9.189872068 1 1 0 # ao
1172 1 2 2.100000 7.597459414 -4.381003271 -6.523590700 0 1 1 # st
1173 1 2 2.100000 7.690124996 -1.434064521 -6.517157818 0 1 1 # st
1174 1 3 -1.050000 7.404296850 -4.305947362 -8.141927041 0 1 1 # ob
1175 1 3 -1.050000 7.843635834 -1.561563502 -8.139170101 0 1 1 # ob
1176 1 4 -0.950000 -10.236103633 -2.593026305 -8.209932150 1 1 1 # oh
1177 1 3 -1.050000 9.078628279 -0.877741400 -5.905112111 0 1 1 # ob
1178 1 3 -1.050000 7.391326878 -2.898546774 -5.909707262 0 1 1 # ob
1179 1 3 -1.050000 6.522705394 -0.393269386 -6.147724732 0 1 1 # ob
1180 1 5 0.425000 -9.144553375 -2.599884819 -8.008509666 1 1 1 # ho
1181 1 1 1.575000 6.036233456 -1.679122225 9.189872068 0 1 0 # ao
1161 1 1 1.575000 9.387432318 -7.286703645 -9.189871776 0 1 1 # ao
1162 1 2 2.100000 -10.434373281 0.101908040 -6.510105182 1 1 1 # st
1163 1 2 2.100000 -10.398042462 -5.916975832 -6.503672300 1 1 1 # st
1164 1 3 -1.050000 9.956129393 -8.788858673 -8.128441523 0 1 1 # ob
1165 1 3 -1.050000 -10.244531623 -6.044474812 -8.125684583 1 1 1 # ob
1166 1 4 -0.950000 7.795729062 -7.075937616 -8.196446632 0 1 1 # oh
1167 1 3 -1.050000 6.470460974 -5.360652711 -5.891626593 0 1 1 # ob
1168 1 3 -1.050000 -10.696840579 -7.381458085 -5.896221744 1 1 1 # ob
1169 1 3 -1.050000 9.074537937 -4.876180697 -6.134239214 0 1 1 # ob
1170 1 5 0.425000 8.887279320 -7.082796130 -7.995024148 0 1 1 # ho
1171 1 1 1.575000 -8.644400377 -2.803792334 -9.189871776 1 1 1 # ao
1172 1 2 2.100000 7.597459414 -4.381003271 -6.510105182 0 1 1 # st
1173 1 2 2.100000 7.690124996 -1.434064521 -6.503672300 0 1 1 # st
1174 1 3 -1.050000 7.404296850 -4.305947362 -8.128441523 0 1 1 # ob
1175 1 3 -1.050000 7.843635834 -1.561563502 -8.125684583 0 1 1 # ob
1176 1 4 -0.950000 -10.236103633 -2.593026305 -8.196446632 1 1 1 # oh
1177 1 3 -1.050000 9.078628279 -0.877741400 -5.891626593 0 1 1 # ob
1178 1 3 -1.050000 7.391326878 -2.898546774 -5.896221744 0 1 1 # ob
1179 1 3 -1.050000 6.522705394 -0.393269386 -6.134239214 0 1 1 # ob
1180 1 5 0.425000 -9.144553375 -2.599884819 -7.995024148 1 1 1 # ho
1181 1 1 1.575000 9.430111204 -1.315465702 -9.189871776 0 1 1 # ao
1182 1 2 2.100000 5.218039055 -9.067733910 6.510105475 0 1 0 # st
1183 1 2 2.100000 5.181708235 -3.048850038 6.503672592 0 1 0 # st
1184 1 3 -1.050000 5.467536381 -0.176967197 8.128441816 0 1 0 # ob
@ -1226,7 +1226,7 @@ Atoms # full
1188 1 3 -1.050000 5.480506353 -1.584367785 5.896222036 0 1 0 # ob
1189 1 3 -1.050000 6.349127837 -4.089645173 6.134239507 0 1 0 # ob
1190 1 5 0.425000 6.536386454 -1.883029740 7.995024441 0 1 0 # ho
1191 1 1 1.575000 3.428066151 -6.162033536 9.189872068 0 1 0 # ao
1191 1 1 1.575000 6.821943899 -5.798377013 -9.189871776 0 1 1 # ao
1192 1 2 2.100000 -12.813793640 -4.584822599 6.510105475 1 1 0 # st
1193 1 2 2.100000 -12.906459222 -7.531761349 6.503672592 1 1 0 # st
1194 1 3 -1.050000 -12.620631076 -4.659878508 8.128441816 1 1 0 # ob
@ -1236,27 +1236,27 @@ Atoms # full
1198 1 3 -1.050000 -12.607661104 -6.067279095 5.896222036 1 1 0 # ob
1199 1 3 -1.050000 -11.739039620 -8.572556484 6.134239507 1 1 0 # ob
1200 1 5 0.425000 3.928219149 -6.365941050 7.995024441 0 1 0 # ho
1201 1 1 1.575000 -9.486445582 -7.650360168 9.189872068 1 1 0 # ao
1202 1 2 2.100000 -5.274373434 0.101908040 -6.523590700 1 1 1 # st
1203 1 2 2.100000 -5.238042614 -5.916975832 -6.517157818 1 1 1 # st
1204 1 3 -1.050000 -5.523870760 -8.788858673 -8.141927041 1 1 1 # ob
1205 1 3 -1.050000 -5.084531776 -6.044474812 -8.139170101 1 1 1 # ob
1206 1 4 -0.950000 -7.684271090 -7.075937616 -8.209932150 1 1 1 # oh
1207 1 3 -1.050000 -9.009539178 -5.360652711 -5.905112111 1 1 1 # ob
1208 1 3 -1.050000 -5.536840731 -7.381458085 -5.909707262 1 1 1 # ob
1209 1 3 -1.050000 -6.405462216 -4.876180697 -6.147724732 1 1 1 # ob
1210 1 5 0.425000 -6.592720833 -7.082796130 -8.008509666 1 1 1 # ho
1211 1 1 1.575000 -6.878278278 -3.167448857 9.189872068 1 1 0 # ao
1212 1 2 2.100000 -7.882540739 -4.381003271 -6.523590700 1 1 1 # st
1213 1 2 2.100000 -7.789875157 -1.434064521 -6.517157818 1 1 1 # st
1214 1 3 -1.050000 -8.075703302 -4.305947362 -8.141927041 1 1 1 # ob
1215 1 3 -1.050000 -7.636364318 -1.561563502 -8.139170101 1 1 1 # ob
1216 1 4 -0.950000 -5.076103786 -2.593026305 -8.209932150 1 1 1 # oh
1217 1 3 -1.050000 -6.401371874 -0.877741400 -5.905112111 1 1 1 # ob
1218 1 3 -1.050000 -8.088673274 -2.898546774 -5.909707262 1 1 1 # ob
1219 1 3 -1.050000 -8.957294759 -0.393269386 -6.147724732 1 1 1 # ob
1220 1 5 0.425000 -3.984553528 -2.599884819 -8.008509666 1 1 1 # ho
1221 1 1 1.575000 -9.443766697 -1.679122225 9.189872068 1 1 0 # ao
1201 1 1 1.575000 -6.092567834 -7.286703645 -9.189871776 1 1 1 # ao
1202 1 2 2.100000 -5.274373434 0.101908040 -6.510105182 1 1 1 # st
1203 1 2 2.100000 -5.238042614 -5.916975832 -6.503672300 1 1 1 # st
1204 1 3 -1.050000 -5.523870760 -8.788858673 -8.128441523 1 1 1 # ob
1205 1 3 -1.050000 -5.084531776 -6.044474812 -8.125684583 1 1 1 # ob
1206 1 4 -0.950000 -7.684271090 -7.075937616 -8.196446632 1 1 1 # oh
1207 1 3 -1.050000 -9.009539178 -5.360652711 -5.891626593 1 1 1 # ob
1208 1 3 -1.050000 -5.536840731 -7.381458085 -5.896221744 1 1 1 # ob
1209 1 3 -1.050000 -6.405462216 -4.876180697 -6.134239214 1 1 1 # ob
1210 1 5 0.425000 -6.592720833 -7.082796130 -7.995024148 1 1 1 # ho
1211 1 1 1.575000 -3.484400530 -2.803792334 -9.189871776 1 1 1 # ao
1212 1 2 2.100000 -7.882540739 -4.381003271 -6.510105182 1 1 1 # st
1213 1 2 2.100000 -7.789875157 -1.434064521 -6.503672300 1 1 1 # st
1214 1 3 -1.050000 -8.075703302 -4.305947362 -8.128441523 1 1 1 # ob
1215 1 3 -1.050000 -7.636364318 -1.561563502 -8.125684583 1 1 1 # ob
1216 1 4 -0.950000 -5.076103786 -2.593026305 -8.196446632 1 1 1 # oh
1217 1 3 -1.050000 -6.401371874 -0.877741400 -5.891626593 1 1 1 # ob
1218 1 3 -1.050000 -8.088673274 -2.898546774 -5.896221744 1 1 1 # ob
1219 1 3 -1.050000 -8.957294759 -0.393269386 -6.134239214 1 1 1 # ob
1220 1 5 0.425000 -3.984553528 -2.599884819 -7.995024148 1 1 1 # ho
1221 1 1 1.575000 -6.049888949 -1.315465702 -9.189871776 1 1 1 # ao
1222 1 2 2.100000 -10.261961097 -9.067733910 6.510105475 1 1 0 # st
1223 1 2 2.100000 -10.298291917 -3.048850038 6.503672592 1 1 0 # st
1224 1 3 -1.050000 -10.012463772 -0.176967197 8.128441816 1 1 0 # ob
@ -1266,7 +1266,7 @@ Atoms # full
1228 1 3 -1.050000 -9.999493800 -1.584367785 5.896222036 1 1 0 # ob
1229 1 3 -1.050000 -9.130872315 -4.089645173 6.134239507 1 1 0 # ob
1230 1 5 0.425000 -8.943613699 -1.883029740 7.995024441 1 1 0 # ho
1231 1 1 1.575000 -12.051934002 -6.162033536 9.189872068 1 1 0 # ao
1231 1 1 1.575000 -8.658056254 -5.798377013 -9.189871776 1 1 1 # ao
1232 1 2 2.100000 -7.653793793 -4.584822599 6.510105475 1 1 0 # st
1233 1 2 2.100000 -7.746459374 -7.531761349 6.503672592 1 1 0 # st
1234 1 3 -1.050000 -7.460631229 -4.659878508 8.128441816 1 1 0 # ob
@ -1276,27 +1276,27 @@ Atoms # full
1238 1 3 -1.050000 -7.447661257 -6.067279095 5.896222036 1 1 0 # ob
1239 1 3 -1.050000 -6.579039773 -8.572556484 6.134239507 1 1 0 # ob
1240 1 5 0.425000 -11.551781003 -6.365941050 7.995024441 1 1 0 # ho
1241 1 1 1.575000 -4.326445735 -7.650360168 9.189872068 1 1 0 # ao
1242 1 2 2.100000 -0.114373587 0.101908040 -6.523590700 1 1 1 # st
1243 1 2 2.100000 -0.078042767 -5.916975832 -6.517157818 1 1 1 # st
1244 1 3 -1.050000 -0.363870912 -8.788858673 -8.141927041 1 1 1 # ob
1245 1 3 -1.050000 0.075468072 -6.044474812 -8.139170101 1 1 1 # ob
1246 1 4 -0.950000 -2.524271243 -7.075937616 -8.209932150 1 1 1 # oh
1247 1 3 -1.050000 -3.849539331 -5.360652711 -5.905112111 1 1 1 # ob
1248 1 3 -1.050000 -0.376840884 -7.381458085 -5.909707262 1 1 1 # ob
1249 1 3 -1.050000 -1.245462368 -4.876180697 -6.147724732 1 1 1 # ob
1250 1 5 0.425000 -1.432720985 -7.082796130 -8.008509666 1 1 1 # ho
1251 1 1 1.575000 -1.718278430 -3.167448857 9.189872068 1 1 0 # ao
1252 1 2 2.100000 -2.722540891 -4.381003271 -6.523590700 1 1 1 # st
1253 1 2 2.100000 -2.629875310 -1.434064521 -6.517157818 1 1 1 # st
1254 1 3 -1.050000 -2.915703455 -4.305947362 -8.141927041 1 1 1 # ob
1255 1 3 -1.050000 -2.476364471 -1.561563502 -8.139170101 1 1 1 # ob
1256 1 4 -0.950000 0.083896062 -2.593026305 -8.209932150 1 1 1 # oh
1257 1 3 -1.050000 -1.241372026 -0.877741400 -5.905112111 1 1 1 # ob
1258 1 3 -1.050000 -2.928673427 -2.898546774 -5.909707262 1 1 1 # ob
1259 1 3 -1.050000 -3.797294911 -0.393269386 -6.147724732 1 1 1 # ob
1260 1 5 0.425000 1.175446320 -2.599884819 -8.008509666 1 1 1 # ho
1261 1 1 1.575000 -4.283766850 -1.679122225 9.189872068 1 1 0 # ao
1241 1 1 1.575000 -0.932567987 -7.286703645 -9.189871776 1 1 1 # ao
1242 1 2 2.100000 -0.114373587 0.101908040 -6.510105182 1 1 1 # st
1243 1 2 2.100000 -0.078042767 -5.916975832 -6.503672300 1 1 1 # st
1244 1 3 -1.050000 -0.363870912 -8.788858673 -8.128441523 1 1 1 # ob
1245 1 3 -1.050000 0.075468072 -6.044474812 -8.125684583 1 1 1 # ob
1246 1 4 -0.950000 -2.524271243 -7.075937616 -8.196446632 1 1 1 # oh
1247 1 3 -1.050000 -3.849539331 -5.360652711 -5.891626593 1 1 1 # ob
1248 1 3 -1.050000 -0.376840884 -7.381458085 -5.896221744 1 1 1 # ob
1249 1 3 -1.050000 -1.245462368 -4.876180697 -6.134239214 1 1 1 # ob
1250 1 5 0.425000 -1.432720985 -7.082796130 -7.995024148 1 1 1 # ho
1251 1 1 1.575000 1.675599318 -2.803792334 -9.189871776 1 1 1 # ao
1252 1 2 2.100000 -2.722540891 -4.381003271 -6.510105182 1 1 1 # st
1253 1 2 2.100000 -2.629875310 -1.434064521 -6.503672300 1 1 1 # st
1254 1 3 -1.050000 -2.915703455 -4.305947362 -8.128441523 1 1 1 # ob
1255 1 3 -1.050000 -2.476364471 -1.561563502 -8.125684583 1 1 1 # ob
1256 1 4 -0.950000 0.083896062 -2.593026305 -8.196446632 1 1 1 # oh
1257 1 3 -1.050000 -1.241372026 -0.877741400 -5.891626593 1 1 1 # ob
1258 1 3 -1.050000 -2.928673427 -2.898546774 -5.896221744 1 1 1 # ob
1259 1 3 -1.050000 -3.797294911 -0.393269386 -6.134239214 1 1 1 # ob
1260 1 5 0.425000 1.175446320 -2.599884819 -7.995024148 1 1 1 # ho
1261 1 1 1.575000 -0.889889102 -1.315465702 -9.189871776 1 1 1 # ao
1262 1 2 2.100000 -5.101961250 -9.067733910 6.510105475 1 1 0 # st
1263 1 2 2.100000 -5.138292070 -3.048850038 6.503672592 1 1 0 # st
1264 1 3 -1.050000 -4.852463924 -0.176967197 8.128441816 1 1 0 # ob
@ -1306,7 +1306,7 @@ Atoms # full
1268 1 3 -1.050000 -4.839493952 -1.584367785 5.896222036 1 1 0 # ob
1269 1 3 -1.050000 -3.970872468 -4.089645173 6.134239507 1 1 0 # ob
1270 1 5 0.425000 -3.783613851 -1.883029740 7.995024441 1 1 0 # ho
1271 1 1 1.575000 -6.891934154 -6.162033536 9.189872068 1 1 0 # ao
1271 1 1 1.575000 -3.498056406 -5.798377013 -9.189871776 1 1 1 # ao
1272 1 2 2.100000 -2.493793945 -4.584822599 6.510105475 1 1 0 # st
1273 1 2 2.100000 -2.586459527 -7.531761349 6.503672592 1 1 0 # st
1274 1 3 -1.050000 -2.300631381 -4.659878508 8.128441816 1 1 0 # ob

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
LAMMPS data file via write_data, version 24 Oct 2015-ICMS, timestep = 60
LAMMPS data file via write_data, version 29 Aug 2024, timestep = 64, units = real
8 atoms
2 atom types
@ -9,13 +9,13 @@ LAMMPS data file via write_data, version 24 Oct 2015-ICMS, timestep = 60
9 dihedrals
1 dihedral types
-5.0000000000000000e+00 5.0000000000000000e+00 xlo xhi
-5.0000000000000000e+00 5.0000000000000000e+00 ylo yhi
-5.0000000000000000e+00 5.0000000000000000e+00 zlo zhi
-5 5 xlo xhi
-5 5 ylo yhi
-5 5 zlo zhi
Masses
1 12.0112
1 12.01115
2 1.00797
Pair Coeffs # lj/cut/coul/cut
@ -39,25 +39,25 @@ Dihedral Coeffs # opls
Atoms # full
1 1 1 -1.7999999999999999e-01 4.4520961794662339e+00 -4.8331316055118139e+00 4.9921953697666774e+00 0 1 -1
2 1 1 -1.7999999999999999e-01 -4.0208267456132498e+00 -4.9408970766661060e+00 -4.9962668603193716e+00 1 1 0
3 1 2 5.9999999999999998e-02 4.1241637410618237e+00 -3.9187715229527775e+00 4.4953501727331462e+00 0 1 -1
4 1 2 5.9999999999999998e-02 3.9927847754165149e+00 4.3246628372301563e+00 4.4708516600772406e+00 0 0 -1
5 1 2 5.9999999999999998e-02 4.0591846610420355e+00 -4.8176278098672096e+00 -3.9904372631272924e+00 0 1 0
6 1 2 5.9999999999999998e-02 -3.5762405194770461e+00 -4.0716394256255244e+00 -4.5137080084717223e+00 1 1 0
7 1 2 5.9999999999999998e-02 -3.6936651570105905e+00 4.1740778258698201e+00 -4.4511582014826949e+00 1 0 0
8 1 2 5.9999999999999998e-02 -3.6211369348857190e+00 4.9967667775234554e+00 3.9920131308240276e+00 1 0 -1
1 1 1 -0.18 4.450690671089314 -4.83133647736812 4.992428212375868 0 1 -1
2 1 1 -0.18 -4.022291647324266 -4.942324611094984 -4.995836359730008 1 1 0
3 1 2 0.06 4.1294147504666165 -3.9160894986014068 4.495489435092607 0 1 -1
4 1 2 0.06 3.9961668185396193 4.3269540139496785 4.470098784261843 0 0 -1
5 1 2 0.06 4.059021520856406 -4.816007407764785 -3.990885907539094 0 1 0
6 1 2 0.06 -3.5752328984263166 -4.071671221696795 -4.5159098704661425 1 1 0
7 1 2 0.06 -3.6980390300174055 4.172581688097945 -4.448408184535642 1 0 0
8 1 2 0.06 -3.6233701851839633 4.991333514478468 3.9918638905405723 1 0 -1
Velocities
1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
2 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
3 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
4 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
5 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
6 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
7 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
8 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
1 0 0 0
2 0 0 0
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 0 0 0
8 0 0 0
Bonds

View File

@ -2,8 +2,8 @@
MSI2LMP_LIBRARY=../frc_files
VALGRIND='valgrind -v --track-origins=yes --show-reachable=yes --leak-check=full'
MSI2LMP=../src/msi2lmp.exe
LAMMPS=../../../src/lmp_serial
MSI2LMP=../../../build-test/msi2lmp
LAMMPS=../../../build-test/lmp
CHECKDATA=./data-compare.pl
if [ ! -x $MSI2LMP ]

View File

@ -130,6 +130,7 @@ extern void *lammps_extract_pair(void *handle, const char *name);
extern int lammps_map_atom(void *handle, const void *id);
extern int lammps_extract_atom_datatype(void *handle, const char *name);
extern int lammps_extract_atom_size(void *handle, const char *name, int type);
extern void *lammps_extract_atom(void *handle, const char *name);
extern void *lammps_extract_compute(void *handle, const char *id, int, int);
@ -319,6 +320,7 @@ extern void *lammps_extract_pair(void *handle, const char *name);
extern int lammps_map_atom(void *handle, const void *id);
extern int lammps_extract_atom_datatype(void *handle, const char *name);
extern int lammps_extract_atom_size(void *handle, const char *name, int type);
extern void *lammps_extract_atom(void *handle, const char *name);
extern void *lammps_extract_compute(void *handle, const char *id, int, int);

View File

@ -49,6 +49,7 @@ protected:
if (verbose) std::cout << output;
EXPECT_THAT(output, StartsWith("LAMMPS ("));
}
void TearDown() override
{
::testing::internal::CaptureStdout();
@ -694,11 +695,10 @@ TEST_F(LibraryProperties, has_error)
class AtomProperties : public ::testing::Test {
protected:
void *lmp;
int ntypes, nlocal, nall;
AtomProperties() = default;
;
~AtomProperties() override = default;
;
void SetUp() override
{
@ -713,11 +713,30 @@ protected:
if (verbose) std::cout << output;
EXPECT_THAT(output, StartsWith("LAMMPS ("));
::testing::internal::CaptureStdout();
lammps_command(lmp, "fix props all property/atom i_one i2_two 2 d_three d2_four 2");
lammps_command(lmp, "fix rmass all property/atom mol q rmass ghost yes");
lammps_command(lmp, "region box block 0 2 0 2 0 2");
lammps_command(lmp, "create_box 1 box");
lammps_command(lmp, "mass 1 3.0");
lammps_command(lmp, "create_atoms 1 single 1.0 1.0 1.5");
lammps_command(lmp, "create_atoms 1 single 0.2 0.1 0.1");
lammps_command(lmp, "set group all mass 2.0");
lammps_command(lmp, "set atom 1 charge -1");
lammps_command(lmp, "set atom 2 charge 1");
lammps_command(lmp, "set atom 1 mol 2");
lammps_command(lmp, "set atom 2 mol 1");
lammps_command(lmp, "set atom 1 i_one -3");
lammps_command(lmp, "set atom 2 i_one 3");
lammps_command(lmp, "set atom 1 d_three -1.3");
lammps_command(lmp, "set atom 2 d_three 3.5");
lammps_command(lmp, "set atom 1 i_two[1] -3");
lammps_command(lmp, "set atom 2 i_two[2] 3");
lammps_command(lmp, "set atom * d_four[1] -1.3");
lammps_command(lmp, "set atom * d_four[2] 3.5");
ntypes = lammps_extract_setting(lmp, "ntypes");
nlocal = lammps_extract_setting(lmp, "nlocal");
nall = lammps_extract_setting(lmp, "nall");
output = ::testing::internal::GetCapturedStdout();
if (verbose) std::cout << output;
}
@ -740,14 +759,42 @@ TEST_F(AtomProperties, invalid)
TEST_F(AtomProperties, mass)
{
EXPECT_EQ(lammps_extract_atom_datatype(lmp, "mass"), LAMMPS_DOUBLE);
EXPECT_EQ(lammps_extract_atom_size(lmp, "mass", 0), ntypes + 1);
auto *mass = (double *)lammps_extract_atom(lmp, "mass");
ASSERT_NE(mass, nullptr);
ASSERT_DOUBLE_EQ(mass[1], 3.0);
EXPECT_EQ(lammps_extract_atom_datatype(lmp, "rmass"), LAMMPS_DOUBLE);
EXPECT_EQ(lammps_extract_atom_size(lmp, "rmass", 0), nall);
mass = (double *)lammps_extract_atom(lmp, "rmass");
ASSERT_NE(mass, nullptr);
ASSERT_DOUBLE_EQ(mass[0], 2.0);
ASSERT_DOUBLE_EQ(mass[1], 2.0);
}
TEST_F(AtomProperties, charge)
{
EXPECT_EQ(lammps_extract_atom_datatype(lmp, "q"), LAMMPS_DOUBLE);
EXPECT_EQ(lammps_extract_atom_size(lmp, "rmass", 0), nall);
auto *charge = (double *)lammps_extract_atom(lmp, "q");
ASSERT_NE(charge, nullptr);
ASSERT_DOUBLE_EQ(charge[0], -1.0);
ASSERT_DOUBLE_EQ(charge[1], 1.0);
}
TEST_F(AtomProperties, molecule)
{
EXPECT_EQ(lammps_extract_atom_datatype(lmp, "molecule"), LAMMPS_TAGINT);
EXPECT_EQ(lammps_extract_atom_size(lmp, "molecule", 0), nall);
auto *molecule = (tagint *)lammps_extract_atom(lmp, "molecule");
ASSERT_NE(molecule, nullptr);
ASSERT_EQ(molecule[0], 2);
ASSERT_EQ(molecule[1], 1);
}
TEST_F(AtomProperties, id)
{
EXPECT_EQ(lammps_extract_atom_datatype(lmp, "id"), LAMMPS_TAGINT);
EXPECT_EQ(lammps_extract_atom_size(lmp, "id", 0), nall);
auto *id = (tagint *)lammps_extract_atom(lmp, "id");
ASSERT_NE(id, nullptr);
ASSERT_EQ(id[0], 1);
@ -757,6 +804,7 @@ TEST_F(AtomProperties, id)
TEST_F(AtomProperties, type)
{
EXPECT_EQ(lammps_extract_atom_datatype(lmp, "type"), LAMMPS_INT);
EXPECT_EQ(lammps_extract_atom_size(lmp, "type", 0), nall);
int *type = (int *)lammps_extract_atom(lmp, "type");
ASSERT_NE(type, nullptr);
ASSERT_EQ(type[0], 1);
@ -766,6 +814,8 @@ TEST_F(AtomProperties, type)
TEST_F(AtomProperties, position)
{
EXPECT_EQ(lammps_extract_atom_datatype(lmp, "x"), LAMMPS_DOUBLE_2D);
EXPECT_EQ(lammps_extract_atom_size(lmp, "x", LMP_SIZE_ROWS), nall);
EXPECT_EQ(lammps_extract_atom_size(lmp, "x", LMP_SIZE_COLS), 3);
auto **x = (double **)lammps_extract_atom(lmp, "x");
ASSERT_NE(x, nullptr);
EXPECT_DOUBLE_EQ(x[0][0], 1.0);
@ -776,6 +826,41 @@ TEST_F(AtomProperties, position)
EXPECT_DOUBLE_EQ(x[1][2], 0.1);
}
TEST_F(AtomProperties, custom)
{
EXPECT_EQ(lammps_extract_atom_datatype(lmp, "i_one"), LAMMPS_INT);
EXPECT_EQ(lammps_extract_atom_size(lmp, "i_one", 0), nlocal);
auto *one = (int *)lammps_extract_atom(lmp, "i_one");
ASSERT_NE(one, nullptr);
EXPECT_EQ(lammps_extract_atom_datatype(lmp, "i2_two"), LAMMPS_INT_2D);
EXPECT_EQ(lammps_extract_atom_size(lmp, "i2_two", LMP_SIZE_ROWS), nlocal);
EXPECT_EQ(lammps_extract_atom_size(lmp, "i2_two", LMP_SIZE_COLS), 2);
auto **two = (int **)lammps_extract_atom(lmp, "i2_two");
ASSERT_NE(two, nullptr);
EXPECT_EQ(lammps_extract_atom_datatype(lmp, "d_three"), LAMMPS_DOUBLE);
EXPECT_EQ(lammps_extract_atom_size(lmp, "d_three", 0), nlocal);
auto *three = (double *)lammps_extract_atom(lmp, "d_three");
ASSERT_NE(three, nullptr);
EXPECT_EQ(lammps_extract_atom_datatype(lmp, "d2_four"), LAMMPS_DOUBLE_2D);
EXPECT_EQ(lammps_extract_atom_size(lmp, "d2_four", LMP_SIZE_ROWS), nlocal);
EXPECT_EQ(lammps_extract_atom_size(lmp, "d2_four", LMP_SIZE_COLS), 2);
auto **four = (double **)lammps_extract_atom(lmp, "d2_four");
ASSERT_NE(four, nullptr);
EXPECT_EQ(one[0], -3);
EXPECT_EQ(one[1], 3);
EXPECT_EQ(two[0][0], -3);
EXPECT_EQ(two[0][1], 0);
EXPECT_EQ(two[1][0], 0);
EXPECT_EQ(two[1][1], 3);
EXPECT_DOUBLE_EQ(three[0], -1.3);
EXPECT_DOUBLE_EQ(three[1], 3.5);
EXPECT_DOUBLE_EQ(four[0][0], -1.3);
EXPECT_DOUBLE_EQ(four[0][1], 3.5);
EXPECT_DOUBLE_EQ(four[1][0], -1.3);
EXPECT_DOUBLE_EQ(four[1][1], 3.5);
}
TEST(SystemSettings, kokkos)
{
if (!lammps_config_has_package("KOKKOS")) GTEST_SKIP();

View File

@ -88,10 +88,9 @@ for header in headers:
style = m[1]
if upper.match(style):
continue
if style in ['reax/c', 'reax/c/omp', 'reax/c/kk',
'reax/c/kk/device', 'reax/c/kk/host',
'reax/c/species', 'reax/c/bonds',
'reax/c/species/kk', 'reax/c/bonds/kk', 'meam/c']:
if style in ['lj/sdk', 'lj/sdk/coul/long', 'lj/sdk/coul/msm', 'sdk', 'lj/sdk/gpu',
'lj/sdk/coul/long/gpu', 'lj/sdk/omp', 'lj/sdk/coul/long/omp', 'sdk/omp',
'lj/sdk/coul/msm/omp', 'lj/sdk/kk', 'lj/sdk/coul/long/kk', 'sdk/kk']:
continue
# detect, process, and flag suffix styles:
@ -176,11 +175,12 @@ def check_tests(name,styles,yaml,search,skip=()):
counter = 0
counter += check_tests('pair',pair,'*-pair-*.yaml',
'.*pair_style:\\s*((\\S+).*)?',skip=('meam','lj/sf'))
'.*pair_style:\\s*((\\S+).*)?',
skip=('lj/sf','lj/sdk', 'lj/sdk/coul/long', 'lj/sdk/coul/msm'))
counter += check_tests('bond',bond,'bond-*.yaml',
'.*bond_style:\\s*((\\S+).*)?')
counter += check_tests('angle',angle,'angle-*.yaml',
'.*angle_style:\\s*((\\S+).*)?')
'.*angle_style:\\s*((\\S+).*)?', skip=('sdk'))
counter += check_tests('dihedral',dihedral,'dihedral-*.yaml',
'.*dihedral_style:\\s*((\\S+).*)?')
counter += check_tests('improper',improper,'improper-*.yaml',

View File

@ -17,6 +17,17 @@ MODULE keepstuff
[ CHARACTER(LEN=40) :: &
'create_atoms 1 single &', &
' 0.2 0.1 0.1' ]
CHARACTER(LEN=60), DIMENSION(18), PARAMETER :: prop_input = &
[ CHARACTER(LEN=60) :: 'fix 1 all nve', 'mass 1 3.0', &
'fix 2 all property/atom mol q rmass ghost yes', &
'fix 3 all property/atom i_one i2_two 2 d_three d2_four 2', &
'set group all mass 2.0', 'set atom 1 charge -1', &
'set atom 2 charge 1', 'set atom 1 mol 2', 'set atom 2 mol 1', &
'set atom 1 i_one -3', 'set atom 2 i_one 3', &
'set atom 1 d_three -1.3', 'set atom 2 d_three 3.5', &
'set atom 1 i_two[1] -3', 'set atom 2 i_two[2] 3', &
'set atom * d_four[1] -1.3', 'set atom * d_four[2] 3.5', &
'run 0 post no' ]
CHARACTER(LEN=40), DIMENSION(1), PARAMETER :: more_input = &
[ CHARACTER(LEN=40) :: 'create_atoms 1 single 0.5 0.5 0.5' ]
CHARACTER(LEN=40), DIMENSION(3), PARAMETER :: pair_input = &
@ -63,4 +74,3 @@ CONTAINS
END FUNCTION f2c_string
END MODULE keepstuff

View File

@ -24,12 +24,13 @@ END SUBROUTINE f_lammps_close
SUBROUTINE f_lammps_setup_extract_atom() BIND(C)
USE LIBLAMMPS
USE keepstuff, ONLY : lmp, big_input, cont_input, pair_input
USE keepstuff, ONLY : lmp, big_input, cont_input, pair_input, prop_input
IMPLICIT NONE
CALL lmp%commands_list(big_input)
CALL lmp%commands_list(cont_input)
CALL lmp%commands_list(pair_input)
CALL lmp%commands_list(prop_input)
END SUBROUTINE f_lammps_setup_extract_atom
FUNCTION f_lammps_extract_atom_mass() BIND(C)
@ -44,6 +45,19 @@ FUNCTION f_lammps_extract_atom_mass() BIND(C)
f_lammps_extract_atom_mass = mass(1)
END FUNCTION f_lammps_extract_atom_mass
FUNCTION f_lammps_extract_atom_mass_size() BIND(C)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_double, c_int
USE LIBLAMMPS
USE keepstuff, ONLY : lmp
IMPLICIT NONE
INTEGER(c_int) :: f_lammps_extract_atom_mass_size, ntypes
REAL(c_double), DIMENSION(:), POINTER :: mass => NULL()
ntypes = lmp%extract_setting('ntypes')
mass = lmp%extract_atom('mass')
f_lammps_extract_atom_mass_size = SIZE(mass)
END FUNCTION f_lammps_extract_atom_mass_size
FUNCTION f_lammps_extract_atom_tag_int(i) BIND(C)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_double, c_int
USE LIBLAMMPS
@ -83,6 +97,18 @@ FUNCTION f_lammps_extract_atom_type(i) BIND(C)
f_lammps_extract_atom_type = atype(i)
END FUNCTION f_lammps_extract_atom_type
FUNCTION f_lammps_extract_atom_type_size() BIND(C)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_int
USE LIBLAMMPS
USE keepstuff, ONLY : lmp
IMPLICIT NONE
INTEGER(c_int) :: f_lammps_extract_atom_type_size
INTEGER(c_int), DIMENSION(:), POINTER :: atype => NULL()
atype = lmp%extract_atom('type')
f_lammps_extract_atom_type_size = size(atype)
END FUNCTION f_lammps_extract_atom_type_size
FUNCTION f_lammps_extract_atom_mask(i) BIND(C)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_int
USE LIBLAMMPS
@ -109,6 +135,19 @@ SUBROUTINE f_lammps_extract_atom_x(i, x) BIND(C)
x = xptr(:,i)
END SUBROUTINE f_lammps_extract_atom_x
FUNCTION f_lammps_extract_atom_x_size(i) BIND(C)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_double, c_int
USE LIBLAMMPS
USE keepstuff, ONLY : lmp
IMPLICIT NONE
INTEGER(c_int), INTENT(IN), VALUE :: i
INTEGER(c_int) :: f_lammps_extract_atom_x_size
REAL(c_double), DIMENSION(:,:), POINTER :: xptr => NULL()
xptr = lmp%extract_atom('x')
f_lammps_extract_atom_x_size = SIZE(xptr, i)
END FUNCTION f_lammps_extract_atom_x_size
SUBROUTINE f_lammps_extract_atom_v(i, v) BIND(C)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_double, c_int
USE LIBLAMMPS
@ -121,3 +160,16 @@ SUBROUTINE f_lammps_extract_atom_v(i, v) BIND(C)
vptr = lmp%extract_atom('v')
v = vptr(:,i)
END SUBROUTINE f_lammps_extract_atom_v
FUNCTION f_lammps_extract_atom_v_size(i) BIND(C)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_double, c_int
USE LIBLAMMPS
USE keepstuff, ONLY : lmp
IMPLICIT NONE
INTEGER(c_int), INTENT(IN), VALUE :: i
INTEGER(c_int) :: f_lammps_extract_atom_v_size
REAL(c_double), DIMENSION(:,:), POINTER :: xptr => NULL()
xptr = lmp%extract_atom('v')
f_lammps_extract_atom_v_size = SIZE(xptr, i)
END FUNCTION f_lammps_extract_atom_v_size

View File

@ -1,6 +1,7 @@
// unit tests for extracting Atom class data from a LAMMPS instance through the
// Fortran wrapper
#include "atom.h"
#include "lammps.h"
#include "library.h"
#include <cstdint>
@ -16,12 +17,16 @@ void *f_lammps_with_args();
void f_lammps_close();
void f_lammps_setup_extract_atom();
double f_lammps_extract_atom_mass();
int f_lammps_extract_atom_mass_size();
int f_lammps_extract_atom_tag_int(int);
int64_t f_lammps_extract_atom_tag_int64(int64_t);
int f_lammps_extract_atom_type(int);
int f_lammps_extract_atom_type_size();
int f_lammps_extract_atom_mask(int);
void f_lammps_extract_atom_x(int, double *);
int f_lammps_extract_atom_x_size(int);
void f_lammps_extract_atom_v(int, double *);
int f_lammps_extract_atom_v_size(int);
}
class LAMMPS_extract_atom : public ::testing::Test {
@ -50,7 +55,9 @@ protected:
TEST_F(LAMMPS_extract_atom, mass)
{
f_lammps_setup_extract_atom();
EXPECT_DOUBLE_EQ(f_lammps_extract_atom_mass(), 2.0);
int ntypes = lmp->atom->ntypes;
EXPECT_DOUBLE_EQ(f_lammps_extract_atom_mass(), 3.0);
EXPECT_EQ(f_lammps_extract_atom_mass_size(), ntypes + 1);
};
TEST_F(LAMMPS_extract_atom, tag)
@ -68,8 +75,10 @@ TEST_F(LAMMPS_extract_atom, tag)
TEST_F(LAMMPS_extract_atom, type)
{
f_lammps_setup_extract_atom();
int nall = lmp->atom->nlocal + lmp->atom->nghost;
EXPECT_EQ(f_lammps_extract_atom_type(1), 1);
EXPECT_EQ(f_lammps_extract_atom_type(2), 1);
EXPECT_EQ(f_lammps_extract_atom_type_size(), nall);
};
TEST_F(LAMMPS_extract_atom, mask)
@ -86,6 +95,7 @@ TEST_F(LAMMPS_extract_atom, mask)
TEST_F(LAMMPS_extract_atom, x)
{
f_lammps_setup_extract_atom();
int nall = lmp->atom->nlocal + lmp->atom->nghost;
double x1[3];
double x2[3];
f_lammps_extract_atom_x(1, x1);
@ -96,11 +106,15 @@ TEST_F(LAMMPS_extract_atom, x)
EXPECT_DOUBLE_EQ(x2[0], 0.2);
EXPECT_DOUBLE_EQ(x2[1], 0.1);
EXPECT_DOUBLE_EQ(x2[2], 0.1);
// in Fortran row and column are swapped
EXPECT_EQ(f_lammps_extract_atom_x_size(1), 3);
EXPECT_EQ(f_lammps_extract_atom_x_size(2), nall);
}
TEST_F(LAMMPS_extract_atom, v)
{
f_lammps_setup_extract_atom();
int nall = lmp->atom->nlocal + lmp->atom->nghost;
double v1[3];
double v2[3];
f_lammps_extract_atom_v(1, v1);
@ -117,4 +131,13 @@ TEST_F(LAMMPS_extract_atom, v)
EXPECT_DOUBLE_EQ(v1[0], 1.0);
EXPECT_DOUBLE_EQ(v1[1], 2.0);
EXPECT_DOUBLE_EQ(v1[2], 3.0);
// in Fortran row and column are swapped!
EXPECT_EQ(f_lammps_extract_atom_v_size(1), 3);
EXPECT_EQ(f_lammps_extract_atom_v_size(2), lmp->atom->nlocal);
lammps_command(lmp, "comm_modify vel yes");
lammps_command(lmp, "run 0 post no");
EXPECT_EQ(f_lammps_extract_atom_v_size(1), 3);
EXPECT_EQ(f_lammps_extract_atom_v_size(2), nall);
}
// TODO: write tests for custom properties

View File

@ -155,67 +155,104 @@ class PythonNumpy(unittest.TestCase):
self.assertEqual(values[1,0], 1.5)
self.assertEqual(values[1,3], 1.5)
def testExtractAtomDeprecated(self):
self.lmp.command("units lj")
self.lmp.command("atom_style atomic")
self.lmp.command("atom_modify map array")
self.lmp.command("region box block 0 2 0 2 0 2")
self.lmp.command("create_box 1 box")
x = [
1.0, 1.0, 1.0,
1.0, 1.0, 1.5
]
types = [1, 1]
self.assertEqual(self.lmp.create_atoms(2, id=None, type=types, x=x), 2)
nlocal = self.lmp.extract_global("nlocal", LAMMPS_INT)
self.assertEqual(nlocal, 2)
ident = self.lmp.numpy.extract_atom_iarray("id", nlocal, dim=1)
self.assertEqual(len(ident), 2)
ntypes = self.lmp.extract_global("ntypes", LAMMPS_INT)
self.assertEqual(ntypes, 1)
x = self.lmp.numpy.extract_atom_darray("x", nlocal, dim=3)
v = self.lmp.numpy.extract_atom_darray("v", nlocal, dim=3)
self.assertEqual(len(x), 2)
self.assertTrue((x[0] == (1.0, 1.0, 1.0)).all())
self.assertTrue((x[1] == (1.0, 1.0, 1.5)).all())
self.assertEqual(len(v), 2)
def testExtractAtom(self):
self.lmp.command("units lj")
self.lmp.command("atom_style atomic")
self.lmp.command("atom_modify map array")
self.lmp.command("region box block 0 2 0 2 0 2")
self.lmp.command("create_box 1 box")
self.lmp.command("create_box 2 box")
x = [
1.0, 1.0, 1.0,
1.0, 1.0, 1.5
]
x = [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.5, 1.5, 1.0, 1.0 ]
types = [1, 2, 1]
ids = [1, 2, 3]
self.assertEqual(self.lmp.create_atoms(3, id=ids, type=types, x=x), 3)
self.lmp.command("mass * 2.0")
self.lmp.command("pair_style zero 1.1")
self.lmp.command("pair_coeff * *")
self.lmp.command("fix props all property/atom i_one i2_two 2 d_three d2_four 2");
self.lmp.command("fix rmass all property/atom mol q rmass ghost yes");
self.lmp.command("fix 1 all nve")
self.lmp.command("run 0 post no")
ntypes = self.lmp.extract_setting("ntypes");
nlocal = self.lmp.extract_setting("nlocal");
nall = self.lmp.extract_setting("nall");
self.assertEqual(nlocal, 3)
self.assertEqual(ntypes, 2)
self.assertEqual(nall, 63)
types = [1, 1]
self.lmp.command("set atom 1 charge -1");
self.lmp.command("set atom 2 charge 1");
self.lmp.command("set atom 3 charge 0");
self.lmp.command("set atom * mol 2");
self.lmp.command("set atom 2 mol 1");
self.lmp.command("set atom 1 i_one -3");
self.lmp.command("set atom 2 i_one 3");
self.lmp.command("set atom 2 d_three -1.3");
self.lmp.command("set atom 3 d_three 3.5");
self.lmp.command("set atom 1 i_two[1] -3");
self.lmp.command("set atom 2 i_two[2] 3");
self.lmp.command("set atom * d_four[1] -1.3");
self.lmp.command("set atom * d_four[2] 3.5");
self.lmp.command("run 0 post no")
self.assertEqual(self.lmp.create_atoms(2, id=None, type=types, x=x), 2)
nlocal = self.lmp.extract_global("nlocal")
self.assertEqual(nlocal, 2)
mass = self.lmp.numpy.extract_atom("mass")
self.assertEqual(len(mass), ntypes + 1)
self.assertTrue((mass == (0.0, 2.0, 2.0)).all())
rmass = self.lmp.numpy.extract_atom("rmass")
self.assertEqual(len(rmass), nall)
self.assertTrue((rmass[0:3] == (0.0, 0.0, 0.0)).all())
charge = self.lmp.numpy.extract_atom("q")
self.assertEqual(len(charge), nall)
self.assertTrue((charge[0:3] == (-1.0, 1.0, 0.0)).all())
molecule = self.lmp.numpy.extract_atom("molecule")
self.assertEqual(len(molecule), nall)
self.assertTrue((molecule[0:3] == (2, 1, 2)).all())
ident = self.lmp.numpy.extract_atom("id")
self.assertEqual(len(ident), 2)
self.assertEqual(len(ident), nall)
self.assertTrue((ident[0:3] == (1, 2, 3)).all())
ntypes = self.lmp.extract_global("ntypes")
self.assertEqual(ntypes, 1)
atype = self.lmp.numpy.extract_atom("type")
self.assertEqual(len(atype), nall)
self.assertTrue((atype[0:3] == (1, 2, 1)).all())
x = self.lmp.numpy.extract_atom("x")
v = self.lmp.numpy.extract_atom("v")
self.assertEqual(len(x), 2)
self.assertEqual(len(x), nall)
self.assertEqual(len(x[0]), 3)
self.assertTrue((x[0] == (1.0, 1.0, 1.0)).all())
self.assertTrue((x[1] == (1.0, 1.0, 1.5)).all())
self.assertEqual(len(v), 2)
self.assertTrue((x[2] == (1.5, 1.0, 1.0)).all())
self.assertEqual(len(v), nlocal)
self.assertEqual(len(v[0]), 3)
self.lmp.command("comm_modify vel yes");
self.lmp.command("run 0 post no")
v = self.lmp.numpy.extract_atom("v")
self.assertEqual(len(v), nall)
one = self.lmp.numpy.extract_atom("i_one")
two = self.lmp.numpy.extract_atom("i2_two")
three = self.lmp.numpy.extract_atom("d_three")
four = self.lmp.numpy.extract_atom("d2_four")
self.assertEqual(len(one), nlocal)
self.assertTrue((one == (-3, 3, 0)).all())
self.assertEqual(len(two), nlocal)
self.assertEqual(len(two[0]), 2)
self.assertTrue((two[0] == (-3, 0)).all())
self.assertTrue((two[1] == (0, 3)).all())
self.assertTrue((two[2] == (0, 0)).all())
self.assertEqual(len(three), nlocal)
self.assertTrue((three == (0.0, -1.3, 3.5)).all())
self.assertEqual(len(four), nlocal)
self.assertEqual(len(four[0]), 2)
self.assertTrue((four[0] == (-1.3, 3.5)).all())
self.assertTrue((four[1] == (-1.3, 3.5)).all())
self.assertTrue((four[2] == (-1.3, 3.5)).all())
@unittest.skipIf(not has_full,"Gather bonds test")
def testGatherBond_newton_on(self):