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

ObjCryst::ScatteringPower Class Reference

Abstract Base Class to describe the scattering power of any Scatterer component in a crystal. More...

Inheritance diagram for ObjCryst::ScatteringPower:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

virtual void operator= (const ScatteringPower &rhs)
virtual CrystVector_REAL GetScatteringFactor (const ScatteringData &data, const int spgSymPosIndex=-1) const=0
 Get the Scattering factor for all reflections of a given ScatteringData object.

virtual REAL GetForwardScatteringFactor (const RadiationType) const=0
 Get the scattering factor at (0,0,0).

virtual CrystVector_REAL GetTemperatureFactor (const ScatteringData &data, const int spgSymPosIndex=-1) const=0
 Get the temperature factor for all reflections of a given ScatteringData object.

virtual CrystMatrix_REAL GetResonantScattFactReal (const ScatteringData &data, const int spgSymPosIndex=-1) const=0
 Get the real part of the resonant scattering factor.

virtual CrystMatrix_REAL GetResonantScattFactImag (const ScatteringData &data, const int spgSymPosIndex=-1) const=0
 Get the imaginary part of the resonant scattering factor.

virtual bool IsScatteringFactorAnisotropic () const
 Is the scattering factor anisotropic ?

virtual bool IsTemperatureFactorAnisotropic () const
 Is the thermic factor anisotropic ?

virtual bool IsResonantScatteringAnisotropic () const
 Are the resonant scattering terms anisotropic ?

virtual const string & GetSymbol () const
 Symbol for this Scattering power (the atom name for atoms).

REAL GetBiso () const
 Returns the isotropic temperature B factor.

REAL & GetBiso ()
 Returns the isotropic temperature B factor.

virtual void SetBiso (const REAL newB)
 Sets the isotropic temperature B factor.

bool IsIsotropic () const
 Returns true if the scattering power is isotropic, else false.

long GetDynPopCorrIndex () const
 Get the number identifying this kind of scatterer, used to decide whether two scatterers are equivalent, for the dynamical occupancy correction.

long GetNbScatteringPower () const
 Total number of ScatteringPower object.

const RefinableObjClockGetLastChangeClock () const
 ObjCrystClock time when the last modification was made to the object.

const string & GetColourName () const
 Get the (POV-Ray) name associated to the color (if any).

const float * GetColourRGB () const
 Get the float[3] array of RGB components defining the colour of this scattering power.

void SetColour (const string &colorName)
 Set the colour from the associated POV-Ray name.

void SetColour (const float r, const float g, const float b)
 Set the colour from RGB components (all between 0 and 1.).

virtual REAL GetRadius () const=0
 Return the physical radius of this type of scatterer (for 3D display purposes).

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

REAL GetMaximumLikelihoodPositionError () const
 Maximum Likelihood: get the estimated error (sigma) on the positions for this kind of element.

void SetMaximumLikelihoodPositionError (const REAL mle)
 Maximum Likelihood: set the estimated error (sigma) on the positions for this kind of element.

REAL GetMaximumLikelihoodNbGhostAtom () const
 Maximum Likelihood: get the number of ghost elements per asymmetric unit.

void SetMaximumLikelihoodNbGhostAtom (const REAL nb)
 Maximum Likelihood: set the number of ghost elements per asymmetric unit.

const RefinableObjClockGetMaximumLikelihoodParClock () const
 Get the clock value for the last change on the maximum likelihood parameters (positionnal error, number of ghost atoms).

virtual REAL GetFormalCharge () const
virtual void SetFormalCharge (const REAL charge)

Protected Member Functions

virtual void InitRefParList ()=0
virtual void Init ()
 Initialization of the object, used by all constructors, and operator=.

virtual void InitRGBColour ()
 Get RGB Colour coordinates from Colour Name.


Protected Attributes

long mDynPopCorrIndex
 number identifying this kind of scatterer, for the dynamical occupancy correction.

REAL mBiso
 Temperature isotropic B factor.

bool mIsIsotropic
 Is the scattering isotropic ?

CrystVector_REAL mBeta
 Anisotropic Beta(ij).

RefinableObjClock mClock
 Clock.

