pub struct StructureSpatial<'a> { /* private fields */ }Expand description
A spatial resolver bound to one immutable structure snapshot.
Implementations§
Source§impl<'a> StructureSpatial<'a>
impl<'a> StructureSpatial<'a>
Sourcepub fn new(
structure: &'a Structure,
policy: &AnalysisPolicy,
backend: SpatialBackend,
context: &'a ExecutionContext,
) -> Result<Self, Diagnostic>
pub fn new( structure: &'a Structure, policy: &AnalysisPolicy, backend: SpatialBackend, context: &'a ExecutionContext, ) -> Result<Self, Diagnostic>
Creates a resolver under the policy’s periodicity decision.
§Errors
Returns E5004 when periodicity is requested without a valid unit cell.
Sourcepub fn new_with_options(
structure: &'a Structure,
policy: &AnalysisPolicy,
options: SpatialSearchOptions,
context: &'a ExecutionContext,
) -> Result<Self, Diagnostic>
pub fn new_with_options( structure: &'a Structure, policy: &AnalysisPolicy, options: SpatialSearchOptions, context: &'a ExecutionContext, ) -> Result<Self, Diagnostic>
Creates a resolver under explicit spatial planning options.
§Errors
Returns a diagnostic for invalid options or periodic cell data.
Sourcepub fn cached_index_count(&self) -> usize
pub fn cached_index_count(&self) -> usize
Number of structure-bound indices currently retained for reuse.
Sourcepub fn pairs_with_backend(
&self,
query: &AtomSelection,
target: &AtomSelection,
cutoff: f32,
requested_backend: SpatialBackend,
) -> Result<Vec<NeighborPair>, Diagnostic>
pub fn pairs_with_backend( &self, query: &AtomSelection, target: &AtomSelection, cutoff: f32, requested_backend: SpatialBackend, ) -> Result<Vec<NeighborPair>, Diagnostic>
Searches one pair workload while retaining indices in this resolver.
The resolver itself is configured with Auto in a reusable plan. A
request may still pin a concrete backend; the target index is keyed by
that backend, cutoff and selection, so compatible operations share the
construction without changing the requested algorithm.
§Errors
Returns a diagnostic when the requested backend cannot be planned or the spatial kernel rejects the workload.
Trait Implementations§
Source§impl<'a> Debug for StructureSpatial<'a>
impl<'a> Debug for StructureSpatial<'a>
Source§impl SpatialResolver for StructureSpatial<'_>
impl SpatialResolver for StructureSpatial<'_>
Source§fn resolve(
&self,
request: GeometricRequest<'_>,
) -> Result<AtomSelection, Diagnostic>
fn resolve( &self, request: GeometricRequest<'_>, ) -> Result<AtomSelection, Diagnostic>
Resolves one query-language geometric request.
Each variant delegates to a focused helper to keep dispatch separate from individual spatial algorithms.
Auto Trait Implementations§
impl<'a> !Freeze for StructureSpatial<'a>
impl<'a> !RefUnwindSafe for StructureSpatial<'a>
impl<'a> !UnwindSafe for StructureSpatial<'a>
impl<'a> Send for StructureSpatial<'a>
impl<'a> Sync for StructureSpatial<'a>
impl<'a> Unpin for StructureSpatial<'a>
impl<'a> UnsafeUnpin for StructureSpatial<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more