Tools for magnetic PDF analysis.
Project description
diffpy.mpdf
Framework for comprehensive magnetic PDF analysis.
This package aims to provide a convenient method for computing the magnetic PDF (mPDF) from magnetic structures, performing fits to neutron total scattering data, and generating the experimental mPDF signal from magnetic scattering data. The mPDF is calculated by an MPDFcalculator object, which extracts the spin positions and spin vectors from a MagStructure object that the MPDFcalculator takes as input. The MagStructure object in turn can contain multiple MagSpecies objects, which generate magnetic configurations based on a diffpy.Structure object and a set of propagation vectors and basis vectors either provided by the user or read in directly from an MCIF file. Alternatively, the user can manually define a magnetic unit cell that will be used to generate the magnetic structure, or the magnetic structure can be defined simply as lists of spin positions and spin vectors provided by the user. The MPDFtransformer class is used to generate mPDF data from magnetic scattering data. Both one-dimensional (powder) and three-dimensional (single crystal) mPDF patterns can be calculated.
Please cite: Frandsen et al., "diffpy.mpdf: open-source software for magnetic pair distribution function analysis", J. Appl. Cryst. (2022) 55, 1377-1382. https://doi.org/10.1107/S1600576722007257
Requirements
This package requires Python 3.11 or greater and the following software:
numpy, matplotlib, scipy, diffpy.structure, diffpy.srreal
Recommended software:
Full diffpy.cmi suite, jupyter notebook
Current supported platforms are Linux, Unix, macOS, and Windows.
Recommended Installation Procedure
Step 1: Install diffpy.cmi
Follow the instructions at https://github.com/diffpy/diffpy.cmi.
Step 2: Install diffpy.mpdf with pip
Making sure you are in the correct python environment, run the command:
>>> pip install diffpy.mpdf
Alternatively, you can install from source by installing diffpy.structure and diffpy.srreal following the instructions on their respective github pages, then cloning or downloading the github repository https://github.com/FrandsenGroup/diffpy.mpdf on your local machine, navigating to the downloaded repository, and running the following command (making sure that you are in the correct python environment):
>>> pip install .
Documentation and Helpful Examples
Complete documentation is available at https://frandsengroup.github.io/diffpy.mpdf/index.html.
Several examples to help you get started with mPDF analysis are available as jupyter notebooks at https://github.com/FrandsenGroup/mPDF-tutorial.
You may also check out https://addie.ornl.gov/simulating_mpdf for a web-based tool to calculate mPDF patterns from magnetic CIF (mCIF) files.
Contributors
Benjamin Frandsen, Parker Hamilton, Jacob Christensen, Eric Stubben, Victor Velasco, Pavol Juhas, Xiaohao Yang, and Simon Billinge.
License
3-Clause BSD License
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
Built Distribution
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_mpdf-1.0.4.1.tar.gz.
File metadata
- Download URL: diffpy_mpdf-1.0.4.1.tar.gz
- Upload date:
- Size: 114.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e0ee9ebd014af916c02b631818d01d63c5727433f0e8d52a3257d1c032d22a9
|
|
| MD5 |
997074509c9a9eb11476fcd3633dcaa7
|
|
| BLAKE2b-256 |
0084de4df2d8b3fa9d401bd0a130f6ea64d0d0cf15a49620b389101f1ecbc43c
|
File details
Details for the file diffpy_mpdf-1.0.4.1-py3-none-any.whl.
File metadata
- Download URL: diffpy_mpdf-1.0.4.1-py3-none-any.whl
- Upload date:
- Size: 123.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2a96caed31ede504c0a8c641105f86bb44f1fdf7fe4ac961ce346692a1d6832
|
|
| MD5 |
4c529236a57e1d33a10975902bd446c7
|
|
| BLAKE2b-256 |
e2b15f19cd56671adce83c960b0078ea8f380f319adda69ea17bd801844b9c9f
|