Esempio n. 1
0
 def get_number_of_spins(self):
     if self.calc is None:
         raise PropertyNotPresent(error_template % 'Number of spins')
     nspins = self.calc.get_number_of_spins()
     if nspins is None:
         warnings.warn(warn_template % 'Number of spins')
     return nspins
Esempio n. 2
0
 def get_eigenvalues(self, **kwargs):
     if self.calc is None:
         raise PropertyNotPresent(error_template % 'Eigenvalues')
     eigenvalues = self.calc.get_eigenvalues(**kwargs)
     if eigenvalues is None:
         warnings.warn(warn_template % 'Eigenvalues')
     return eigenvalues
Esempio n. 3
0
 def get_k_point_weights(self):
     if self.calc is None:
         raise PropertyNotPresent(error_template % 'K-point weights')
     k_point_weights = self.calc.get_k_point_weights()
     if k_point_weights is None:
         warnings.warn(warn_template % 'K-point weights')
     return k_point_weights
Esempio n. 4
0
 def get_ibz_k_points(self):
     if self.calc is None:
         raise PropertyNotPresent(error_template % 'IBZ k-points')
     ibzkpts = self.calc.get_ibz_k_points()
     if ibzkpts is None:
         warnings.warn(warn_template % 'IBZ k-points')
     return ibzkpts
Esempio n. 5
0
 def _get(self, name):
     # Cyclic import, should restructure.
     from ase.calculators.calculator import PropertyNotPresent
     dct = self._outputmixin_get_results()
     try:
         return dct[name]
     except KeyError:
         raise PropertyNotPresent(name)
Esempio n. 6
0
 def get_fermi_level(self):
     if self.calc is None:
         raise PropertyNotPresent(error_template % 'Fermi level')
     return self.calc.get_fermi_level()