How I Built the Gram-Negative Envelope for a YouTube Short
PDB structures, two GROMACS runs, a scripted Blender scene, and the cuts I threw away.

The science of the first episode is in a separate post. This note is only about how the film was made.
The upload is here.
Why I did not draw the cell
A drawn cell is fine until the drawing invents a path. A beta-lactam has to get past lipopolysaccharide, find a porin, cross the periplasm, and reach a penicillin-binding protein. A line that goes straight through the membrane teaches a mechanism the cell does not use.
So I set one rule. Proteins come from the Protein Data Bank. Membranes come from a built bilayer. The drug is the real molecule. The peptidoglycan mesh is the only object I stylized, because there is no single atomic structure to import. Labels and camera moves can be designed. The atoms are not invented.
The steps
- Collect structures and build the membranes.
- Run short molecular dynamics so the membrane and the enzyme move.
- Build one base scene in Blender with Molecular Nodes.
- Script the camera, the drug path, and the hydrolysis shot.
- Render, draw the labels in 2D, cut, and add sound with ffmpeg.
The base scene and the shots are Python files. Blender runs them in the background. Changing a label is an edit and a re-render, not an afternoon of clicking.
Where each object came from
| Component | Source | What I used it for |
|---|---|---|
| OmpF porin trimer | PDB 3POX, oriented with OPM | The channel |
| Outer membrane with LPS | CHARMM-GUI Membrane Builder | 45 E. coli LPS molecules (lipid A, R1 core, O1 antigen) on the outer leaflet. PE, PG, and cardiolipin on the inner leaflet |
| TEM-1 | PDB 1XPB | The enzyme in the periplasm |
| PBP1b | PDB 3VMA, oriented with OPM | The target the drug does not reach |
| AcrB in a bilayer | MemProtMD 4DX5 | The pump. I removed the DARPins used for crystallization |
| Inner membrane | The same MemProtMD bilayer, patched | So the pump appears once |
| Ceftazidime | RCSB ideal coordinates (CAZ) | Ball-and-stick, bonds kept |
The opened-ring pose is not from TEM-1. No PDB entry has hydrolyzed ceftazidime in a class A active site. I superposed KPC-2 with hydrolyzed cefotaxime (PDB 5UJ3) onto TEM-1 using the Ambler active-site residues, then copied the ligand. The two drugs share the ring that opens. The side chains differ. At this scale the difference is easy to miss, so I state it here and in the science post.
The simulations
I ran two systems in GROMACS 2026 with CHARMM36m.
TEM-1 in water ran for 10 ns. That is enough for the enzyme to move a little on screen instead of sitting as a frozen crystal.
OmpF in the LPS outer membrane is about 229,000 atoms. I took it through the six CHARMM-GUI equilibration stages and then 5 ns of production.

Five nanoseconds does not relax an O-antigen brush. The two frames look alike, and they should. I am not making a claim about LPS dynamics. The run is there so the membrane is not a still picture, and so the protein has local motion.
One practical note. The conda-forge GROMACS build uses OpenCL, and that build did not see the NVIDIA card under WSL. The CUDA build (nompi_cuda) ran the same system much faster. The production run started on the CPU at 41 ns/day. After a checkpoint restart on the GPU it ran at 384 ns/day.
The scene
The camera looks at a cut. A geometry-nodes clip removes the half of each membrane nearest the camera, so the porin, the periplasm, and the inner membrane read in profile. I tiled the outer membrane three times along its periodic box vector. That gives three porins without a visible seam.

I checked a few lengths against published values before animating. The periplasm is 21 nm. The peptidoglycan sits 6 nm under the outer membrane. AcrB is 13.6 nm, which matches the OPM placement. The bilayer is about 5 nm thick. The gap from the top of AcrB to the underside of the outer membrane came out at 13.9 nm. TolC is about that long, so a later episode can add the full efflux assembly without moving the membranes.
Molecular Nodes reads the trajectories on the Blender timeline. The three TEM-1 copies are offset in time so they do not breathe together.
What was wrong with the first cut
The first cut had the right objects and a bad film. The camera barely moved. The layers looked flat. Captions sat at the bottom. I went through it frame by frame and wrote down 26 problems. They fell into three jobs.
Labels left the 3D scene. The render writes the screen position of each anchor for every frame. A 2D pass then draws a ring, a line, and one word. Text cannot end up behind the atoms. While one part is introduced, the rest of the frame is dimmed.

One camera move instead of jump cuts. The camera starts on the LPS surface, pulls back to the whole envelope, and goes down layer by layer. Each stop lasts about 3.5 to 5.5 seconds. The peptidoglycan is shown from above so it reads as a mesh.
The ring opening was too small. In the first cut the chemical event was easy to miss. The new shot is closer, slower, and has a flash on the bond, rings drawn in 2D, a short impact sound, and a dip in the music.


The edit
I rendered the tour and the drug entry as two pieces and joined them with a one-second crossfade. ffmpeg burns in the title and the gold lines. The music is normalized to the YouTube loudness target, with fades at both ends. The impact sound ducks the music for 0.6 seconds. Those are the only two audio edits. A full-resolution pass of the whole film takes about 20 minutes on a laptop GPU in EEVEE.
Frames from the build
These are intermediate renders, in the order I made them.











What I would change next time
- Render a still of every shot before rendering the sequence. Most of the wasted renders came from skipping that.
- Put label anchors on geometry the camera can actually see. With a high camera, an anchor on the cut plane can sit several nanometers away from the visible surface.
- Spend the time on the shot that carries the point. Here that shot is the ring opening.
- Keep lipids as spheres for wide shots. For close shots of the large proteins, a surface will be easier to read than ribbons.
What stays fixed
The next episodes keep this scene. They change the drug path, the binding pose, and the labels: the drug reaching PBP1b when no beta-lactamase is present, avibactam with ceftazidime, a closed porin, and the pump throwing the drug out. Scripts and small structure files are in the site repository. The large renders and trajectories are not committed.