Metadata-Version: 2.4
Name: chemiscope
Version: 1.0.3
Summary: Helpers to work with the chemiscope interactive structure/property explorer for materials and molecules
Author-email: Guillaume Fraux <guillaume.fraux@epfl.ch>
License: BSD-3-Clause
Project-URL: homepage, https://chemiscope.org
Project-URL: documentation, https://chemiscope.org/docs/
Project-URL: repository, https://github.com/lab-cosmo/chemiscope
Keywords: visualization,materials science,chemistry,molecules
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: ipywidgets<9,>=7
Provides-Extra: explore
Requires-Dist: pet_mad<2.0,>=1.4; extra == "explore"
Requires-Dist: metatomic-torch<0.2,>=0.1.0; extra == "explore"
Requires-Dist: vesin<0.6,>=0.3.5; extra == "explore"
Provides-Extra: streamlit
Requires-Dist: streamlit>=1.25; extra == "streamlit"
Provides-Extra: headless
Requires-Dist: playwright>=1.52; extra == "headless"
Dynamic: license-file

# Python helpers for chemiscope

This package contains Python code to help generate input files for the
[chemiscope](https://chemiscope.org) default visualizer, and integrate
chemiscope with jupyter notebooks.

## Installation

You should use pip to install this package:

```bash
pip install chemiscope
```

This installs both a `chemiscope-input` command line tool, and the `chemiscope`
package.

## Usage

To create a new chemiscope input file:

```python
import chemiscope
import ase.io

# read structures using ase. You can also use other structure providers such as
# stk, MDAnalysis, …
structures = ase.io.read("structures.xyz", ":")

# add additional properties to display
properties = {
    "<property name>": {
        target: "atom",
        values: [3, 4, 2, 8, 9, 10],
    }
}

chemiscope.write_input(
    "my-input.json.gz", structures=structures, properties=properties
)
```

To display a chemiscope widget inside a jupyter notebook:

```python
import chemiscope
import ase.io

structures = ase.io.read("structures.xyz", ":")

properties = {
    "<property name>": [3, 4, 2, 8, 9, 10],
}

chemiscope.show(structures=structures, properties=properties)
```
