PDFfit2 - real space structure refinement program.
Project description
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.
Install pre-commit in your working environment by running conda install pre-commit.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file diffpy_pdffit2-1.5.2.tar.gz.
File metadata
- Download URL: diffpy_pdffit2-1.5.2.tar.gz
- Upload date:
- Size: 306.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04a5539e5cc10896e3b28c3f0a433222c1856a2dc4014904b73988a03b123f24
|
|
| MD5 |
5c91b73102349ce00f636fd707e13d06
|
|
| BLAKE2b-256 |
eeaf3b86dbd18d8dab5646f5b7c7db5bd9c43108e093864032aabd35d41b127d
|
File details
Details for the file diffpy_pdffit2-1.5.2-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: diffpy_pdffit2-1.5.2-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df6a2005a773748e24a2dcca4fcfd275dbba8d62f89da19c39677bd30c29cf63
|
|
| MD5 |
ed165fdfb674293821df2b3d1dad20b5
|
|
| BLAKE2b-256 |
1f0c6826cb2151628c59cca66ca6089ff910ab3ccd62b0524c2b398dc145ee52
|
File details
Details for the file diffpy_pdffit2-1.5.2-cp313-cp313-manylinux_2_39_x86_64.whl.
File metadata
- Download URL: diffpy_pdffit2-1.5.2-cp313-cp313-manylinux_2_39_x86_64.whl
- Upload date:
- Size: 470.6 kB
- Tags: CPython 3.13, manylinux: glibc 2.39+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f39caa9a3a428a4275b90d7199ce6d446db1044887542110475bacc6c61436db
|
|
| MD5 |
d4192e358fd7a53e4562787e40d8b8e7
|
|
| BLAKE2b-256 |
bec8c74d86aabc3d2e82d75b9e955c6798531464645ea451318d746051395805
|
File details
Details for the file diffpy_pdffit2-1.5.2-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: diffpy_pdffit2-1.5.2-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 358.7 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b1e21b8902a45e8f019b62c5c0ebf73dd4f95687109e6450f8ca884f96a50df
|
|
| MD5 |
7921bdc72a755757244866472c113bef
|
|
| BLAKE2b-256 |
a328d050c2716c74c6fce9ace360e727e6f86b68212fb6b0ea57c005ebe574ea
|
File details
Details for the file diffpy_pdffit2-1.5.2-cp313-cp313-macosx_10_13_x86_64.whl.
File metadata
- Download URL: diffpy_pdffit2-1.5.2-cp313-cp313-macosx_10_13_x86_64.whl
- Upload date:
- Size: 372.3 kB
- Tags: CPython 3.13, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fb32cc2a702176fd8f22eeb78e628f4d51f41c8eeeaccce9e9897c01e73df9c
|
|
| MD5 |
8a4cb96f37cf4e094a9b3099f8257019
|
|
| BLAKE2b-256 |
19ebbb3ff420acdaf9bcaf94c510f42df11974bc3fc475ef50d619366f33fda3
|
File details
Details for the file diffpy_pdffit2-1.5.2-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: diffpy_pdffit2-1.5.2-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23ff6b09f6af75e4d1143119daf3b28029f1138f19ab35d721a24d23524e9bc4
|
|
| MD5 |
19731011ee2c4ff2c449415e0e6816d9
|
|
| BLAKE2b-256 |
8e7dc340c18b1af6d0a472af61d84291a16a2fa11d58f4c5402f013a98a1ca51
|
File details
Details for the file diffpy_pdffit2-1.5.2-cp312-cp312-manylinux_2_39_x86_64.whl.
File metadata
- Download URL: diffpy_pdffit2-1.5.2-cp312-cp312-manylinux_2_39_x86_64.whl
- Upload date:
- Size: 470.6 kB
- Tags: CPython 3.12, manylinux: glibc 2.39+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a74168140ee5c0f8a521d13bc609ff9020548e6c284e3751c97e99444e00b23
|
|
| MD5 |
6da6be3e3e60ecf75b94267a1872dadf
|
|
| BLAKE2b-256 |
333b5644acc421b607d81a7cc000f9ea2ddc224323c9ff59d18442c0f67474cd
|
File details
Details for the file diffpy_pdffit2-1.5.2-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: diffpy_pdffit2-1.5.2-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 358.7 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e82f082f1e7a815bcf7be59ebbe682fc049d0b556dc30aa158bff5971a3212d
|
|
| MD5 |
260299569a8bed229e015519519d1c8e
|
|
| BLAKE2b-256 |
9e868503926752353bb714984886684083743c46a27efcac221c15714c7752ac
|
File details
Details for the file diffpy_pdffit2-1.5.2-cp312-cp312-macosx_10_13_x86_64.whl.
File metadata
- Download URL: diffpy_pdffit2-1.5.2-cp312-cp312-macosx_10_13_x86_64.whl
- Upload date:
- Size: 372.3 kB
- Tags: CPython 3.12, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76285c41f225dd20a04e508ad44ffad8283fa000214e3a9cb6b80f9c59004aa7
|
|
| MD5 |
fd34724e4265f7ff245ae988c97f04ea
|
|
| BLAKE2b-256 |
dc979b1e69f4c97c3a9b79fb7fd073e975491dacc06f124443db303bc58934f5
|
File details
Details for the file diffpy_pdffit2-1.5.2-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: diffpy_pdffit2-1.5.2-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fed73956031c425b2a082f59e83f8c769cf6b675ad99c653db4beb6b164c822
|
|
| MD5 |
2cfb022994e6470891b8993561aed355
|
|
| BLAKE2b-256 |
5233fae9a52a6cb97efd21176303dfef44e487b56e3473c1329e019d5682d158
|
File details
Details for the file diffpy_pdffit2-1.5.2-cp311-cp311-manylinux_2_39_x86_64.whl.
File metadata
- Download URL: diffpy_pdffit2-1.5.2-cp311-cp311-manylinux_2_39_x86_64.whl
- Upload date:
- Size: 470.6 kB
- Tags: CPython 3.11, manylinux: glibc 2.39+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cde626b5dddade30e85842dcc4451f0b151727d2288a4090db690780fd9fccc0
|
|
| MD5 |
92c5251dedd9163e613b390395298cd5
|
|
| BLAKE2b-256 |
577c915a0d0bc9d916fc3b80cba0e3670893f7cb77515c6a120a4e9ca18e3a77
|
File details
Details for the file diffpy_pdffit2-1.5.2-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: diffpy_pdffit2-1.5.2-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 358.4 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15a92b442bc7802333da8088054fbdf1c7bbf2416dd3db6205c244c0fb00eb71
|
|
| MD5 |
22fb39b8a13c4b3c9f6d401187601884
|
|
| BLAKE2b-256 |
cec97b61255980383781774d9857aa9e97fe7e9b8b08f97c0974afeef3083dd9
|
File details
Details for the file diffpy_pdffit2-1.5.2-cp311-cp311-macosx_10_13_x86_64.whl.
File metadata
- Download URL: diffpy_pdffit2-1.5.2-cp311-cp311-macosx_10_13_x86_64.whl
- Upload date:
- Size: 372.0 kB
- Tags: CPython 3.11, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9206c5b3a25b1a51a02fc7276951df8461492813a1294c3c291422fdf3956b16
|
|
| MD5 |
44a5c84026dc8c4cd23dc1ee4135156c
|
|
| BLAKE2b-256 |
949e0e27056c6165ab3e2536d5efbc358cf495e6cd57fbaf51e68b1113fa7771
|