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

ObjCryst::ScatteringPower Class Reference

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

#include <ScatteringPower.h>

Inheritance diagram for ObjCryst::ScatteringPower::

ObjCryst::RefinableObj ObjCryst::GlobalScatteringPower ObjCryst::ScatteringPowerAtom List of all members.

Public Methods

 ScatteringPower ()
 ScatteringPower (const ScatteringPower &old)
virtual ~ScatteringPower ()
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.

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

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

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

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

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

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

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

virtual void SetBiso (const double 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 GetScatteringPowerId () const
 Unique number identifying this ScatteringPower object.

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 double GetRadius () const=0
 Return the physical radius of this type of scatterer (for 3D display purposes).
Warning:
this may be removed later.



Protected Methods

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. Right now it is the atomic number.

double mBiso
 Temperature isotropic B factor.

bool mIsIsotropic
 Is the scattering isotropic ?

CrystVector_double mBeta
 Anisotropic Beta(ij).

const long mScatteringPowerId
 Unique number identifying this ScatteringPower. Needed for avoiding re-calculations in ScatteringData.

RefinableObjClock mClock
 Clock.

string mColourName
 Colour for this ScatteringPower (from POVRay).

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


Static Protected Attributes

long mNbScatteringPower
 Current unique number to use for a new ScatteringPower object= total number of objects that have been allocated.

ScatteringPower * mspScatteringPowerGlobalList [1000]
 Keep a list of all objects.

CrystVector_bool mspScatteringPowerGlobalListIsUsed
 To know which objects are available in the list.


Friends

const ScatteringPower & GetScatteringPower (const long i)

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.


Member Function Documentation

virtual CrystMatrix_double 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.

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

virtual CrystMatrix_double 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.

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

virtual CrystVector_double 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.

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

virtual CrystVector_double 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.

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


The documentation for this class was generated from the following file:
Generated on Wed Nov 14 19:48:38 2001 for ObjCryst++ by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001