pub struct CIntOpt {
pub(crate) optimizer: CIntOptimizer,
pub(crate) intor: &'static str,
pub(crate) nbas: usize,
pub(crate) max_l: c_int,
pub(crate) necpbas: usize,
}Expand description
A built libcint optimizer with provenance, suitable for reuse.
libcint’s optimizers hold prescreening tables (pairdata, nonzero
contraction maps, angular-momentum index arrays) that cost O(nbas²) to
build. Build one with CInt::get_cintopt and pass it by reference to
IntegrateArgs::cintopt / IntorCrossArgs::cintopt instead of letting
the engine rebuild it on every call — the typical case is J/K build that
evaluates the same integral in many shell batches.
§Validity
The handle is only valid for the molecule and integrator it was built from:
rebuild it after any change of atm, bas, ecpbas or env. It is
Send and Sync (libcint only reads it during evaluation); wrap it in
std::sync::Arc if it must be shared between several owners.
Fields§
§optimizer: CIntOptimizer§intor: &'static str§nbas: usize§max_l: c_int§necpbas: usizeImplementations§
Source§impl CIntOpt
impl CIntOpt
Sourcepub fn intor(&self) -> &'static str
pub fn intor(&self) -> &'static str
Integrator name this optimizer was built for, e.g. "int2e_ip1".
Sourcepub fn nbas(&self) -> usize
pub fn nbas(&self) -> usize
Number of shells the optimizer was built for.
For ECP-bearing molecules this is the merged shell count (basis plus ECP shells), i.e. what the C constructor saw.
Sourcepub fn as_raw(&self) -> &CIntOptimizer
pub fn as_raw(&self) -> &CIntOptimizer
Low-level handle, e.g. for CInt::integral_block.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CIntOpt
impl RefUnwindSafe for CIntOpt
impl Send for CIntOpt
impl Sync for CIntOpt
impl Unpin for CIntOpt
impl UnsafeUnpin for CIntOpt
impl UnwindSafe for CIntOpt
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
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