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.6.tar.gz (104.5 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.6-py3-none-any.whl (72.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for chemanim-0.1.6.tar.gz
Algorithm Hash digest
SHA256 2e1cc48d2b0d261cff6aa2b4c13d0a3747617ca3c6ac2c23ca801e94b0b8c699
MD5 18b883ed8fee82875dd3725611f7c51b
BLAKE2b-256 c2aa34e5a764374d70823e3ec3a84d3991e8690ddf6b7bfd2dd3e03f192fc426

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for chemanim-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f900c5c66e842836c69a4edc4199842c5e266149daf675632a128d3f404e9c37
MD5 64e92948d77bb57814a0d67976774a76
BLAKE2b-256 8845d94c1276a286b11ab8b5a3463c931d9ff73c3c17f202b980d1166deedae5

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