// !!! This function affects the supercell convention !!! (SUPERCELL-CONV)
// When modifying it, you must modify all functions that have this label.
This function affects the supercell convention !!. (SUPERCELL-CONV)
When modifying it, you must modify all functions that have this label.
This function affects the supercell convention !! . ( SUPERCELL - CONV ) When modifying it you must modify all functions that have this label .
pub fn replicate_with<M, M2, F>(&self, vec: &[M], mut make_meta: F) -> Vec<M2>
    where F: FnMut(&M, [u32; 3]) -> M2,
    {
        assert_eq!(vec.len(), self.num_primitive_atoms());
        let sc_idx = image_cells(self.periods);
        let mut out = Vec::with_capacity(self.num_supercell_atoms());
        for m in vec {
            for &idx in &sc_idx {
                out.push(make_meta(m, idx));
            }
        }
        out
    }
pub fn replicate_with < M , M2 , F > ( & self , vec : & [ M ] , mut make_meta : F ) -> Vec < M2 > where F : FnMut ( & M , [ u32 ; 3 ] ) -> M2 , { assert_eq ! ( vec len ( ) self num_primitive_atoms ( ) ) ; let sc_idx = image_cells ( self . periods ) ; let mut out = Vec :: with_capacity ( self . num_supercell_atoms ( ) ) ; for m in vec { for & idx in & sc_idx { out . push ( make_meta ( m , idx ) ) ; } } out }
This function affects the supercell convention !
This function affects the supercell convention !
&self
vec
&[M]
make_meta
F