Example #1
0
    def get_orbit(self, p, m, tol=1e-5):
        """
        Returns the orbit for a point and its associated magnetic moment.

        Args:
            p: Point as a 3x1 array.
            m: A magnetic moment, compatible with 
            :class:`pymatgen.electronic_structure.core.Magmom`
            tol: Tolerance for determining if sites are the same. 1e-5 should
                be sufficient for most purposes. Set to 0 for exact matching
                (and also needed for symbolic orbits).

        Returns:
            (([array], [array])) Tuple of orbit for point and magnetic moments for orbit.
        """
        orbit = []
        orbit_magmoms = []
        m = Magmom(m)
        for o in self.symmetry_ops:
            pp = o.operate(p)
            pp = np.mod(np.round(pp, decimals=10), 1)
            mm = o.operate_magmom(m)
            if not in_array_list(orbit, pp, tol=tol):
                orbit.append(pp)
                orbit_magmoms.append(mm)
        return orbit, orbit_magmoms
Example #2
0
    def get_orbit(self, p, m, tol=1e-5):
        """
        Returns the orbit for a point and its associated magnetic moment.

        Args:
            p: Point as a 3x1 array.
            m: A magnetic moment, compatible with
            :class:`pymatgen.electronic_structure.core.Magmom`
            tol: Tolerance for determining if sites are the same. 1e-5 should
                be sufficient for most purposes. Set to 0 for exact matching
                (and also needed for symbolic orbits).

        Returns:
            (([array], [array])) Tuple of orbit for point and magnetic moments for orbit.
        """
        orbit = []
        orbit_magmoms = []
        m = Magmom(m)
        for o in self.symmetry_ops:
            pp = o.operate(p)
            pp = np.mod(np.round(pp, decimals=10), 1)
            mm = o.operate_magmom(m)
            if not in_array_list(orbit, pp, tol=tol):
                orbit.append(pp)
                orbit_magmoms.append(mm)
        return orbit, orbit_magmoms