Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Icon diffpy.srreal

PyPI Forge PythonVersion PR

CI Codecov Black Tracking

Calculators for PDF, bond valence sum, and other quantities based on atom pair interaction.

The diffpy.srreal package provides calculators for atomic pair distribution function (PDF), bond valence sums (BVS), atom overlaps for a hard-sphere model, bond distances and directions up to specified maximum distance. The atomic structure models are represented with internal classes as non-periodic, periodic or structures with space group symmetries. The package provides implicit adapters from diffpy.structure classes or from Crystal or Molecule objects from pyobjcryst. Adapters can be easily defined for any other structure representations in Python allowing their direct use with the calculators. Calculators support two evaluation models - BASIC, which performs a full pair-summation every time, and OPTIMIZED, which updates only pair contributions that have changed since the last evaluation. Calculations can be split among parallel jobs using Python multiprocessing package or any other library that provides parallel map function. PDF calculations can be done in two modes - either as a real-space summation of peak profiles (PDFCalculator) or as a reciprocal-space Debye summation and Fourier transform of the total scattering structure function (DebyePDFCalculator).

The diffpy.srreal package is a Python binding to the C++ library libdiffpy (https://github.com/diffpy/libdiffpy). Calculators are created as objects of a given calculator type and so multiple instances of the same calculator type can exist with different configurations. Calculators are composed of other objects that perform lower-level tasks, such as calculating peak profile or looking up atom scattering factors. These objects can be re-assigned at runtime allowing to easily customize the calculation procedure. New classes can be defined using object inheritance either in Python or in C++ and used with the existing calculators; as an example, this allows to calculate PDF with a user-defined profile function. A new calculator class can be also defined for any quantity that is obtained by iteration over atom pairs, by defining only the function that processes atom-pair contributions.

For more information about the diffpy.srreal library, please consult our online documentation.

Citation

If you use diffpy.srreal in a scientific publication, we would like you to cite this package as

Juhás, P.; Farrow, C. L.; Yang, X.; Knox, K. R.; Billinge, S. J. L. Complex Modeling: A Strategy and Software Program for Combining Multiple Information Sources to Solve Ill Posed Structure and Nanostructure Inverse Problems. Acta Crystallogr A Found Adv 2015, 71 (6), 562–568. https://doi.org/10.1107/S2053273315014473.

Installation

The preferred method is to use Miniconda Python and install from the “conda-forge” channel of Conda packages.

To add “conda-forge” to the conda channels, run the following in a terminal.

conda config --add channels conda-forge

We want to install our packages in a suitable conda environment. The following creates and activates a new environment named diffpy.srreal_env

conda create -n diffpy.srreal_env diffpy.srreal
conda activate diffpy.srreal_env

To confirm that the installation was successful, type

python -c "import diffpy.srreal; print(diffpy.srreal.__version__)"

The output should print the latest version displayed on the badges above.

If the above does not work, you can use pip to download and install the latest release from Python Package Index. To install using pip into your diffpy.srreal_env environment, type

pip install diffpy.srreal

To build from Git, install the dependencies, then clone the repository with its libdiffpy submodule

git clone --recurse-submodules https://github.com/diffpy/diffpy.srreal.git
cd diffpy.srreal
pip install .

For an existing checkout, initialize or update the submodule before building

git submodule update --init --recursive

The parent repository pins the libdiffpy commit in extern/libdiffpy. CMake compiles those sources directly without downloading them or updating the submodule. Version information is read from the submodule and included in source distributions as a generated header.

Packaged source distributions (sdists) include libdiffpy, so they can be extracted and built with pip install . without Git or a separate 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.

Getting Started

You may consult our online documentation for tutorials and API references.

Support and Contribute

Diffpy user group is the discussion forum for general questions and discussions about the use of diffpy.srreal. Please join the diffpy.srreal users community by joining the Google group. The diffpy.srreal project welcomes your expertise and enthusiasm!

If you see a bug or want to request a feature, please report it as an issue and/or submit a fix as a PR. You can also post it to the Diffpy user group.

Feel free to fork the project and contribute. To install diffpy.srreal in a development mode, with its sources being directly used by Python rather than copied to a package directory, use the following in the root directory

pip install -e .

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

  1. Install pre-commit in your working environment by running conda install pre-commit.

  2. Initialize pre-commit (one time only) pre-commit install.

Thereafter your code will be linted by black and isort and checked against flake8 before you can commit. If it fails by black or isort, just rerun and it should pass (black and isort will modify the files so should pass after they are modified). If the flake8 test fails please see the error messages and fix them manually before trying to commit again.

Improvements and fixes are always appreciated.

Before contributing, please read our Code of Conduct.

Contact

For more information on diffpy.srreal please visit the project web-page or email the maintainers Simon Billinge(sbillinge@ucsb.edu).

Acknowledgements

diffpy.srreal is built and maintained with scikit-package.

Metadata

Release files for diffpy.srreal 1.5.1rc0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for diffpy.srreal 1.5.1rc0
File Size Uploaded Provenance Actions
diffpy_srreal-1.5.1rc0.tar.gz 416.5 kB Without provenance Details for diffpy_srreal-1.5.1rc0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for diffpy.srreal 1.5.1rc0
File Actions
diffpy_srreal-1.5.1rc0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for diffpy_srreal-1.5.1rc0-cp314-cp314-win_amd64.whl
diffpy_srreal-1.5.1rc0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for diffpy_srreal-1.5.1rc0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
diffpy_srreal-1.5.1rc0-cp314-cp314-macosx_11_0_x86_64.whl CPython 3.14 CPython 3.14 macOS 11.0+ x86-64 Details for diffpy_srreal-1.5.1rc0-cp314-cp314-macosx_11_0_x86_64.whl
diffpy_srreal-1.5.1rc0-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details for diffpy_srreal-1.5.1rc0-cp314-cp314-macosx_11_0_arm64.whl
diffpy_srreal-1.5.1rc0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for diffpy_srreal-1.5.1rc0-cp313-cp313-win_amd64.whl
diffpy_srreal-1.5.1rc0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for diffpy_srreal-1.5.1rc0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
diffpy_srreal-1.5.1rc0-cp313-cp313-macosx_11_0_x86_64.whl CPython 3.13 CPython 3.13 macOS 11.0+ x86-64 Details for diffpy_srreal-1.5.1rc0-cp313-cp313-macosx_11_0_x86_64.whl
diffpy_srreal-1.5.1rc0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for diffpy_srreal-1.5.1rc0-cp313-cp313-macosx_11_0_arm64.whl
diffpy_srreal-1.5.1rc0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for diffpy_srreal-1.5.1rc0-cp312-cp312-win_amd64.whl
diffpy_srreal-1.5.1rc0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for diffpy_srreal-1.5.1rc0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
diffpy_srreal-1.5.1rc0-cp312-cp312-macosx_11_0_x86_64.whl CPython 3.12 CPython 3.12 macOS 11.0+ x86-64 Details for diffpy_srreal-1.5.1rc0-cp312-cp312-macosx_11_0_x86_64.whl
diffpy_srreal-1.5.1rc0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for diffpy_srreal-1.5.1rc0-cp312-cp312-macosx_11_0_arm64.whl

Total release size: 15.2 MB

Release files / diffpy_srreal-1.5.1rc0.tar.gz

Download URL diffpy_srreal-1.5.1rc0.tar.gz
Size 416.5 kB
Tags Source
SHA-256 checksum
How to use checksums
63e457d4c64e3eca3334e2e728e7f7e2dd00644d43268be470c06ea105ed04ed
BLAKE2b-256 checksum
How to use checksums
55c9673b8b0c1b1bc5fdb181e2472c8be0cb675c7be28d72cc490f841cf1551d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / diffpy_srreal-1.5.1rc0-cp314-cp314-win_amd64.whl

Download URL diffpy_srreal-1.5.1rc0-cp314-cp314-win_amd64.whl
Size 1.0 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
3ac106c6e6563a731f9e39c7ac4364185f8b029d8537e058c6e184ea279d59f4
BLAKE2b-256 checksum
How to use checksums
1d8d0dae8c5154650c8d53b2670633945675ea393ff17a6b88861eb1c553a67d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / diffpy_srreal-1.5.1rc0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL diffpy_srreal-1.5.1rc0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.6 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
1dba86cbd9bd72a31619aeba36436dbc21c11f362ff8d1eca1b3fa0d34bbf577
BLAKE2b-256 checksum
How to use checksums
285688f715aade1f1b785bb1a46402ada66aa238ba4ca882f152b2a8a7519b57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / diffpy_srreal-1.5.1rc0-cp314-cp314-macosx_11_0_x86_64.whl

Download URL diffpy_srreal-1.5.1rc0-cp314-cp314-macosx_11_0_x86_64.whl
Size 1.2 MB
Tags CPython 3.14 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
1744c8f89af9d0b2a1e070fce660bac5d018bb93e897aece311a1866a0bd36db
BLAKE2b-256 checksum
How to use checksums
48b818e5e1885ca0fc15f47fe134bb3457e6260f1f1b23f518ad4674a8cdfee8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / diffpy_srreal-1.5.1rc0-cp314-cp314-macosx_11_0_arm64.whl

Download URL diffpy_srreal-1.5.1rc0-cp314-cp314-macosx_11_0_arm64.whl
Size 1.1 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
55925e660962ed96f8e2623b5ed81483523eceb2fa87c4f1dcf95da6823ac493
BLAKE2b-256 checksum
How to use checksums
ab097da1ae36abb30ef42e64f9d0a4c06428e115c2c297b6a465aafae661b612
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / diffpy_srreal-1.5.1rc0-cp313-cp313-win_amd64.whl

Download URL diffpy_srreal-1.5.1rc0-cp313-cp313-win_amd64.whl
Size 985.2 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
4841e035a5d6461f043e459e0c6a95053eb357eb2f1a40e4bdb03477db6a1236
BLAKE2b-256 checksum
How to use checksums
ac4ed340441c969b44ea7c51f3ab18e27f8b2031cb5ed4ad13ec83f3fd0de675
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / diffpy_srreal-1.5.1rc0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL diffpy_srreal-1.5.1rc0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.6 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
9d97cd451ff72cdc7f6c2fdc0021553b179ccdc2085ebac9cd64a2e60b0d972b
BLAKE2b-256 checksum
How to use checksums
106f3cae283360d9984a78e13e69bfce0ef06f87e2e2ad8672800cb29961ca69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / diffpy_srreal-1.5.1rc0-cp313-cp313-macosx_11_0_x86_64.whl

Download URL diffpy_srreal-1.5.1rc0-cp313-cp313-macosx_11_0_x86_64.whl
Size 1.2 MB
Tags CPython 3.13 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
3cda8c7de804a7f3d22a223fa41aa246eee913080ab1adeb8802ef5c1f2f0995
BLAKE2b-256 checksum
How to use checksums
98dbef47e28f7ceabd921a98587468a70a0408c7bc812a354ddf5f224dc0de55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / diffpy_srreal-1.5.1rc0-cp313-cp313-macosx_11_0_arm64.whl

Download URL diffpy_srreal-1.5.1rc0-cp313-cp313-macosx_11_0_arm64.whl
Size 1.1 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
873c919ca8753417f0aa3dc578cfaeab0cf6926a719c4e732a8bac2afa63c0ac
BLAKE2b-256 checksum
How to use checksums
66c83dd543b6cf833f4304e4ba521e3db7dc84f65e2cb82c7f2da2a7a3461e38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / diffpy_srreal-1.5.1rc0-cp312-cp312-win_amd64.whl

Download URL diffpy_srreal-1.5.1rc0-cp312-cp312-win_amd64.whl
Size 985.1 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
459e6a1a251d665c35455a687ccdb1c4de1da55dbba5ffff13162e2cccb4e292
BLAKE2b-256 checksum
How to use checksums
f8efd7f570dce7069e620016f98c1955fd06c9bee9f2980704b39d486188d1ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / diffpy_srreal-1.5.1rc0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL diffpy_srreal-1.5.1rc0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.6 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
8855dc86f97b5c5aced5d92faf33447f463c89b12a9037634df0642e0b114974
BLAKE2b-256 checksum
How to use checksums
afc0875d8323e3e9d9b17b73d1387b2077726196a75e2ad322e8045b3939ecfa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / diffpy_srreal-1.5.1rc0-cp312-cp312-macosx_11_0_x86_64.whl

Download URL diffpy_srreal-1.5.1rc0-cp312-cp312-macosx_11_0_x86_64.whl
Size 1.2 MB
Tags CPython 3.12 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
f0a37db7432638fec1dc8c4f0a625486fe1c2bce009ec356b45eb8b31b51fae1
BLAKE2b-256 checksum
How to use checksums
666f228fc890d37228df3fb2bff4c9fba85a988c4c1d930885ee6dad628060f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / diffpy_srreal-1.5.1rc0-cp312-cp312-macosx_11_0_arm64.whl

Download URL diffpy_srreal-1.5.1rc0-cp312-cp312-macosx_11_0_arm64.whl
Size 1.1 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
427f8bada3419984879eb211602be42de78f81f3833e8ef97b0b845bad01e376
BLAKE2b-256 checksum
How to use checksums
b66d260d0bc12e25d5eada6e2ff5bdcb13348cca0884cbda4fca579be5168e87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for diffpy.srreal 1.5.1rc0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page