Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ObjCryst::ZScatterer Class Reference

ZScatterer: the basic type of complex scatterers, where atom positions are defined using a standard "Z-Matrix" description. More...

Inheritance diagram for ObjCryst::ZScatterer:

Inheritance graph
[legend]
Collaboration diagram for ObjCryst::ZScatterer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ZScatterer (const string &name, Crystal &cryst, const REAL x=0., const REAL y=0., const REAL z=0., const REAL phi=0., const REAL chi=0., const REAL psi=0.)
 ZScatterer constructor.

 ZScatterer (const ZScatterer &old)
 Copy constructor.

 ~ZScatterer ()
virtual ZScattererCreateCopy () const
virtual const string & GetClassName () const
 Name for this class ("RefinableObj", "Crystal",...).

void AddAtom (const string &name, const ScatteringPower *pow, const long atomBond, const REAL bondLength, const long atomAngle, const REAL bondAngle, const long atomDihedral, const REAL dihedralAngle, const REAL popu=1.)
 Add an atom to the Zscatterer.

virtual int GetNbComponent () const
 Number of components in the scatterer (eg number of point scatterers).

virtual const ScatteringComponentListGetScatteringComponentList () const
 Get the list of all scattering components for this scatterer.

virtual string GetComponentName (const int i) const
 Name for the i-th component of this scatterer.

void Print () const
 Print a single line of information about this scatterer.

REAL GetPhi () const
 Access to phi parameter (overall orientation of the scatterer).

REAL GetChi () const
 Access to chi parameter (overall orientation of the scatterer).

REAL GetPsi () const
 Access to psi parameter (overall orientation of the scatterer).

void SetPhi (const REAL)
 Access to phi parameter (overall orientation of the scatterer).

void SetChi (const REAL)
 Access to chi parameter (overall orientation of the scatterer).

void SetPsi (const REAL)
 Access to psi parameter (overall orientation of the scatterer).

REAL GetZAtomX (const int i) const
 Get the X fractionnal coordinate of atom i.

REAL GetZAtomY (const int i) const
 Get the Y fractionnal coordinate of atom i.

REAL GetZAtomZ (const int i) const
 Get the Z fractionnal coordinate of atom i.

long GetZBondAtom (const int i) const
 Index of the 1st atom used to define the i-th atom in the Z-Matrix (the one from which the bondlength is calculated).

long GetZAngleAtom (const int i) const
 Index of the 2nd atom used to define the i-th atom in the Z-Matrix (the one from which the angle is calculated).

long GetZDihedralAngleAtom (const int i) const
 Index of the 3rd atom used to define the i-th atom in the Z-Matrix (the one from which the dihedral angle is calculated).

REAL GetZBondLength (const int i) const
 Const access to bondlength parameter, for the i-th row in the Z-Matrix.

REAL GetZAngle (const int i) const
 Const access to the angle parameter, for the i-th row in the Z-Matrix.

REAL GetZDihedralAngle (const int i) const
 Const access to the dihedral angle parameter, for the i-th row in the Z-Matrix.

void SetZBondLength (const int i, const REAL)
 Access to bondlength parameter, for the i-th row in the Z-Matrix.

void SetZAngle (const int i, const REAL)
 Access to the angle parameter, for the i-th row in the Z-Matrix.

void SetZDihedralAngle (const int i, const REAL)
 Access to the dihedral angle parameter, for the i-th row in the Z-Matrix.

const ObjRegistry< ZAtom > & GetZAtomRegistry () const
 Access to the registry of ZAtoms.

virtual ostream & POVRayDescription (ostream &os, const CrystalPOVRayOptions &options) const
 Not implemented for ZScatterer.

virtual void GLInitDisplayList (const bool onlyIndependentAtoms=false, const REAL xMin=-.1, const REAL xMax=1.1, const REAL yMin=-.1, const REAL yMax=1.1, const REAL zMin=-.1, const REAL zMax=1.1, const bool displayEnantiomer=false, const bool displayNames=false) const
virtual void SetUseGlobalScatteringPower (const bool useIt)
 use a Global scattering power for this scatterer ?

virtual void XMLOutput (ostream &os, int indent=0) const
 Output to stream in well-formed XML.

virtual void XMLInput (istream &is, const XMLCrystTag &tag)
 Input From stream.

