A website that can do real time theoretical EM 2D projections from an uploaded pdb or cif file. Just open the page in your own browser! Let me know what other features you would like to use!
No installation. No server. No build step.
-
Click and open the website fast_2D_projection (Thanks to Daniel for the website deployment setup!)
-
Drag and drop a
.pdbor.cif/.mmciffile onto the window, or click Load PDB
Load, drag, and view
Hide and show chains and ligands
For a deployed static website (like this one!), the page loads into your browser cache and runs locally on your computer. Your uploaded PDB file is never sent anywhere — it's just as safe as downloading and opening it locally. But if you prefer to download your own copy of the html file permanently:
(1) Download Fast_2D_Projection_Visualization_v0.9.html
(2) Double click it and it should open in any modern browser (Chrome, Safari, ...)
I haven't checked all the equations myself yet, I will update the readme file when I am done checking. I used ChatGPT to check Claude's work and it passed, so I haven't checked it myself yet.
The electron scattering factor of each atom is parameterized as a sum of 5 Gaussians using Peng 1999 tabulated coefficients:
f(s) = Σᵢ aᵢ exp(−bᵢ s²)
where s = sinθ/λ (Å⁻¹) is the scattering parameter, and aᵢ (Å) and bᵢ (Ų) are element-specific coefficients fit to electron diffraction data.
The 2D projected density per atom is obtained analytically from the 2D inverse Fourier transform of each Gaussian slice via the projection-slice theorem:
φᵢ(ρ) = (π aᵢ / b_eff,i) exp(−π²ρ² / b_eff,i)
where ρ is the 2D radial distance from the atom center and b_eff,i = bᵢ + σ² incorporates the user-controlled blur.
Reference: Peng L-M (1999) Micron 30:625–648, Table 1.
Built by vibe coding with Claude (Anthropic)
MIT License
0 comments
log in to comment.