Logo Search packages:      
Sourcecode: objcryst-fox version File versions  Download package

ObjCryst::ZScatterer Class Reference

#include <ZScatterer.h>

Inheritance diagram for ObjCryst::ZScatterer:

ObjCryst::Scatterer ObjCryst::RefinableObj ObjCryst::ZPolyhedron

List of all members.


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. ####################################################################

Definition at line 188 of file ZScatterer.h.


Public Member Functions

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.)
void AddPar (RefinableObj &newRefParList, const bool copyParam=false)
void AddPar (RefinablePar *newRefPar)
void AddPar (const RefinablePar &newRefPar)
void AddRestraint (Restraint *pNewRestraint)
void BeginGlobalOptRandomMove ()
virtual void BeginOptimization (const bool allowApproximations=false, const bool enableRestraints=false)
void ClearParamSet (const unsigned long id) const
 Erase the param set with the given id, releasing memory.
virtual ZScattererCreateCopy () const
unsigned long CreateParamSet (const string name="") const
 Save the current set of refined values in a new set.
virtual void DeRegisterClient (RefinableObj &) const
 Deregister an object (which not any more) using this object.
virtual void EndOptimization ()
const void EraseAllParamSet ()
 Erase all saved refpar sets.
void ExportFenskeHallZMatrix (ostream &os)
void FixAllPar ()
 Fix All parameters.
unsigned int GetCenterAtomIndex () const
 Get the index of the central atom (around which the rotation is made).
REAL GetChi () const
 Access to chi parameter (overall orientation of the scatterer).
virtual const string & GetClassName () const
virtual ObjRegistry
< RefinableObj > & 
GetClientRegistry ()
 Get the list of clients.
virtual const ObjRegistry
< RefinableObj > & 
GetClientRegistry () const
 Get the list of clients.
const RefinableObjClockGetClockMaster () const
 This clocks records _any_ change in the object. See refinableObj::mClockMaster.
RefinableObjClockGetClockScatterer ()
 Last time anything in the scatterer was changed (atoms, positions, scattering power).
const RefinableObjClockGetClockScatterer () const
 Last time anything in the scatterer was changed (atoms, positions, scattering power).
virtual const string & GetColour () const
 Colour associated to this scatterer (using POVRay names).
virtual const float * GetColourRGB () const
 Colour associated to this scatterer, 3 RGB Coordinates.
virtual string GetComponentName (const int i) const
CrystalGetCrystal ()
 In which crystal is this Scatterer included ?
const CrystalGetCrystal () const
 In which crystal is this Scatterer included ?
virtual void GetGeneGroup (const RefinableObj &obj, CrystVector_uint &groupIndex, unsigned int &firstGroup) const
 Get the gene group assigned to each parameter.
virtual REAL GetLogLikelihood () const
virtual const CrystVector_REAL & GetLSQCalc (const unsigned int) const
 Get the current calculated value for the LSQ function.
virtual const CrystVector_REAL & GetLSQDeriv (const unsigned int, RefinablePar &)
virtual const CrystVector_REAL & GetLSQObs (const unsigned int) const
 Get the observed values for the LSQ function.
virtual const CrystVector_REAL & GetLSQWeight (const unsigned int) const
 Get the weight values for the LSQ function.
virtual const string & GetName () const
 Name of the object.
virtual int GetNbComponent () const
 Number of components in the scatterer (eg number of point scatterers).
virtual unsigned int GetNbLSQFunction () const
 Number of LSQ functions.
unsigned int GetNbOption () const
 Number of Options for this object.
long GetNbPar () const
long GetNbParNotFixed () const
 Total number of non-fixed parameters. Is initialized by PrepareForRefinement().
REAL GetOccupancy () const
 Get the occupancy of the scatterer (0. -> 1.0).
const RefObjOptGetOption (const unsigned int i) const
 const access to the options
RefObjOptGetOption (const unsigned int i)
 Access to the options.
const RefinableParGetPar (const REAL *) const
 Access parameter from its adress.
RefinableParGetPar (const REAL *)
 Access parameter from its adress.
const RefinableParGetPar (const string &name) const
 Access all parameters from their name.
RefinableParGetPar (const string &name)
 Access all parameters from their name.
const RefinableParGetPar (const long i) const
 Access all parameters in the order they were inputted.
RefinableParGetPar (const long i)
 Access all parameters in the order they were inputted.
CrystVector_REAL & GetParamSet (const unsigned long setId)
 Access one save refpar set.
const CrystVector_REAL & GetParamSet (const unsigned long setId) const
 Access one save refpar set.