string mColourName
 Colour for this ScatteringPower (from POVRay).

float mColourRGB [3]
 Colour for this ScatteringPower using RGB.

REAL mMaximumLikelihoodPositionError
 estimated error (sigma) on the positions for this type of element.

RefinableObjClock mMaximumLikelihoodParClock
REAL mMaximumLikelihoodNbGhost
 Number of ghost atoms in the asymmetric unit.

REAL mFormalCharge
 Formal Charge.


Detailed Description

Abstract Base Class to describe the scattering power of any Scatterer component in a crystal.

This includes:

The interface is independent of the radiation type.

This base class is designed to handle both isotropic and anisotropic versions of scattering, temperature and anomalous factors.

Todo:
Anisotropic scattering (temperature factor especially) code, using derived classes

Clarify organization by removing any 'real' data from the top, abstract base class (eg remove Biso and Betaij), and by creating derived classes. Optionnaly 3 classes (used as members of ScatteringPower) could be created, TemperatureFactor, ScatteringFactor, and ResonantScatteringFactor. In any way the design of this class should not evolve, so that code using the ScatteringPower interface will remain compatible whatever modifications are made.


Constructor & Destructor Documentation

ObjCryst::ScatteringPower::ScatteringPower  ) 
 

ObjCryst::ScatteringPower::ScatteringPower const ScatteringPower old  ) 
 

virtual ObjCryst::ScatteringPower::~ScatteringPower  )  [virtual]
 


Member Function Documentation

REAL& ObjCryst::ScatteringPower::GetBiso  ) 
 

Returns the isotropic temperature B factor.

REAL ObjCryst::ScatteringPower::GetBiso  )  const
 

Returns the isotropic temperature B factor.

virtual const string& ObjCryst::ScatteringPower::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::RefinableObj.

Reimplemented in ObjCryst::ScatteringPowerAtom, and ObjCryst::ScatteringPowerSphere.

const string& ObjCryst::ScatteringPower::GetColourName  )  const
 

Get the (POV-Ray) name associated to the color (if any).

const float* ObjCryst::ScatteringPower::GetColourRGB  )  const
 

Get the float[3] array of RGB components defining the colour of this scattering power.

long ObjCryst::ScatteringPower::GetDynPopCorrIndex  )  const
 

Get the number identifying this kind of scatterer, used to decide whether two scatterers are equivalent, for the dynamical occupancy correction.

virtual REAL ObjCryst::ScatteringPower::GetFormalCharge  )  const [virtual]
 

virtual REAL ObjCryst::ScatteringPower::GetForwardScatteringFactor const  RadiationType  )  const [pure virtual]
 

Get the scattering factor at (0,0,0).

Used for scatterer (electron, nucleus) density generation.

Implemented in ObjCryst::ScatteringPowerAtom, ObjCryst::ScatteringPowerSphere, and ObjCryst::GlobalScatteringPower.

virtual void ObjCryst::ScatteringPower::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.

const RefinableObjClock& ObjCryst::ScatteringPower::GetLastChangeClock  )  const
 

ObjCrystClock time when the last modification was made to the object.

REAL ObjCryst::ScatteringPower::GetMaximumLikelihoodNbGhostAtom  )  const
 

Maximum Likelihood: get the number of ghost elements per asymmetric unit.

const RefinableObjClock& ObjCryst::ScatteringPower::GetMaximumLikelihoodParClock  )  const
 

Get the clock value for the last change on the maximum likelihood parameters (positionnal error, number of ghost atoms).

REAL ObjCryst::ScatteringPower::GetMaximumLikelihoodPositionError  )  const
 

Maximum Likelihood: get the estimated error (sigma) on the positions for this kind of element.

long ObjCryst::ScatteringPower::GetNbScatteringPower  )  const
 

Total number of ScatteringPower object.

virtual REAL ObjCryst::ScatteringPower::GetRadius  )  const [pure virtual]
 

Return the physical radius of this type of scatterer (for 3D display purposes).

Warning:
this may be removed later.

Implemented in ObjCryst::ScatteringPowerAtom, ObjCryst::ScatteringPowerSphere, and ObjCryst::GlobalScatteringPower.

