Struct rust_libcint::CINTR2CDATA[][src]

pub struct CINTR2CDATA { /* fields omitted */ }

Implementations

A new type that groups all necessary data to communicate with libcint

Examples

use rust_libcint::{CINT2CDATA,CintType};
let mut atm: Vec<Vec<i32>> = vec![];
atm.push(vec![2,0,0,0,0,0]);
let mut bas: Vec<Vec<i32>> = vec![];
bas.push(vec![0,1,1,1,1,3,4,0]);
bas.push(vec![0,2,1,1,1,5,6,0]);
let mut env: Vec<f64> = vec![0.0,0.0,0.0,2.0,1.0,1.5,0.5];
let mut cint_data = rust_libcint::CINTR2CDATA::new();
cint_data.initial_r2c(&atm,1,&bas,2,env);

2-electron analytic integrals for the shperic Gaussian-type orbitals

cint_data.set_cint_type(CintType::Spheric);
cint_data.cint2e_optimizer_rust();
let buf = cint_data.cint_ijkl(0,1,1,0);
let mut v1:f64=0.0;
println!("{:?}",&buf);
&buf.into_iter().for_each(|i| {v1 += i.abs()});
println!("v1: {}",v1);

the overlap integrals for the shperic Gaussian-type orbitals

cint_data.cint_del_optimizer_rust();
cint_data.set_cint_type(CintType::Spheric);
cint_data.cint1e_ovlp_optimizer_rust();
let buf = cint_data.cint_ijovlp(0,1);
let mut v1:f64=0.0;
println!("{:?}",&buf);
&buf.into_iter().for_each(|i| {v1 += i.abs()});
println!("v1: {}",v1);

the kinetic integrals for the cartesian Gaussian-type orbitals

cint_data.cint_del_optimizer_rust();
cint_data.set_cint_type(CintType::Cartesian);
cint_data.cint1e_kin_optimizer_rust();
let buf = cint_data.cint_ijkin(0,1);
let mut v1:f64=0.0;
println!("{:?}",&buf);
&buf.into_iter().for_each(|i| {v1 += i.abs()});
println!("v1: {}",v1);

create a new, empty CINTR2CDATA.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.