Skip to main content

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 .

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

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_mpdf-1.0.4.2.tar.gz (114.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

diffpy_mpdf-1.0.4.2-py3-none-any.whl (123.2 kB view details)

Uploaded Python 3

File details

Details for the file diffpy_mpdf-1.0.4.2.tar.gz.

File metadata

  • Download URL: diffpy_mpdf-1.0.4.2.tar.gz
  • Upload date:
  • Size: 114.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for diffpy_mpdf-1.0.4.2.tar.gz
Algorithm Hash digest
SHA256 5fcf3f84fe00ae0d8f6bc4f90bd5ab4e879c8a77585173d264dec5a6c73e24c5
MD5 66cb700a86b78fe98f4a2d49fc4166e2
BLAKE2b-256 9497fe0a5dffee27350b51f07d50931e85236a80ffad3c7852641d0c62904868

See more details on using hashes here.

File details

Details for the file diffpy_mpdf-1.0.4.2-py3-none-any.whl.

File metadata

  • Download URL: diffpy_mpdf-1.0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 123.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for diffpy_mpdf-1.0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 af0f64ab3f2408ab395332c6a5de56f4720cde874298e0aa48c823526c623483
MD5 438aecf213ac74b9413748886a02ff82
BLAKE2b-256 8d7121b0819ebfa32ba7ec89ffb369d60056062e2c567b0abbe704b379e987a3

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