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.0rc1.tar.gz (307.0 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.0rc1-cp314-cp314-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14manylinux: glibc 2.39+ x86-64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

diffpy_pdffit2-1.6.0rc1-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.0rc1-cp313-cp313-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.13Windows x86-64

diffpy_pdffit2-1.6.0rc1-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.0rc1-cp313-cp313-macosx_11_0_arm64.whl (358.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

diffpy_pdffit2-1.6.0rc1-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.0rc1-cp312-cp312-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

diffpy_pdffit2-1.6.0rc1-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.0rc1-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.0rc1.tar.gz.

File metadata

  • Download URL: diffpy_pdffit2-1.6.0rc1.tar.gz
  • Upload date:
  • Size: 307.0 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.0rc1.tar.gz
Algorithm Hash digest
SHA256 c01a2f635dee7abb75f5f4bb09eee02f34c312b6a4fb04d33ca15c47672d7ae0
MD5 c1914fb31a5aee15e5a69a439f92b684
BLAKE2b-256 fdf27d5bb92b1033e4cac8075a4ba57da1208ffaa6a921cc977a1b55f14b38e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 33ecafa0e9624efc326726f65401c899442d018910b450e362f0f69dc38a1b43
MD5 99f3f15080e3d8c3e771b012a846b8be
BLAKE2b-256 2726db31e42bc6dc84c6fd7acfcfc9c65a089510235668c8c0c1a661146eb125

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc1-cp314-cp314-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 32da3199d9c64dc3cbfdc3284a31c04ad36fa75ed9d1cafaaff12ef7cc797ea2
MD5 7a817bb3b3019c9e8f0b0ee8166d3585
BLAKE2b-256 43ac4ec2e38dec8645da8f6f36e35a8c873ef332e32b8a6fbf66d7a667f46cc2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ce9794ab565c412e30dca02b46fc0139ce396ce16e01a95b0d31ddc46578284b
MD5 61f5c0ac08ee14ad63dcd152d7fef398
BLAKE2b-256 1bea5dbe0e169b1987e5f2151f2c6226ed0bd1ae7fa0421d3e7b4e4b994db327

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc1-cp314-cp314-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 6d32bfce435d38b5c4b4ae282f0cec95b34ec41fe40abe988d09569fde888ed7
MD5 13ea3ef4fcb53b383b129628459a1e7a
BLAKE2b-256 928e229c25d75097a6696933363fc21e90850d8ad03a8d59e8e95561ea995488

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 78b7301a06b9e651b378a98695fb4153567564742c7b6818caa29acd66be2312
MD5 80af6219556494751c9b5c6d83a7ab14
BLAKE2b-256 a3d6702fe0eae8b4a7d034b76787e158a0adeb290d4c42cb319d802c9653b49e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc1-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 fb4533ddf06336158ede240fe992933f82c478f9fbf641b5e14b0d01fad1f882
MD5 b0e32da8b8ea1b4f8e1d659222efdbd8
BLAKE2b-256 a3cc22731b0e228cd460a502e221fcac9cda5a53dde48ba2bf244cfcf08dcece

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 17ef8862c854f05393a504401c1213f6335d38113129157025e133b2d01a42ea
MD5 b07c88d0e8efa2183f60f72b110e28b1
BLAKE2b-256 42168f195ccaed3a7ba10275586696c14d6af339e452591948e6e427fd204d19

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc1-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 066dba8292f356844811685384f80c2be2338480e6cbc42991c2b003bd56d54a
MD5 c9a4308132e37bc8236e6d8932e4306b
BLAKE2b-256 466174d0b9de3dd683737760328af4650c78ac26ee1e8af57fae57e8048189a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 00ae644a695a06b6df0fa352f30f818668a3a016bb664616664127a5391aa563
MD5 34ab5a4d06e872f6c2e543e72fc0d5a1
BLAKE2b-256 cf86a7b2b647b94ce844a44ff5bfeda70a0d1b3f75a243bb42ff70bff1b75675

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc1-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 472deb8aae4100a41cb4bfb8e07757940623dc463f5b37ee671595cbffa7d6f1
MD5 aaddea804f7d035befded6511983aecf
BLAKE2b-256 ef50d0bf0b3bd9e84386f049f689ea348c40080f4dbcbcaaa9e24e385c61336f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc1-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 f7f0a5d7cfca4ad50be2a7131ab93107a10f285b0795c5a1374e18e958b74881
MD5 0fe2839170b98e70b14a3cb346593bdc
BLAKE2b-256 8bc75e4be12d13f5e1547d80612d2cef6879aefd0fa288521d01f228a3861672

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c1074ebfef94e3d8a71646ad62e1e7f58e9fa7bfb5e5c5eef14b69c2f95ac13a
MD5 97b3912d3c47b5003a7543cc1940c2f6
BLAKE2b-256 3c89151dde7d5215fd8d11b72d37ed167734e968526d38e19d8bfb5189b8c388

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