Skip to main content

Display and Edit Molecular Structures and Trajectories in the Browser.

Project description

zincware PyPI version DOI codecov 'Threejs

ZnDraw

Install via pip install zndraw. If you have pip install pywebview installed, ZnDraw will open in a dedicated window.

CLI

You can use ZnDraw to view a file using the CLI zndraw traj.xyz. Supported file formats include everything that ase.io can read and additionally h5 files in the H5MD standard.

If you want to view the frames while they are added to the scene you can use zndraw -mp traj.xyz. See zndraw --help for more CLI options.

Python

ZnDraw provides a Python interface. The zndraw.ZnDraw object offers append, extend as well as assignment operations. More information is available in the example notebook.

from zndraw import ZnDraw
import ase

vis = ZnDraw()

vis.socket.sleep(2) # give it some time to fully connect
vis[0] = ase.Atoms(
  "H2O", positions=[[0.75, -0.75, 0], [0.75, 0.75, 0], [0, 0, 0]]
  )

ZnDraw also provides an interface to the Python logging library, including support for formatters and different logging levels.

import logging

log = logging.getLogger(__name__)
log.addHandler(vis.get_logging_handler())
log.critical("Critical Message")

User Interface

ZnDraw UI

ZnDraw UI3

Development

ZnDraw is developed using https://python-poetry.org/. Furthermore, the javascript packages have to be installed using https://www.npmjs.com/.

cd zndraw/static/
npm install

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zndraw-0.2.2a4.tar.gz (17.6 MB view details)

Uploaded Source

Built Distribution

zndraw-0.2.2a4-py3-none-any.whl (20.9 MB view details)

Uploaded Python 3

File details

Details for the file zndraw-0.2.2a4.tar.gz.

File metadata

  • Download URL: zndraw-0.2.2a4.tar.gz
  • Upload date:
  • Size: 17.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.8 Linux/6.2.0-34-generic

File hashes

Hashes for zndraw-0.2.2a4.tar.gz
Algorithm Hash digest
SHA256 8fcd1115501a192de73a441cd93fad26966a376e2d8de199347cdf023a270fb3
MD5 bc0a001d11ea51a723ac7cf83957d7fd
BLAKE2b-256 2a4293bfe6f385d9638d202b51bb5bdb20b9bc64f8583ac0560a5b5df4f79862

See more details on using hashes here.

File details

Details for the file zndraw-0.2.2a4-py3-none-any.whl.

File metadata

  • Download URL: zndraw-0.2.2a4-py3-none-any.whl
  • Upload date:
  • Size: 20.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.8 Linux/6.2.0-34-generic

File hashes

Hashes for zndraw-0.2.2a4-py3-none-any.whl
Algorithm Hash digest
SHA256 50f233f1ff07b55d9c2c6277039bdbd202013b1e6be7894b057d72db7e0270f4
MD5 ebc916643de07199c8c52583a572e2fe
BLAKE2b-256 7446836f63f2961034674c0b3874349ae86349753da88a35234a7cbc2f5408dd

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