Metadata-Version: 2.4
Name: xPDFsim
Version: 0.1.0
Summary: Simulation of X-ray and neutron pair distribution functions from CIF files, with a browser GUI.
Author: Jan-Benedikt Weiß
License-Expression: GPL-3.0-or-later
Project-URL: Repository, https://github.com/JBWeiss-chem/xPDFsim
Project-URL: Documentation, https://xpdfsim.readthedocs.io
Keywords: PDF,pair distribution function,total scattering,disordered materials,simulation,crystallography,X-ray,neutron
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: xPDFsim/static/vendor/three/LICENSE
Requires-Dist: numpy
Dynamic: license-file

# xPDFsim

Simulation of X-ray and neutron pair distribution functions (PDFs) from CIF files, with an interactive
graphical user interface in the browser. Read the documentation [here](https://xpdfsim.readthedocs.io/en/latest/).

![Basic usage of the graphical user interface of xPDFsim](https://raw.githubusercontent.com/JBWeiss-chem/xPDFsim/main/docs/gui_highlight.gif)

## Features

- Simulation of R(r), ρ(r), g(r), G<sub>K</sub>(r), G(r), D(r), T(r) and N(r), defined as in Peterson *et al.* [(2021)](https://doi.org/10.1107/S1600576720015630)
- X-ray and neutron PDFs, with all element-element partial PDFs
- Graphical user interface in the browser with a 3D structure viewer and interactive graphs
- Highlighting of the atom pairs that contribute most to a region of the PDF, with their share of it
- Export of the simulated PDFs to a CSV file

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install xPDFsim. Its only dependency is numpy.

```bash
pip install xPDFsim
```

## Usage

Simulate the PDF of a structure; the result opens in the graphical user interface in your browser:

```bash
xPDFsim example.cif
```

Calculate the neutron G(r) and save it as a CSV file, without opening the browser:

```bash
xPDFsim -p G_r --radiation neutron -o --no-plot example.cif
```

Start the graphical user interface without a file:

```bash
xPDFsim-gui
```

All options are listed with `xPDFsim -h`.

## Contributing

Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.

## License

[GNU GPLv3](https://choosealicense.com/licenses/gpl-3.0/). The bundled three.js is licensed under the MIT
licence; the example structures from the COD are in the public domain.
