Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ if(DEFINED _srreal_saved_suffixes)
endforeach()
endif()

# Needs nvcc to build; without a CUDA device the CPU kernels are used.
option(SRREAL_CUDA "Build the CUDA calculation kernels" OFF)
set(LIBDIFFPY_CUDA ${SRREAL_CUDA})

# Embed libdiffpy as an OBJECT library: every object is linked, so its static
# factory/serialization registrars are kept.
set(LIBDIFFPY_BUILD_OBJECT_LIB ON)
Expand Down
13 changes: 13 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ libdiffpy download. GitHub's automatically generated source archives omit
submodule contents; use a recursive clone or a packaged sdist instead.
A C++23 compiler, Boost.Serialization, GSL, and the Python build dependencies
must still be installed separately, including for an offline build.
CMake builds the SIMD kernels when it finds xsimd 14 or newer.

To enable the optional CUDA kernels in a source build, install the CUDA
toolkit with ``nvcc`` and run ::

pip install . -C cmake.define.SRREAL_CUDA=ON

Set ``CUDACXX`` if ``nvcc`` is not in the ``PATH``.

Getting Started
---------------
Expand All @@ -148,6 +156,11 @@ directory ::

pip install -e .

The default build type is Release. For example, to test a debug CUDA build ::

python -m pip install -e ".[test]" -C cmake.build-type=Debug -C cmake.define.SRREAL_CUDA=ON
python -m pytest

To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit
hooks.

Expand Down
9 changes: 9 additions & 0 deletions docs/source/api/diffpy.srreal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ diffpy.srreal.bvscalculator module
:undoc-members:
:show-inheritance:

diffpy.srreal.calculationkernel module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: diffpy.srreal.calculationkernel

.. autofunction:: diffpy.srreal.calculationkernel.availableCalculationKernels()
.. autofunction:: diffpy.srreal.calculationkernel.getCalculationKernel()
.. autofunction:: diffpy.srreal.calculationkernel.setCalculationKernel(name)

