Skip to main content

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

diffpy.srreal Package, https://github.com/diffpy/diffpy.srreal

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

If you prefer to install from sources, after installing the dependencies, obtain the source archive from GitHub. Once installed, cd into your diffpy.srreal directory and run the following

pip install .

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 Simon Billinge at sb2896@columbia.edu.

Acknowledgements

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

Metadata

Release files for diffpy.srreal 1.4.0

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.4.0
File Size Uploaded
diffpy_srreal-1.4.0.tar.gz 138.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for diffpy.srreal 1.4.0
File
diffpy_srreal-1.4.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
diffpy_srreal-1.4.0-cp313-cp313-manylinux_2_39_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.39+ x86-64 Details
diffpy_srreal-1.4.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
diffpy_srreal-1.4.0-cp313-cp313-macosx_10_13_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.13+ x86-64 Details
diffpy_srreal-1.4.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
diffpy_srreal-1.4.0-cp312-cp312-manylinux_2_39_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.39+ x86-64 Details
diffpy_srreal-1.4.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
diffpy_srreal-1.4.0-cp312-cp312-macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64 Details
diffpy_srreal-1.4.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
diffpy_srreal-1.4.0-cp311-cp311-manylinux_2_39_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.39+ x86-64 Details
diffpy_srreal-1.4.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
diffpy_srreal-1.4.0-cp311-cp311-macosx_10_13_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.13+ x86-64 Details

Total release size: 16.5 MB

Release files / diffpy_srreal-1.4.0.tar.gz

Download URL diffpy_srreal-1.4.0.tar.gz
Size 138.0 kB
Tags Source
SHA-256 checksum
How to use checksums
34988d5e8e1bf321523de989a48fcac99cba5ff205de26c699e396b9c5a95365
BLAKE2b-256 checksum
How to use checksums
52f973cce15c9714799712fe2ae1085066154d0214640b6c7bd55b5c5fd285da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / diffpy_srreal-1.4.0-cp313-cp313-win_amd64.whl

Download URL diffpy_srreal-1.4.0-cp313-cp313-win_amd64.whl
Size 1.9 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
1d3e954130a13934d5c499f0c800e368501f1190c8506e6d21104fea6c28b997
BLAKE2b-256 checksum
How to use checksums
8b47b05a15384cb19ead55115b183cc18e863a58e420aacc3d3c056374cc6c05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / diffpy_srreal-1.4.0-cp313-cp313-manylinux_2_39_x86_64.whl

Download URL diffpy_srreal-1.4.0-cp313-cp313-manylinux_2_39_x86_64.whl
Size 1.6 MB
Tags CPython 3.13 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
77f6af3c407bd3ed73d4106cfe5ef9feb8ebcd9ccdf995be12297af3422cb420
BLAKE2b-256 checksum
How to use checksums
3c2c4aacd85903745a52b4a17a43c0eadb67bd727a612fa0067c3c6388497cdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / diffpy_srreal-1.4.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL diffpy_srreal-1.4.0-cp313-cp313-macosx_11_0_arm64.whl
Size 990.4 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
efdfd2b70d65d53c8c4bafde186aa1f9402574b45e8cf6b2a29b0caa35a692c5
BLAKE2b-256 checksum
How to use checksums
8cb73b4c067ec786f39ea274c45ce8a8d53cdfd25d5415eb77ff54132eee1933
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / diffpy_srreal-1.4.0-cp313-cp313-macosx_10_13_x86_64.whl

Download URL diffpy_srreal-1.4.0-cp313-cp313-macosx_10_13_x86_64.whl
Size 1.1 MB
Tags CPython 3.13 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
af63ff747ad6992800ef8a9f612152e8d07468fedee6b13605d1e5bceaf79998
BLAKE2b-256 checksum
How to use checksums
c1a11c099ffdc0fbe9903eafa8ed87ae704f9fef8869a70d9311de6e653a9974
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / diffpy_srreal-1.4.0-cp312-cp312-win_amd64.whl

