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;
133 const int spgSymPosIndex=-1)
const=0;
151 const int spgSymPosIndex=-1)
const=0;
168 const int spgSymPosIndex=-1)
const=0;
185 const int spgSymPosIndex=-1)
const=0;
207 virtual void SetBiso(
const REAL newB);
212 REAL
GetBij(
const size_t &i,
const size_t &j)
const;
224 REAL
GetBij(
const size_t &idx)
const;
229 virtual void SetBij(
const size_t &i,
const size_t &j,
const REAL newB);
241 virtual void SetBij(
const size_t &idx,
const REAL newB);
261 void SetColour(
const float r,
const float g,
const float b);
266 CrystVector_uint & groupIndex,
267 unsigned int &firstGroup)
const;
281 virtual REAL GetFormalCharge()
const;
282 virtual void SetFormalCharge(
const REAL charge);
284 virtual void InitRefParList()=0;
356 void Init(
const string &name,
const string &symbol,
const REAL bIso=1.0);
358 const int spgSymPosIndex=0)
const;
361 const int spgSymPosIndex=0)
const;
363 const int spgSymPosIndex=0)
const;
365 const int spgSymPosIndex=0)
const;
384 virtual void Print()
const;
385 virtual void XMLOutput(ostream &os,
int indent=0)
const;
398 virtual void InitRefParList();
464 REAL
mX,mY,mZ,mOccupancy;
527 #include "ObjCryst/ObjCryst/ScatteringData.h"
529 #endif //_OBJCRYST_SCATTPOWER_H_
string mColourName
Colour for this ScatteringPower (from POVRay)
virtual REAL GetForwardScatteringFactor(const RadiationType) const
Get the scattering factor at (0,0,0).
virtual CrystMatrix_REAL GetResonantScattFactImag(const ScatteringData &data, const int spgSymPosIndex=0) const
Get the imaginary part of the resonant scattering factor.
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 GetMaximumLikelihoodNbGhostAtom() const
Maximum Likelihood: get the number of ghost elements per asymmetric unit.
const string & GetColourName() const
Get the (POV-Ray) name associated to the color (if any)
virtual bool IsTemperatureFactorAnisotropic() const
Is the thermic factor anisotropic ?
void SetColour(const string &colorName)
Set the colour from the associated POV-Ray name.
const RefinableObjClock & GetMaximumLikelihoodParClock() const
Get the clock value for the last change on the maximum likelihood parameters (positionnal error...
virtual bool IsScatteringFactorAnisotropic() const
Is the scattering factor anisotropic ?
virtual CrystMatrix_REAL GetResonantScattFactReal(const ScatteringData &data, const int spgSymPosIndex=-1) const =0
Get the real part of the resonant scattering factor.
long GetDynPopCorrIndex() const
Get the number identifying this kind of scatterer, used to decide whether two scatterers are equivale...
REAL mNeutronScattLengthReal
Neutron Bond Coherent Scattering lengths.
A scattering position in a crystal, associated with the corresponding occupancy and a pointer to the ...
long GetNbComponent() const
Number of components.
We need to record exactly when refinable objects have been modified for the last time (to avoid re-co...
void InitAtScattCoeffsWK95()
virtual bool IsResonantScatteringAnisotropic() const
Are the resonant scattering terms anisotropic ?
bool operator==(const ScatteringComponentList &rhs) const
Compare two lists.
REAL mCovalentRadius
Covalent Radius for this atom, in Angstroems (from cctbx)
REAL GetMaximumLikelihoodPositionError() const
Maximum Likelihood: get the estimated error (sigma) on the positions for this kind of element...
virtual const string & GetClassName() const
Name for this class ("RefinableObj", "Crystal",...).
unsigned int GetMaxCovBonds() const
Maximum number of covalent bonds (from openbabel element.txt)
void Print() const
Print the list of Scattering components. For debugging.
const ScatteringComponent & operator()(const long i) const
Access to a component.
virtual REAL GetRadius() const =0
Return the physical radius of this type of scatterer (for 3D display purposes).
Class to compute structure factors for a set of reflections and a Crystal.
bool mIsIsotropic
Is the scattering isotropic ?
Generic Refinable Object.
REAL mDynPopCorr
Dynamical Population Correction.
REAL GetBij(const size_t &i, const size_t &j) const
Returns the anisotropic temperature B factor for (i, j) pair.
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.
void operator++()
Add component (the whole list should be updated after that)
void Reset()
Reset the list.
REAL mBiso
Temperature isotropic B factor.
Abstract base class for all objects in wxCryst.
long GetNbScatteringPower() const
Total number of ScatteringPower object.
virtual void SetBij(const size_t &i, const size_t &j, const REAL newB)
Sets the anisotropic temperature B factor for (i, j) pair.
const RefinableObjClock & GetLastChangeClock() const
ObjCrystClock time when the last modification was made to the object.
REAL mX
Coordinates of scattering positions i the crystal with the corresponding occupancy.
virtual void Init()
Initialization of the object, used by all constructors, and operator=.
cctbx::eltbx::xray_scattering::gaussian * mpGaussian
Pointer to cctbx's gaussian describing the thomson x-ray scattering factor.
bool IsIsotropic() const
Returns true if the scattering power is isotropic, else false.
CrystVector_REAL mB
Anisotropic B(ij)
const ScatteringPower * mpScattPow
The ScatteringPower associated with this position.
virtual void XMLInput(istream &is, const XMLCrystTag &tag)
Input From stream.
virtual const string & GetSymbol() const
Returns the symbol ('Ta', 'O2-',...) of the atom.
void operator+=(const ScatteringComponentList &rhs)
Add another list of components.
void SetSymbol(const string &symbol)
Set the symbol for this atom.
vector< ScatteringComponent > mvScattComp
The vector of components.
virtual CrystMatrix_REAL GetResonantScattFactImag(const ScatteringData &data, const int spgSymPosIndex=-1) const =0
Get the imaginary part of the resonant scattering factor.
REAL GetRadius() const
Atomic radius for this atom or ion, in Angstroems (ICSD table from cctbx)
virtual CrystMatrix_REAL GetResonantScattFactReal(const ScatteringData &data, const int spgSymPosIndex=0) const
Get the real part of the resonant scattering factor.
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 void GetGeneGroup(const RefinableObj &obj, CrystVector_uint &groupIndex, unsigned int &firstGroup) const
Get the gene group assigned to each parameter.
REAL mMaximumLikelihoodNbGhost
Number of ghost atoms in the asymmetric unit.
virtual void SetBiso(const REAL newB)
Sets the isotropic temperature B factor.
void operator=(const ScatteringComponentList &rhs)
Assignement operator.
ObjRegistry< ScatteringPowerAtom > gScatteringPowerAtomRegistry("Global ScatteringPowerAtom Registry")
Global registry for all ScatteringPowerAtom objects.
string mSymbol
Symbol of this atom.
void Print() const
Print one line oabout this component.
void Init()
Initialization of the object, used by all constructors, and operator=.
virtual const string & GetClassName() const
Name for this class ("RefinableObj", "Crystal",...).
REAL mNeutronAbsCrossSection
Neutron Absorption cross section (barn)
float mColourRGB[3]
Colour for this ScatteringPower using RGB.
ObjRegistry< ScatteringPower > gScatteringPowerRegistry("Global ScatteringPower Registry")
Global registry for all ScatteringPower objects.
RefinableObjClock mClock
Clock.
int GetAtomicNumber() const
Atomic number for this atom.
virtual REAL GetForwardScatteringFactor(const RadiationType) const =0
Get the scattering factor at (0,0,0).
wxCryst class for ScatteringPowerAtom
The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++.
The Scattering Power for an Atom.
REAL mFormalCharge
Formal Charge.
REAL mMaximumLikelihoodPositionError
estimated error (sigma) on the positions for this type of element.
void SetMaximumLikelihoodPositionError(const REAL mle)
Maximum Likelihood: set the estimated error (sigma) on the positions for this kind of element...
void InitAtNeutronScattCoeffs()
int mAtomicNumber
atomic number (Z) for the atom
RadiationType
Type of radiation used.
virtual void XMLOutput(ostream &os, int indent=0) const
Output to stream in well-formed XML.
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.
long mDynPopCorrIndex
number identifying this kind of scatterer, for the dynamical occupancy correction.
REAL GetBiso() const
Returns the isotropic temperature B factor.
class to input or output a well-formatted xml beginning or ending tag.
class of refinable parameter types.
list of scattering positions in a crystal, associated with the corresponding occupancy and a pointer ...
REAL mRadius
Radius of the atom or ion, in Angstroems (ICSD table from cctbx)
virtual const string & GetSymbol() const
Symbol for this Scattering power (the atom name for atoms)
string GetElementName() const
Returns the standard name of the element (ie "hydrogen", "tantalum",..).
const RefParType * gpRefParTypeObjCryst
Top RefParType for the ObjCryst++ library.
void SetMaximumLikelihoodNbGhostAtom(const REAL nb)
Maximum Likelihood: set the number of ghost elements per asymmetric unit.
REAL GetCovalentRadius() const
Covalent Radius for this atom, in Angstroems (from cctbx)
void operator--()
Remove component (the whole list should be updated after that)
virtual void InitRGBColour()
Get RGB Colour coordinates from Colour Name.
const float * GetColourRGB() const
Get the float[3] array of RGB components defining the colour of this scattering power.
CrystVector_REAL mBeta
Anisotropic Beta(ij)
Abstract Base Class to describe the scattering power of any Scatterer component in a crystal...
unsigned int mMaxCovBonds
Maximum number of covalent bonds.