Table of Contents

Class: NonModulatedCell experiment/crystal.py

Store a unit cell orientation and perform operations on it.

Methods   
Allowed
CMatrix
CVector
ConventionalCell
DataSet
DataSet2
DenzoRots
DirectVector
FriedelAxes
InputCell
InverseConventionalCell
InverseInputCell
InverseReducedCell
LowestSpacegroup
PointgroupValid
ReciprocalAxes
ReducedCell
ReducedInverseCell
ReducedVolume
SatelliteHKL
SetHardware
SetSigma
Shkl
ShortestReciprocalLatticeVector
Theta
ValidPointgroups
Volume
__init__
__repr__
angle30
angle45
angle60
angle90
d
guesssystem
hkl
input2conventionaltransformation
inputrmatstr
reduced2conventionaltransformation
  Allowed 
Allowed (
        self,
        h,
        k,
        l,
        )

See if the reflection hkl is allowed

  CMatrix 
CMatrix ( self,  p=None )

Find matrix that converts HKL->oriented C vector.

  CVector 
CVector ( self,  hkl )

Calculate a c-vector in 0-goniometer position for a reflection.

parameters:

hkl

a single reflection (array of 3 elements)

return value : the c-vector of hkl (3-vector)

  ConventionalCell 
ConventionalCell ( self )

Calculate the parameters of the direct conventional cell.

return value: a 6-tuple of (a, b, c, alpha, beta, gamma)

  DataSet 
DataSet (
        self,
        thetamax,
        thetamin=1.5 * projtls.degrees,
        maxaxis=None,
        userhmin=-512,
        userkmin=-512,
        userlmin=-512,
        userhmax=512,
        userkmax=512,
        userlmax=512,
        safetymargin=0,
        )

Make an array of reflection indices respecting given theta limits.

parameters:

thetamax

maximum diffraction angle for the dataset

optional parameters:

thetamin

minimum diffraction angle for the dataset maxaxis -- try to get axis lengths below this value, producing an equivalent smaller dataset.

**user?min, user*max**

limit the output data set to the given hkl limits.

safetymargin

used for debugging purposes to see if reflections were missed.

return value: uniquified dataset object with appropriate symmetry

Exceptions   
error( "Cannot calculate theta without knowing hardware or wavelength" )
  DataSet2 
DataSet2 (
        self,
        invdmin,
        invdmax,
        maxaxis=None,
        thetamax=None,
        thetamin=None,
        userhmin=-512,
        userkmin=-512,
        userlmin=-512,
        userhmax=512,
        userkmax=512,
        userlmax=512,
        safetymargin=0,
        )

Same as DataSet(), but instead of specifying thetamax and thetamin (1/d)max and min must be given. This can be used without knowledge of the wavelength at which the measurement is performed.

  DenzoRots 
DenzoRots (
        self,
        p,
        alternative=0,
        )

Calculate X/Y/Z rotations of crystal at specified goniostat position

parameters: p : desired goniostat position

optional parameters: alternative=0 : if 1, return alternative angles with same setting

return value: 3-tuple of (rotz,roty,rotx)

  DirectVector 
DirectVector ( self,  indices )

Calculate a direct vector pointing to the named lattice point.

  FriedelAxes 
FriedelAxes ( self )

Return list of axes that measure Friedels in same frame when rotating around them.

  InputCell 
InputCell ( self )

Calculate the parameters of the direct input cell.

return value: a 6-tuple of (a, b, c, alpha, beta, gamma)

  InverseConventionalCell 
InverseConventionalCell ( self )

Calculate the parameters of the reciprocal conventional cell.

return value: a 6-tuple of (a, b, c, alpha, beta, gamma)

  InverseInputCell 
InverseInputCell ( self )

Calculate the parameters of the reciprocal input cell.

return value: a 6-tuple of (a, b, c, alpha, beta, gamma)

  InverseReducedCell 
InverseReducedCell ( self )

Calculate the parameters of the reciprocal reduced cell.

return value: a 6-tuple of (a, b, c, alpha, beta, gamma)

  LowestSpacegroup 
LowestSpacegroup ( self )

Returns the name of the lowest-symmetry space group that is compatible with the lattice defined by this cell.

  PointgroupValid 
PointgroupValid ( self,  pointgroup=None )

Checks whether the given pointgroup is compatible with the cell. If no point group is specified, checks the validity of the point group this cell thinks it has.

  ReciprocalAxes 
ReciprocalAxes ( self )

  ReducedCell 
ReducedCell ( self )

Calculate the parameters of the direct reduced cell.

return value: a 6-tuple of (a, b, c, alpha, beta, gamma)

  ReducedInverseCell 
ReducedInverseCell ( self )

Calculate the parameters of the reduced reciprocal cell.

return value: a 6-tuple of (a, b, c, alpha, beta, gamma)

  ReducedVolume 
