Skip to main content

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 .

Step 3 (recommended): Install jupyter notebook and interactive plotting tools

To use the jupyter notebook tutorials mentioned below, install the notebook and ipympl packages as follows:

>>> pip install notebook ipympl

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

Metadata

Release files for diffpy.mpdf 1.0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for diffpy.mpdf 1.0.4.2
File Size Uploaded
diffpy_mpdf-1.0.4.2.tar.gz 114.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for diffpy.mpdf 1.0.4.2
File Interpreter ABI Platform
diffpy_mpdf-1.0.4.2-py3-none-any.whl Python 3 none any Details

Total release size: 237.3 kB

Release files / diffpy_mpdf-1.0.4.2.tar.gz

Download URL diffpy_mpdf-1.0.4.2.tar.gz
Size 114.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5fcf3f84fe00ae0d8f6bc4f90bd5ab4e879c8a77585173d264dec5a6c73e24c5
BLAKE2b-256 checksum
How to use checksums
9497fe0a5dffee27350b51f07d50931e85236a80ffad3c7852641d0c62904868
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.13

Release files / diffpy_mpdf-1.0.4.2-py3-none-any.whl

Download URL diffpy_mpdf-1.0.4.2-py3-none-any.whl
Size 123.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af0f64ab3f2408ab395332c6a5de56f4720cde874298e0aa48c823526c623483
BLAKE2b-256 checksum
How to use checksums
8d7121b0819ebfa32ba7ec89ffb369d60056062e2c567b0abbe704b379e987a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.13

Release history Release notifications | RSS feed

This release

1.0.4.2 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page