diffpy.srreal.eventticker module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
2 changes: 1 addition & 1 deletion extern/libdiffpy
Submodule libdiffpy updated 92 files
+153 −0 .github/scripts/check-kernel-isolation.py
+2 −1 .github/scripts/configure-tests.py
+16 −3 .github/workflows/matrix-and-codecov.yml
+1 −1 .pre-commit-config.yaml
+45 −4 CMakeLists.txt
+53 −19 CMakePresets.json
+120 −0 cmake/CalculationKernels.cmake
+37 −0 cmake/Cuda.cmake
+6 −0 cmake/libdiffpyConfig.cmake.in
+38 −2 docs/source/development.rst
+40 −0 news/cuda.rst
+59 −0 news/faster-pdf.rst
+23 −0 news/kernel.rst
+1 −0 requirements/build.txt
+27 −10 src/diffpy/EventTicker.cpp
+7 −2 src/diffpy/EventTicker.hpp
+2 −6 src/diffpy/HasClassRegistry.ipp
+4 −0 src/diffpy/features.tpl
+86 −0 src/diffpy/hash.hpp
+16 −8 src/diffpy/srreal/AtomicStructureAdapter.cpp
+3 −0 src/diffpy/srreal/AtomicStructureAdapter.hpp
+2 −7 src/diffpy/srreal/BVParam.cpp
+2 −2 src/diffpy/srreal/BVSCalculator.cpp
+20 −8 src/diffpy/srreal/BaseBondGenerator.cpp
+13 −0 src/diffpy/srreal/BaseBondGenerator.hpp
+188 −72 src/diffpy/srreal/BaseDebyeSum.cpp
+36 −6 src/diffpy/srreal/BaseDebyeSum.hpp
+43 −0 src/diffpy/srreal/CalculationKernel.hpp
+4 −0 src/diffpy/srreal/ConstantPeakWidth.cpp
+3 −0 src/diffpy/srreal/ConstantPeakWidth.hpp
+8 −0 src/diffpy/srreal/CroppedGaussianProfile.cpp
+4 −0 src/diffpy/srreal/CroppedGaussianProfile.hpp
+117 −80 src/diffpy/srreal/CrystalStructureAdapter.cpp
+12 −19 src/diffpy/srreal/CrystalStructureAdapter.hpp
+6 −0 src/diffpy/srreal/DebyePDFCalculator.cpp
+1 −0 src/diffpy/srreal/DebyePDFCalculator.hpp
+6 −4 src/diffpy/srreal/DebyeWallerPeakWidth.cpp
+3 −0 src/diffpy/srreal/DebyeWallerPeakWidth.hpp
+34 −0 src/diffpy/srreal/GaussianProfile.cpp
+12 −0 src/diffpy/srreal/GaussianProfile.hpp
+13 −12 src/diffpy/srreal/JeongPeakWidth.cpp
+3 −0 src/diffpy/srreal/JeongPeakWidth.hpp
+60 −58 src/diffpy/srreal/Lattice.cpp
+25 −39 src/diffpy/srreal/Lattice.hpp
+41 −32 src/diffpy/srreal/PDFCalculator.cpp
+6 −4 src/diffpy/srreal/PDFCalculator.hpp
+94 −44 src/diffpy/srreal/PDFUtils.cpp
+124 −65 src/diffpy/srreal/PQEvaluator.cpp
+14 −1 src/diffpy/srreal/PQEvaluator.hpp
+27 −6 src/diffpy/srreal/PairQuantity.cpp
+68 −6 src/diffpy/srreal/PairQuantity.hpp
+14 −0 src/diffpy/srreal/PeakProfile.cpp
+6 −0 src/diffpy/srreal/PeakProfile.hpp
+411 −42 src/diffpy/srreal/PeriodicStructureAdapter.cpp
+146 −5 src/diffpy/srreal/PeriodicStructureAdapter.hpp
+73 −41 src/diffpy/srreal/R3linalg.cpp
+205 −134 src/diffpy/srreal/R3linalg.hpp
+102 −0 src/diffpy/srreal/R3linalg.ipp
+10 −4 src/diffpy/srreal/ScatteringFactorTable.cpp
+4 −0 src/diffpy/srreal/ScatteringFactorTable.hpp
+15 −17 src/diffpy/srreal/StructureAdapter.cpp
+33 −0 src/diffpy/srreal/kernels/CalculationKernelAVX2.cpp
+33 −0 src/diffpy/srreal/kernels/CalculationKernelAVX512.cpp
+154 −0 src/diffpy/srreal/kernels/CalculationKernelCPU.cpp
+587 −0 src/diffpy/srreal/kernels/CalculationKernelCuda.cu
+183 −0 src/diffpy/srreal/kernels/CalculationKernelDispatch.cpp
+266 −0 src/diffpy/srreal/kernels/CalculationKernelImpl.hpp
+56 −0 src/diffpy/srreal/kernels/CalculationKernelMSVC.hpp
+32 −0 src/diffpy/srreal/kernels/CalculationKernelNEON.cpp
+299 −0 src/diffpy/srreal/kernels/CalculationKernelSIMD.ipp
+32 −0 src/diffpy/srreal/kernels/CalculationKernelSSE2.cpp
+81 −0 src/diffpy/srreal/kernels/CalculationKernelScalar.cpp
+168 −0 src/diffpy/srreal/kernels/PairGeometry.hpp
+336 −0 src/diffpy/srreal/kernels/PairTable.cpp
+231 −0 src/diffpy/srreal/kernels/PairTable.hpp
+63 −51 src/diffpy/srreal/scatteringfactordata.cpp
+17 −1 src/tests/CMakeLists.txt
+620 −0 src/tests/TestBondGeneratorBatching.cpp
+484 −0 src/tests/TestCalculationKernel.cpp
+527 −0 src/tests/TestCalculationKernelCuda.cpp
+170 −0 src/tests/TestDebyePDFCalculator.cpp
+68 −0 src/tests/TestHash.cpp
+33 −0 src/tests/TestLattice.cpp
+184 −0 src/tests/TestPDFUtils.cpp
+319 −7 src/tests/TestPQEvaluator.cpp
+1,028 −0 src/tests/TestPairTable.cpp
+3 −0 src/tests/TestPeakWidthModel.cpp
+198 −0 src/tests/TestR3linalg.cpp
+165 −0 src/tests/TestThreads.cpp
+157 −0 src/tests/pair_test_helpers.hpp
+39 −7 src/tests/test_helpers.cpp
+76 −0 src/tests/test_helpers.hpp
38 changes: 38 additions & 0 deletions news/cuda.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
**Added:**

