pub fn calc_o2_matrix_element<'a, 'b, T, SC, F>(
lowdin_paired_coefficientss: &[LowdinPairedCoefficients<T>],
o2_opt: Option<&'b ArrayView4<'a, T>>,
get_jk_opt: Option<&F>,
structure_constraint: &SC,
) -> Result<T, Error>where
T: ComplexFloat + ScalarOperand + Product + Display,
SC: StructureConstraint,
F: Fn(&Array2<T>) -> Result<(Array2<T>, Array2<T>), Error>,
'a: 'b,Expand description
Calculates the matrix element of a two-particle operator between two Löwdin-paired determinants.
§Arguments
lowdin_paired_coefficientss- A sequence of pairs of Löwdin-paired coefficients, one for each subspace determined by the specified structure constraint.o2_opt- The two-particle operator in the atomic-orbital basis in physicists’ ordering.get_jk_opt- The optional function callable on a density matrix $\mathbf{D}$ to calculate the corresponding $\mathbf{J}$ and $\mathbf{K}$ matrices by contracting with appropriate two-electron integrals calculated on-the-fly. Either this oro2_optmust be specified, but not both.structure_constraint- The structure constraint governing the coefficients.
§Returns
The two-particle matrix element.