On the surface
The exact SES distance field is sampled on a grid, Marching Cubes finds the crossings, and every vertex is then solved onto the analytic surface (|F| ≤ 10⁻⁴·h). Normals come from the closest point, not from triangles.
The exact SES distance field is sampled on a grid, Marching Cubes finds the crossings, and every vertex is then solved onto the analytic surface (|F| ≤ 10⁻⁴·h). Normals come from the closest point, not from triangles.
Edge-manifold meshes with outward normals, split into components with area, signed volume and genus. Internal cavities are found, kept, removed or isolated on request.
Only bricks near the surface are sampled. The field kernel dispatches at run time to AVX-512, AVX2, SSE4.2 or NEON; rayon spreads bricks over every core. Optional back ends sample on AMD GPUs through HIP and on NVIDIA GPUs through CUDA.
Output does not depend on the number of threads or on scheduling, nor on CPU or GPU in exact mode. Re-run a figure in a year and diff the OBJ files.
Grid spacing, presets, target vertex density, smoothing with exact re-projection, decimation that keeps vertices on the surface, and a memory limit that can coarsen the grid for you.
OBJ with groups and vertex colours, binary PLY, MSMS .vert/.face, all optionally gzipped; per-atom areas and per-vertex data as CSV, statistics as JSON.
One command from a file — or a whole directory of files — to a mesh. Pick the surface, the resolution and the extras.
# GroEL–GroES, fine grid, cavities removed,
# coloured by chain, decimated to a quarter
$ sesmesh 1aon.cif.gz -q high \
--cavities remove --vertex-colors chain \
--decimate 0.25 -o groel.ply
The same engine as a crate: spheres in, a validated mesh and its statistics out. Reuse one engine across trajectory frames.
use sesmesh::{compute_surface, Sphere, SurfaceParams};
let atoms = [
Sphere::new([0.0, 0.0, 0.0], 1.7),
Sphere::new([3.0, 0.0, 0.0], 1.7),
];
let params = SurfaceParams::ses(1.4).with_spacing(0.25);
let out = compute_surface(&atoms, ¶ms)?;
println!("{} triangles, {:.1} Ų",
out.stats.triangles, out.stats.area);
F(x) = rp − d(x, P)
The SES is the zero level set of one exact function: the probe radius minus the distance to P, the set of positions the probe centre can reach. sesmesh builds P from the SAS arrangement (spheres, intersection circles, triple points), evaluates F only where the surface can be, and contours it.