/// Get the permutation that, when applied to this structure, makes it
/// match the target (when reduced under the lattice).
///
/// The existing implementation is pretty strict.  I mean, structure matching
/// is *kind of a tricky problem.*
Get the permutation that, when applied to this structure, makes it
match the target (when reduced under the lattice).

The existing implementation is pretty strict.  I mean, structure matching
is *kind of a tricky problem.
Get the permutation that when applied to this structure makes it match the target ( when reduced under the lattice ) . The existing implementation is pretty strict . I mean structure matching is * kind of a tricky problem .
pub fn perm_to_match(
        &self,
        target: &Coords,
        tol: f64,
    ) -> Result<Perm, crate::algo::find_perm::PositionMatchError>
    {
        // FIXME: incompatible lattices should return Error and not panic
        // NOTE: maybe this test on the lattice should use a larger or smaller
        //        tolerance than the perm search. Haven't thought it through
        // (include abs; arbitrary lattices may have near-zero cancellations)
        assert_eq!(self.num_atoms(), target.num_atoms());
        assert_close!(rel=tol, abs=tol,
            self.lattice().matrix().unvee(),
            target.lattice().matrix().unvee(),
        );
        let fake_meta = vec![(); self.coords.len()];
        crate::algo::find_perm::brute_force_with_sort_trick(
            self.lattice(),
            &fake_meta, self.coords.as_ref(),
            &fake_meta, target.coords.as_ref(),
            tol,
        )
    }
pub fn perm_to_match ( & self , target : & Coords , tol : f64 , ) -> Result < Perm , crate :: algo :: find_perm :: PositionMatchError > { // FIXME: incompatible lattices should return Error and not panic // NOTE: maybe this test on the lattice should use a larger or smaller //        tolerance than the perm search. Haven't thought it through // (include abs; arbitrary lattices may have near-zero cancellations) assert_eq ! ( self num_atoms ( ) target num_atoms ( ) ) ; assert_close ! ( rel tol abs tol self lattice ( ) matrix ( ) unvee ( ) target lattice ( ) matrix ( ) unvee ( ) ) ; let fake_meta = vec ! [ ( ) self coords len ( ) ] ; crate :: algo :: find_perm :: brute_force_with_sort_trick ( self . lattice ( ) , & fake_meta , self . coords . as_ref ( ) , & fake_meta , target . coords . as_ref ( ) , tol , ) }
Get the permutation that, when applied to this structure, makes it
match the target (when reduced under the lattice).
Get the permutation that when applied to this structure makes it match the target ( when reduced under the lattice ) .
&self
target
&Coords
tol
f64