* The ``diffpy.srreal.calculationkernel`` module selects the kernel of PDF
and Debye calculations.
* Optional ``cuda`` and ``cuda-mixed`` kernels, included in the Windows and
Linux x86-64 wheels (which also run without a GPU) and enabled in source
builds with ``SRREAL_CUDA=ON``.
* ``AtomicStructureAdapter.getAtomArrays`` and ``setAtomArrays`` read and
replace all atom data in bulk.

**Changed:**

* Full PDF and Debye calculations use multithreaded, batched CPU sums, with
SIMD kernels when built with xsimd (always in wheels).
* ``OPTIMIZED`` can choose a full calculation when it costs less than updating
changed atoms. ``evaluatortypeused`` then reports ``"BASIC"``.
* Conversion of ``diffpy.structure`` and ``pyobjcryst`` structures is faster.

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* ``DebyePDFCalculator`` uses each site's own occupancy when several sites
share an element.
* ``CrystalStructureAdapter.getEquivalentAtoms`` now checks the index against
the number of sites, fixing incorrect exceptions and a possible crash.
* ``OPTIMIZED`` recalculates when a change of adapter class changes the
structure, for example when a cluster becomes periodic.

**Security:**

* <news item>
43 changes: 38 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,31 +67,64 @@ skip = ["*-musllinux_*"]
test-extras = ["test"]
test-command = "pytest {project}/tests"

[tool.cibuildwheel.config-settings]
"cmake.define.SRREAL_STATIC_DEPS" = "ON"
"cmake.define.VCPKG_MANIFEST_INSTALL" = "OFF"
"cmake.define.CMAKE_REQUIRE_FIND_PACKAGE_xsimd" = "ON"

[tool.cibuildwheel.linux]
archs = ["x86_64"]
config-settings = { "cmake.define.SRREAL_STATIC_DEPS" = "ON", "cmake.define.SRREAL_DEPS_LICENSE_DIR" = "/opt/srreal-deps/licenses", "cmake.define.CMAKE_TOOLCHAIN_FILE" = "/opt/srreal-deps/vcpkg/scripts/buildsystems/vcpkg.cmake", "cmake.define.VCPKG_INSTALLED_DIR" = "/opt/srreal-deps/installed", "cmake.define.VCPKG_MANIFEST_INSTALL" = "OFF" }
environment = { CUDACXX = "/usr/local/cuda-13.5/bin/nvcc" }
test-environment = { CUDA_VISIBLE_DEVICES = "-1" }
inherit.config-settings = "append"

[tool.cibuildwheel.linux.config-settings]
"cmake.define.SRREAL_CUDA" = "ON"
"cmake.define.SRREAL_DEPS_LICENSE_DIR" = "/opt/srreal-deps/licenses"
"cmake.define.CMAKE_TOOLCHAIN_FILE" = "/opt/srreal-deps/vcpkg/scripts/buildsystems/vcpkg.cmake"
"cmake.define.VCPKG_INSTALLED_DIR" = "/opt/srreal-deps/installed"

[tool.cibuildwheel.macos]
archs = ["native"]
# Keep in sync with VCPKG_OSX_DEPLOYMENT_TARGET in tools/vcpkg-triplets.
environment = { MACOSX_DEPLOYMENT_TARGET = "11.0" }
config-settings = { "cmake.define.SRREAL_STATIC_DEPS" = "ON", "cmake.define.SRREAL_DEPS_LICENSE_DIR" = "/tmp/srreal-deps/licenses", "cmake.define.CMAKE_TOOLCHAIN_FILE" = "/tmp/srreal-deps/vcpkg/scripts/buildsystems/vcpkg.cmake", "cmake.define.VCPKG_INSTALLED_DIR" = "/tmp/srreal-deps/installed", "cmake.define.VCPKG_MANIFEST_INSTALL" = "OFF" }
inherit.config-settings = "append"