REAL GetParamSet_ParNotFixedHumanValue (const unsigned long setId, const long parNumber) const
 Access the (human) value of one refined parameter in a saved set of parameters.
const string & GetParamSetName (const unsigned long setId) const
 Get the name associated to a refpar set.
const RefinableParGetParNotFixed (const long i) const
RefinableParGetParNotFixed (const long i)
REAL GetPhi () const
 Access to phi parameter (overall orientation of the scatterer).
REAL GetPsi () const
 Access to psi parameter (overall orientation of the scatterer).
const RefinableObjClockGetRefParListClock () const
virtual REAL GetRestraintCost () const
virtual const
ScatteringComponentList
GetScatteringComponentList () const
 Get the list of all scattering components for this scatterer.
const ObjRegistry< RefinableObj > & GetSubObjRegistry () const
 Access to the registry of RefinableObj used by this object.
ObjRegistry< RefinableObj > & GetSubObjRegistry ()
 Access to the registry of RefinableObj used by this object.
REAL GetX () const
const CrystVector_REAL & GetXCoord () const
 Get the list of all ZAtom cartesian x coordinates.
REAL GetY () const
const CrystVector_REAL & GetYCoord () const
 Get the list of all ZAtom cartesian x coordinates.
REAL GetZ () const
REAL GetZAngle (const int i) const
 Const access to the angle parameter, for the i-th row in the Z-Matrix.
long GetZAngleAtom (const int i) const
const ObjRegistry< ZAtom > & GetZAtomRegistry () const
 Access to the registry of ZAtoms.
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
REAL GetZBondLength (const int i) const
 Const access to bondlength parameter, for the i-th row in the Z-Matrix.
const CrystVector_REAL & GetZCoord () const
 Get the list of all ZAtom cartesian x coordinates.
REAL GetZDihedralAngle (const int i) const
 Const access to the dihedral angle parameter, for the i-th row in the Z-Matrix.
long GetZDihedralAngleAtom (const int i) const
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 GlobalOptRandomMove (const REAL mutationAmplitude, const RefParType *type=gpRefParTypeObjCryst)
void ImportFenskeHallZMatrix (istream &is, bool named=false)
bool IsBeingRefined () const
 Is the object being refined ? (Can be refined by one algorithm at a time only.).
 operator string () const
virtual ostream & POVRayDescription (ostream &os, const CrystalPOVRayOptions &options) const
void PrepareForRefinement () const
void Print () const
 Print a single line of information about this scatterer.
virtual void RandomizeConfiguration ()
virtual void RegisterClient (RefinableObj &) const
vector< RefinablePar * >::iterator RemovePar (RefinablePar *refPar)
vector< Restraint * >::iterator RemoveRestraint (Restraint *pRestraint)
void ResetParList ()
void RestoreParamSet (const unsigned long id)
 Restore a saved set of values.
void SaveParamSet (const unsigned long id) const
 Save the current set of refined values over a previously-created set of saved values.
void SetCenterAtomIndex (const unsigned int)
 Set the index of the central atom (around which the rotation is made).
void SetChi (const REAL)
 Access to chi parameter (overall orientation of the scatterer).
void SetCrystal (Crystal &)
 Set the crystal in which is included this Scatterer.
void SetDeleteRefParInDestructor (const bool b)
void SetGlobalOptimStep (const RefParType *type, const REAL step)
 Change the maximum step to use during Global Optimization algorithms.
void SetLimitsAbsolute (const RefParType *type, const REAL min, const REAL max)
 Change the limits for a category of parameters, giving absolute new limits.
void SetLimitsAbsolute (const string &parName, const REAL min, const REAL max)
 Change the limits for a given parameter, giving absolute new limits.
void SetLimitsProportional (const RefParType *type, const REAL min, const REAL max)
void SetLimitsProportional (const string &parName, const REAL min, const REAL max)
void SetLimitsRelative (const RefParType *type, const REAL min, const REAL max)
void SetLimitsRelative (const string &parName, const REAL min, const REAL max)
virtual void SetName (const string &name)
 Name of the object.
virtual void SetOccupancy (const REAL occupancy)
 Change the occupancy of the scatterer (0. -> 1.0).
void SetParIsFixed (const RefParType *type, const bool fix)
 Fix/un-fix one family of parameters.
void SetParIsFixed (const string &parName, const bool fix)
 Fix/un-fix one parameter from its name.
void SetParIsFixed (const long parIndex, const bool fix)
 Fix/un-fix one parameter from its #.
void SetParIsUsed (const RefParType *type, const bool use)
 Set whether a family of parameters is used.
