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 can also be stk objets, e.g.
# frames = [stk.BuildingBlock(smiles="NCCN")]
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 can also be stk objets, e.g.
# frames = [stk.BuildingBlock(smiles="NCCN")]
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.8.2.tar.gz (3.7 MB view details)

Uploaded Source

Built Distribution

chemiscope-0.8.2-py3-none-any.whl (3.7 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chemiscope-0.8.2.tar.gz
  • Upload date:
  • Size: 3.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.0

File hashes

Hashes for chemiscope-0.8.2.tar.gz
Algorithm Hash digest
SHA256 f9359c6ee20707fd298a9cadfec580b935b91a86869d87153551cb2816d71888
MD5 78b734840623a2b8aebd9197b8c02755
BLAKE2b-256 8e4f1fed5afbde4cb4dfe2a8e0ad7bb5f8acc8e7aac8c96370d6c02355fc31f7

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: chemiscope-0.8.2-py3-none-any.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.0

File hashes

Hashes for chemiscope-0.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fc5be4213d5e22c62e7cf3777ff6bbd734c1b542c30e54c80898e6a574758ce5
MD5 e47728ec74951934f83866c0b19c2ffd
BLAKE2b-256 0b7eabb417f9966a0d0ba04a4b7d6bfa9082a5b56127ad58331a0d81728390d7

See more details on using hashes here.

Provenance

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