Package diffpy :: Package Structure :: Module SymmetryUtilities :: Class GeneratorSite
[hide private]
[frames] | no frames]

Class GeneratorSite

source code

Storage of data related to a generator positions.

Data members:
    xyz          -- fractional coordinates of generator site
    Uij          -- anisotropic thermal displacement at generator site
    sgoffset     -- offset of space group origin [0, 0, 0]
    eps          -- cutoff for equal positions
    eqxyz        -- list of equivalent positions
    eqUij        -- list of displacement matrices at equivalent positions
    symops       -- nested list of operations per each eqxyz
    multiplicity -- generator site multiplicity
    Uisotropy    -- bool flag for isotropic thermal factors
    invariants   -- list of invariant operations for generator site
    null_space   -- null space of all possible differences of invariant
                    rotational matrices, this is a base of symmetry
                    allowed shifts.
    Uspace       -- 3D array of independent components of U matrices.
    pparameters  -- list of (xyz symbol, value) pairs
    Uparameters  -- list of (U symbol, value) pairs



Instance Methods [hide private]
 
__init__(self, spacegroup, xyz, Uij=array([[ 0., 0., 0..., sgoffset=[0, 0, 0], eps=1e-05)
Initialize GeneratorSite.
source code
 
signedRatStr(self, x)
Convert floating point number to signed rational representation.
source code
 
_findNullSpace(self)
Calculate self.null_space from self.invariants.
source code
 
_findPosParameters(self)
Find pparameters and their values for expressing self.xyz.
source code
 
_findUSpace(self)
Find independent U components with respect to invariant rotations.
source code
 
_findUParameters(self)
Find Uparameters and their values for expressing self.Uij.
source code
 
_findeqUij(self)
Adjust self.Uij and self.eqUij to be consistent with spacegroup...
source code
 
positionFormula(self, pos, xyzsymbols=('x', 'y', 'z'))
Formula of equivalent position with respect to generator site pos -- fractional coordinates of possibly equivalent site xyzsymbols -- symbols for parametrized coordinates Return position formulas in a dictionary with keys equal ("x", "y", "z") or an empty dictionary when pos is not equivalent to generator.
source code
 
UFormula(self, pos, Usymbols=['U11', 'U22', 'U33', 'U12', 'U13', 'U23'])
List of atom displacement formulas with custom parameter symbols.
source code
 
eqIndex(self, pos)
Index of the nearest generator equivalent site pos -- fractional coordinates Return integer.
source code
Class Variables [hide private]
  Ucomponents = array([[[ 1., 0., 0...
  idx2Usymbol = {0: 'U11', 1: 'U12', 2: 'U13', 3: 'U12', 4: 'U22...
Method Details [hide private]

__init__(self, spacegroup, xyz, Uij=array([[ 0., 0., 0..., sgoffset=[0, 0, 0], eps=1e-05)
(Constructor)

source code 
Initialize GeneratorSite.

spacegroup -- instance of SpaceGroup
xyz        -- generating site.  When xyz is close to special
              position self.xyz will be adjusted.
Uij        -- thermal factors at generator site.  Yields self.Uij
              after adjusting to spacegroup symmetry.
sgoffset   -- offset of space group origin [0, 0, 0]
eps        -- cutoff for equal positions

signedRatStr(self, x)

source code 
Convert floating point number to signed rational representation.
Possible fractional are multiples of 1/3, 1/6, 1/7, 1/9, if these
are not close, return "%+g" format.

Return string.

_findNullSpace(self)

source code 
Calculate self.null_space from self.invariants.
Try to represent self.null_space using small integers.

_findeqUij(self)

source code 
Adjust self.Uij and self.eqUij to be consistent with spacegroup
        

positionFormula(self, pos, xyzsymbols=('x', 'y', 'z'))

source code 
Formula of equivalent position with respect to generator site

pos        -- fractional coordinates of possibly equivalent site
xyzsymbols -- symbols for parametrized coordinates

Return position formulas in a dictionary with keys equal ("x", "y", "z")
or an empty dictionary when pos is not equivalent to generator.
Formulas are formatted as "[[-][%g*]{x|y|z}] [{+|-}%g]", for example
"-x", "z +0.5", "0.25".

UFormula(self, pos, Usymbols=['U11', 'U22', 'U33', 'U12', 'U13', 'U23'])

source code 
List of atom displacement formulas with custom parameter symbols.

pos        -- fractional coordinates of possibly equivalent site
Usymbols   -- 6 symbols for possible U matrix parameters

Return U element formulas in a dictionary where keys are from
('U11','U22','U33','U12','U13','U23') or empty dictionary when
pos is not equivalent to generator.


Class Variable Details [hide private]

Ucomponents

Value:
array([[[ 1.,  0.,  0.],
        [ 0.,  0.,  0.],
        [ 0.,  0.,  0.]],

       [[ 0.,  0.,  0.],
        [ 0.,  1.,  0.],
        [ 0.,  0.,  0.]],

...

idx2Usymbol

Value:
{0: 'U11',
 1: 'U12',
 2: 'U13',
 3: 'U12',
 4: 'U22',
 5: 'U23',
 6: 'U13',
 7: 'U23',
...