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.0.tar.gz (72.9 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.0-py3-none-any.whl (45.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chemanim-0.1.0.tar.gz
  • Upload date:
  • Size: 72.9 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.0.tar.gz
Algorithm Hash digest
SHA256 a2450e251f0365b2fe63803b4cb89430d5fa6d712816ff254484bbed64c45c25
MD5 6456ee5c24d7a81a389f636c8d1af257
BLAKE2b-256 51ac6128b36b2b70f3590c4ed6ee51c4ea6ffca467a9e4a1d648c5428881667a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chemanim-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 45.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3bfd6cd27140390cdd94749349a864f1e20c99e0a061c6f6b6c86d4ed542b9a9
MD5 ca351b102c37ef5d2a6edf74cff8f0fb
BLAKE2b-256 748ac040ce57a6fd0c43ba35e8008f0d3750c1d55d6fcb2906268da1734782ca

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