virtual void GetGeneGroup (const RefinableObj &obj, CrystVector_uint &groupIndex, unsigned int &firstGroup) const
 Get the gene group assigned to each parameter.

virtual void GlobalOptRandomMove (const REAL mutationAmplitude, const RefParType *type=gpRefParTypeObjCryst)
 Make a random move of the current configuration.

const CrystVector_REAL & GetXCoord () const
 Get the list of all ZAtom cartesian x coordinates.

const CrystVector_REAL & GetYCoord () const
 Get the list of all ZAtom cartesian x coordinates.

const CrystVector_REAL & GetZCoord () const
 Get the list of all ZAtom cartesian x coordinates.

virtual void EndOptimization ()
 This should be called by any optimization class at the end of an optimization.

void ImportFenskeHallZMatrix (istream &is, bool named=false)
 Import "Fenske-Hall" ZMatrix file (fhz in the babel program http://www.eyesopen.com/babel.html\ example: use "./babel -ipdb foo.pdb -ofhz foo.fhz -d", to convert a pdb file to a Z-Matrix file (the -d removes hydrogen atoms).

void ExportFenskeHallZMatrix (ostream &os)
 Export to Fenske-Hall ZMatrix file.

void SetCenterAtomIndex (const unsigned int)
 Set the index of the central atom (around which the rotation is made).

unsigned int GetCenterAtomIndex () const
 Get the index of the central atom (around which the rotation is made).


Protected Member Functions

void UpdateCoordinates () const
 Update the atom coordinates (in real units, in Angstroems).

void UpdateScattCompList () const
 Update the scattering component list, ie compute all atom positions from the bonds/angles/dihedral angles, and convert the coordinates to fractionnal coordinates of the Crystal.


Protected Attributes

CrystMatrix_long m3DDisplayIndex
 For 3D display of the structure, bonds, triangular and quadric faces can be displayed.

ScatteringComponentList mScattCompList
 The list of scattering components.

long mNbAtom
 Total number of atoms in the structure.


Private Member Functions

virtual void InitRefParList ()
 Prepare refinable parameters for the scatterer object.


Private Attributes

long mNbDummyAtom
 Number of "dummy" atoms in the structure.

CrystVector_int mComponentIndex
 Index of atoms in the ScatteringComponentList.

REAL mPhi
 Angles giving the orientation of the ZScatterer (stored in radian).

REAL mChi
 Angles giving the orientation of the ZScatterer (stored in radian).

REAL mPsi
 Angles giving the orientation of the ZScatterer (stored in radian).

ObjRegistry< ZAtommZAtomRegistry
 Registry for ZAtoms in this Scatterer.

long mCenterAtomIndex
 Index of the atom used as a pivot (the scatterer is rotated around this atom).

CrystMatrix_REAL mPhiChiPsiMatrix
 Rotation matrix for the orientation of the scatterer.

bool mUseGlobalScattPow
 Does the ZScatterer use a global scattering power ?

GlobalScatteringPowermpGlobalScattPow
 the global scattering power used, if mUseGlobalScattPow=true

CrystVector_REAL mXCoord
 Storage for Cartesian coordinates.

CrystVector_REAL mYCoord
 Storage for Cartesian coordinates.

CrystVector_REAL mZCoord
 Storage for Cartesian coordinates.

RefinableObjClock mClockCoord
 Last time the cartesian coordinates were computed.

ZMoveMinimizermpZMoveMinimizer

Detailed Description

ZScatterer: the basic type of complex scatterers, where atom positions are defined using a standard "Z-Matrix" description.

This is used to describe inorganic polyhedras, as well as molecules. ####################################################################


Constructor & Destructor Documentation

ObjCryst::ZScatterer::ZScatterer const string &  name,
Crystal cryst,
const REAL  x = 0.,
const REAL  y = 0.,
const REAL  z = 0.,
const REAL  phi = 0.,
const REAL  chi = 0.,
const REAL  psi = 0.
 

ZScatterer constructor.

Parameters:
name: the name of the scatterer
cryst: the crystal in which the scatterer is (needed to convert from cartesian to fractionnal coordinates).
x,y,z: fractionnal coordinates of the scatterer
phi,chi: angles defining the orientation of the scatterer

ObjCryst::ZScatterer::ZScatterer const ZScatterer old  ) 
 

