27 #include "cctbx/eltbx/xray_scattering.h"
28 #include "cctbx/eltbx/tiny_pse.h"
29 #include "cctbx/eltbx/icsd_radii.h"
30 #include "cctbx/eltbx/covalent_radii.h"
31 #include "cctbx/eltbx/henke.h"
32 #include "cctbx/eltbx/neutron.h"
34 #include "ObjCryst/ObjCryst/ScatteringPower.h"
35 #include "ObjCryst/Quirks/VFNStreamFormat.h"
36 #include "ObjCryst/Quirks/VFNDebug.h"
37 #include "ObjCryst/ObjCryst/Colours.h"
40 #include "ObjCryst/wxCryst/wxScatteringPower.h"
46 const RefParType *gpRefParTypeScattPow=0;
47 const RefParType *gpRefParTypeScattPowResonant=0;
48 const RefParType *gpRefParTypeScattPowTemperature=0;
49 const RefParType *gpRefParTypeScattPowTemperatureIso=0;
50 const RefParType *gpRefParTypeScattPowTemperatureAniso=0;
51 long NiftyStaticGlobalObjectsInitializer_ScatteringPower::mCount=0;
57 CrystMatrix_REAL Bij2Betaij(
const CrystVector_REAL &Bij,
const UnitCell &cell)
61 const REAL B11=Bij(0);
62 const REAL B22=Bij(1);
63 const REAL B33=Bij(2);
64 const REAL B12=Bij(3);
65 const REAL B13=Bij(4);
66 const REAL B23=Bij(5);
67 CrystMatrix_REAL B(3,3);
77 CrystMatrix_REAL b(3,3);
78 b=cell.GetBMatrix().transpose().Mult(B.Mult(cell.GetBMatrix()));
90 ScatteringPower::ScatteringPower():mDynPopCorrIndex(0),mBiso(1.0),mIsIsotropic(true),
91 mMaximumLikelihoodNbGhost(0),mFormalCharge(0.0)
93 VFN_DEBUG_MESSAGE(
"ScatteringPower::ScatteringPower():"<<mName,5)
98 gScatteringPowerRegistry.Register(*this);
100 mClockMaster.AddChild(mClock);
101 mClockMaster.AddChild(mMaximumLikelihoodParClock);
103 ScatteringPower::ScatteringPower(const ScatteringPower& old):
104 mDynPopCorrIndex(old.mDynPopCorrIndex),mBiso(old.mBiso),mIsIsotropic(old.mIsIsotropic),
105 mBeta(old.mBeta),mB(old.mB),
106 mFormalCharge(old.mFormalCharge)
108 VFN_DEBUG_MESSAGE(
"ScatteringPower::ScatteringPower(&old):"<<mName,5)
109 gScatteringPowerRegistry.Register(*this);
111 mMaximumLikelihoodPositionError=old.mMaximumLikelihoodPositionError;
112 mMaximumLikelihoodNbGhost=old.mMaximumLikelihoodNbGhost;
113 mClockMaster.AddChild(mClock);
114 mClockMaster.AddChild(mMaximumLikelihoodParClock);
116 ScatteringPower::~ScatteringPower()
118 VFN_DEBUG_MESSAGE(
"ScatteringPower::~ScatteringPower():"<<mName,5)
119 gScatteringPowerRegistry.DeRegister(*this);
124 const static string className=
"ScatteringPower";
130 VFN_DEBUG_MESSAGE(
"ScatteringPower::operator=():"<<mName,2)
131 mDynPopCorrIndex=rhs.mDynPopCorrIndex;
133 mIsIsotropic=rhs.mIsIsotropic;
140 if(mBiso!=rhs.GetBiso())
return false;
141 for(
unsigned int i=0;i<6;i++)
142 if(this->GetBij(i) != rhs.GetBij(i))
return false;
143 if(this->GetClassName() != rhs.GetClassName())
return false;
144 if(this->GetSymbol() != rhs.GetSymbol())
return false;
150 return !(*
this == rhs);
153 bool ScatteringPower::IsScatteringFactorAnisotropic()
const{
return false;}
154 bool ScatteringPower::IsTemperatureFactorAnisotropic()
const{
return false;}
155 bool ScatteringPower::IsResonantScatteringAnisotropic()
const{
return false;}
157 const string& ScatteringPower::GetSymbol()
const {
return this->GetName();}
158 REAL ScatteringPower::GetBiso()
const {
return mBiso;}
159 REAL& ScatteringPower::GetBiso() {mClock.Click();
return mBiso;}
160 void ScatteringPower::SetBiso(
const REAL newB) { mClock.Click();mBiso=newB;mIsIsotropic=
true;}
161 REAL ScatteringPower::GetBij(
const size_t &i,
const size_t &j)
const
172 return this->GetBij(idx);
174 REAL ScatteringPower::GetBij(
const size_t &idx)
const
178 void ScatteringPower::SetBij(
const size_t &i,
const size_t &j,
const REAL newB)
189 this->SetBij(idx, newB);
191 void ScatteringPower::SetBij(
const size_t &idx,
const REAL newB)
197 bool ScatteringPower::IsIsotropic()
const {
return mIsIsotropic;}
198 long ScatteringPower::GetDynPopCorrIndex()
const {
return mDynPopCorrIndex;}
202 const string& ScatteringPower::GetColourName()
const{
return mColourName;}
203 const float* ScatteringPower::GetColourRGB()
const{
return mColourRGB;}
204 void ScatteringPower::SetColour(
const string& colourName)
206 mColourName=colourName;
207 this->InitRGBColour();
209 void ScatteringPower::SetColour(
const float r,
const float g,
const float b)
216 CrystVector_uint & groupIndex,
217 unsigned int &first)
const
220 unsigned int index=0;
221 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetGeneGroup()",4)
223 for(
long j=0;j<this->GetNbPar();j++)
224 if(&(obj.
GetPar(i)) == &(this->GetPar(j)))
226 if(index==0) index=first++;
231 REAL ScatteringPower::GetMaximumLikelihoodPositionError()
const
232 {
return mMaximumLikelihoodPositionError;}
235 {
return mMaximumLikelihoodParClock;}
237 void ScatteringPower::SetMaximumLikelihoodPositionError(
const REAL mle)
239 if(mle!=mMaximumLikelihoodPositionError)
241 mMaximumLikelihoodPositionError=mle;
242 mMaximumLikelihoodParClock.
Click();
246 REAL ScatteringPower::GetMaximumLikelihoodNbGhostAtom()
const
247 {
return mMaximumLikelihoodNbGhost;}
249 void ScatteringPower::SetMaximumLikelihoodNbGhostAtom(
const REAL nb)
251 if(nb!=mMaximumLikelihoodNbGhost)
253 mMaximumLikelihoodNbGhost=nb;
254 mMaximumLikelihoodParClock.Click();
258 REAL ScatteringPower::GetFormalCharge()
const{
return mFormalCharge;}
259 void ScatteringPower::SetFormalCharge(
const REAL charge)
260 {mFormalCharge=charge;}
262 void ScatteringPower::Init()
264 VFN_DEBUG_MESSAGE(
"ScatteringPower::Init():"<<mName,2)
266 mMaximumLikelihoodPositionError=0;
267 mMaximumLikelihoodNbGhost=0;
268 VFN_DEBUG_MESSAGE(
"ScatteringPower::Init():End",2)
270 void ScatteringPower::InitRGBColour()
272 VFN_DEBUG_MESSAGE(
"ScatteringPower::InitRGBColour()",2)
275 if(gPOVRayColours[i].mName==mColourName)
277 mColourRGB[0]=gPOVRayColours[i].mRGB[0];
278 mColourRGB[1]=gPOVRayColours[i].mRGB[1];
279 mColourRGB[2]=gPOVRayColours[i].mRGB[2];
283 if(strncmp(gPOVRayColours[i].mName,
"",3)==0)
285 cout <<
"Could not find colour:"<<mColourName<<
" for ScatteringPower "<<mName<<endl;
292 VFN_DEBUG_MESSAGE(
"->RGBColour:"<<mColourName<<mColourRGB[0]<<
" "<<mColourRGB[1]<<
" "<<mColourRGB[2],2)
303 ScatteringPowerAtom::ScatteringPowerAtom():
306 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::ScatteringPowerAtom():"<<
mName,5)
308 this->InitRefParList();
312 const
string &symbol,
316 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::ScatteringPowerAtom(n,s,B):"<<name,5)
318 this->InitRefParList();
319 this->
Init(name,symbol,bIso);
325 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::ScatteringPowerAtom(&old):"<<old.
mName,5)
333 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::~ScatteringPowerAtom():"<<
mName,5)
340 const static string className=
"ScatteringPowerAtom";
353 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::Init(n,s,b)"<<
mName,4)
362 cctbx::eltbx::xray_scattering::wk1995 wk95t(
mSymbol);
363 mpGaussian=
new cctbx::eltbx::xray_scattering::gaussian(wk95t.fetch());
367 cctbx::eltbx::tiny_pse::table tpse(
mSymbol);
371 cctbx::eltbx::icsd_radii::table ticsd(
mSymbol);
373 cctbx::eltbx::covalent_radii::table tcov(
mSymbol);
376 catch(exception &err)
378 cout <<
"WARNING: could not interpret Symbol name !"<<
mSymbol<<endl
379 <<
" Reverting to H !"<<endl;
380 (*fpObjCrystInformUser)(
"Symbol not understood:"+
mSymbol);
381 this->
Init(name,
"H",bIso);
385 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::Init():/Name="<<this->
GetName() \
386 <<
" /Symbol="<<mSymbol<<
" /Atomic Number=" <<
mAtomicNumber,4)
391 cctbx::eltbx::tiny_pse::table tpse(
mSymbol);
488 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::Init(n,s,b):End",3)
492 const int spgSymPosIndex)
const
494 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetScatteringFactor(&data):"<<
mName,3)
500 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetScatteringFactor():NEUTRON:"<<
mName,3)
506 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetScatteringFactor():XRAY:"<<
mName,3)
511 for(
long i=0;i<nb;i++)
519 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetScatteringFactor():ELECTRON:"<<
mName,3)
525 for(
long i=0;i<nb;i++)
527 sf(i)=(z-
mpGaussian->at_stol(*pstol))/(*pstol * *pstol);
535 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetScatteringFactor(&data):End",3)
559 sf=(z-
mpGaussian->at_stol(0.0001))/(.0001 * .0001);
562 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetScatteringFactor(&data):End",3)
566 static bool warnADP=
true;
568 const int spgSymPosIndex)
const
570 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetTemperatureFactor(&data):"<<
mName,3)
574 cout<<
"========================== WARNING ========================="<<endl
575 <<
" In ScatteringPowerAtom::GetTemperatureFactor():"<<endl
576 <<
" Anisotropic Displacement Parameters are not currently properly handled"<<endl
577 <<
" for Debye-Waller calculations (no symmetry handling for ADPs)."<<endl
578 <<
" =>The Debye-Waller calculations will instead use only isotropic DPs"<<endl<<endl;
584 CrystVector_REAL stolsq(data.
GetNbRefl());
589 #ifdef __VFN_VECTOR_USE_BLITZ__
591 #define STOLSQ stolsq
594 #define STOLSQ (*sstolsq)
597 const REAL *sstolsq=stolsq.data();
599 for(
long ii=0;ii<sf.numElements();ii++)
603 SF=exp(-
mBiso*STOLSQ);
605 #ifdef __VFN_VECTOR_USE_BLITZ__
618 const REAL b11=
mBeta(0);
619 const REAL b22=
mBeta(1);
620 const REAL b33=
mBeta(2);
621 const REAL b12=
mBeta(3);
622 const REAL b13=
mBeta(4);
623 const REAL b23=
mBeta(5);
624 #ifdef __VFN_VECTOR_USE_BLITZ__
635 const REAL *hh=(data.
GetH()).data();
636 const REAL *kk=(data.
GetK()).data();
637 const REAL *ll=(data.
GetL()).data();
640 for(
long ii=0;ii<sf.numElements();ii++)
644 SF= exp( -b11*pow(HH,2)
651 #ifdef __VFN_VECTOR_USE_BLITZ__
671 const int spgSymPosIndex)
const
673 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetResonantScattFactReal(&data):"<<
mName,3)
674 CrystMatrix_REAL fprime(1,1);
675 CrystMatrix_REAL fsecond(1,1);
681 fsecond=mNeutronScattLengthImag;
688 cctbx::eltbx::henke::table thenke(
mSymbol);
689 cctbx::eltbx::fp_fdp f=thenke.at_angstrom(data.
GetWavelength()(0));
691 if(f.is_valid_fp()) fprime(0)=f.fp();
693 if(f.is_valid_fdp()) fsecond(0)=f.fdp();
715 const int spgSymPosIndex)
const
717 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetResonantScattFactImag():"<<
mName,3)
718 CrystMatrix_REAL fprime(1,1);
719 CrystMatrix_REAL fsecond(1,1);
725 fsecond=mNeutronScattLengthImag;
732 cctbx::eltbx::henke::table thenke(
mSymbol);
733 cctbx::eltbx::fp_fdp f=thenke.at_angstrom(data.
GetWavelength()(0));
735 if(f.is_valid_fp()) fprime(0)=f.fp();
737 if(f.is_valid_fdp()) fsecond(0)=f.fdp();
760 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::SetSymbol():"<<
mName,5)
765 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::GetSymbol():"<<
mName,5)
771 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::GetElementName():"<<
mName,2)
774 cctbx::eltbx::tiny_pse::table tpse(
mSymbol);
779 cout <<
"WARNING: could not interpret Symbol:"<<
mSymbol<<endl;
790 void ScatteringPowerAtom::Print()
const
792 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::Print()",1)
796 VFN_DEBUG_MESSAGE_SHORT("at "<<this,10)
802 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::InitAtNeutronScattCoeffs():"<<
mName,3)
806 cctbx::eltbx::neutron::neutron_news_1992_table nn92t(
mSymbol);
808 mNeutronScattLengthImag=nn92t.bound_coh_scatt_length_imag();
812 cout <<
"WARNING: could not interpret symbol for neutron coeefs:"<<
mSymbol<<endl;
815 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::InitAtNeutronScattCoeffs():End",3)
818 void ScatteringPowerAtom::InitRefParList()
820 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::InitRefParList():"<<
mName,5)
823 gpRefParTypeScattPowTemperatureIso,REFPAR_DERIV_STEP_ABSOLUTE,
824 true,
true,
true,
false);
825 tmp.SetDerivStep(1e-3);
826 tmp.SetGlobalOptimStep(.5);
831 REAL* bdata = (REAL*)
mB.data();
833 RefinablePar B11(
"B11",&bdata[0],0.1,5.,
834 gpRefParTypeScattPowTemperatureAniso,REFPAR_DERIV_STEP_ABSOLUTE,
835 true,
true,
false,
false);
836 B11.SetDerivStep(1e-3);
837 B11.SetGlobalOptimStep(.5);
841 RefinablePar B22(
"B22",&bdata[1],0.1,5.,
842 gpRefParTypeScattPowTemperatureAniso,REFPAR_DERIV_STEP_ABSOLUTE,
843 true,
true,
false,
false);
844 B22.SetDerivStep(1e-3);
845 B22.SetGlobalOptimStep(.5);
849 RefinablePar B33(
"B33",&bdata[2],0.1,5.,
850 gpRefParTypeScattPowTemperatureAniso,REFPAR_DERIV_STEP_ABSOLUTE,
851 true,
true,
false,
false);
852 B33.SetDerivStep(1e-3);
853 B33.SetGlobalOptimStep(.5);
857 RefinablePar B12(
"B12",&bdata[3],-5,5.,
858 gpRefParTypeScattPowTemperatureAniso,REFPAR_DERIV_STEP_ABSOLUTE,
859 true,
true,
false,
false);
860 B12.SetDerivStep(1e-3);
861 B12.SetGlobalOptimStep(.5);
865 RefinablePar B13(
"B13",&bdata[4],-5,5.,
866 gpRefParTypeScattPowTemperatureAniso,REFPAR_DERIV_STEP_ABSOLUTE,
867 true,
true,
false,
false);
868 B13.SetDerivStep(1e-3);
869 B13.SetGlobalOptimStep(.5);
873 RefinablePar B23(
"B23",&bdata[5],-5,5.,
874 gpRefParTypeScattPowTemperatureAniso,REFPAR_DERIV_STEP_ABSOLUTE,
875 true,
true,
false,
false);
876 B23.SetDerivStep(1e-3);
877 B23.SetGlobalOptimStep(.5);
883 gpRefParTypeScattPow,REFPAR_DERIV_STEP_ABSOLUTE,
884 false,
true,
true,
false);
885 tmp.SetDerivStep(1e-4);
886 tmp.SetGlobalOptimStep(.001);
887 tmp.AssignClock(mMaximumLikelihoodParClock);
892 gpRefParTypeScattPow,REFPAR_DERIV_STEP_ABSOLUTE,
893 true,
true,
true,
false);
894 tmp.SetDerivStep(1e-3);
895 tmp.SetGlobalOptimStep(.05);
896 tmp.AssignClock(mMaximumLikelihoodParClock);
901 gpRefParTypeScattPow,REFPAR_DERIV_STEP_ABSOLUTE,
902 true,
true,
true,
false);
903 tmp.SetDerivStep(1e-3);
904 tmp.SetGlobalOptimStep(.05);
910 WXCrystObjBasic* ScatteringPowerAtom::WXCreate(wxWindow* parent)
913 mpWXCrystObj=
new WXScatteringPowerAtom(parent,
this);
923 ScatteringComponent::ScatteringComponent():
924 mX(0),mY(0),mZ(0),mOccupancy(0),mpScattPow(0),mDynPopCorr(0)
926 bool ScatteringComponent::operator==(
const ScatteringComponent& rhs)
const
928 return ((
mX==rhs.mX) && (mY==rhs.mY) && (mZ==rhs.mZ) &&
929 (mOccupancy==rhs.mOccupancy) && (
mpScattPow==rhs.mpScattPow));
931 bool ScatteringComponent::operator!=(
const ScatteringComponent& rhs)
const
933 return ((
mX!=rhs.mX) || (mY!=rhs.mY) || (mZ!=rhs.mZ) ||
934 (mOccupancy!=rhs.mOccupancy) || (
mpScattPow!=rhs.mpScattPow));
949 ScatteringComponentList::ScatteringComponentList()
953 ScatteringComponentList::ScatteringComponentList(
const long nbComponent)
958 ScatteringComponentList::ScatteringComponentList(
const ScatteringComponentList &old):
959 mvScattComp(old.mvScattComp)
963 ScatteringComponentList::~ScatteringComponentList()
973 VFN_DEBUG_MESSAGE(
"ScatteringComponentList::operator()("<<i<<
")",1)
977 throw ObjCrystException(
"ScatteringComponentList::operator()(i)::i>mNbComponent!!");
979 if(i<0)
throw ObjCrystException(
"ScatteringComponentList::operator()&(i)::i<0!!");
985 VFN_DEBUG_MESSAGE(
"ScatteringComponentList::operator()&("<<i<<
")",1)
989 throw ObjCrystException(
"ScatteringComponentList::operator()&(i)::i>mNbComponent!!");
991 if(i<0)
throw ObjCrystException(
"ScatteringComponentList::operator()&(i):: i<0!!");
999 VFN_DEBUG_MESSAGE(
"ScatteringComponentList::operator=()",1)
1001 VFN_DEBUG_MESSAGE(
"ScatteringComponentList::operator=():End",0)
1007 if( (*
this)(i) != rhs(i) )
return false;
1018 VFN_DEBUG_MESSAGE(
"ScatteringComponentList::operator+=()",1)
1024 VFN_DEBUG_MESSAGE(
"ScatteringComponentList::operator++()",1)
1030 VFN_DEBUG_MESSAGE(
"ScatteringComponentList::operator--()",1)
1037 VFN_DEBUG_ENTRY(
"ScatteringComponentList::Print()",5)
1038 cout<<
"Number of Scattering components:"<<this->
GetNbComponent()<<endl;
1044 VFN_DEBUG_EXIT(
"ScatteringComponentList::Print()",5)
The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++.
RadiationType
Type of radiation used.
ObjRegistry< ScatteringPower > gScatteringPowerRegistry("Global ScatteringPower Registry")
Global registry for all ScatteringPower objects.
ObjRegistry< ScatteringPowerAtom > gScatteringPowerAtomRegistry("Global ScatteringPowerAtom Registry")
Global registry for all ScatteringPowerAtom objects.
Exception class for ObjCryst++ library.
Class to compute structure factors for a set of reflections and a Crystal.
const CrystVector_REAL & GetSinThetaOverLambda() const
Return an array with for all reflections.
const CrystVector_REAL & GetK() const
Return the 1D array of K coordinates for all reflections.
CrystVector_REAL GetWavelength() const
wavelength of the experiment (in Angstroems)
const CrystVector_REAL & GetH() const
Return the 1D array of H coordinates for all reflections.
RadiationType GetRadiationType() const
Neutron or x-ray experiment ? Wavelength ?
const CrystVector_REAL & GetL() const
Return the 1D array of L coordinates for all reflections.
long GetNbRefl() const
Return the number of reflections in this experiment.
Abstract Base Class to describe the scattering power of any Scatterer component in a crystal.
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 ?
REAL GetBiso() const
Returns the isotropic temperature B factor.
REAL mMaximumLikelihoodNbGhost
Number of ghost atoms in the asymmetric unit.
CrystVector_REAL mB
Anisotropic B(ij)
RefinableObjClock mClock
Clock.
REAL mBiso
Temperature isotropic B factor.
virtual void InitRGBColour()
Get RGB Colour coordinates from Colour Name.
The Scattering Power for an Atom.
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.
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
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
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)
We need to record exactly when refinable objects have been modified for the last time (to avoid re-co...
void Click()
Record an event for this clock (generally, the 'time' an object has been modified,...
Generic class for parameters of refinable objects.
Generic Refinable Object.
void AddPar(const RefinablePar &newRefPar)
Add a refinable parameter.
virtual void SetName(const string &name)
Name of the object.
RefinablePar & GetPar(const long i)
Access all parameters in the order they were inputted.
virtual const string & GetName() const
Name of the object.
long GetNbPar() const
Total number of refinable parameter in the object.
string mName
Name for this RefinableObject. Should be unique, at least in the same scope.+.
output a number as a formatted float:
output a string with a fixed length (adding necessary space or removing excess characters) :