/// Calculate the Kolmogorov-Crespi potential.
///
/// Accepts the delta vector between two carbon atoms `r_ij` as well as the unit normal vectors
/// for each atom, `n_i` and `n_j`. Returns the potential as well as the gradient of the
/// potential with respect to `r_ij`, `n_i`, and `n_j`.
///
/// For the total potential of a system, one should only sum over undirected bonds.
/// (see `FracBond::is_canonical`).
Calculate the Kolmogorov-Crespi potential.

For the total potential of a system, one should only sum over undirected bonds.
Calculate the Kolmogorov - Crespi potential . For the total potential of a system one should only sum over undirected bonds .
pub fn compute(&self, r_ij: V3, normal_i: V3, normal_j: V3) -> Output {
        // NOTE: These are debug-only in the hope of optimizing branch prediction
        //       for the cutoff check
        debug_assert_close!(1.0, normal_i.sqnorm());
        debug_assert_close!(1.0, normal_j.sqnorm());
        debug_assert!(self.cutoff_begin >= 0.0);
        debug_assert!(self.cutoff_transition_dist.unwrap_or(0.0) >= 0.0);
        self::full::compute(self, r_ij, normal_i, normal_j)
    }
pub fn compute ( & self , r_ij : V3 , normal_i : V3 , normal_j : V3 ) -> Output { // NOTE: These are debug-only in the hope of optimizing branch prediction //       for the cutoff check debug_assert_close ! ( 1.0 normal_i sqnorm ( ) ) ; debug_assert_close ! ( 1.0 normal_j sqnorm ( ) ) ; debug_assert ! ( self cutoff_begin 0.0 ) ; debug_assert ! ( self cutoff_transition_dist unwrap_or ( 0.0 ) 0.0 ) ; self :: full :: compute ( self , r_ij , normal_i , normal_j ) }
Calculate the Kolmogorov-Crespi potential.
Calculate the Kolmogorov - Crespi potential .
&self
r_ij
V3
normal_i
V3
normal_j
V3