Copy constructor.

ObjCryst::ZScatterer::~ZScatterer  ) 
 


Member Function Documentation

void ObjCryst::ZScatterer::AddAtom const string &  name,
const ScatteringPower pow,
const long  atomBond,
const REAL  bondLength,
const long  atomAngle,
const REAL  bondAngle,
const long  atomDihedral,
const REAL  dihedralAngle,
const REAL  popu = 1.
 

Add an atom to the Zscatterer.

If &ScatteringPower=0, then it is a 'dummy' atom and will be ignored for any scattering analysis. The 'name' supplied may not be respected, and can be replaced by 'ZScatterer_name'+'AtomNum'+'ScattPowName'

virtual ZScatterer* ObjCryst::ZScatterer::CreateCopy  )  const [virtual]
 

For internal use only.

so-called Virtual copy constructor, needed to make copies of arrays of Scatterers

Implements ObjCryst::Scatterer.

Reimplemented in ObjCryst::ZPolyhedron.

virtual void ObjCryst::ZScatterer::EndOptimization  )  [virtual]
 

This should be called by any optimization class at the end of an optimization.

This also affects all sub-objects.

Note:
this may be called several time for some objects which are used by several other objects.

Reimplemented from ObjCryst::RefinableObj.

void ObjCryst::ZScatterer::ExportFenskeHallZMatrix ostream &  os  ) 
 

Export to Fenske-Hall ZMatrix file.

Todo:
USe more strict formatting than space-delimited.

unsigned int ObjCryst::ZScatterer::GetCenterAtomIndex  )  const
 

Get the index of the central atom (around which the rotation is made).

REAL ObjCryst::ZScatterer::GetChi  )  const
 

Access to chi parameter (overall orientation of the scatterer).

virtual const string& ObjCryst::ZScatterer::GetClassName  )  const [virtual]
 

Name for this class ("RefinableObj", "Crystal",...).

This is only useful to distinguish different classes when picking up objects from the RefinableObj Global Registry

Reimplemented from ObjCryst::Scatterer.

virtual string ObjCryst::ZScatterer::GetComponentName const int  i  )  const [virtual]
 

Name for the i-th component of this scatterer.

If the component is an Atom, Then the name is that of the atom. Else, it is the name of the scatterer plus the component number in the scatterer plus the name of the ScatteringPower.

Note:
It would be better to return a reference, but we don't want to keep a name for all components... Weeelll, needs some more thinking... see what performance hit results (if any).
Bug:
does not take into account dummy atoms !!

Implements ObjCryst::Scatterer.

virtual void ObjCryst::ZScatterer::GetGeneGroup const RefinableObj obj,
CrystVector_uint &  groupIndex,
unsigned int &  firstGroup
const [virtual]
 

Get the gene group assigned to each parameter.

Each parameter (a gene in terms of genetic algorithms) can be assigned to a gene group. Thus when mating two configurations, genes will be exchanged by groups. By default (in the base RefinabeObj class), each parameter is alone in its group. Derived classes can group genes for a better s** life.

The number identifying a gene group only has a meaning in a given object. It can also change on subsequent calls, and thus is not unique.

Parameters:
obj the , supplied by an algorithm class (OptimizationObj,..), which contains a list of parameters, some of which (but possibly all or none) are parameters belonging to this object.
groupIndex a vector of unsigned integers, one for each parameter in the input object, giving an unsigned integer value as gene group index. At the beginning this vector should contain only zeros (no group assigned).
firstGroup this is the number of groups which have already been assigned, plus one. The gene groups returned by this object will start from this value, and increment firstGroup for each gene group used, so that different RefinableObj cannot share a gene group.
Note:
this function is not optimized, and should only be called at the beginning of a refinement.

Reimplemented from ObjCryst::RefinableObj.

virtual int ObjCryst::ZScatterer::GetNbComponent  )  const [virtual]
 

Number of components in the scatterer (eg number of point scatterers).

Implements ObjCryst::Scatterer.

REAL ObjCryst::ZScatterer::GetPhi  )  const
 

Access to phi parameter (overall orientation of the scatterer).

REAL ObjCryst::ZScatterer::GetPsi  )  const
 