ReducedVolume ( self )

Return the volume of the reduced cell

  SatelliteHKL 
SatelliteHKL ( self )

  SetHardware 
SetHardware (
        self,
        hardware,
        wavelength=None,
        )

Set hardware or wavelength when they appear at a later stage.

Exceptions   
error( "Both hardware and wavelength given" )
  SetSigma 
SetSigma ( self,  sig )

Set the sigma (6-tuple or 7-tuple) of the unit cell. If the sigma on the volume is not given, it is calculated.

  Shkl 
Shkl (
        self,
        p,
        hkl,
        )

Calculate diffracted vector Shkl for a dataset

parameters:

p

position of the goniometer hkl -- dataset

return value: Diffraction vector for each of the reflections in the dataset (3xN array)

Exceptions   
error( "Cannot calculate Shkl without knowing hardware" )
  ShortestReciprocalLatticeVector 
ShortestReciprocalLatticeVector ( self )

Return the shortest reciprocal lattice vector as a 3-vector

  Theta 
Theta ( self,  hkl )

Calculate theta for a reflection.

parameters:

hkl

a single reflection (array of 3 elements)

return value: theta for the reflection

Exceptions   
error( "Cannot calculate theta without knowing hardware or wavelength" )
  ValidPointgroups 
ValidPointgroups ( self )

Returns a list of all point groups that are compatible with the current cell. Depending on the (protein?) environment, this may give only acentric point groups!

  Volume 
Volume ( self )

Return the volume of the conventional cell

  __init__ 
__init__ (
        self,
        orientationmatrix,
        bravaistype='P',
        transformedbravaistype=None,
        axcrit=None,
        hardware=None,
        wavelength=None,
        pointgroup=None,
        standardize=1,
        system=None,
        triclinic=0,
        transformtrigonal=1,
        transformationmatrix=None,
        xtra={},
        )

Constructor.

Construction will generate an input cell, a Buerger reduced cell, and a standardized cell. The orientation matrix for the input cell must be specified as an argument. Unless a transformation matrix is given or the "standardize=0" argument is passed, the standardized cell is calculated by the algorithm of Y.Le Page.

parameters:

orientationmatrix

Represents a 3x3 matrix with as elements the x,y and z coordinates of a*, b* and c* in the "all zero" position of the goniostat. The associated cell is called the "input cell".

optional parameters:

bravaistype

Bravais type of the input cell transformedbravaistype -- Bravais type of transformed cell (only used if transformation matrix is also specified) axcrit -- Criterion used to decide whether two axes are coinciding. Decrease to prevent pseudo- symmetry. Value in radians. hardware -- a hardware object. wavelength -- Wavelength. Extracted from hardware if not specified. standardize -- if 1, attempt to derive conventional cell triclinic -- if 1 and standardize=0 and no transformation matrix is given, use triclinic crystal system independent of unit cell constants. transformtrigonal -- if 1, trigonal cells will be standardized to hexagonal if 0, they will be kept primitive. transformationmatrix -- pre-specify the input to conventional cell transformation matrix system -- specify crystal system of transformed cell (only used if a t-mat is given!) pointgroup -- point group of the data set. If not specified, or if equal to the string "Default", this will be deduced from the crystal system.

  __repr__ 
__repr__ ( self )

  angle30 
angle30 (
        self,
        v1,
        v2,
        )

Return true if the angle between v1 and v2 is 30 degrees within axcrit

  angle45 
angle45 (
        self,
        v1,
        v2,
        )

Return true if the angle between v1 and v2 is 45 degrees within axcrit

  angle60 
angle60 (
        self,
        v1,
        v2,
        )

Return true if the angle between v1 and v2 is 60 degrees within axcrit

  angle90 
angle90 (
        self,
        v1,
        v2,
        )

Return true if the angle between v1 and v2 is 90 degrees within axcrit

 
d ( self,  ref )

  guesssystem 
guesssystem ( self )

Guess the crystal system based on the conventional cell parameters

  hkl 
hkl ( self,  c )

Calculate the HKL indices for the given C vector

  input2conventionaltransformation 
input2conventionaltransformation ( self )

Returns the transformation matrix that can be used to transform the input cell into the conventional cell

  inputrmatstr 
inputrmatstr ( self )

Return the contents of a .rmat file that would reconstruct the current Cell() object completely

  reduced2conventionaltransformation 
reduced2conventionaltransformation ( self )

Returns the transformation matrix that can be used to transform the reduced cell into the conventional cell

  rmatstr 
rmatstr ( self )

Return the contents of a .rmat file that is the standard description of the current Cell(): the reduced cell plus the standardization matrix

  transformedrmatstr 
transformedrmatstr ( self )

Return the contents of a .rmat file that contains the conventional cell as rmatrix.


Table of Contents

This document was automatically generated on Fri Jul 3 09:28:36 2009 by HappyDoc version WORKING