19 #ifndef _OBJCRYST_SCATTPOWER_H_
20 #define _OBJCRYST_SCATTPOWER_H_
22 #include "ObjCryst/CrystVector/CrystVector.h"
23 #include "ObjCryst/ObjCryst/General.h"
24 #include "ObjCryst/RefinableObj/RefinableObj.h"
36 namespace cctbx {
namespace eltbx {
namespace xray_scattering {
class gaussian;}}}
40 extern const RefParType *gpRefParTypeScattPow;
41 extern const RefParType *gpRefParTypeScattPowResonant;
42 extern const RefParType *gpRefParTypeScattPowTemperature;
43 extern const RefParType *gpRefParTypeScattPowTemperatureIso;
44 extern const RefParType *gpRefParTypeScattPowTemperatureAniso;
53 gpRefParTypeScattPowResonant=
new RefParType(gpRefParTypeScattPow,
"Resonant Scatt.");
54 gpRefParTypeScattPowTemperature=
new RefParType(gpRefParTypeScattPow,
"Temperature");
55 gpRefParTypeScattPowTemperatureIso=
new RefParType(gpRefParTypeScattPowTemperature,
"Isotropic");
56 gpRefParTypeScattPowTemperatureAniso=
new RefParType(gpRefParTypeScattPowTemperatureIso,
"Anisotropic");
63 delete gpRefParTypeScattPow;
64 delete gpRefParTypeScattPowResonant;
65 delete gpRefParTypeScattPowTemperature;
66 delete gpRefParTypeScattPowTemperatureIso;
67 delete gpRefParTypeScattPowTemperatureAniso;
68 gpRefParTypeScattPow=0;
69 gpRefParTypeScattPowResonant=0;
70 gpRefParTypeScattPowTemperature=0;
71 gpRefParTypeScattPowTemperatureIso=0;
72 gpRefParTypeScattPowTemperatureAniso=0;
141 const int spgSymPosIndex=-1)
const=0;
159 const int spgSymPosIndex=-1)
const=0;
176 const int spgSymPosIndex=-1)
const=0;
193 const int spgSymPosIndex=-1)
const=0;
215 virtual void SetBiso(
const REAL newB);
220 REAL
GetBij(
const size_t &i,
const size_t &j)
const;
232 REAL
GetBij(
const size_t &idx)
const;
237 virtual void SetBij(
const size_t &i,
const size_t &j,
const REAL newB);
249 virtual void SetBij(
const size_t &idx,
const REAL newB);
269 void SetColour(
const float r,
const float g,
const float b);
274 CrystVector_uint & groupIndex,
275 unsigned int &firstGroup)
const;
289 virtual REAL GetFormalCharge()
const;
290 virtual void SetFormalCharge(
const REAL charge);
292 virtual void InitRefParList()=0;
364 void Init(
const string &name,
const string &symbol,
const REAL bIso=1.0);
366 const int spgSymPosIndex=0)
const;
369 const int spgSymPosIndex=0)
const;
371 const int spgSymPosIndex=0)
const;
373 const int spgSymPosIndex=0)
const;
394 virtual void Print()
const;
395 virtual void XMLOutput(ostream &os,
int indent=0)
const;
408 virtual void InitRefParList();
476 REAL
mX,mY,mZ,mOccupancy;
540 #include "ObjCryst/ObjCryst/ScatteringData.h"
The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++.
RadiationType
Type of radiation used.
const RefParType * gpRefParTypeObjCryst
Top RefParType for the ObjCryst++ library.
ObjRegistry< ScatteringPower > gScatteringPowerRegistry("Global ScatteringPower Registry")
Global registry for all ScatteringPower objects.
ObjRegistry< ScatteringPowerAtom > gScatteringPowerAtomRegistry("Global ScatteringPowerAtom Registry")
Global registry for all ScatteringPowerAtom objects.
Class to compute structure factors for a set of reflections and a Crystal.
Abstract Base Class to describe the scattering power of any Scatterer component in a crystal.
float mColourRGB[3]
Colour for this ScatteringPower using RGB.
long mDynPopCorrIndex
number identifying this kind of scatterer, for the dynamical occupancy correction.
CrystVector_REAL mBeta
Anisotropic Beta(ij)
REAL mFormalCharge
Formal Charge.
string mColourName
Colour for this ScatteringPower (from POVRay)
REAL mMaximumLikelihoodPositionError
estimated error (sigma) on the positions for this type of element.
virtual void Init()
Initialization of the object, used by all constructors, and operator=.
bool mIsIsotropic
Is the scattering isotropic ?
bool IsIsotropic() const
Returns true if the scattering power is isotropic, else false.
const float * GetColourRGB() const
Get the float[3] array of RGB components defining the colour of this scattering power.
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.
REAL GetBiso() const
Returns the isotropic temperature B factor.
virtual CrystMatrix_REAL GetResonantScattFactReal(const ScatteringData &data, const int spgSymPosIndex=-1) const =0
Get the real part of the resonant scattering factor.
virtual void SetBiso(const REAL newB)
Sets the isotropic temperature B factor.
REAL mMaximumLikelihoodNbGhost
Number of ghost atoms in the asymmetric unit.
const RefinableObjClock & GetLastChangeClock() const
ObjCrystClock time when the last modification was made to the object.
virtual bool IsScatteringFactorAnisotropic() const
Is the scattering factor anisotropic ?
virtual bool operator==(const ScatteringPower &rhs) const
Comparison operator.
long GetNbScatteringPower() const
Total number of ScatteringPower object.
REAL GetBij(const size_t &i, const size_t &j) const
Returns the anisotropic temperature B factor for (i, j) pair.
const string & GetColourName() const
Get the (POV-Ray) name associated to the color (if any)
CrystVector_REAL mB
Anisotropic B(ij)
virtual const string & GetClassName() const
Name for this class ("RefinableObj", "Crystal",...).
REAL GetMaximumLikelihoodNbGhostAtom() const
Maximum Likelihood: get the number of ghost elements per asymmetric unit.
RefinableObjClock mClock
Clock.
long GetDynPopCorrIndex() const
Get the number identifying this kind of scatterer, used to decide whether two scatterers are equivale...
const RefinableObjClock & GetMaximumLikelihoodParClock() const
Get the clock value for the last change on the maximum likelihood parameters (positionnal error,...
virtual REAL GetForwardScatteringFactor(const RadiationType) const =0
Get the scattering factor at (0,0,0).
virtual CrystMatrix_REAL GetResonantScattFactImag(const ScatteringData &data, const int spgSymPosIndex=-1) const =0
Get the imaginary part of the resonant scattering factor.
void SetMaximumLikelihoodNbGhostAtom(const REAL nb)
Maximum Likelihood: set the number of ghost elements per asymmetric unit.
REAL mBiso
Temperature isotropic B factor.
virtual void GetGeneGroup(const RefinableObj &obj, CrystVector_uint &groupIndex, unsigned int &firstGroup) const
Get the gene group assigned to each parameter.
virtual REAL GetRadius() const =0
Return the physical radius of this type of scatterer (for 3D display purposes).
void SetColour(const string &colorName)
Set the colour from the associated POV-Ray name.
virtual bool IsResonantScatteringAnisotropic() const
Are the resonant scattering terms anisotropic ?
virtual void InitRGBColour()
Get RGB Colour coordinates from Colour Name.
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.
virtual bool IsTemperatureFactorAnisotropic() const
Is the thermic factor anisotropic ?
virtual void SetBij(const size_t &i, const size_t &j, const REAL newB)
Sets the anisotropic temperature B factor for (i, j) pair.
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 bool operator!=(const ScatteringPower &rhs) const
Comparison operator.
virtual const string & GetSymbol() const
Symbol for this Scattering power (the atom name for atoms)
The Scattering Power for an Atom.
REAL mNeutronAbsCrossSection
Neutron Absorption cross section (barn)
string GetElementName() const
Returns the standard name of the element (ie "hydrogen", "tantalum",..).
virtual const string & GetSymbol() const
Returns the symbol ('Ta', 'O2-',...) of the atom.
REAL mCovalentRadius
Covalent Radius for this atom, in Angstroems (from cctbx)
virtual CrystVector_REAL GetScatteringFactor(const ScatteringData &data, const int spgSymPosIndex=0) const
Get the Scattering factor for all reflections of a given ScatteringData object.
virtual CrystMatrix_REAL GetResonantScattFactReal(const ScatteringData &data, const int spgSymPosIndex=0) const
Get the real part of the resonant scattering factor.
REAL GetCovalentRadius() const
Covalent Radius for this atom, in Angstroems (from cctbx)
void InitAtNeutronScattCoeffs()
virtual CrystMatrix_REAL GetResonantScattFactImag(const ScatteringData &data, const int spgSymPosIndex=0) const
Get the imaginary part of the resonant scattering factor.
REAL mRadius
Radius of the atom or ion, in Angstroems (ICSD table from cctbx)
REAL GetAtomicWeight() const
Atomic weight (g/mol) for this atom.
void SetSymbol(const string &symbol)
Set the symbol for this atom.
virtual void XMLInput(istream &is, const XMLCrystTag &tag)
Input From stream.
REAL mNeutronScattLengthReal
Neutron Bond Coherent Scattering lengths.
string mSymbol
Symbol of this atom.
unsigned int GetMaxCovBonds() const
Maximum number of covalent bonds (from openbabel element.txt)
virtual const string & GetClassName() const
Name for this class ("RefinableObj", "Crystal",...).
REAL GetRadius() const
Atomic radius for this atom or ion, in Angstroems (ICSD table from cctbx)
void Init()
Initialization of the object, used by all constructors, and operator=.
virtual REAL GetForwardScatteringFactor(const RadiationType) const
Get the scattering factor at (0,0,0).
int mAtomicNumber
atomic number (Z) for the atom
virtual void XMLOutput(ostream &os, int indent=0) const
Output to stream in well-formed XML.
int GetAtomicNumber() const
Atomic number for this atom.
virtual CrystVector_REAL GetTemperatureFactor(const ScatteringData &data, const int spgSymPosIndex=0) const
Get the temperature factor for all reflections of a given ScatteringData object.
REAL mAtomicWeight
atomic weight (g/mol) for the atom
void InitAtScattCoeffsWK95()
unsigned int mMaxCovBonds
Maximum number of covalent bonds.
cctbx::eltbx::xray_scattering::gaussian * mpGaussian
Pointer to cctbx's gaussian describing the thomson x-ray scattering factor.
A scattering position in a crystal, associated with the corresponding occupancy and a pointer to the ...
const ScatteringPower * mpScattPow
The ScatteringPower associated with this position.
REAL mDynPopCorr
Dynamical Population Correction.
REAL mX
Coordinates of scattering positions i the crystal with the corresponding occupancy.
void Print() const
Print one line oabout this component.
list of scattering positions in a crystal, associated with the corresponding occupancy and a pointer ...
bool operator==(const ScatteringComponentList &rhs) const
Compare two lists.
vector< ScatteringComponent > mvScattComp
The vector of components.
const ScatteringComponent & operator()(const long i) const
Access to a component.
void operator+=(const ScatteringComponentList &rhs)
Add another list of components.
void Reset()
Reset the list.
void operator++()
Add component (the whole list should be updated after that)
void operator=(const ScatteringComponentList &rhs)
Assignement operator.
long GetNbComponent() const
Number of components.
void Print() const
Print the list of Scattering components. For debugging.
void operator--()
Remove component (the whole list should be updated after that)
class to input or output a well-formatted xml beginning or ending tag.
class of refinable parameter types.
We need to record exactly when refinable objects have been modified for the last time (to avoid re-co...
Generic Refinable Object.
Abstract base class for all objects in wxCryst.
wxCryst class for ScatteringPowerAtom