Access to psi parameter (overall orientation of the scatterer).

virtual const ScatteringComponentList& ObjCryst::ZScatterer::GetScatteringComponentList  )  const [virtual]
 

Get the list of all scattering components for this scatterer.

This is the most important function of this class, giving the list of scattering positions along with the associated ScatteringPower.

Implements ObjCryst::Scatterer.

const CrystVector_REAL& ObjCryst::ZScatterer::GetXCoord  )  const
 

Get the list of all ZAtom cartesian x coordinates.

const CrystVector_REAL& ObjCryst::ZScatterer::GetYCoord  )  const
 

Get the list of all ZAtom cartesian x coordinates.

REAL ObjCryst::ZScatterer::GetZAngle const int  i  )  const
 

Const access to the angle parameter, for the i-th row in the Z-Matrix.

long ObjCryst::ZScatterer::GetZAngleAtom const int  i  )  const
 

Index of the 2nd atom used to define the i-th atom in the Z-Matrix (the one from which the angle is calculated).

const ObjRegistry<ZAtom>& ObjCryst::ZScatterer::GetZAtomRegistry  )  const
 

Access to the registry of ZAtoms.

REAL ObjCryst::ZScatterer::GetZAtomX const int  i  )  const
 

Get the X fractionnal coordinate of atom i.

REAL ObjCryst::ZScatterer::GetZAtomY const int  i  )  const
 

Get the Y fractionnal coordinate of atom i.

REAL ObjCryst::ZScatterer::GetZAtomZ const int  i  )  const
 

Get the Z fractionnal coordinate of atom i.

long ObjCryst::ZScatterer::GetZBondAtom const int  i  )  const
 

Index of the 1st atom used to define the i-th atom in the Z-Matrix (the one from which the bondlength is calculated).

REAL ObjCryst::ZScatterer::GetZBondLength const int  i  )  const
 

Const access to bondlength parameter, for the i-th row in the Z-Matrix.

const CrystVector_REAL& ObjCryst::ZScatterer::GetZCoord  )  const
 

Get the list of all ZAtom cartesian x coordinates.

REAL ObjCryst::ZScatterer::GetZDihedralAngle const int  i  )  const
 

Const access to the dihedral angle parameter, for the i-th row in the Z-Matrix.

long ObjCryst::ZScatterer::GetZDihedralAngleAtom const int  i  )  const
 

Index of the 3rd atom used to define the i-th atom in the Z-Matrix (the one from which the dihedral angle is calculated).

virtual void ObjCryst::ZScatterer::GLInitDisplayList const bool  onlyIndependentAtoms = false,
const REAL  xMin = -.1,
const REAL  xMax = 1.1,
const REAL  yMin = -.1,
const REAL  yMax = 1.1,
const REAL  zMin = -.1,
const REAL  zMax = 1.1,
const bool  displayEnantiomer = false,
const bool  displayNames = false
const [virtual]
 

For internal use only.

Create an OpenGL Display List of the scatterer. This should only be called by a Crystal object.

Parameters:
noSymmetrics: if false (the default), then all symmetrics are shown in the 3D display, within the limits defined by the min/max parameters \ param xMin,xMax,yMin,yMax,zMin,zMax: in fractionnal coordinates, the region in which we want scaterrer to be displayed. The test is made on the center of the scatterer (eg a ZScatterer (molecule) will not be 'cut' on the border).
displayNames: if true, only the names of the scatterers will be displayed, at the position of the scatterers (to actually see them, they will have to be translated with respect to the drawing of the scatterers).

Implements ObjCryst::Scatterer.

virtual void ObjCryst::ZScatterer::GlobalOptRandomMove const REAL  mutationAmplitude,
const RefParType type = gpRefParTypeObjCryst
[virtual]
 

Make a random move of the current configuration.

This is for global optimization algorithms. the moves for each parameter are less than their global optimization step, multiplied by the mutation amplitude.

Warning:
: this makes a random move for the parameter declared for this object, and it is the duty of the object to decide whether the included objects should be moved and how. (eg an algorithm should only call for a move with the top object, and this object decides how he and his sub-objects moves). By default (RefinableObj implementation) all included objects are moved recursively.
RefinableObj::
Parameters:
mutationAmplitude: multiplier for the maximum move amplitude, for all parameters
type: restrain the change exclusively to parameters of a given type (same type or descendant from this RefParType).

