An interactive 3D molecular dynamics visualization platform built with React, Three.js, and WebGPU for high-performance rendering of large protein structures.
- Interactive 3D Visualization: Real-time molecular structure rendering with orbit controls
- WebGPU Acceleration: GPU-powered rendering for large protein structures (10k+ atoms)
- Performance Monitoring: Built-in FPS counter to track rendering performance
- Chain Selection: Interactive chain highlighting and information display
- PDB Support: Load and visualize PDB format molecular structures
- Trajectory Playback: Animate molecular dynamics simulation trajectories
|
|
|
|
- React - UI framework
- TypeScript - Type-safe development
- Three.js / React Three Fiber - 3D rendering
- WebGPU - GPU-accelerated compute and rendering
- React Three Drei - Helpful Three.js utilities
- Node.js (v14 or higher)
- npm or yarn
- WebGPU-compatible browser (Chrome 113+, Edge 113+)
- Load a Structure: Upload a PDB file or use the included example (trajectory.json)
- Navigate: Use mouse to rotate (left-click drag), pan (right-click drag), and zoom (scroll)
- Select Chains: Click on molecular chains to highlight and view detailed information
- Monitor Performance: Check the FPS counter in the top-right for rendering performance
The application automatically detects WebGPU support and falls back to WebGL for systems without WebGPU:
- WebGPU Mode: Used for structures with 10,000+ atoms
- WebGL Mode: Used for smaller structures or WebGPU-incompatible browsers
md-ui/
โโโ src/
โ โโโ components/ # React components
โ โ โโโ MolecularView.tsx
โ โ โโโ BackboneView.tsx
โ โ โโโ GPUAtomRenderer.tsx
โ โ โโโ FPSCounter.tsx
โ โโโ gpu/ # WebGPU context and shaders
โ โ โโโ WebGpuContext.ts
โ โ โโโ computePipeline.ts
โ โ โโโ shaders/
โ โโโ types/ # TypeScript type definitions
โ โโโ pages/ # Page components
โโโ images/ # Screenshots and assets
โโโ public/ # Static files
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.



