pub struct Query { /* private fields */ }Expand description
A parsed and reusable selection plan.
Implementations§
Source§impl Query
impl Query
Sourcepub fn references(&self) -> Vec<&str>
pub fn references(&self) -> Vec<&str>
Names this query refers to, in ascending order and without repeats.
These are the definitions the query depends on directly; a definition’s
own references are its own dependencies. Runtime is O(E).
Source§impl Query
impl Query
Sourcepub fn compile(source: &str) -> Result<Self, Vec<Diagnostic>>
pub fn compile(source: &str) -> Result<Self, Vec<Diagnostic>>
Compiles textual selection syntax into a reusable typed plan.
§Errors
Returns registered diagnostics for lexical, syntax and type errors.
Sourcepub fn from_builder(builder: Builder) -> Self
pub fn from_builder(builder: Builder) -> Self
Creates a reusable query from the typed builder surface.
Sourcepub fn fingerprint(&self) -> QueryFingerprint
pub fn fingerprint(&self) -> QueryFingerprint
Stable identity of the normalized typed query plan.
Sourcepub fn by_residue(target: Self) -> Self
pub fn by_residue(target: Self) -> Self
Expands the selected atoms to their complete residues.
Sourcepub fn residues_within(radius: f32, target: Self) -> Self
pub fn residues_within(radius: f32, target: Self) -> Self
Selects complete residues within radius of target.
Sourcepub fn logical_plan(&self) -> LogicalPlan
pub fn logical_plan(&self) -> LogicalPlan
Returns the storage-independent plan produced by either input surface.
Sourcepub fn plan(
&self,
structure: &Structure,
policy: &AnalysisPolicy,
) -> PhysicalQuery
pub fn plan( &self, structure: &Structure, policy: &AnalysisPolicy, ) -> PhysicalQuery
Binds this query to a structure dictionary and analysis policy.
Sourcepub fn evaluate(
&self,
structure: &Structure,
policy: &AnalysisPolicy,
groups: &Groups,
spatial: Option<&dyn SpatialResolver>,
) -> Result<Evaluation, Vec<Diagnostic>>
pub fn evaluate( &self, structure: &Structure, policy: &AnalysisPolicy, groups: &Groups, spatial: Option<&dyn SpatialResolver>, ) -> Result<Evaluation, Vec<Diagnostic>>
Evaluates against the whole first-model topology.
§Errors
Returns diagnostics when required data or a spatial resolver is absent.
Sourcepub fn evaluate_in(
&self,
structure: &Structure,
universe: &AtomSelection,
policy: &AnalysisPolicy,
groups: &Groups,
spatial: Option<&dyn SpatialResolver>,
) -> Result<Evaluation, Vec<Diagnostic>>
pub fn evaluate_in( &self, structure: &Structure, universe: &AtomSelection, policy: &AnalysisPolicy, groups: &Groups, spatial: Option<&dyn SpatialResolver>, ) -> Result<Evaluation, Vec<Diagnostic>>
Evaluates inside a current view; global escapes to the whole topology.
§Errors
Returns the same diagnostics as Query::evaluate.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Query
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnsafeUnpin for Query
impl UnwindSafe for Query
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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