Reimplemented from ObjCryst::RefinableObj.

void ObjCryst::ZScatterer::ImportFenskeHallZMatrix istream &  is,
bool  named = false
 

Import "Fenske-Hall" ZMatrix file (fhz in the babel program http://www.eyesopen.com/babel.html\ example: use "./babel -ipdb foo.pdb -ofhz foo.fhz -d", to convert a pdb file to a Z-Matrix file (the -d removes hydrogen atoms).

Parameters:
is: the input stream from which to read the z-matrix
names: if true, instead of reading a standard Fenske-Hall z-matrix, the file will be read with names, i.e. with an added first column with the names of the atoms, and the number used to reference the bond, bond angle and dihedral angle atoms are replaced by the names of the atoms.
Warning:
: this should be called before any atom has been added (if there are already atoms, they should be removed but this has not been tested...)
Note:
: this will search in the Crystal associated with this ZScatterer the relevant ScatteringPowerAtom, which should have the name of the corresponding symbol (eg 'H', 'C',...) if these are not found then they will be added to the Crystal with a default isotropic B-factor equal to 1.

: this also sets relative limits of +/-.03 Angstroems for all bond distances, and +/-3.6 degress for bond and dihedral angles.

Todo:
: identify which dihedral angles should not be limited, by analysing a coordination table.

virtual void ObjCryst::ZScatterer::InitRefParList  )  [private, virtual]
 

Prepare refinable parameters for the scatterer object.

Implements ObjCryst::Scatterer.

virtual ostream& ObjCryst::ZScatterer::POVRayDescription ostream &  os,
const CrystalPOVRayOptions options
const [virtual]
 

Not implemented for ZScatterer.

Implements ObjCryst::Scatterer.

void ObjCryst::ZScatterer::Print  )  const [virtual]
 

Print a single line of information about this scatterer.

Implements ObjCryst::Scatterer.

void ObjCryst::ZScatterer::SetCenterAtomIndex const unsigned  int  ) 
 

Set the index of the central atom (around which the rotation is made).

void ObjCryst::ZScatterer::SetChi const  REAL  ) 
 

Access to chi parameter (overall orientation of the scatterer).

void ObjCryst::ZScatterer::SetPhi const  REAL  ) 
 

Access to phi parameter (overall orientation of the scatterer).

void ObjCryst::ZScatterer::SetPsi const  REAL  ) 
 

Access to psi parameter (overall orientation of the scatterer).

virtual void ObjCryst::ZScatterer::SetUseGlobalScatteringPower const bool  useIt  )  [virtual]
 

use a Global scattering power for this scatterer ?

If true, then the overall scattering power of this ZScatterer will be approximated to an isotropic scattering power computed for this scatterer. Of course, only use this if the "isotropic" approximation is reasonable for this scatterer (typically true for 'large' polyhedra). See GlobalScatteringPower.

Warning:
EXPERIMENTAL

void ObjCryst::ZScatterer::SetZAngle const int  i,
const  REAL
 

Access to the angle parameter, for the i-th row in the Z-Matrix.

void ObjCryst::ZScatterer::SetZBondLength const int  i,
const  REAL
 

Access to bondlength parameter, for the i-th row in the Z-Matrix.

void ObjCryst::ZScatterer::SetZDihedralAngle const int  i,
const  REAL
 

Access to the dihedral angle parameter, for the i-th row in the Z-Matrix.

void ObjCryst::ZScatterer::UpdateCoordinates  )  const [protected]
 

Update the atom coordinates (in real units, in Angstroems).

This takes into account the translation and global rotation of the scatterer (ie this does not generate 'internal coordinates).

void ObjCryst::ZScatterer::UpdateScattCompList  )  const [protected]
 

Update the scattering component list, ie compute all atom positions from the bonds/angles/dihedral angles, and convert the coordinates to fractionnal coordinates of the Crystal.

virtual void ObjCryst::ZScatterer::XMLInput istream &  is,
const XMLCrystTag tag
[virtual]
 

Input From stream.

