Skip to main content

PDFfit2 - real space structure refinement program.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

diffpy_pdffit2-1.6.0.tar.gz (306.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

diffpy_pdffit2-1.6.0-cp314-cp314-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.14Windows x86-64

diffpy_pdffit2-1.6.0-cp314-cp314-manylinux_2_39_x86_64.whl (470.7 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.39+ x86-64

diffpy_pdffit2-1.6.0-cp314-cp314-macosx_11_0_arm64.whl (358.7 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

diffpy_pdffit2-1.6.0-cp314-cp314-macosx_10_13_x86_64.whl (372.3 kB view details)

Uploaded CPython 3.14macOS 10.13+ x86-64

diffpy_pdffit2-1.6.0-cp313-cp313-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.13Windows x86-64

diffpy_pdffit2-1.6.0-cp313-cp313-manylinux_2_39_x86_64.whl (470.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

diffpy_pdffit2-1.6.0-cp313-cp313-macosx_11_0_arm64.whl (358.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

diffpy_pdffit2-1.6.0-cp313-cp313-macosx_10_13_x86_64.whl (372.4 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

diffpy_pdffit2-1.6.0-cp312-cp312-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.12Windows x86-64

diffpy_pdffit2-1.6.0-cp312-cp312-manylinux_2_39_x86_64.whl (470.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

diffpy_pdffit2-1.6.0-cp312-cp312-macosx_11_0_x86_64.whl (372.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

diffpy_pdffit2-1.6.0-cp312-cp312-macosx_11_0_arm64.whl (358.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

Details for the file diffpy_pdffit2-1.6.0.tar.gz.

File metadata

  • Download URL: diffpy_pdffit2-1.6.0.tar.gz
  • Upload date:
  • Size: 306.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for diffpy_pdffit2-1.6.0.tar.gz
Algorithm Hash digest
SHA256 11a65466f8790f5ac7ae45f2f3fc0d5d116d156d274bcfc079df653123d080e2
MD5 236ab78b0b3a6ee70a902c934aa16fe4
BLAKE2b-256 33ebf9f1ded8e4db9638f9530c3782eb01f5ab04945f4cb9e597a51c203fa4c5

See more details on using hashes here.

File details

Details for the file diffpy_pdffit2-1.6.0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 dc4b5c57c5bcdac4983ff3ec33a960b0f45b3d8d0e20f44347f533861b890c2a
MD5 815ac0a807977131401ef2337395a2be
BLAKE2b-256 82d026c81ffbe588f936d05f395da34046c66322e8067c9fd331c788c4f682f2

See more details on using hashes here.

File details

Details for the file diffpy_pdffit2-1.6.0-cp314-cp314-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0-cp314-cp314-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 fc03b3617ac30eb07fa6b57c37fec22f65880bcd9e7277d08b5ac8a2978f6a81
MD5 1d0b24ec8e8c2f3d6f956dca762c057c
BLAKE2b-256 46b72bde9ec95356ca809e6e4e90cc9fc56d92b2e6cdd38e93b33e0d397dabe3

See more details on using hashes here.

File details

Details for the file diffpy_pdffit2-1.6.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0e178ff1d40e6b652dedb96b744a2eb04320f58b21012304b29d52167b62afa5
MD5 f38b631e66154d1d1f4e9c504a872582
BLAKE2b-256 04f158c14b37525dc075f3bdf149251f079723049a9f1c82eb48835a0e6b8db3

See more details on using hashes here.

File details

Details for the file diffpy_pdffit2-1.6.0-cp314-cp314-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0-cp314-cp314-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 79562f679ff275bd1754fe5aad154ae1c6122d19648a4037faeaea110061d656
MD5 a38d0fe5c59bb85d6a44c29ffbf9026f
BLAKE2b-256 204477b3936beb0da7d9f011699914e06a34b9507fd8c41e897116167a3b0a2d

See more details on using hashes here.

File details

Details for the file diffpy_pdffit2-1.6.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f1bba407eac8ff8ef1264ad5a1d3dff840e2d0a5f71e9fb0c0b9b06d5a8eb139
MD5 d078315ad17d41a0feff10093fbe8ed0
BLAKE2b-256 15feb426215b6843ee70285521e2dd52f08a32096fe1d68e5b92fbdaffdf8ca3

See more details on using hashes here.

File details

Details for the file diffpy_pdffit2-1.6.0-cp313-cp313-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 16330c4ac31debd90b12aa73fcd1dacaf4e83e0e8950b9660ed792ed319bdd16
MD5 4db861d6cecab1e4da4aae0e6403047e
BLAKE2b-256 b2c906add38c7ab892cee94bc9ede0b63e2697a44d38297d3e832bae04f976f3

See more details on using hashes here.

File details

Details for the file diffpy_pdffit2-1.6.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8837088196ddabd688deb77740c3f03ddc33f0df6964a8e3507701c32b67b8b2
MD5 220b0fb18d254bb6cdf306c9dfe678b1
BLAKE2b-256 d380722402571443031989e87a5861f26f2e897778768906dff1f998b42f235d

See more details on using hashes here.

File details

Details for the file diffpy_pdffit2-1.6.0-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 bb6b0ffda13a957e9d4a95657fd9be8e154ddf4faba3a4399a4030e8fc966885
MD5 0d76585570d7061a004032fbb5cde1ac
BLAKE2b-256 eb270c4baa7ee4c765dc8f6cca1c2044ea4cf9022b0611428364e13737a11818

See more details on using hashes here.

File details

Details for the file diffpy_pdffit2-1.6.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6c7865218f78effeeb8374fb62a5aef2b084264da96e77c03160aa411d33c2a0
MD5 fe93725bed84de4849f39f9ef57c6bf4
BLAKE2b-256 6f0c8297c8d978c919ad6318011631a6123082d5da940da5f8612e75a247d739

See more details on using hashes here.

File details

Details for the file diffpy_pdffit2-1.6.0-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 3de967c0607e00bc71655874fed4998f71af71d9aee1990c973e4835b2f9f7ac
MD5 5664df5f08e3cb6cad945b552ca9fb9e
BLAKE2b-256 62ed6e04ea7a0a5b18cba83adcf88ea1cfc0383eea1d180e44c56a6cdc8707b1

See more details on using hashes here.

File details

Details for the file diffpy_pdffit2-1.6.0-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 fa78dceeaea0151bfe78696ea41d6825c19bbe9ad0bd29734a649093557eae43
MD5 986b8dfc424fe9b5cf2e62633d545e28
BLAKE2b-256 2f7246cb5810b1c9eb1dfb267519385662eaf0f45a7ccf3184e460a9677431ef

See more details on using hashes here.

File details

Details for the file diffpy_pdffit2-1.6.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4c4418388b9ab4eaeb485a9950a455b3713d21319a98d61e9f69ca5b9a6b45e3
MD5 965c51e27a22a8ba411789b8f107d80f
BLAKE2b-256 015c87b5fefdd3c4b157c8a16833f2236723136806814584c4589610217252f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page