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.0rc1

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.0rc1
File Size Uploaded Provenance Actions
diffpy_srreal-1.5.0rc1.tar.gz 431.7 kB Without provenance Details for diffpy_srreal-1.5.0rc1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for diffpy.srreal 1.5.0rc1
File Actions
diffpy_srreal-1.5.0rc1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for diffpy_srreal-1.5.0rc1-cp314-cp314-win_amd64.whl
diffpy_srreal-1.5.0rc1-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.0rc1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
diffpy_srreal-1.5.0rc1-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.0rc1-cp314-cp314-macosx_11_0_x86_64.whl
diffpy_srreal-1.5.0rc1-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details for diffpy_srreal-1.5.0rc1-cp314-cp314-macosx_11_0_arm64.whl
diffpy_srreal-1.5.0rc1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for diffpy_srreal-1.5.0rc1-cp313-cp313-win_amd64.whl
diffpy_srreal-1.5.0rc1-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.0rc1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
diffpy_srreal-1.5.0rc1-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.0rc1-cp313-cp313-macosx_11_0_x86_64.whl
diffpy_srreal-1.5.0rc1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for diffpy_srreal-1.5.0rc1-cp313-cp313-macosx_11_0_arm64.whl
diffpy_srreal-1.5.0rc1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for diffpy_srreal-1.5.0rc1-cp312-cp312-win_amd64.whl
diffpy_srreal-1.5.0rc1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for diffpy_srreal-1.5.0rc1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
diffpy_srreal-1.5.0rc1-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.0rc1-cp312-cp312-macosx_11_0_x86_64.whl
diffpy_srreal-1.5.0rc1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for diffpy_srreal-1.5.0rc1-cp312-cp312-macosx_11_0_arm64.whl

Total release size: 15.3 MB

Release files / diffpy_srreal-1.5.0rc1.tar.gz

Download URL diffpy_srreal-1.5.0rc1.tar.gz
Size 431.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a4077a33e7885676d6e4074b926665abe910545d998d019d987025ebc1a5b818
BLAKE2b-256 checksum
How to use checksums
45bab0ae70f8ece6d4617cb7505d124b12d5955ac0a74f1e9259556d3767d32e
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.0rc1-cp314-cp314-win_amd64.whl

Download URL diffpy_srreal-1.5.0rc1-cp314-cp314-win_amd64.whl
Size 1.0 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
fa647f878551a3fabc021a1dd6a9f67bf9e6a8f567bad8c72cf609a5407d4474
BLAKE2b-256 checksum
How to use checksums
898ec77a5487448d9658e4f0721be17d6c27d6ea4818907881894077778cb9bb
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.0rc1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL diffpy_srreal-1.5.0rc1-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
98bd11c66050b6ac5225f1b280767387a5a110267b7e6b254d9062e48e1ae550
BLAKE2b-256 checksum
How to use checksums
fe95bcbd2447e532f50829f5283f5dacab5e880d52affeb9fc0068f5beaf4a88
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.0rc1-cp314-cp314-macosx_11_0_x86_64.whl

Download URL diffpy_srreal-1.5.0rc1-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
b5e4eb4102424260d9ad0884dabb388798f32861ff6f90628829f057b996a877
BLAKE2b-256 checksum
How to use checksums
8948821a74688239afc1d903786d3c19300e334641fe292f8c8f0a7a7272593d
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.0rc1-cp314-cp314-macosx_11_0_arm64.whl

Download URL diffpy_srreal-1.5.0rc1-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
9fe0b4362b11ee7cd5ef02e45099f1c26806fe452896b80ca96e3d668329f4a2
BLAKE2b-256 checksum
How to use checksums
d7d363c73767a292172772d51decc397305a8fd46eafa23b39ea7b3e7b61ad30
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.0rc1-cp313-cp313-win_amd64.whl

Download URL diffpy_srreal-1.5.0rc1-cp313-cp313-win_amd64.whl
Size 1.0 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
d86b6b2d739fa625a04b5b6e5f243e9420a4e15bc9db458e1ed9632d5da76d40
BLAKE2b-256 checksum
How to use checksums
b8acce37d708b54170f69204d2f586e8e29b5f9f044a2e90bbb3e1c5b389cf22
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.0rc1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL diffpy_srreal-1.5.0rc1-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
5bdb698e9f52c57f735f4ac44c07bd97d492cd0a030afd6d86b49ccdd0364032
BLAKE2b-256 checksum
How to use checksums
1f22a36836ca73deaaefa8ac81f576a607bc84c0d2ba77d070c5bf81af73c4c9
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.0rc1-cp313-cp313-macosx_11_0_x86_64.whl

Download URL diffpy_srreal-1.5.0rc1-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
033ce4b95f4b53159702f235ee1b7e33c214d967ba324ffac91c90619a3f3fbc
BLAKE2b-256 checksum
How to use checksums
34663b44100a61084d28a448209965b030cff6c70f5d7d514af91c09d591044e
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.0rc1-cp313-cp313-macosx_11_0_arm64.whl

Download URL diffpy_srreal-1.5.0rc1-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
2aed17a328d671fa24254587336998ce2cd23dbd30f5cafebe30a917635a9ce9
BLAKE2b-256 checksum
How to use checksums
e33dcc94e129881638dd0148a8b6630da9f143af9c89aa89b23a752318fe34e5
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.0rc1-cp312-cp312-win_amd64.whl

Download URL diffpy_srreal-1.5.0rc1-cp312-cp312-win_amd64.whl
Size 1.0 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
eb96e4de6f1e7cdefa2fd2eaf473b8d4686413cbc768b7e2d03254eb2ffcb94c
BLAKE2b-256 checksum
How to use checksums
93524205e6e2a6320449ca711ccd09e6746aa2d408865cbc0078113eaa44f633
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.0rc1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL diffpy_srreal-1.5.0rc1-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
e27e3e2e1d3b2b15aa8f0f1b60577463d5c1be942aeabd5ef559ac958fc4b7ec
BLAKE2b-256 checksum
How to use checksums
7579eb35fedab09953f2d3a3910487f495647e344227c7bbd6e2aa9c63386f64
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.0rc1-cp312-cp312-macosx_11_0_x86_64.whl

Download URL diffpy_srreal-1.5.0rc1-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
b11869ca13407e4073cfd9f2bf767cf6177a358821a5ac762b0441b6a56cae19
BLAKE2b-256 checksum
How to use checksums
c9c4bc7caeee2c9206c48753eb0abab141e34b5f06f0ad7491a122b43bc84e35
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.0rc1-cp312-cp312-macosx_11_0_arm64.whl

Download URL diffpy_srreal-1.5.0rc1-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
8159d355925931bc1e1504789586b6dae8febe245376abffc96ec9ba6081ed8a
BLAKE2b-256 checksum
How to use checksums
55db92531de20f2c628e2ecfef3c70da5088307a02b16c1a6acfcf7150c9cbd2
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.0rc1

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