Todo:
Add an bool XMLInputTag(is,tag) function to recognize all the tags from the stream. So that each inherited class can use the XMLInputTag function from its parent (ie take advantage of inheritance). The children class would first try to interpret the tag, then if unsuccessful would pass it to its parent (thus allowing overloading), etc...

Reimplemented from ObjCryst::RefinableObj.

virtual void ObjCryst::ZScatterer::XMLOutput ostream &  os,
int  indent = 0
const [virtual]
 

Output to stream in well-formed XML.

Todo:
Use inheritance.. as for XMLInputTag()...

Reimplemented from ObjCryst::RefinableObj.


Member Data Documentation

CrystMatrix_long ObjCryst::ZScatterer::m3DDisplayIndex [protected]
 

For 3D display of the structure, bonds, triangular and quadric faces can be displayed.

This matrix determines what is drawn. This is a 5-column matrix. The first column indicates the type of drawing (0: : nothing, 1: display the atom (a sphere), 2: bond, 3: triangular face, 4: quadric face) the other columns indicate the index of the atoms involved in the drawing (2 atoms for a bond, 3 for....)

If the matrix is empty only the individual atoms are displayed.

Todo:
This is still experimental. This is only used for the display of ZPolyhedron, and should be more developped (and it should also be saved in XML files !)

long ObjCryst::ZScatterer::mCenterAtomIndex [private]
 

Index of the atom used as a pivot (the scatterer is rotated around this atom).

This should more or less be at the center of the Scatterer.

REAL ObjCryst::ZScatterer::mChi [private]
 

Angles giving the orientation of the ZScatterer (stored in radian).

The position of any atom can be transformed from internal coordinates (orthonormal coordinates derived from the ZMatrix, with first atom at (0,0,0), second atom at (x,0,0), third atom at (x,y,0),...) to orthonormal coordinates in the crystal reference frame (ie with orientation of the ZScatterer) using :

\[ \left[ \begin{array}{c} x(i) \\ y(i) \\ z(i) \end{array} \right]_{orthonormal} = \left[ \begin{array}{ccc} \cos(\chi) & 0 & -\sin(\chi) \\ 0 & 1 & 0 \\ \sin(\chi) & 0 & \cos(\chi) \end{array} \right] \times \left[ \begin{array}{ccc} \cos(\phi) & -\sin(\phi) & 0 \\ \sin(\phi) & \cos(\phi) & 0 \\ 0 & 0 & 1 \end{array} \right] \times \left[ \begin{array}{ccc} 1 & 0 & 0 \\ 0 & \cos(\psi) & -\sin(\psi) \\ 0 & \sin(\psi) & \cos(\psi) \end{array} \right] \times \left[ \begin{array}{c} x_0(i) \\ y_0(i) \\ z_0(i) \end{array} \right] \]

, where x0(i), y0(i) and z0(i) describe the position for atom (i) in internal coordinates, and x(i), y(i), z(i) are coordinates of the rotated ZScatterer.

The rotation is performed around a 'pivot' atom (see ZScatterer::mPivotAtom)

RefinableObjClock ObjCryst::ZScatterer::mClockCoord [mutable, private]
 

Last time the cartesian coordinates were computed.

CrystVector_int ObjCryst::ZScatterer::mComponentIndex [private]
 

Index of atoms in the ScatteringComponentList.

We need this list because Dummy atoms are not included in it. So this is an integer array with [ 0 1 2 4 5 6].. where the missing '3' marks a Dummy atom. Thus to get the name of component 'i' in the component list, you must take the mComponentIndex(i) atom in the ZAtom Registry.

long ObjCryst::ZScatterer::mNbAtom [protected]
 

Total number of atoms in the structure.

long ObjCryst::ZScatterer::mNbDummyAtom [private]
 

Number of "dummy" atoms in the structure.

GlobalScatteringPower* ObjCryst::ZScatterer::mpGlobalScattPow [private]
 

the global scattering power used, if mUseGlobalScattPow=true

Warning:
EXPERIMENTAL.

REAL ObjCryst::ZScatterer::mPhi [private]
 

Angles giving the orientation of the ZScatterer (stored in radian).

The position of any atom can be transformed from internal coordinates (orthonormal coordinates derived from the ZMatrix, with first atom at (0,0,0), second atom at (x,0,0), third atom at (x,y,0),...) to orthonormal coordinates in the crystal reference frame (ie with orientation of the ZScatterer) using :

