Skip to main content

Lightshow

image image image image
Ruff python Downloads


Lightshow is a Python library for easily generating computational spectroscopy input files. If you use our code, please consider citing our manuscript in the Journal of Open Source Software and our multi-code benchmark paper, which provides the methods and default parameters used in Lightshow.

Often, it can be daunting to create comprehensive, well documented databases of materials structures and their x-ray absorption spectra. Lightshow solves this problem, allowing new users to choose sensible defaults for their calculations, while simultaneously exposing all functionality for experts.

Lightshow aims to provide a "one-stop-shop" for input file generation, and currently supports the following codes:

with more on the way! The software is intended to be user-friendly, extensively documented and tested, and extendable for those users who wish to add additional spectroscopy functionalities. There are also a few comprehensive tutorials to help you get started.

Tutorials

We offer a few tutorials to get you started (with more on the way!)

# Tutorial Description Notebook
1 Basic usage Pull structure data from Materials Project, write input files for all codes Open In Colab
2 Spectral broadening Utilities for broadening spectra Open In Colab

Installation

To install Lightshow, simply use pip

pip install lightshow

Make sure you've set your Materials Project v2 API key as well! You can find some documentation on how to query data here and how to set up your new API key here.

export MP_API_KEY="your_Materials_Project_v2_API_key"

(or preferably, add MP_API_KEY to your bash profile).

More details can be found at our documentation.

Development installation

For developers: after cloning Lightshow locally, install pre-commit via

pip install pre-commit
pre-commit
pre-commit install

and check that the tests (below) work correctly (these can be run via pytest). After cloning, simply use

pytest lightshow/_tests

or with coverage

pytest -v --cov --cov-report xml lightshow/_tests

We use helper scripts to parse the pyproject.toml file and install only specific packages required for certain parts of development. For development, we recommend installing all dependencies:

bash scripts/install.sh       # Install Lightshow's core dependencies
bash scripts/install.sh test  # Install the test requirements only
bash scripts/install.sh doc   # Install requirements for building the docs

Contributing

We welcome any and all contributions by the community, including pull requests, bug reports, etc. Please see our contributing document for more details!

Adding new spectroscopy codes

Adding new spectroscopy codes requires one to inherit the _BaseParameters class from lightshow.parameters._base. The new Parameters(_BaseParameters) object should have a write() method, which must take a target directory as an argument, as well as any other keyword arguments require to write the input file (most notably, the Pymatgen structure, either a unit or super cell). The name property must also be defined (corresponding to the name of the calculation, e.g. "VASP"). Take a look at the examples in the lightshow.parameters module for more details!

Funding acknowledgement

This research is based upon work supported by the U.S. Department of Energy, Office of Science, Office Basic Energy Sciences, under Award Number FWP PS-030. This research used resources of the Center for Functional Nanomaterials (CFN), which is a U.S. Department of Energy Office of Science User Facility, at Brookhaven National Laboratory under Contract No. DE-SC0012704. This work received partial funding by the German Research Foundation (DFG) through the CRC 1404 (FONDA), Projektnummer 414984028, and the NFDI consortium FAIRmat – project 460197019. C.V. acknowledges support by the Department of Energy, Basic Energy Sciences, Materials Science and Engineering Division, through the Midwest Integrated Center for Computational Materials (MICCoM).

The Software resulted from work developed under a U.S. Government Contract No. DE-SC0012704 and are subject to the following terms: the U.S. Government is granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable worldwide license in this computer software and data to reproduce, prepare derivative works, and perform publicly and display publicly.

THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT WARRANTY OF ANY KIND. THE UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4) DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL BE CORRECTED.

IN NO EVENT SHALL THE UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, OR THEIR EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF ANY KIND OR NATURE RESULTING FROM EXERCISE OF THIS LICENSE AGREEMENT OR THE USE OF THE SOFTWARE.

Metadata

Release files for lightshow 1.2.8

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

Source distribution (sdist)

Source distribution for lightshow 1.2.8
File Size Uploaded
lightshow-1.2.8.tar.gz 1.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for lightshow 1.2.8
File Interpreter ABI Platform
lightshow-1.2.8-py3-none-any.whl Python 3 none any Details

Total release size: 1.2 MB

Release files / lightshow-1.2.8.tar.gz

Download URL lightshow-1.2.8.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
a2c7e15d8f8b99155ee88f97ca31d798a95fa11c889d70d5c9a9daa4ee6c2ffd
BLAKE2b-256 checksum
How to use checksums
36bff63a6df3fe132dad9e8c6ad5a13c4c11aae8848d162c966b17181d963ade
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2024.

Transparency log

Release files / lightshow-1.2.8-py3-none-any.whl

Download URL lightshow-1.2.8-py3-none-any.whl
Size 128.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd509b06799f688a5ab40eecce79745f329578a30be17dccd9cfe655efb93e85
BLAKE2b-256 checksum
How to use checksums
9d9bf2bce6d0ff9eb85e5014af5b23e41edc011492048b96884cb76e70ee998f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2024.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.8 This release

2 release files

1.2.7

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.0.15

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.2

2 release files

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