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.11, 3.12, and 3.13.

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

diffpy_pdffit2-1.6.0rc0-cp311-cp311-manylinux_2_39_x86_64.whl (470.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

diffpy_pdffit2-1.6.0rc0-cp311-cp311-macosx_11_0_x86_64.whl (372.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

diffpy_pdffit2-1.6.0rc0-cp311-cp311-macosx_11_0_arm64.whl (358.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for diffpy_pdffit2-1.6.0rc0.tar.gz
Algorithm Hash digest
SHA256 110bf6fbad86205f1b0d8a9f9e2b95a01a76f834589f56e6190c6062af5f6176
MD5 c037df8ecd778f7c61140c67bc2dd5ed
BLAKE2b-256 b16d6a2f2e95f2ec44e48e5e7504c04e38c3263ff9acbd907b4105e45fa08ab0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 22c92ccca3cb9d03a48030736f4a47a1cd7c0f5d6d9e2b5c404b85e3762a8000
MD5 d2f634e3b942eb7e48034a201982e694
BLAKE2b-256 8849f962f3fada4c13c6ea123c3ea885207a837337fb79e563e659aae7da30fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc0-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 b67aafe4469307969b32abdaa2f7e740258b410ef6eee666452113e9b432695c
MD5 b3b6dbd42f93f539cf442c808879b8da
BLAKE2b-256 c21ae249bb4ad06e6c6ece0ee4558f99810f031cdf41557642abb8781dfdf37a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f53b4742abdab704c1a9875f876fce198ad290051b8b84790c84f95eac27b885
MD5 1cc52ef87eafb0983633e6148247b94d
BLAKE2b-256 26bdedf65bc23127648d238c9d9ae78482b48c7a7f05c22950b7cd1784aa61ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 e583cd0701c498a4ebe25f04e8c698ebcd21b7c1321317ca86fc78a3efcdd81e
MD5 67b8c0b1bc21097bc923e984670764bb
BLAKE2b-256 ca561077f2d69ccf346a0b48d25d0c559c5775166e8a0034c02aa64ef85aaf6e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e63bb0e4969e897f5eccb4dd84eb43ba3cda83d751b9affa21afd3d510688dc5
MD5 bf7e1d4ad58c4b64b7a1300bc8ab9afb
BLAKE2b-256 2ea6556d059335df0f60e0acc8f5a910a02db61cd49d8f630d6e561b88f8b748

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc0-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 10c419785327b7227107a1b9d7050ca993b1cafa795e721d6abd4cdc246ddfeb
MD5 de3cdb56472c8e7635518a42e8773c79
BLAKE2b-256 ede4e0fd634430d0a74534c7503d57e7e2be143cf9625c7af3ad41495035f279

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc0-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 87fc87ad37daa1ccaca8a09a01a3ab72e42fb7cbfdc360e120132d73ee7f73d7
MD5 5240e4d1fc7c2f770e95412c7aca10d1
BLAKE2b-256 92e0c498474ca958b98deb1c0476df6ef62259e15ac250752055855d7650a8f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 609f180402d2ec9fbdbd97aed86b2a54e454918019a0b7e95151953c6d42ee3c
MD5 53f240658ce55b60dbbe466183a530f7
BLAKE2b-256 2c98d18e6413549fc389074c1eea894b56a3924843ccd4ff3849a329c5a1056e

See more details on using hashes here.

File details

Details for the file diffpy_pdffit2-1.6.0rc0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2b920a49b7ebead754f0768f5889b667d2c1cc3933e6dac82460255bc88b25b4
MD5 04bff42f51963c0810712cb4fac9649f
BLAKE2b-256 1a9faaa449f1f6d6ad559b1d3231d1024d4887c1e90c862c9778397e873fe6a6

See more details on using hashes here.

File details

Details for the file diffpy_pdffit2-1.6.0rc0-cp311-cp311-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc0-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 2e48671d862b71ebe990ea93d1c0ba6085b483811df88b5a2ee473d418148752
MD5 04dc4ddfa8d0451918dac06e1c3b0954
BLAKE2b-256 4a43da81900ad1a5d2798fd260654570ff16e320d98b0673405608c989e39bce

See more details on using hashes here.

File details

Details for the file diffpy_pdffit2-1.6.0rc0-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 c29bb7c00f2353d6e047d63fd61aad3a9b23e06a9341deb0c1944863598323ed
MD5 7560211d5648f43f9e3f6b3403a447cc
BLAKE2b-256 ff17833be9602caa36931718d1d95b9e796dfab9d7e885611822d7588caa1502

See more details on using hashes here.

File details

Details for the file diffpy_pdffit2-1.6.0rc0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for diffpy_pdffit2-1.6.0rc0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 55d52e970d02f2df69d1ec8fc661bc35c4044e6f3cb7f847a7b4d9a7e0667500
MD5 0e85f061bb91157967730dc365c65f21
BLAKE2b-256 c459e4711fdbde7386247ff9ec5524ef4c93a566450102ac58e27fc73882fac5

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