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

Uploaded Python 3

File details

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

File metadata

  • Download URL: chemanim-0.1.1.tar.gz
  • Upload date:
  • Size: 73.3 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.1.tar.gz
Algorithm Hash digest
SHA256 83df46983dc873fc088eaaee86b2722be7a4a73ba5c44c0f7ce8e222c16a21c4
MD5 4f6f0ed3c02f24822966c60de06d4ce8
BLAKE2b-256 fd5b525a99526eb2dbd498ea4ac360a68f7e93359074ebcf01c55cc2a807de32

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chemanim-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b6c35da49627a27bf9d2bfe95aba091b2282aed6f7984df984d78fdbc15933db
MD5 2a92b182c2577ca45c9986b89019a2e9
BLAKE2b-256 e8b7313912c9e13b5c0fa6d20760ce545a8cfb705dfe1ba0636a54419131c3ba

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