#include <ZScatterer.h>
Inheritance diagram for ObjCryst::ZScatterer::
Public Methods | |
ZScatterer (const string &name, const Crystal &cryst, const double x=0., const double y=0., const double z=0., const double phi=0., const double chi=0., const double psi=0.) | |
ZScatterer constructor. More... | |
ZScatterer (const ZScatterer &old) | |
Copy constructor. | |
~ZScatterer () | |
virtual ZScatterer * | CreateCopy () const |
so-called Virtual copy constructor, needed to make copies of arrays of Scatterers. | |
virtual const string | GetClassName () const |
Name for this class ("RefinableObj", "Crystal",...). This is only useful to distinguish different classes when picking up objects from the RefinableObj Global Registry. | |
void | AddAtom (const string &name, const ScatteringPower *pow, const long atomBond, const double bondLength, const long atomAngle, const double bondAngle, const long atomDihedral, const double dihedralAngle, const double 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 int | GetNbComponent () const |
Number of components in the scatterer (eg number of point scatterers). | |
virtual const ScatteringComponentList & | GetScatteringComponentList () const |
Get the list of all scattering components for this scatterer. More... | |
virtual string | GetComponentName (const int i) const |
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.
| |
void | Print () const |
Print a single line of information about this scatterer. | |
double | GetPhi () const |
Access to phi parameter (overall orientation of the scatterer). | |
double | GetChi () const |
Access to chi parameter (overall orientation of the scatterer). | |
double | GetPsi () const |
Access to psi parameter (overall orientation of the scatterer). | |
void | SetPhi (const double) |
Access to phi parameter (overall orientation of the scatterer). | |
void | SetChi (const double) |
Access to chi parameter (overall orientation of the scatterer). | |
void | SetPsi (const double) |
Access to psi parameter (overall orientation of the scatterer). | |
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). | |
double | GetZBondLength (const int i) const |
Const access to bondlength parameter, for the i-th row in the Z-Matrix. | |
double | GetZAngle (const int i) const |
Const access to the angle parameter, for the i-th row in the Z-Matrix. | |
double | 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 double) |
Access to bondlength parameter, for the i-th row in the Z-Matrix. | |
void | SetZAngle (const int i, const double) |
Access to the angle parameter, for the i-th row in the Z-Matrix. | |
void | SetZDihedralAngle (const int i, const double) |
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 bool onlyIndependentAtoms=false) const |
| |
virtual void | GLInitDisplayList (const bool onlyIndependentAtoms=false, const double xMin=-.1, const double xMax=1.1, const double yMin=-.1, const double yMax=1.1, const double zMin=-.1, const double zMax=1.1) const |
virtual void | SetUseGlobalScatteringPower (const bool useIt) |
use a Global scattering power for this scatterer ? More... | |
virtual void | XMLOutput (ostream &os, int indent=0) const |
Output to stream in well-formed XML. More... | |
virtual void | XMLInput (istream &is, const XMLCrystTag &tag) |
Input From stream. More... | |
Protected Methods | |
void | Update () const |
Update the scatterer's parameters (scattering positions, occupancy). More... | |
Protected Attributes | |
CrystMatrix_long | m3DDisplayIndex |
For 3D display of the structure, bonds, triangular and quadric faces can be displayed. More... | |
ScatteringComponentList | mScattCompList |
The list of scattering components. | |
long | mNbAtom |
Total number of atoms in the structure. | |
Private Methods | |
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. 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. | |
double | mPhi |
Angles giving the orientation of the ZScatterer (stored in radian). More... | |
double | mChi |
Angles giving the orientation of the ZScatterer (stored in radian). More... | |
double | mPsi |
Angles giving the orientation of the ZScatterer (stored in radian). More... | |
ObjRegistry< ZAtom > | mZAtomRegistry |
Registry for ZAtoms in this Scatterer. | |
long | mCenterAtomIndex |
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. | |
CrystMatrix_double | mPhiChiPsiMatrix |
Rotation matrix for the orientation of the scatterer. | |
bool | mUseGlobalScattPow |
Does the ZScatterer use a global scattering power ?
| |
GlobalScatteringPower * | mpGlobalScattPow |
the global scattering power used, if mUseGlobalScattPow=true
| |
CrystVector_double | mXCoord |
Storage for Cartesian coordinates. The (0,0,0) is on the central atom. This includes Dummy atoms. | |
CrystVector_double | mYCoord |
Storage for Cartesian coordinates. The (0,0,0) is on the central atom. This includes Dummy atoms. | |
CrystVector_double | mZCoord |
Storage for Cartesian coordinates. The (0,0,0) is on the central atom. This includes Dummy atoms. |
|
ZScatterer constructor.
|
|
Create an OpenGL Display List of the scatterer. This should only be called by a Crystal object.
Reimplemented from ObjCryst::Scatterer. |
|
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.
Reimplemented from ObjCryst::Scatterer. |
|
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. Reimplemented from ObjCryst::Scatterer. |
|
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.
|
|
Update the scatterer's parameters (scattering positions, occupancy). This is necessary for composite scatterers (eg not atoms), which include more than a single scattering center. The coordinates of all scattering points are updated from the scatterer's parameters. This is automatically called each time GetScatteringComponentList() is used. As always, update is only made if nessary (ie if one parameter determining the atom positions has changed).
Reimplemented from ObjCryst::Scatterer. |
|
Input From stream.
Reimplemented from ObjCryst::RefinableObj. |
|
Output to stream in well-formed XML.
Reimplemented from ObjCryst::RefinableObj. |
|
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.
|
|
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 : ![]() , 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) |
|
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 : ![]() , 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) |
|
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 : ![]() , 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) |