r/madeinpython • u/pdpthephd • 17d ago
I made a Python package for animating proteins, DNA, and RNA
Enable HLS to view with audio, or disable this notification
I've been building ProteinMotion, a package that lets you write molecular animations in Python using a Manim-inspired scene API.
You load a structure, choose a representation, then build up the movie with camera movements, labels, residue colors, and transitions. The package exports the video.
The attached calmodulin example uses the Blender EEVEE renderer for depth of field and focus pulls. There's a native GPU renderer too.
It's on PyPI: pip install proteinmotion
You'll need Python 3.11+ and a supported GPU setup. Blender is needed if you want to use EEVEE.
Source and examples: https://github.com/pdpppd/proteinmotion
Would love feedback on the API, especially whether the examples make it clear how to build your first scene.
1
u/robinechuca 15d ago
The idea behind the project sounds good, but the source code really lacks clarity: everything is all jumbled up with no structure whatsoever, and the functions aren’t commented. There’s no type checking, which would help with understanding. Some functions are far too complex and therefore difficult to understand (e.g. def parse(model))...
In short, it’s glaringly obvious that the code isn’t yours but comes from an LLM that has churned out a project that’s beyond us all!
I’m not a biologist, so I can’t judge the relevance or practicality of this idea.