Skip to main content

A Manim-based library for chemistry and biochemistry animations

Project description

Chemanim

A Python library extended from Manim for creating chemistry and biochemistry animations.

Features

  • Core Chemistry: Visualize Atoms, Bonds, and Molecules.
  • Trusted Data: Fetch molecular structures directly from PubChem.
  • Biochemistry: Parse and visualize PDB structures (Proteins/DNA).
  • 3D Molecules: Render ball-and-stick structures with PubChem or RDKit conformers.
  • Reactions: Animate chemical reactions simply.

Installation

1. Basic (Logic & Data only)

Use this if you don't need animations or cannot install Manim dependencies.

pip install -e .

2. Full (With Animations)

First, ensure you have Manim's system dependencies installed (FFmpeg, etc.).

pip install -e .[vis]

Usage

See examples/ folder for demo scripts.

manim -pql examples/demo_reaction.py SimpleReactionScene

3D quickstart

Install with Manim and RDKit (optional) and run the sample:

manim -pql examples/demo_3d_molecule.py Molecule3DDemo

External 3D viewers (py3Dmol / XYZ)

Optional dependency: pip install py3Dmol

  • Generate interactive HTML and XYZ: python examples/demo_py3dmol_viewer.py
  • Styles supported: ball, stick, ball-and-stick (default). Files land in media/py3dmol/.

Programmatic use:

from chemanim.connect import fetch_molecule_data
from chemanim.viewer_3d import show_py3dmol, write_xyz

data = fetch_molecule_data("benzene")
view = show_py3dmol(data, style="ball_and_stick")
view.write_html("benzene.html")
write_xyz("benzene.xyz", data)

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

chemanim-0.1.5.tar.gz (95.6 kB view details)

Uploaded Source

Built Distribution

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

chemanim-0.1.5-py3-none-any.whl (72.2 kB view details)

Uploaded Python 3

File details

Details for the file chemanim-0.1.5.tar.gz.

File metadata

  • Download URL: chemanim-0.1.5.tar.gz
  • Upload date:
  • Size: 95.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for chemanim-0.1.5.tar.gz
Algorithm Hash digest
SHA256 f5060f8f03c98bd4f0ca1af9979421fb2189428d8e85bd77fdda4d765df3d160
MD5 f24cac058fd97b988885ae6d49cd89b7
BLAKE2b-256 c944e27487815d968dcdd3471ad46c4f05e9c8f2923ea49dd8efb6c261a1f099

See more details on using hashes here.

File details

Details for the file chemanim-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: chemanim-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 72.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for chemanim-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 059d4bc85de45cc6ed89712d4806688a0d2c0a1bfae71b7d74409a8f60b443d0
MD5 9e1838ae40bfb772120b30a064b7059a
BLAKE2b-256 c9bbc4aad372d1238ed9cb457e2dcda7a2c07c92548276355fbe6a98a2c046b1

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