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 as an interactive widget in notebook environments (Jupyter, JupyterLab, marimo, and Google Colab).

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 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 notebook:

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)

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-1.1.0.tar.gz (3.0 MB view details)

Uploaded Source

Built Distribution

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

chemiscope-1.1.0-py3-none-any.whl (3.0 MB view details)

Uploaded Python 3

File details

Details for the file chemiscope-1.1.0.tar.gz.

File metadata

  • Download URL: chemiscope-1.1.0.tar.gz
  • Upload date:
  • Size: 3.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for chemiscope-1.1.0.tar.gz
Algorithm Hash digest
SHA256 87fae6fb05dc44c8cee3c778e40b4dd62ac5164df91cc3db46421d31ef3903be
MD5 112b4d3ccd00a7f20bc0d6761d725bd4
BLAKE2b-256 6e4686534a161e88888ee4826b5aaa4cf4a038331db6a8e46f7ce34649564412

See more details on using hashes here.

File details

Details for the file chemiscope-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: chemiscope-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for chemiscope-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 47fcffa7b306deadeef853ed0bbda156fa09a22411bcb0ee01451bf09ed90c8a
MD5 206c37a45472ee9e8f868b97e57766c4
BLAKE2b-256 ca5d159143b0a7b4f0997460aad7d2a82d7456eb3523844ea6d1debb7013308b

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