def make_crystal_basis(self): "Make the basis matrix for the crystal unit cell and the system unit cell." # First convert the basis specification to a triclinic one if type(self.latticeconstant) == type({}): self.latticeconstant['beta'] = 90 self.latticeconstant['gamma'] = 90 else: if len(self.latticeconstant) == 4: self.latticeconstant = self.latticeconstant + (90, 90) else: raise ValueError, "Improper lattice constants for monoclinic crystal." TriclinicFactory.make_crystal_basis(self)
def make_crystal_basis(self): "Make the basis matrix for the crystal unit cell and the system unit cell." # First convert the basis specification to a triclinic one if isinstance(self.latticeconstant, type({})): self.latticeconstant['beta'] = 90 self.latticeconstant['gamma'] = 90 else: if len(self.latticeconstant) == 4: self.latticeconstant = self.latticeconstant + (90,90) else: raise ValueError("Improper lattice constants for monoclinic crystal.") TriclinicFactory.make_crystal_basis(self)
def make_crystal_basis(self): "Make the basis matrix for the crystal unit cell and the system unit cell." # First convert the basis specification to a triclinic one if type(self.latticeconstant) == type({}): self.latticeconstant['alpha'] = 90 self.latticeconstant['beta'] = 90 self.latticeconstant['gamma'] = 120 self.latticeconstant['b/a'] = 1.0 else: if len(self.latticeconstant) == 2: a,c = self.latticeconstant self.latticeconstant = (a,a,c,90,90,120) else: raise ValueError, "Improper lattice constants for hexagonal crystal." TriclinicFactory.make_crystal_basis(self)
def make_crystal_basis(self): "Make the basis matrix for the crystal unit cell and the system unit cell." # First convert the basis specification to a triclinic one if isinstance(self.latticeconstant, type({})): self.latticeconstant['alpha'] = 90 self.latticeconstant['beta'] = 90 self.latticeconstant['gamma'] = 120 self.latticeconstant['b/a'] = 1.0 else: if len(self.latticeconstant) == 2: a,c = self.latticeconstant self.latticeconstant = (a,a,c,90,90,120) else: raise ValueError("Improper lattice constants for hexagonal crystal.") TriclinicFactory.make_crystal_basis(self)