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-0.6.0rc1.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-0.6.0rc1-cp314-cp314-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

File metadata

  • Download URL: diffpy_pdffit2-0.6.0rc1.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-0.6.0rc1.tar.gz
Algorithm Hash digest
SHA256 f6a71fed8d3fc65cbbe5555b74778cf878995c477fd26dfa23e5a303e7f462ca
MD5 47eb779a8d1c11c663798adfaa172e41
BLAKE2b-256 b127c236ad18a354dc7f0065fbfa99dbbd802a0b2ca9bf8c82fae26c341876af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-0.6.0rc1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 2432b6c47d8690a3ce55723138d33c3b4d57e7d56fc19fdec85087dd81b0160b
MD5 0ade98b7b04b1eb3dd1ba25f890deb1d
BLAKE2b-256 72568db6fefd3dab24151d48c440812670cb77274b3d977e6a061d653731f3fa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-0.6.0rc1-cp314-cp314-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 04c3b6a17e4199964f4d962d0720d6d32c3ca0929aa094697ade3492949c0463
MD5 c5f4b5c3d3102eccd2ca754d7439f3f6
BLAKE2b-256 df46f01ffa0f4b3513931ab10515a8bd121d55629d6f27acbb89c5fe9d3d6f94

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-0.6.0rc1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 92d580efa1acfb8acdf1a736d133d9397c4a0a38774bdc23839d58060626a651
MD5 9c5737d127f1234fc839100fec4b9bb9
BLAKE2b-256 d67d18db82f6f1a8d117c3a9cdd8fd7949301da5ca343a381a9dd1a8f8ea6fd0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-0.6.0rc1-cp314-cp314-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 5dd6ce0caaa2c916c47911d8fac816060b4d7d1ffb09f36b9ba5aa2638f311de
MD5 014948039c13a21916db43b4254ea8be
BLAKE2b-256 04c58482077a2e51fe65e0f1bb60468ddab05a699e7ebe97f9f04746d7f013ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-0.6.0rc1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b0846ce49b291b9516e1deed77f3c888c06efe9f45eb31044ac6c52943d1e931
MD5 c05240be010e5fef122650e0ce8ac910
BLAKE2b-256 01c67de9f2117261607ce4b4c12a8d9a58d56f544f6971bf8e57b2dab625ca30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-0.6.0rc1-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 b672550aa1aea56ab87b78416b8eded3ef59a68a0c62b6d2e022e9ac8108350b
MD5 a4f1dd636097a9c624e3db08e1fcc75e
BLAKE2b-256 d59e62b2efea5398d3f58579cec0492d9471a1a08e6c3a78574430d282109295

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-0.6.0rc1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 997d3a8b4c001c33edc4ebd1c96ce35b63e2dc5455739600e19195a10a6b3de4
MD5 090aadae955ea1dd7144c8ad24e08ce2
BLAKE2b-256 5ba34b6ea9d8e83e9580da2eb2de07e9cb63f53cb0972e61b61e54246233ab55

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-0.6.0rc1-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 f8794a77f97f199acccac5b7db51418d9211e59ea668034d80444f52f271de53
MD5 6da5988e35c2b17782e9669fc4c9c457
BLAKE2b-256 a83b7ca3e2e8841b2212bf613ca6ad092caf0c7def5483eca79919f3f659892c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-0.6.0rc1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b10eff8500795f396e32fe6c4405232d4fb15fe36fa96c350b767a62a70081c0
MD5 3090a5b9e87b32951a5ec7c048e3c92d
BLAKE2b-256 b1411514857c0d6ea0fb4be6c107053791f05f3c338cf37b7b225b27dabe8a2f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-0.6.0rc1-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 90c0e7277d41f2945b4a7fb4b7bd4bbc091eba948f3ad7e5dbf6bac095ef0959
MD5 4eb54476e975ea43366e6af5fe533a99
BLAKE2b-256 53e2209affd06fa713fb4ae94dd259fa3d15bd9d6f5e43356f94e17420faac91

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-0.6.0rc1-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 60d19df458634014b9a808d5514851533e41165a1fa171be935a1b60e799ecbf
MD5 fb6a976d75f5fe007ed1dd447562f81d
BLAKE2b-256 4a2ea511cf5b28e3601b41fb02fd69f4c8f648f76a6623b8fe161b4119de13fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for diffpy_pdffit2-0.6.0rc1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2a9c07eebae087177ea722d93ae0872949323a1d84a78ada576fc08c4908b329
MD5 bebd075dcab0fb6ed3d18916c8da00b6
BLAKE2b-256 948a060152094be4c57678c19cfba3a4f466f0efc2ac3c35e004c1e1ba5207cf

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