Skip to main content

Crate voronota_ltr

Crate voronota_ltr 

Source
Expand description

Native rust port of voronota-lt for computing radical tessellation contacts and cells.

This library computes the radical Voronoi tessellation of a set of spheres, providing contact areas between neighboring spheres and solvent-accessible surface (SAS) areas and volumes for each sphere.

§Cell measures

Detailed Cell records are sparse. The Results::sas_areas and Results::volumes methods instead return one CellMeasure per input ball. Detached balls are CellMeasure::Computed with their full-sphere measure, geometrically absent cells are CellMeasure::Empty, and filtered results are CellMeasure::NotComputed.

§Example

use voronota_ltr::{Ball, CellMeasure, Results, compute_tessellation};

let balls = vec![
    Ball::new(0.0, 0.0, 0.0, 1.5),
    Ball::new(3.0, 0.0, 0.0, 1.5),
    Ball::new(1.5, 2.5, 0.0, 1.5),
];

let result = compute_tessellation(&balls, 1.4, None, None, false);

// Per-ball measures distinguish computed, empty, and unavailable cells.
let sas_areas: Vec<CellMeasure> = result.sas_areas();
let volumes: Vec<CellMeasure> = result.volumes();

// Total SAS area across computed cells.
let total_sas: f64 = result.total_sas_area();

for contact in &result.contacts {
    println!("Contact {}-{}: area={:.2}", contact.id_a, contact.id_b, contact.area);
}

Re-exports§

pub use input::FileComputeError;
pub use input::compute_tessellation_from_file;

Modules§

input
Input file parsing (PDB, mmCIF, XYZR formats). Input file parsing for PDB, mmCIF, and XYZR formats.

Structs§

Ball
Input sphere defined by center coordinates and radius.
Cell
Voronoi cell properties for a sphere.
CellEdge
An edge in the tessellation network.
CellVertex
A vertex in the tessellation network.
Contact
Contact area between two neighboring spheres.
GraphicsWriter
Collects graphics primitives and writes PyMOL CGO scripts.
PeriodicBox
Periodic boundary conditions defined by three lattice vectors.
SolventSphere
A pseudo-solvent sphere representing where a solvent molecule could sit on the molecular surface.
TessellationResult
Result of a tessellation computation.
UpdateableResult
Result of updateable tessellation with per-sphere contact storage.
UpdateableTessellation
Updateable radical tessellation that supports incremental updates.

Enums§

CellMeasure
A scalar measure associated with one input ball’s tessellation cell.
SolventSpheresError
Error type for solvent sphere computation.
SubdivisionDepth
Subdivision depth controlling the number of sample points.

Traits§

Results
Trait for accessing tessellation results (contacts and cells).

Functions§

compute_contacts_only
Compute only contact areas between spheres, without cells, SAS, solid angles, or volumes.
compute_solvent_spheres
Generate weighted pseudo-solvent spheres around a molecule.
compute_tessellation
Compute radical tessellation contacts and cells.