\[ \left[ \begin{array}{c} x(i) \\ y(i) \\ z(i) \end{array} \right]_{orthonormal} = \left[ \begin{array}{ccc} \cos(\chi) & 0 & -\sin(\chi) \\ 0 & 1 & 0 \\ \sin(\chi) & 0 & \cos(\chi) \end{array} \right] \times \left[ \begin{array}{ccc} \cos(\phi) & -\sin(\phi) & 0 \\ \sin(\phi) & \cos(\phi) & 0 \\ 0 & 0 & 1 \end{array} \right] \times \left[ \begin{array}{ccc} 1 & 0 & 0 \\ 0 & \cos(\psi) & -\sin(\psi) \\ 0 & \sin(\psi) & \cos(\psi) \end{array} \right] \times \left[ \begin{array}{c} x_0(i) \\ y_0(i) \\ z_0(i) \end{array} \right] \]

, where x0(i), y0(i) and z0(i) describe the position for atom (i) in internal coordinates, and x(i), y(i), z(i) are coordinates of the rotated ZScatterer.

The rotation is performed around a 'pivot' atom (see ZScatterer::mPivotAtom)

CrystMatrix_REAL ObjCryst::ZScatterer::mPhiChiPsiMatrix [mutable, private]
 

Rotation matrix for the orientation of the scatterer.

REAL ObjCryst::ZScatterer::mPsi [private]
 

Angles giving the orientation of the ZScatterer (stored in radian).

The position of any atom can be transformed from internal coordinates (orthonormal coordinates derived from the ZMatrix, with first atom at (0,0,0), second atom at (x,0,0), third atom at (x,y,0),...) to orthonormal coordinates in the crystal reference frame (ie with orientation of the ZScatterer) using :

\[ \left[ \begin{array}{c} x(i) \\ y(i) \\ z(i) \end{array} \right]_{orthonormal} = \left[ \begin{array}{ccc} \cos(\chi) & 0 & -\sin(\chi) \\ 0 & 1 & 0 \\ \sin(\chi) & 0 & \cos(\chi) \end{array} \right] \times \left[ \begin{array}{ccc} \cos(\phi) & -\sin(\phi) & 0 \\ \sin(\phi) & \cos(\phi) & 0 \\ 0 & 0 & 1 \end{array} \right] \times \left[ \begin{array}{ccc} 1 & 0 & 0 \\ 0 & \cos(\psi) & -\sin(\psi) \\ 0 & \sin(\psi) & \cos(\psi) \end{array} \right] \times \left[ \begin{array}{c} x_0(i) \\ y_0(i) \\ z_0(i) \end{array} \right] \]

, where x0(i), y0(i) and z0(i) describe the position for atom (i) in internal coordinates, and x(i), y(i), z(i) are coordinates of the rotated ZScatterer.

The rotation is performed around a 'pivot' atom (see ZScatterer::mPivotAtom)

ZMoveMinimizer* ObjCryst::ZScatterer::mpZMoveMinimizer [private]
 

ScatteringComponentList ObjCryst::ZScatterer::mScattCompList [mutable, protected]
 

The list of scattering components.

bool ObjCryst::ZScatterer::mUseGlobalScattPow [private]
 

Does the ZScatterer use a global scattering power ?

Warning:
EXPERIMENTAL.

CrystVector_REAL ObjCryst::ZScatterer::mXCoord [mutable, private]
 

Storage for Cartesian coordinates.

The (0,0,0) is on the central atom. This includes Dummy atoms.

CrystVector_REAL ObjCryst::ZScatterer::mYCoord [mutable, private]
 

Storage for Cartesian coordinates.

The (0,0,0) is on the central atom. This includes Dummy atoms.

ObjRegistry<ZAtom> ObjCryst::ZScatterer::mZAtomRegistry [private]
 

Registry for ZAtoms in this Scatterer.

CrystVector_REAL ObjCryst::ZScatterer::mZCoord [mutable, private]
 

Storage for Cartesian coordinates.

The (0,0,0) is on the central atom. This includes Dummy atoms.


The documentation for this class was generated from the following file:
Generated on Tue Nov 14 15:05:36 2006 for ObjCryst++ by doxygen 1.3.6