# Patch-Based Ray Tracing in NanoShaper Boosts Molecular Surface Computation

**Authors:** Marco Domenico Mazzeo, Vincenzo Di Florio, Walter Rocchia, Sergio Decherchi

PMC · DOI: 10.1021/acs.jcim.5c02287 · Journal of Chemical Information and Modeling · 2025-12-23

## TL;DR

NanoShaper's new patch-based ray tracing method significantly improves speed and memory efficiency for computing molecular surfaces.

## Contribution

A novel patch-based ray tracing algorithm that boosts performance and reduces memory usage in molecular surface computation.

## Key findings

- The new method achieves up to 12.5× performance gains and 8× memory reductions.
- It enables triangulation of multimillion-atom complexes on modest hardware.
- Results on over 1500 structures and the H1N1 virus confirm improved speed and accuracy.

## Abstract

NanoShaper (NS) is a widely used tool that leverages
ray tracing
for molecular surface triangulation, pocket detection, and supports
Poisson–Boltzmann equation solvers. By retaining the established
methodological framework and implementing a targeted redesign, our
approach achieves performance gains of up to 12.5× and memory
reductions of up to 8×, enabling the triangulation of complexes
containing millions of atoms on relatively modest computational architectures
in a short time. The key innovation is a patch-based ray tracing algorithm
that replaces the traditional ray-sweeping approach. By iterating
over surface patches rather than rays, this method enhances cache
performance and removes the need for memory-intensive grids for patch
localization, yielding major reductions in memory usage. Further optimizations
include the parallelization of the analytical solvent-excluded surface
(SES) construction and the replacement of uniform grids and octrees
with bilevel grids and/or compressed buffers. We also introduce an
analytical ray–torus intersection scheme based on an exact
quartic solution, which improves both accuracy and computational efficiency.
The updated version (v1.5) additionally provides a public C++ API
for seamless integration with external tools. The tool is available
at https://gitlab.iit.it/SDecherchi/nanoshaper. Results on more than 1500 structures and on a multimillion atom
complex (e.g., the H1N1 virus) confirm speed and accuracy achievements.

## Full-text entities

- **Chemicals:** Hydrogen (MESH:D006859), water (MESH:D014867), S-M (MESH:D012493), 1VSZ (-)
- **Species:** H1N1 subtype (serotype) [taxon 114727], Human adenovirus sp. (species) [taxon 1907210]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12801300/full.md

## Figures

13 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12801300/full.md

## References

18 references — full list in the complete paper: https://tomesphere.com/paper/PMC12801300/full.md

---
Source: https://tomesphere.com/paper/PMC12801300