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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for chemiscope-0.8.0.tar.gz
Algorithm Hash digest
SHA256 3affb727f5f2252c83b49be1f821872680cfd337db158ede5b64bbd97c8bd9f3
MD5 c3c0d350dc8c52816774a80a18489ac1
BLAKE2b-256 4f3e68f74414e5e7d6a2ae48590c8041a7f0fa3bd5415db9189b7adbbd074100

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for chemiscope-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 026d147989ea3cfdd0f3b9cb8515b66dfe498ad2ebd7cadbe5345d009058bb9c
MD5 7d472fa94283a316ba3a5b8a5c9c5abf
BLAKE2b-256 54b71685fec319b69569b80aa3b4286128ffa25e90cea23fa698b9d086178c07

See more details on using hashes here.

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