[tool.cibuildwheel.macos.config-settings]
"cmake.define.SRREAL_DEPS_LICENSE_DIR" = "/tmp/srreal-deps/licenses"
"cmake.define.CMAKE_TOOLCHAIN_FILE" = "/tmp/srreal-deps/vcpkg/scripts/buildsystems/vcpkg.cmake"
"cmake.define.VCPKG_INSTALLED_DIR" = "/tmp/srreal-deps/installed"

# No Windows ARM64 wheels.
[tool.cibuildwheel.windows]
archs = ["AMD64"]
before-all = "powershell -NoProfile -ExecutionPolicy Bypass -File {project}/tools/install-vcpkg-deps.ps1 C:/srreal-deps srreal-x64-windows"
config-settings = { "cmake.define.SRREAL_STATIC_DEPS" = "ON", "cmake.define.SRREAL_DEPS_LICENSE_DIR" = "C:/srreal-deps/licenses", "cmake.define.CMAKE_TOOLCHAIN_FILE" = "C:/srreal-deps/vcpkg/scripts/buildsystems/vcpkg.cmake", "cmake.define.VCPKG_INSTALLED_DIR" = "C:/srreal-deps/installed", "cmake.define.VCPKG_MANIFEST_INSTALL" = "OFF", "cmake.define.VCPKG_TARGET_TRIPLET" = "srreal-x64-windows" }
environment = { CUDA_PATH_V13_5 = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.5" }
test-environment = { CUDA_VISIBLE_DEVICES = "-1" }
before-all = [
"pwsh -NoProfile -ExecutionPolicy Bypass -File {project}/tools/install-wheel-cuda.ps1 C:/srreal-deps",
"powershell -NoProfile -ExecutionPolicy Bypass -File {project}/tools/install-vcpkg-deps.ps1 C:/srreal-deps srreal-x64-windows",
]
inherit.config-settings = "append"
before-build = "pip install delvewheel"
# Other diffpy distributions also install diffpy/__init__.py. Keep the DLL
# loader in diffpy.srreal and use the runtime matching the build toolset.
repair-wheel-command = "delvewheel repair --namespace-pkg diffpy --add-path C:/srreal-deps/redist -w {dest_dir} {wheel}"

[tool.cibuildwheel.windows.config-settings]
"cmake.define.SRREAL_CUDA" = "ON"
"cmake.define.SRREAL_DEPS_LICENSE_DIR" = "C:/srreal-deps/licenses"
"cmake.define.CMAKE_TOOLCHAIN_FILE" = "C:/srreal-deps/vcpkg/scripts/buildsystems/vcpkg.cmake"
"cmake.define.VCPKG_INSTALLED_DIR" = "C:/srreal-deps/installed"
"cmake.define.VCPKG_TARGET_TRIPLET" = "srreal-x64-windows"

# One vcpkg triplet per architecture; see tools/vcpkg-triplets.
[[tool.cibuildwheel.overrides]]
select = "*-manylinux_x86_64"
inherit.config-settings = "append"
before-all = "bash {project}/tools/install-vcpkg-deps.sh /opt/srreal-deps srreal-x64-linux"
before-all = [
"bash {project}/tools/install-wheel-cuda.sh /opt/srreal-deps",
"bash {project}/tools/install-vcpkg-deps.sh /opt/srreal-deps srreal-x64-linux",
]
config-settings = { "cmake.define.VCPKG_TARGET_TRIPLET" = "srreal-x64-linux" }

[[tool.cibuildwheel.overrides]]
Expand Down
1 change: 1 addition & 0 deletions requirements/conda.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
libboost-devel
gsl
xsimd>=14
diffpy.structure
periodictable
nanobind>=3.1,<4
Expand Down
87 changes: 53 additions & 34 deletions src/diffpy/srreal/_objcrystconverters.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import numpy as np

from diffpy.srreal.srreal_ext import (
Atom,
AtomicStructureAdapter,
CrystalStructureAdapter,
)
Expand All @@ -23,61 +22,83 @@ def _check_type(obj, name):
raise TypeError(f"Expected a pyobjcryst {name} object.")


def _atom_from_scattering_power(sp):
atom = Atom()
atom.atomtype = sp.GetSymbol()
atom.anisotropy = not sp.IsIsotropic()
if atom.anisotropy:
bij = np.array(
[[sp.GetBij(i, j) for j in range(1, 4)] for i in range(1, 4)]
)
else:
bij = np.eye(3) * sp.GetBiso()
atom.uij_cartn = bij / (8 * np.pi**2)
return atom
def _power_arrays(powers):
"""Return atom types, anisotropy flags and U tensors of scattering
powers, in pyobjcryst coordinates."""
n = len(powers)
atomtypes = [sp.GetSymbol() for sp in powers]
anisotropy = np.fromiter((not sp.IsIsotropic() for sp in powers), bool, n)
biso = np.fromiter((sp.GetBiso() for sp in powers), float, n)
bij = np.zeros((n, 3, 3))
for k in range(3):
bij[:, k, k] = biso
for i in np.flatnonzero(anisotropy):
sp = powers[i]
bij[i] = [[sp.GetBij(j, k) for k in (1, 2, 3)] for j in (1, 2, 3)]
return atomtypes, anisotropy, bij / (8 * np.pi**2)


def convertObjCrystMolecule(molecule):
"""Copy molecule atoms in local Cartesian coordinates, omitting
dummies."""
_check_type(molecule, "Molecule")
adapter = AtomicStructureAdapter()
adapter.reserve(molecule.GetNbComponent())
powers, xyz, occupancy = [], [], []
for i in range(molecule.GetNbComponent()):
source = molecule.GetAtom(i)
if source.IsDummy():
continue
atom = _atom_from_scattering_power(source.GetScatteringPower())
atom.xyz_cartn = [source.X, source.Y, source.Z]
atom.occupancy = source.Occupancy
adapter.append(atom)
powers.append(source.GetScatteringPower())
xyz.append((source.X, source.Y, source.Z))
occupancy.append(source.Occupancy)
atomtypes, anisotropy, uij = _power_arrays(powers)
adapter.setAtomArrays(atomtypes, xyz, occupancy, anisotropy, uij)
return adapter


def _crystal_components(crystal):
"""Read the asymmetric unit in crystal order."""
from pyobjcryst._pyobjcryst import Crystal

for name in (
"GetScatteringComponentList",
"GetNbScatterer",
"GetScatterer",
):
method = getattr(crystal, name)
if getattr(method, "__self__", None) is not crystal or getattr(
method, "__func__", None
) is not getattr(Crystal, name):
return crystal.GetScatteringComponentList()
return [
component
for i in range(crystal.GetNbScatterer())
for component in crystal.GetScatterer(i).GetScatteringComponentList()
]


def convertObjCrystCrystal(crystal):
"""Copy the asymmetric unit and complete space-group symmetry
operations."""
_check_type(crystal, "Crystal")
# The master clock does not track all changes to the crystal's children.
adapter = CrystalStructureAdapter()
lattice = [crystal.GetLatticePar(i) for i in range(6)]
lattice[3:] = np.degrees(lattice[3:])
adapter.setLatPar(*lattice)
components = crystal.GetScatteringComponentList()
adapter.reserve(len(components))
for source in components:
powers, xyz, occupancy = [], [], []
for source in _crystal_components(crystal):
sp = source.mpScattPow
if sp is None:
continue
atom = _atom_from_scattering_power(sp)
atom.xyz_cartn = [source.mX, source.mY, source.mZ]
atom.occupancy = source.mOccupancy
# Isotropic U is already Cartesian. Only anisotropic U follows the
# lattice transformation; coordinates always need that transformation.
uij = atom.uij_cartn.copy()
adapter.toCartesian(atom)
if not atom.anisotropy:
atom.uij_cartn = uij
adapter.append(atom)
powers.append(sp)
xyz.append((source.mX, source.mY, source.mZ))
occupancy.append(source.mOccupancy)
atomtypes, anisotropy, uij = _power_arrays(powers)
# isotropic U is already Cartesian
adapter._setLatticeAtomArrays(
atomtypes, xyz, occupancy, anisotropy, uij, isotropic_cartesian=True
)

sg = crystal.GetSpaceGroup()
operations = [
Expand All @@ -90,7 +111,5 @@ def convertObjCrystCrystal(crystal):
operations += [(-r, inversion - t) for r, t in operations]
if len(operations) != sg.GetNbSymmetrics():
raise ValueError("Inconsistent pyobjcryst space-group operations.")
for rotation, translation in operations:
adapter.addSymOp(rotation, translation)
adapter.updateSymmetryPositions()
adapter._setSymOps([r for r, t in operations], [t for r, t in operations])
return adapter
36 changes: 36 additions & 0 deletions src/diffpy/srreal/calculationkernel.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env python
##############################################################################
#
# (c) 2026 The Trustees of Columbia University in the City of New York.
# All rights reserved.
#
# File coded by: Billinge Group members and community contributors.
#
# See GitHub contributions for a more detailed list of contributors.
# https://github.com/diffpy/diffpy.srreal/graphs/contributors
#
# See LICENSE.rst for license information.
#
##############################################################################
"""Selection of the kernel that sums the contributions of atom pairs.

PDFCalculator and DebyePDFCalculator send full pair sums to the selected
kernel, by default the best one the CPU supports. For refinements with
'cuda-mixed', use larger finite-difference steps and verify the fit in
double precision.
"""

# exported items
__all__ = [
"availableCalculationKernels",
"getCalculationKernel",
"setCalculationKernel",
]

from diffpy.srreal.srreal_ext import (
availableCalculationKernels,
getCalculationKernel,
setCalculationKernel,
)

# End of file
37 changes: 37 additions & 0 deletions src/diffpy/srreal/structureconverters.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
"""Converters from other structure representations in Python to
diffpy.srreal StructureAdapter classes."""

import sys

import numpy

from diffpy.srreal.srreal_ext import (
AtomicStructureAdapter,
PeriodicStructureAdapter,
Expand Down Expand Up @@ -77,6 +81,39 @@ def _fetchDiffPyStructureData(adpt, stru):
"""
from diffpy.srreal.srreal_ext import Atom as AdapterAtom

# Batch isotropic tensors only when the atoms use standard properties,
# the structure's lattice, and coordinates and occupancies in native form.
lattice = stru.lattice
standard_atom = getattr(sys.modules.get("diffpy.structure"), "Atom", None)
if (
len(stru) > 1
and all(
type(a) is standard_atom
and a.lattice is lattice
and type(a.occupancy) is float
and type(a.xyz) is numpy.ndarray
and a.xyz.shape == (3,)
for a in stru
)
and not all(a.anisotropy for a in stru)
):
atomtypes = [a.element for a in stru]
xyz = [a.xyz for a in stru]
occupancy = [a.occupancy for a in stru]
anisotropy = [a.anisotropy for a in stru]
uiso = [0.0 if f else a.Uisoequiv for a, f in zip(stru, anisotropy)]
uij = numpy.multiply.outer(uiso, lattice.isotropicunit)
if any(anisotropy):
uij[anisotropy] = [a.U for a, f in zip(stru, anisotropy) if f]
if hasattr(adpt, "setLatPar"):
adpt.setLatPar(*lattice.cell_parms())
adpt._setLatticeAtomArrays(
atomtypes, xyz, occupancy, anisotropy, uij
)
else:
adpt.setAtomArrays(atomtypes, xyz, occupancy, anisotropy, uij)
return

# copy atoms
adpt.clear()
adpt.reserve(len(stru))
Expand Down
Loading
Loading