void SetParIsUsed (const string &parName, const bool use)
 Set whether a parameter is used.
void SetPhi (const REAL)
 Access to phi parameter (overall orientation of the scatterer).
void SetPsi (const REAL)
 Access to psi parameter (overall orientation of the scatterer).
virtual void SetUseGlobalScatteringPower (const bool useIt)
 use a Global scattering power for this scatterer ?
virtual void SetX (const REAL x)
virtual void SetY (const REAL y)
virtual void SetZ (const REAL z)
void SetZAngle (const int i, const REAL)
 Access to the 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 SetZDihedralAngle (const int i, const REAL)
 Access to the dihedral angle parameter, for the i-th row in the Z-Matrix.
virtual void TagNewBestConfig () const
void UnFixAllPar ()
 UnFix All parameters.
virtual void UpdateDisplay () const
virtual void XMLInput (istream &is, const XMLCrystTag &tag)
 Input From stream.
virtual void XMLOutput (ostream &os, int indent=0) const
 Output to stream in well-formed XML.
 ZScatterer (const ZScatterer &old)
 Copy constructor.
 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.

Protected Member Functions

void AddOption (RefObjOpt *opt)
void AddSubRefObj (RefinableObj &)
long FindPar (const REAL *) const
 Find a refinable parameter from the adress of its value.
long FindPar (const string &name) const
 Find a refinable parameter with a given name.
map< unsigned long, pair
< CrystVector_REAL, string >
>::iterator 
FindParamSet (unsigned long id) const
 Find a parameter set with a given id (and check if it is there).
const RefinableObjClockGetClockScattCompList () const
 Last time the ScatteringComponentList was generated.
virtual void InitRGBColour ()
virtual void Prepare ()
void RemoveSubRefObj (RefinableObj &)
void UpdateCoordinates () const
void UpdateScattCompList () const

Protected Attributes

CrystMatrix_long m3DDisplayIndex
ObjRegistry< RefinableObjmClientObjRegistry
RefinableObjClock mClockMaster
RefinableObjClock mClockScattCompList
RefinableObjClock mClockScatterer
 Last time anything (number of atoms, positions, scattering power) was changed.
string mColourName
 Colour for this scatterer (from POVRay).
float mColourRGB [3]
 Colour for this scatterer using RGB.
bool mDeleteRefParInDestructor
bool mIsbeingRefined
 Is the object being refined ?
CrystVector_REAL mLSQDeriv
string mName
 Name for this RefinableObject. Should be unique, at least in the same scope.+.
long mNbAtom
 Total number of atoms in the structure.
long mNbRefParNotFixed
 Total of not-fixed parameters.
REAL mOccupancy
 Occupancy : 0 <= occ <= 1 For a multi-atom scatterer (polyhedron,..), this is the overall occupancy of the scatterer (affects all components of the scatterer).
ObjRegistry< RefObjOptmOptionRegistry
CrystalmpCryst
bool mRandomMoveIsDone
RefinableObjClock mRefParListClock
 Last time the RefinableParList was modified (a parameter added or removed).
CrystVector_long mRefparNotFixedIndex
 Index of not-fixed parameters.
ScatteringComponentList mScattCompList
 The list of scattering components.
ObjRegistry< RefinableObjmSubObjRegistry
 Registry of RefinableObject needed for this object (owned by this object or not).
vector< RefinablePar * > mvpRefPar
 Vector of pointers to the refinable parameters.
vector< Restraint * > mvpRestraint
map< unsigned long, pair
< CrystVector_REAL, string > > 
mvpSavedValuesSet
CrystVector_REAL mXYZ
 coordinates of the scatterer (or of its center..)

Private Member Functions

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

Private Attributes

long mCenterAtomIndex
REAL mChi
RefinableObjClock mClockCoord
 Last time the cartesian coordinates were computed.
CrystVector_int mComponentIndex
long mNbDummyAtom
 Number of "dummy" atoms in the structure.
GlobalScatteringPowermpGlobalScattPow
REAL mPhi
 Angles giving the orientation of the ZScatterer (stored in radian).
CrystMatrix_REAL mPhiChiPsiMatrix
 Rotation matrix for the orientation of the scatterer.
REAL mPsi
ZMoveMinimizermpZMoveMinimizer
bool mUseGlobalScattPow
CrystVector_REAL mXCoord
CrystVector_REAL mYCoord
ObjRegistry< ZAtommZAtomRegistry
 Registry for ZAtoms in this Scatterer.
CrystVector_REAL mZCoord

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index