Download URL diffpy_srreal-1.4.0-cp312-cp312-win_amd64.whl
Size 1.9 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
30ee3f7bfe5712ce7116c8e23f2a06fbba0cbcb7366ffab2cc596500e1df9b2b
BLAKE2b-256 checksum
How to use checksums
9051514b8bd16bd29e76960a9a5c9a18892135cca53e6cc6ac0a3d3ec679104f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / diffpy_srreal-1.4.0-cp312-cp312-manylinux_2_39_x86_64.whl

Download URL diffpy_srreal-1.4.0-cp312-cp312-manylinux_2_39_x86_64.whl
Size 1.6 MB
Tags CPython 3.12 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
fd8e1c6b56353348cf99ece2982b8773c8310b25cf27175a218bec6268c599b7
BLAKE2b-256 checksum
How to use checksums
288033dbd1c51b9bc84d7d41cd99ac9616d60715ac4fc6b497223701a52e8c38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / diffpy_srreal-1.4.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL diffpy_srreal-1.4.0-cp312-cp312-macosx_11_0_arm64.whl
Size 990.4 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
93189334ae7806e1debe796254099ac825dd56c7c61000cc34340d0b44e1364d
BLAKE2b-256 checksum
How to use checksums
40a740c5fec3c932c20da6af45272bfce27f6e5589837bb211c2189363eb5a0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / diffpy_srreal-1.4.0-cp312-cp312-macosx_10_13_x86_64.whl

Download URL diffpy_srreal-1.4.0-cp312-cp312-macosx_10_13_x86_64.whl
Size 1.1 MB
Tags CPython 3.12 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
cca7e9b90bf875846d5a0bbdd3bf5a86783f25ddee768f12735dcda1f1d8befa
BLAKE2b-256 checksum
How to use checksums
c5544bf07a8e23f535d51e0759df7e704cb18435b5922c5d16efc6d2fbafb763
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / diffpy_srreal-1.4.0-cp311-cp311-win_amd64.whl

Download URL diffpy_srreal-1.4.0-cp311-cp311-win_amd64.whl
Size 1.9 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
435d622dc12a232a69abf764f556c28d19112c4ec3c7cd367f860aaa8c55cbd8
BLAKE2b-256 checksum
How to use checksums
3ab96d636ecff40cf3d17dc69b2f9298522ad11220ddb4c89c0b1a689f11ca50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / diffpy_srreal-1.4.0-cp311-cp311-manylinux_2_39_x86_64.whl

Download URL diffpy_srreal-1.4.0-cp311-cp311-manylinux_2_39_x86_64.whl
Size 1.6 MB
Tags CPython 3.11 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
74551dad6eb092bd30e0b9229ed228961a37d9833d930e1dafa9f62461e59f7f
BLAKE2b-256 checksum
How to use checksums
271b6757ebcd1287a3761683ef1b3f523074058123d6610d792af7fd376e87c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / diffpy_srreal-1.4.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL diffpy_srreal-1.4.0-cp311-cp311-macosx_11_0_arm64.whl
Size 985.6 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fb0ce39287ee2fbae44fcbfe9227d8e83fcd7306859d860c55905d5a09747e00
BLAKE2b-256 checksum
How to use checksums
8a6d6e32d7234dee6be05fb459212f74280a660050b03ad408419f1eca71fe5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / diffpy_srreal-1.4.0-cp311-cp311-macosx_10_13_x86_64.whl

Download URL diffpy_srreal-1.4.0-cp311-cp311-macosx_10_13_x86_64.whl
Size 1.1 MB
Tags CPython 3.11 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
acf6853147cbeea52e3027bade63bb930c875419422fcc39fb247b036c1889e5
BLAKE2b-256 checksum
How to use checksums
d873e9cf83d0106d089a771685291b4d5cab656a3dfa214f8a10a7d5533c7385
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

1.4.0 This release

13 release files

1.3.0

1 release file

1.2

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1

1 release file

1.0

1 release file

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