Chanim
This is an extension to Manim library (initially created by 3Blue1Brown), for making videos regarding chemistry.
A Hindi version of this README is available here.
Installation (pip)
pip install chanim
Installation (Source)
- Install the external dependencies for manim as described here according to your OS.
- Clone the contents of this repository.
- Open a terminal in the cloned directory and run
pip install -e ., or if you prefer to use poetry instead,poetry install. This'll installmanimfor you as well if you don't already have it installed. (you'll still need to setup the external dependencies though)
That's about it. You can now do from chanim import <*|object_name> like any regular Python package.
Usage
Here's a little example of it working.
from chanim import *
class ChanimScene(Scene):
def construct(self):
## ChemWithName creates a chemical diagram with a name label
chem = ChemWithName("*6((=O)-N(-CH_3)-*5(-N=-N(-CH_3)-=)--(=O)-N(-H_3C)-)", "Caffeine")
self.play(chem.creation_anim())
self.wait()
Type this into a python (.py) file. I'll assume you named it chem.py
In your command prompt/terminal write this (assuming you're in your project directory):
manim -p -qm chem.py ChanimScene
This'll render your Scene and preview it in your default player (in medium quality).
Congrats! You've written and played your first animation with chanim (or "chanimation" should I say)
Explore the code and docs (coming soon!) for more on how to use chanim.
Abilities
Currently chanim only supports drawing compounds and reactions along with a few chemfig commands (such as coordinate bonds and complexes etc.) but more is to come! If you have a suggestion, file an issue with a proper tag.
A Quick Note
There may be some faulty code and a lot of this may not be well made/documented. Feel free to file an issue if something doesn't work properly.
Metadata
Release files for chanim 1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| chanim-1.3.tar.gz | 10.9 kB | Without provenance | Details for chanim-1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chanim-1.3-py3-none-any.whl | Python 3 | none | any | Details for chanim-1.3-py3-none-any.whl |
Total release size: 23.0 kB
Release files / chanim-1.3.tar.gz
| Download URL | chanim-1.3.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9bebfe903dd4206bdaa79f0e576c7889d5003c0e8a0e34e62e73ade49d5d851d
|
|
BLAKE2b-256 checksum How to use checksums |
abd6b88cf0e57313006524117039a8118967dc5bcbcf03ce134bce9c37e659bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.9.5 Windows/10
|
Release files / chanim-1.3-py3-none-any.whl
| Download URL | chanim-1.3-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
574a0b51d494d257101a51512b0216309bf5e3c5cfa65dd02c3095b4585a615a
|
|
BLAKE2b-256 checksum How to use checksums |
e1e029949c7ca3a47c0a2d58fe8952cb60129aec6f75f2efdd7d58e4d27d28dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.9.5 Windows/10
|
Security for chanim 1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.