Beispiel #1
0
def analyse_phonopy_equivalent_atoms(atoms,
                                     symprec=1e-5,
                                     angle_tolerance=-1.0):
    """
    Args: (read phonopy.structure.spglib for more details)
        symprec:
            float: Symmetry search tolerance in the unit of length.
        angle_tolerance:
            float: Symmetry search tolerance in the unit of angle deg.
                If the value is negative, an internally optimized routine
                is used to judge symmetry.

    """
    s.publication_add(publication())
    positions = atoms.get_scaled_positions()
    cell = atoms.cell
    types = atoms.get_chemical_symbols()
    types = list(types)
    natom = len(types)
    positions = np.reshape(np.array(positions), (natom, 3))
    cell = np.reshape(np.array(cell), (3, 3))
    unitcell = PhonopyAtoms(symbols=types,
                            cell=cell,
                            scaled_positions=positions)
    ops = spg.get_symmetry(unitcell,
                           symprec=symprec,
                           angle_tolerance=angle_tolerance)
    return ops['equivalent_atoms']
Beispiel #2
0
 def _set_symmetry_operations_with_magmoms(self):
     cell = (self._cell.get_cell(), self._cell.get_scaled_positions(),
             self._cell.get_atomic_numbers(),
             self._cell.get_magnetic_moments())
     self._symmetry_operations = spg.get_symmetry(
         cell, symprec=self._symprec)
     self._map_atoms = self._symmetry_operations['equivalent_atoms']
     self._set_map_atoms()
Beispiel #3
0
 def _set_symmetry_operations_with_magmoms(self):
     cell = (self._cell.get_cell(), self._cell.get_scaled_positions(),
             self._cell.get_atomic_numbers(),
             self._cell.get_magnetic_moments())
     self._symmetry_operations = spg.get_symmetry(cell,
                                                  symprec=self._symprec)
     self._map_atoms = self._symmetry_operations['equivalent_atoms']
     self._set_map_atoms()
Beispiel #4
0
 def _set_symmetry_operations_with_magmoms(self):
     (self._symmetry_operations,
      self._map_atoms) = spg.get_symmetry(self._cell,
                                          use_magmoms=True,
                                          symprec=self._symprec)
     self._set_map_atoms()
 def _set_symmetry_operations(self):
     self._symmetry_operations = spg.get_symmetry(self._cell,
                                                  use_magmoms=True,
                                                  symprec=self._symprec)
     self._set_map_atoms()
Beispiel #6
0
 def _set_symmetry_operations_with_magmoms(self):
     self._symmetry_operations = spg.get_symmetry(self._cell.totuple(),
                                                  symprec=self._symprec)
     self._map_atoms = self._symmetry_operations['equivalent_atoms']
     self._set_map_atoms()
Beispiel #7
0
 def _symmetry_operations(self):
     self.symmetry_operations = \
         spg.get_symmetry(self.__cell, self.symprec)
     self._map_atoms()
Beispiel #8
0
 def _set_symmetry_operations_with_magmoms(self):
     self._symmetry_operations = spg.get_symmetry(self._cell.totuple(),
                                                  symprec=self._symprec)
     self._map_atoms = self._symmetry_operations['equivalent_atoms']
     self._set_map_atoms()
Beispiel #9
0
 def _symmetry_operations(self):
     self.symmetry_operations = \
         spg.get_symmetry(self.__cell, self.symprec)
     self._map_atoms()