Skip to main content

CIntOpt

Struct CIntOpt 

Source
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: usize

Implementations§

Source§

impl CIntOpt

Source

pub fn intor(&self) -> &'static str

Integrator name this optimizer was built for, e.g. "int2e_ip1".

Source

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.

Source

pub fn as_raw(&self) -> &CIntOptimizer

Low-level handle, e.g. for CInt::integral_block.

Source

pub fn as_ptr(&self) -> *const c_void

Raw pointer to the underlying CINTOpt / ECPOpt.

Trait Implementations§

Source§

impl Debug for CIntOpt

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.