/// Drops all of the rows outside `DESIGNATED_CELL`, to recover the standard `ForceConstants`
/// type on which most methods are implemented.
///
/// **Warning:** A `SuperForceConstants` may have a set of nonzero rows that does not coincide
/// with the sites in `DESIGNATED_CELL` (e.g. it might use the set of sites displaced by
/// Phonopy). This method should not be used in such cases, or else data will be lost!.
Drops all of the rows outside `DESIGNATED_CELL`, to recover the standard `ForceConstants`
type on which most methods are implemented.

A `SuperForceConstants` may have a set of nonzero rows that does not coincide
with the sites in `DESIGNATED_CELL` . This method should not be used in such cases, or else data will be lost!.
Drops all of the rows outside ` DESIGNATED_CELL ` to recover the standard ` ForceConstants ` type on which most methods are implemented . A ` SuperForceConstants ` may have a set of nonzero rows that does not coincide with the sites in ` DESIGNATED_CELL ` . This method should not be used in such cases or else data will be lost! .
pub fn drop_non_designated_rows(self, sc: &SupercellToken) -> ForceConstants {
        let SuperForceConstants(RawCoo { dim: _, row, col, val }) = self;
        let sc = SupercellWrapper::new(sc);
        let cells = sc.atom_cells();
        let primitive_atoms = sc.atom_primitive_atoms();
        let (mut out_row, mut out_col, mut out_val) = (vec![], vec![], vec![]);
        for ((super_r, c), x) in row.into_iter().zip(col).zip(val) {
            if cells[super_r] == DESIGNATED_CELL {
                out_row.push(primitive_atoms[super_r]);
                out_col.push(c);
                out_val.push(x);
            }
        }
        let out_dim = (sc.raw.num_primitive_atoms(), sc.raw.num_supercell_atoms());
        let coo = RawCoo { dim: out_dim, val: out_val, row: out_row, col: out_col };
        ForceConstants(coo.into_csr())
    }
pub fn drop_non_designated_rows ( self , sc : & SupercellToken ) -> ForceConstants { let SuperForceConstants ( RawCoo { dim : _ , row , col , val } ) = self ; let sc = SupercellWrapper :: new ( sc ) ; let cells = sc . atom_cells ( ) ; let primitive_atoms = sc . atom_primitive_atoms ( ) ; let ( mut out_row , mut out_col , mut out_val ) = ( vec ! [ ] , vec ! [ ] , vec ! [ ] ) ; for ( ( super_r , c ) , x ) in row . into_iter ( ) . zip ( col ) . zip ( val ) { if cells [ super_r ] == DESIGNATED_CELL { out_row . push ( primitive_atoms [ super_r ] ) ; out_col . push ( c ) ; out_val . push ( x ) ; } } let out_dim = ( sc . raw . num_primitive_atoms ( ) , sc . raw . num_supercell_atoms ( ) ) ; let coo = RawCoo { dim : out_dim , val : out_val , row : out_row , col : out_col } ; ForceConstants ( coo . into_csr ( ) ) }
Drops all of the rows outside `DESIGNATED_CELL`, to recover the standard `ForceConstants`
type on which most methods are implemented.
Drops all of the rows outside ` DESIGNATED_CELL ` to recover the standard ` ForceConstants ` type on which most methods are implemented .
self
sc
&SupercellToken