Esempio n. 1
0
 def __init__(self,uc={'a':2*pi,'b':2*pi,'c':2*pi,'alpha':90,'beta':90,'gamma':90},crystalRotMat=np.asmatrix(np.eye(3))):
   """Unit cell angles in degrees"""
   if type(uc)==dict:
     self.uc = dict2class(uc)
   elif type(uc)==tuple:
     self.uc = self._get_uc_from_tuple(uc)
   else:
     self.uc = uc
   self.crystalRotMat = crystalRotMat
Esempio n. 2
0
 def _get_uc_from_tuple(self,uc):
   uc_dict = dict(a=uc[0],b=uc[1],c=uc[2],alpha=uc[3],beta=uc[4],gamma=uc[5])
   uc_class = dict2class(uc_dict)
   return uc_class