Philip's corrections

This commit is contained in:
Martin Diehl 2021-07-04 23:25:00 +02:00
parent 5202da13ea
commit 92ca010b7c
3 changed files with 11 additions and 11 deletions

View File

@ -90,7 +90,7 @@ class Crystal(LatticeFamily):
or (self.b is None or ('b' in self.immutable and self.b != self.immutable['b'] * self.a)) \ or (self.b is None or ('b' in self.immutable and self.b != self.immutable['b'] * self.a)) \
or (self.c is None or ('c' in self.immutable and self.c != self.immutable['c'] * self.b)) \ or (self.c is None or ('c' in self.immutable and self.c != self.immutable['c'] * self.b)) \
or (self.alpha is None or ('alpha' in self.immutable and self.alpha != self.immutable['alpha'])) \ or (self.alpha is None or ('alpha' in self.immutable and self.alpha != self.immutable['alpha'])) \
or (self.beta is None or ( 'beta' in self.immutable and self.beta != self.immutable['beta'])) \ or (self.beta is None or ('beta' in self.immutable and self.beta != self.immutable['beta'])) \
or (self.gamma is None or ('gamma' in self.immutable and self.gamma != self.immutable['gamma'])): or (self.gamma is None or ('gamma' in self.immutable and self.gamma != self.immutable['gamma'])):
raise ValueError (f'Incompatible parameters {self.parameters} for crystal family {self.family}') raise ValueError (f'Incompatible parameters {self.parameters} for crystal family {self.family}')
@ -139,7 +139,7 @@ class Crystal(LatticeFamily):
@property @property
def basis_real(self): def basis_real(self):
""" """
Calculate orthogonal real space crystal basis. Return orthogonal real space crystal basis.
References References
---------- ----------
@ -162,7 +162,7 @@ class Crystal(LatticeFamily):
@property @property
def basis_reciprocal(self): def basis_reciprocal(self):
"""Calculate reciprocal (dual) crystal basis.""" """Return reciprocal (dual) crystal basis."""
return np.linalg.inv(self.basis_real.T) return np.linalg.inv(self.basis_real.T)
@ -172,13 +172,13 @@ class Crystal(LatticeFamily):
Parameters Parameters
---------- ----------
direction|normal : numpy.ndarray of shape (...,3) direction|plane : numpy.ndarray of shape (...,3)
Vector along direction or plane normal. Vector along direction or plane normal.
Returns Returns
------- -------
Miller : numpy.ndarray of shape (...,3) Miller : numpy.ndarray of shape (...,3)
lattice vector of direction or plane. Lattice vector of direction or plane.
Use util.scale_to_coprime to convert to (integer) Miller indices. Use util.scale_to_coprime to convert to (integer) Miller indices.
""" """

View File

@ -6,7 +6,7 @@ class LatticeFamily():
def __init__(self,family): def __init__(self,family):
""" """
Symmetry-related operations for crystal families. Symmetry-related operations for crystal family.
Parameters Parameters
---------- ----------
@ -15,7 +15,7 @@ class LatticeFamily():
""" """
if family not in self._immutable.keys(): if family not in self._immutable.keys():
raise KeyError(f'invalid lattice family "{family}"') raise KeyError(f'invalid crystal family "{family}"')
self.family = family self.family = family
@ -40,7 +40,7 @@ class LatticeFamily():
@property @property
def immutable(self): def immutable(self):
"""Return immutable parameters lattice parameters.""" """Return immutable lattice parameters."""
return self._immutable[self.family] return self._immutable[self.family]

View File

@ -33,10 +33,10 @@ lattice_symmetries = {
_parameter_doc = \ _parameter_doc = \
""" """
family : {'triclinic', 'monoclinic', 'orthorhombic', 'tetragonal', 'hexagonal', 'cubic'} family : {'triclinic', 'monoclinic', 'orthorhombic', 'tetragonal', 'hexagonal', 'cubic'}
Crystal family. Mutual exclusive with 'lattice' parameter. Crystal family. Mutually exclusive with 'lattice' parameter.
lattice : {'aP', 'mP', 'mS', 'oP', 'oS', 'oI', 'oF', 'tP', 'tI', 'hP', 'cP', 'cI', 'cF'}. lattice : {'aP', 'mP', 'mS', 'oP', 'oS', 'oI', 'oF', 'tP', 'tI', 'hP', 'cP', 'cI', 'cF'}.
Bravais lattice in Pearson notation. Bravais lattice in Pearson notation.
Mutual exclusive with 'family' parameter. Mutually exclusive with 'family' parameter.
a : float, optional a : float, optional
Length of lattice parameter 'a'. Length of lattice parameter 'a'.
b : float, optional b : float, optional
@ -76,7 +76,7 @@ class Orientation(Rotation,Crystal):
- triclinic - triclinic
- aP : primitive - aP : primitive
- monoclininic - monoclinic
- mP : primitive - mP : primitive
- mS : base-centered - mS : base-centered