Skip to main content

Helpers to work with the chemiscope interactive structure/property explorer for materials and molecules

Project description

Python helpers for chemiscope

This package contains Python code to help generate input files for the chemiscope default visualizer, and integrate chemiscope with jupyter notebooks.

Installation

You should use pip to install this package:

pip install chemiscope

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

Usage

To create a new chemiscope input file:

import chemiscope
import ase.io

# read frames using ase
frames = 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", frames=frames, properties=properties)

To display a chemiscope widget inside a jupyter notebook:

import chemiscope
import ase.io

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

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

chemiscope.show(frames=frames, properties=properties)

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

chemiscope-0.6.1.tar.gz (2.7 MB view hashes)

Uploaded Source

Built Distribution

chemiscope-0.6.1-py3-none-any.whl (2.8 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page