GNINA 1.3 WebGPU
3D CNN protein docking in the browser
2 min read
This is an implementation of the popular tool for molecular docking and protein-ligand binding scoring (GNINA 1.3), running entirely via WebGPU (a modern browser graphics API) with no external dependencies. The project brings atomic typing, Vina energy decomposition, and an ensemble of three 3D CNN (convolutional neural network) models directly to the browser environment. The solution weighs only 1.8 to 7.08 MB depending on precision (FP32, FP16, INT8) and delivers scoring results in fractions of a second. The tool is useful for bioinformaticians, researchers, and web application developers for analyzing molecular structures on the fly.
Key features
- Pure WebGPU: Computations happen on the GPU directly in the browser using WGSL shaders without installing heavy software.
- Minimal size: The entire three-model ensemble (1.77 million parameters) fits in a file under 8 MB.
- Fast inference: Warm startup time for the model ensemble on the GPU is only about 61–69 ms.
- Three precision presets: Support for FP32, FP16, and INT8 formats to optimize performance and memory usage.
What you can do
- Protein-ligand pose scoring: Quickly calculate
CNNscore,CNNaffinity, andCNN_VSmetrics for complexes directly in the web interface. - Batch analysis: Use the
scorePosesfunction for batch scoring of multiple poses in a single pass. - Atom contribution analysis: Apply per-atom and per-residue
maskContributionsslicing for detailed interaction studies. - Pose minimization: Perform rigid-body pose minimization using built-in optimization methods.
Example
import { createGninaEngine } from './webgpu/index.js';
const engine = await createGninaEngine({
baseUrl: './weights/gnina/fp16',
precision: 'fp16',
});
const result = await engine.scorePose(receptorPdbText, ligandSdfText);
console.log(result);
engine.destroy();Read more
Details• Core metrics: verified on complex structures
184L and 10GS with high accuracy matching Python benchmarks.• VRAM consumption: peak GPU memory consumption ranges from 66 to 72 MB depending on precision.
• Memory cleanup: complete buffer cleanup without leaks when calling the
destroy() method.• License: Dual Apache-2.0 / GPLv2.










Comments