virtual CrystMatrix_REAL ObjCryst::ScatteringPower::GetResonantScattFactImag const ScatteringData data,
const int  spgSymPosIndex = -1
const [pure virtual]
 

Get the imaginary part of the resonant scattering factor.

Returns:
a matrix where each row corresponds to each wavelength (currently only monochromatic experiments are made so there is only one row), and each column corresponds to each reflection only if the scattering term is anisotropic, which is not the case so far...
Parameters:
data: the ScatteringData object, giving access to all the reflections, and a list of wavelengths.
spgSymPosIndex: if the ScatteringPower is anisotropic, then the different symmetrics will not have the same scattering power for all reflections. This parameter is the index of the symmetric position in the Spacegroup. If spgSymPosIndex=-1, the isotropic values are returned.
Warning:
There is no anisotropic code yet, so spgSymPosIndex is simply ignored so far , but the design of this function is general for any anisotropic scattering.

Implemented in ObjCryst::ScatteringPowerAtom, ObjCryst::ScatteringPowerSphere, and ObjCryst::GlobalScatteringPower.

virtual CrystMatrix_REAL ObjCryst::ScatteringPower::GetResonantScattFactReal const ScatteringData data,
const int  spgSymPosIndex = -1
const [pure virtual]
 

Get the real part of the resonant scattering factor.

Returns:
a matrix where each row corresponds to each wavelength (currently only monochromatic experiments are made so there is only one row), and each column corresponds to each reflection only if the scattering term is anisotropic, which is not the case so far...
Parameters:
data: the ScatteringData object, giving access to all the reflections and a list of wavelengths).
spgSymPosIndex: if the ScatteringPower is anisotropic, then the different symmetrics will not have the same scattering power for all reflections. This parameter is the index of the symmetric position in the Spacegroup. If spgSymPosIndex=-1, the isotropic values are returned.
Warning:
There is no anisotropic code yet, so spgSymPosIndex is simply ignored so far , but the design of this function is general for any anisotropic scattering.

Implemented in ObjCryst::ScatteringPowerAtom, ObjCryst::ScatteringPowerSphere, and ObjCryst::GlobalScatteringPower.

virtual CrystVector_REAL ObjCryst::ScatteringPower::GetScatteringFactor const ScatteringData data,
const int  spgSymPosIndex = -1
const [pure virtual]
 

Get the Scattering factor for all reflections of a given ScatteringData object.

Returns:
a vector with the scattering factor for all reflections, in the same order as in the ScatteringData object. This format is independent of the radiation type (X-Ray, neutron..).
Parameters:
data: the ScatteringData object, giving access to all the reflections.
spgSymPosIndex: if the ScatteringPower is anisotropic, then the different symmetrics will not have the same scattering power for all reflections. This parameter is the index of the symmetric position in the Spacegroup. If spgSymPosIndex=-1, the isotropic values are returned.
Warning:
There is no anisotropic code yet, so spgSymPosIndex is simply ignored so far , but the design of this function is general for any anisotropic scattering.

Implemented in ObjCryst::ScatteringPowerAtom, ObjCryst::ScatteringPowerSphere, and ObjCryst::GlobalScatteringPower.

virtual const string& ObjCryst::ScatteringPower::GetSymbol  )  const [virtual]
 

Symbol for this Scattering power (the atom name for atoms).

Reimplemented in ObjCryst::ScatteringPowerAtom.

virtual CrystVector_REAL ObjCryst::ScatteringPower::GetTemperatureFactor const ScatteringData data,
const int  spgSymPosIndex = -1
const [pure virtual]
 

Get the temperature factor for all reflections of a given ScatteringData object.

Returns:
a vector with the temperature factor for all reflections, in the same order as in the ScatteringData object.
Parameters:
data: the ScatteringData object, giving access to all the reflections.
spgSymPosIndex: if the ScatteringPower is anisotropic, then the different symmetrics will not have the same scattering power for all reflections. This parameter is the index of the symmetric position in the Spacegroup. If spgSymPosIndex=-1, the isotropic values are returned.
Warning:
There is no anisotropic code yet, so spgSymPosIndex is simply ignored so far , but the design of this function is general for any anisotropic scattering.

