Skip to main content

PyPI Forge PythonVersion PR

CI Codecov Black Tracking

PDFfit2 - real space structure refinement of the atomic pair distribution function

The diffpy.pdffit2 package provides functions for the calculation and refinement of atomic Pair Distribution Functions (PDF) from crystal structure models. It is used as a computational engine by PDFgui. All refinements possible in PDFgui can be done by writing python scripts directly with diffpy.pdffit2, although less conveniently and with a fair knowledge of Python. However, we recommend using diffpy-cmi for carrying out more advanced, python-scripted refinements of nanostructure.

The PDFfit2 package includes an extension for the interactive IPython shell, these days commonly used within Jupyter notebooks, which tries to mimic the old PDFFIT program. To start IPython with this extension and also with plotting functions enabled, use

ipython --ext=diffpy.pdffit2.ipy_ext --pylab

The IPython extension is suitable for interactive use, however refinement scripts should be preferably written as a standard Python code. This is more reliable and needs only a few extra statements.

To learn more about diffpy.pdffit2 library, see the examples directory included in this distribution or the API documentation at http://www.diffpy.org/doc/pdffit2.

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

Citation

If you use diffpy.pdffit2 in a scientific publication, we would like you to cite the following paper:

C. L. Farrow, P. Juhás, J. W. Liu, D. Bryndin, E. S. Božin, J. Bloch, Th. Proffen and S. J. L. Billinge, PDFfit2 and PDFgui: computer programs for studying nanostructure in crystals (https://stacks.iop.org/0953-8984/19/335219), J. Phys.: Condens. Matter, 19, 335219 (2007)

Installation

diffpy.pdffit2 supports Python 3.12, 3.13, and 3.14.

Windows, macOS (non-Arm64), Linux

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.pdffit2_env

conda create -n diffpy.pdffit2_env diffpy.pdffit2
conda activate diffpy.pdffit2_env

To confirm that the installation was successful, type

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

macOS (Arm64)

Create a new conda environment diffpy.pdffit2_env:

conda create -n diffpy.pdffit2_env python=3.13

Activate the environment:

conda activate diffpy.pdffit2_env

Install pdffit2 using pip to download and install the latest version from Python Package Index:

pip install diffpy.pdffit2

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

pip install .

You can type the following command to verify the installation is successful.

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

Getting Started

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

Support and Contribute

PDFfit2 is not developed anymore and is only maintained due to its status of a sole computational engine for PDFgui. We don’t expect any major developments to the code beyond simple bug fixes and compatibility features. The source code to PDFfit2 is available in a git repository at https://github.com/diffpy/diffpy.pdffit2.

For an actively developed codes for PDF simulations see the DiffPy-CMI framework at http://www.diffpy.org.


Diffpy user group is the discussion forum for general questions and discussions about the use of diffpy.pdffit2. Please join the diffpy.pdffit2 users community by joining the Google group. The diffpy.pdffit2 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.pdffit2 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.pdffit2 please visit the project web-page or email Simon Billinge at sb2896@columbia.edu.

Acknowledgements

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

Metadata

Release files for diffpy.pdffit2 1.6.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.pdffit2 1.6.0
File Size Uploaded
diffpy_pdffit2-1.6.0.tar.gz 306.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for diffpy.pdffit2 1.6.0
File
diffpy_pdffit2-1.6.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
diffpy_pdffit2-1.6.0-cp314-cp314-manylinux_2_39_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.39+ x86-64 Details
diffpy_pdffit2-1.6.0-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
diffpy_pdffit2-1.6.0-cp314-cp314-macosx_10_13_x86_64.whl CPython 3.14 CPython 3.14 macOS 10.13+ x86-64 Details
diffpy_pdffit2-1.6.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
diffpy_pdffit2-1.6.0-cp313-cp313-manylinux_2_39_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.39+ x86-64 Details
diffpy_pdffit2-1.6.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
diffpy_pdffit2-1.6.0-cp313-cp313-macosx_10_13_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.13+ x86-64 Details
diffpy_pdffit2-1.6.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
diffpy_pdffit2-1.6.0-cp312-cp312-manylinux_2_39_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.39+ x86-64 Details
diffpy_pdffit2-1.6.0-cp312-cp312-macosx_11_0_x86_64.whl CPython 3.12 CPython 3.12 macOS 11.0+ x86-64 Details
diffpy_pdffit2-1.6.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details

Total release size: 8.2 MB

Release files / diffpy_pdffit2-1.6.0.tar.gz

Download URL diffpy_pdffit2-1.6.0.tar.gz
Size 306.9 kB
Tags Source
SHA-256 checksum
How to use checksums
11a65466f8790f5ac7ae45f2f3fc0d5d116d156d274bcfc079df653123d080e2
BLAKE2b-256 checksum
How to use checksums
33ebf9f1ded8e4db9638f9530c3782eb01f5ab04945f4cb9e597a51c203fa4c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / diffpy_pdffit2-1.6.0-cp314-cp314-win_amd64.whl

Download URL diffpy_pdffit2-1.6.0-cp314-cp314-win_amd64.whl
Size 1.4 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
dc4b5c57c5bcdac4983ff3ec33a960b0f45b3d8d0e20f44347f533861b890c2a
BLAKE2b-256 checksum
How to use checksums
82d026c81ffbe588f936d05f395da34046c66322e8067c9fd331c788c4f682f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / diffpy_pdffit2-1.6.0-cp314-cp314-manylinux_2_39_x86_64.whl

Download URL diffpy_pdffit2-1.6.0-cp314-cp314-manylinux_2_39_x86_64.whl
Size 470.7 kB
Tags CPython 3.14 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
fc03b3617ac30eb07fa6b57c37fec22f65880bcd9e7277d08b5ac8a2978f6a81
BLAKE2b-256 checksum
How to use checksums
46b72bde9ec95356ca809e6e4e90cc9fc56d92b2e6cdd38e93b33e0d397dabe3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / diffpy_pdffit2-1.6.0-cp314-cp314-macosx_11_0_arm64.whl

Download URL diffpy_pdffit2-1.6.0-cp314-cp314-macosx_11_0_arm64.whl
Size 358.7 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0e178ff1d40e6b652dedb96b744a2eb04320f58b21012304b29d52167b62afa5
BLAKE2b-256 checksum
How to use checksums
04f158c14b37525dc075f3bdf149251f079723049a9f1c82eb48835a0e6b8db3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / diffpy_pdffit2-1.6.0-cp314-cp314-macosx_10_13_x86_64.whl

Download URL diffpy_pdffit2-1.6.0-cp314-cp314-macosx_10_13_x86_64.whl
Size 372.3 kB
Tags CPython 3.14 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
79562f679ff275bd1754fe5aad154ae1c6122d19648a4037faeaea110061d656
BLAKE2b-256 checksum
How to use checksums
204477b3936beb0da7d9f011699914e06a34b9507fd8c41e897116167a3b0a2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / diffpy_pdffit2-1.6.0-cp313-cp313-win_amd64.whl

Download URL diffpy_pdffit2-1.6.0-cp313-cp313-win_amd64.whl
Size 1.4 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
f1bba407eac8ff8ef1264ad5a1d3dff840e2d0a5f71e9fb0c0b9b06d5a8eb139
BLAKE2b-256 checksum
How to use checksums
15feb426215b6843ee70285521e2dd52f08a32096fe1d68e5b92fbdaffdf8ca3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / diffpy_pdffit2-1.6.0-cp313-cp313-manylinux_2_39_x86_64.whl

Download URL diffpy_pdffit2-1.6.0-cp313-cp313-manylinux_2_39_x86_64.whl
Size 470.7 kB
Tags CPython 3.13 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
16330c4ac31debd90b12aa73fcd1dacaf4e83e0e8950b9660ed792ed319bdd16
BLAKE2b-256 checksum
How to use checksums
b2c906add38c7ab892cee94bc9ede0b63e2697a44d38297d3e832bae04f976f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / diffpy_pdffit2-1.6.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL diffpy_pdffit2-1.6.0-cp313-cp313-macosx_11_0_arm64.whl
Size 358.8 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8837088196ddabd688deb77740c3f03ddc33f0df6964a8e3507701c32b67b8b2
BLAKE2b-256 checksum
How to use checksums
d380722402571443031989e87a5861f26f2e897778768906dff1f998b42f235d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / diffpy_pdffit2-1.6.0-cp313-cp313-macosx_10_13_x86_64.whl

Download URL diffpy_pdffit2-1.6.0-cp313-cp313-macosx_10_13_x86_64.whl
Size 372.4 kB
Tags CPython 3.13 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
bb6b0ffda13a957e9d4a95657fd9be8e154ddf4faba3a4399a4030e8fc966885
BLAKE2b-256 checksum
How to use checksums
eb270c4baa7ee4c765dc8f6cca1c2044ea4cf9022b0611428364e13737a11818
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / diffpy_pdffit2-1.6.0-cp312-cp312-win_amd64.whl

Download URL diffpy_pdffit2-1.6.0-cp312-cp312-win_amd64.whl
Size 1.4 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
6c7865218f78effeeb8374fb62a5aef2b084264da96e77c03160aa411d33c2a0
BLAKE2b-256 checksum
How to use checksums
6f0c8297c8d978c919ad6318011631a6123082d5da940da5f8612e75a247d739
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / diffpy_pdffit2-1.6.0-cp312-cp312-manylinux_2_39_x86_64.whl

Download URL diffpy_pdffit2-1.6.0-cp312-cp312-manylinux_2_39_x86_64.whl
Size 470.7 kB
Tags CPython 3.12 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
3de967c0607e00bc71655874fed4998f71af71d9aee1990c973e4835b2f9f7ac
BLAKE2b-256 checksum
How to use checksums
62ed6e04ea7a0a5b18cba83adcf88ea1cfc0383eea1d180e44c56a6cdc8707b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / diffpy_pdffit2-1.6.0-cp312-cp312-macosx_11_0_x86_64.whl

Download URL diffpy_pdffit2-1.6.0-cp312-cp312-macosx_11_0_x86_64.whl
Size 372.5 kB
Tags CPython 3.12 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
fa78dceeaea0151bfe78696ea41d6825c19bbe9ad0bd29734a649093557eae43
BLAKE2b-256 checksum
How to use checksums
2f7246cb5810b1c9eb1dfb267519385662eaf0f45a7ccf3184e460a9677431ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / diffpy_pdffit2-1.6.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL diffpy_pdffit2-1.6.0-cp312-cp312-macosx_11_0_arm64.whl
Size 358.8 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4c4418388b9ab4eaeb485a9950a455b3713d21319a98d61e9f69ca5b9a6b45e3
BLAKE2b-256 checksum
How to use checksums
015c87b5fefdd3c4b157c8a16833f2236723136806814584c4589610217252f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3
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