pub fn compute_bond_deltas(&self, coords: &Coords, use_rayon: bool) -> IndexVec<BondI, V3> {
        let site_carts = IndexVec::<SiteI, _>::from_raw(coords.to_carts());
        let vec = CondIterator::new(0..self.num_bonds(), use_rayon).map(|bond| {
            let bond = BondI(bond);
            let cart_from = site_carts[self.bond_source(bond)];
            let cart_to = site_carts[self.bond_target(bond)];
            let image_diff = self.bond_image_diff(bond);
            cart_to - cart_from + image_diff.map(|x| x as f64) * coords.lattice()
        }).collect();
        IndexVec::from_raw(vec)
    }
/// Compute all bond delta vectors, defined as the position of the target site minus the
/// position of the source site.
Compute all bond delta vectors, defined as the position of the target site minus the
position of the source site.
Compute all bond delta vectors defined as the position of the target site minus the position of the source site .
pub fn compute_bond_deltas(&self, coords: &Coords, use_rayon: bool) -> IndexVec<BondI, V3> {
        let site_carts = IndexVec::<SiteI, _>::from_raw(coords.to_carts());
        let vec = CondIterator::new(0..self.num_bonds(), use_rayon).map(|bond| {
            let bond = BondI(bond);
            let cart_from = site_carts[self.bond_source(bond)];
            let cart_to = site_carts[self.bond_target(bond)];
            let image_diff = self.bond_image_diff(bond);
            cart_to - cart_from + image_diff.map(|x| x as f64) * coords.lattice()
        }).collect();
        IndexVec::from_raw(vec)
    }
pub fn compute_bond_deltas ( & self , coords : & Coords , use_rayon : bool ) -> IndexVec < BondI , V3 > { let site_carts = IndexVec :: < SiteI , _ > :: from_raw ( coords . to_carts ( ) ) ; let vec = CondIterator :: new ( 0 .. self . num_bonds ( ) , use_rayon ) . map ( | bond | { let bond = BondI ( bond ) ; let cart_from = site_carts [ self . bond_source ( bond ) ] ; let cart_to = site_carts [ self . bond_target ( bond ) ] ; let image_diff = self . bond_image_diff ( bond ) ; cart_to - cart_from + image_diff . map ( | x | x as f64 ) * coords . lattice ( ) } ) . collect ( ) ; IndexVec :: from_raw ( vec ) }
Compute all bond delta vectors, defined as the position of the target site minus the
position of the source site.
Compute all bond delta vectors defined as the position of the target site minus the position of the source site .
&self
coords
&Coords
use_rayon
bool
&self
coords
&Coords
use_rayon
bool