Implemented in ObjCryst::ScatteringPowerAtom, ObjCryst::ScatteringPowerSphere, and ObjCryst::GlobalScatteringPower.

virtual void ObjCryst::ScatteringPower::Init  )  [protected, virtual]
 

Initialization of the object, used by all constructors, and operator=.

virtual void ObjCryst::ScatteringPower::InitRefParList  )  [protected, pure virtual]
 

Implemented in ObjCryst::ScatteringPowerAtom, ObjCryst::ScatteringPowerSphere, and ObjCryst::GlobalScatteringPower.

virtual void ObjCryst::ScatteringPower::InitRGBColour  )  [protected, virtual]
 

Get RGB Colour coordinates from Colour Name.

bool ObjCryst::ScatteringPower::IsIsotropic  )  const
 

Returns true if the scattering power is isotropic, else false.

virtual bool ObjCryst::ScatteringPower::IsResonantScatteringAnisotropic  )  const [virtual]
 

Are the resonant scattering terms anisotropic ?

virtual bool ObjCryst::ScatteringPower::IsScatteringFactorAnisotropic  )  const [virtual]
 

Is the scattering factor anisotropic ?

virtual bool ObjCryst::ScatteringPower::IsTemperatureFactorAnisotropic  )  const [virtual]
 

Is the thermic factor anisotropic ?

virtual void ObjCryst::ScatteringPower::operator= const ScatteringPower rhs  )  [virtual]
 

virtual void ObjCryst::ScatteringPower::SetBiso const REAL  newB  )  [virtual]
 

Sets the isotropic temperature B factor.

void ObjCryst::ScatteringPower::SetColour const float  r,
const float  g,
const float  b
 

Set the colour from RGB components (all between 0 and 1.).

void ObjCryst::ScatteringPower::SetColour const string &  colorName  ) 
 

Set the colour from the associated POV-Ray name.

virtual void ObjCryst::ScatteringPower::SetFormalCharge const REAL  charge  )  [virtual]
 

void ObjCryst::ScatteringPower::SetMaximumLikelihoodNbGhostAtom const REAL  nb  ) 
 

Maximum Likelihood: set the number of ghost elements per asymmetric unit.

void ObjCryst::ScatteringPower::SetMaximumLikelihoodPositionError const REAL  mle  ) 
 

Maximum Likelihood: set the estimated error (sigma) on the positions for this kind of element.


Member Data Documentation

CrystVector_REAL ObjCryst::ScatteringPower::mBeta [protected]
 

Anisotropic Beta(ij).

REAL ObjCryst::ScatteringPower::mBiso [protected]
 

Temperature isotropic B factor.

Reimplemented in ObjCryst::ScatteringPowerSphere.

RefinableObjClock ObjCryst::ScatteringPower::mClock [protected]
 

Clock.

string ObjCryst::ScatteringPower::mColourName [protected]
 

Colour for this ScatteringPower (from POVRay).

float ObjCryst::ScatteringPower::mColourRGB[3] [protected]
 

Colour for this ScatteringPower using RGB.

long ObjCryst::ScatteringPower::mDynPopCorrIndex [protected]
 

number identifying this kind of scatterer, for the dynamical occupancy correction.

Right now it is the atomic number.

REAL ObjCryst::ScatteringPower::mFormalCharge [protected]
 

Formal Charge.

This can be used for bond valence analysis, or energy calculations.

Default value is 0.

bool ObjCryst::ScatteringPower::mIsIsotropic [protected]
 

Is the scattering isotropic ?

REAL ObjCryst::ScatteringPower::mMaximumLikelihoodNbGhost [protected]
 

Number of ghost atoms in the asymmetric unit.

These contribute to the variance of the structure factor, but not to the structure factor as the uncertainty on their position is infinite.

RefinableObjClock ObjCryst::ScatteringPower::mMaximumLikelihoodParClock [protected]
 

REAL ObjCryst::ScatteringPower::mMaximumLikelihoodPositionError [protected]
 

estimated error (sigma) on the positions for this type of element.


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