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)
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)
111 mMaximumLikelihoodPositionError=old.mMaximumLikelihoodPositionError;
112 mMaximumLikelihoodNbGhost=old.mMaximumLikelihoodNbGhost;
116 ScatteringPower::~ScatteringPower()
118 VFN_DEBUG_MESSAGE(
"ScatteringPower::~ScatteringPower():"<<
mName,5)
124 const static string className=
"ScatteringPower";
128 void ScatteringPower::operator=(
const ScatteringPower& rhs)
130 VFN_DEBUG_MESSAGE(
"ScatteringPower::operator=():"<<
mName,2)
131 mDynPopCorrIndex=rhs.mDynPopCorrIndex;
133 mIsIsotropic=rhs.mIsIsotropic;
138 bool ScatteringPower::IsScatteringFactorAnisotropic()
const{
return false;}
157 return this->GetBij(idx);
174 this->SetBij(idx, newB);
191 mColourName=colourName;
192 this->InitRGBColour();
201 CrystVector_uint & groupIndex,
202 unsigned int &first)
const
205 unsigned int index=0;
206 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetGeneGroup()",4)
208 for(
long j=0;j<this->
GetNbPar();j++)
211 if(index==0) index=first++;
217 {
return mMaximumLikelihoodPositionError;}
220 {
return mMaximumLikelihoodParClock;}
224 if(mle!=mMaximumLikelihoodPositionError)
226 mMaximumLikelihoodPositionError=mle;
227 mMaximumLikelihoodParClock.Click();
232 {
return mMaximumLikelihoodNbGhost;}
236 if(nb!=mMaximumLikelihoodNbGhost)
238 mMaximumLikelihoodNbGhost=nb;
239 mMaximumLikelihoodParClock.Click();
243 REAL ScatteringPower::GetFormalCharge()
const{
return mFormalCharge;}
244 void ScatteringPower::SetFormalCharge(
const REAL charge)
245 {mFormalCharge=charge;}
249 VFN_DEBUG_MESSAGE(
"ScatteringPower::Init():"<<
mName,2)
251 mMaximumLikelihoodPositionError=0;
252 mMaximumLikelihoodNbGhost=0;
253 VFN_DEBUG_MESSAGE(
"ScatteringPower::Init():End",2)
257 VFN_DEBUG_MESSAGE(
"ScatteringPower::InitRGBColour()",2)
260 if(gPOVRayColours[i].
mName==mColourName)
262 mColourRGB[0]=gPOVRayColours[i].mRGB[0];
263 mColourRGB[1]=gPOVRayColours[i].mRGB[1];
264 mColourRGB[2]=gPOVRayColours[i].mRGB[2];
268 if(strncmp(gPOVRayColours[i].
mName,
"",3)==0)
270 cout <<
"Could not find colour:"<<mColourName<<
" for ScatteringPower "<<mName<<endl;
277 VFN_DEBUG_MESSAGE(
"->RGBColour:"<<mColourName<<mColourRGB[0]<<
" "<<mColourRGB[1]<<
" "<<mColourRGB[2],2)
288 ScatteringPowerAtom::ScatteringPowerAtom():
289 ScatteringPower(),mSymbol(
""),mAtomicNumber(0),mpGaussian(0)
291 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::ScatteringPowerAtom():"<<
mName,5)
293 this->InitRefParList();
297 const
string &symbol,
301 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::ScatteringPowerAtom(n,s,B):"<<name,5)
303 this->InitRefParList();
304 this->
Init(name,symbol,bIso);
310 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::ScatteringPowerAtom(&old):"<<old.
mName,5)
318 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::~ScatteringPowerAtom():"<<
mName,5)
325 const static string className=
"ScatteringPowerAtom";
338 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::Init(n,s,b)"<<
mName,4)
347 cctbx::eltbx::xray_scattering::wk1995 wk95t(mSymbol);
348 mpGaussian=
new cctbx::eltbx::xray_scattering::gaussian(wk95t.fetch());
352 cctbx::eltbx::tiny_pse::table tpse(mSymbol);
355 cctbx::eltbx::icsd_radii::table ticsd(mSymbol);
357 cctbx::eltbx::covalent_radii::table tcov(mSymbol);
360 catch(exception &err)
362 cout <<
"WARNING: could not interpret Symbol name !"<<mSymbol<<endl
363 <<
" Reverting to H !"<<endl;
364 (*fpObjCrystInformUser)(
"Symbol not understood:"+
mSymbol);
365 this->
Init(name,
"H",bIso);
369 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::Init():/Name="<<this->
GetName() \
370 <<
" /Symbol="<<mSymbol<<
" /Atomic Number=" <<
mAtomicNumber,4)
375 cctbx::eltbx::tiny_pse::table tpse(mSymbol);
472 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::Init(n,s,b):End",3)
476 const int spgSymPosIndex)
const
478 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetScatteringFactor(&data):"<<
mName,3)
484 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetScatteringFactor():NEUTRON:"<<
mName,3)
490 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetScatteringFactor():XRAY:"<<
mName,3)
495 for(
long i=0;i<nb;i++)
503 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetScatteringFactor():ELECTRON:"<<
mName,3)
509 for(
long i=0;i<nb;i++)
510 sf(i)=(z-
mpGaussian->at_stol(*pstol))/(*pstol * *pstol);
517 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetScatteringFactor(&data):End",3)
541 sf=(z-
mpGaussian->at_stol(0.0001))/(.0001 * .0001);
544 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetScatteringFactor(&data):End",3)
548 static bool warnADP=
true;
550 const int spgSymPosIndex)
const
552 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetTemperatureFactor(&data):"<<
mName,3)
554 if((mIsIsotropic==
false) && warnADP)
556 cout<<
"========================== WARNING ========================="<<endl
557 <<
" In ScatteringPowerAtom::GetTemperatureFactor():"<<endl
558 <<
" Anisotropic Displacement Parameters are not currently properly handled"<<endl
559 <<
" for Debye-Waller calculations (no symmetry handling for ADPs)."<<endl
560 <<
" =>The Debye-Waller calculations will instead use only isotropic DPs"<<endl<<endl;
566 CrystVector_REAL stolsq(data.
GetNbRefl());
571 #ifdef __VFN_VECTOR_USE_BLITZ__
573 #define STOLSQ stolsq
576 #define STOLSQ (*sstolsq)
579 const REAL *sstolsq=stolsq.data();
581 for(
long ii=0;ii<sf.numElements();ii++)
585 SF=exp(-mBiso*STOLSQ);
587 #ifdef __VFN_VECTOR_USE_BLITZ__
600 const REAL b11=
mBeta(0);
601 const REAL b22=
mBeta(1);
602 const REAL b33=
mBeta(2);
603 const REAL b12=
mBeta(3);
604 const REAL b13=
mBeta(4);
605 const REAL b23=
mBeta(5);
606 #ifdef __VFN_VECTOR_USE_BLITZ__
617 const REAL *hh=(data.
GetH()).data();
618 const REAL *kk=(data.
GetK()).data();
619 const REAL *ll=(data.
GetL()).data();
622 for(
long ii=0;ii<sf.numElements();ii++)
626 SF= exp( -b11*pow(HH,2)
633 #ifdef __VFN_VECTOR_USE_BLITZ__
653 const int spgSymPosIndex)
const
655 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetResonantScattFactReal(&data):"<<
mName,3)
656 CrystMatrix_REAL fprime(1,1);
657 CrystMatrix_REAL fsecond(1,1);
663 fsecond=mNeutronScattLengthImag;
670 cctbx::eltbx::henke::table thenke(mSymbol);
671 cctbx::eltbx::fp_fdp f=thenke.at_angstrom(data.
GetWavelength()(0));
673 if(f.is_valid_fp()) fprime(0)=f.fp();
675 if(f.is_valid_fdp()) fsecond(0)=f.fdp();
697 const int spgSymPosIndex)
const
699 VFN_DEBUG_MESSAGE(
"ScatteringPower::GetResonantScattFactImag():"<<
mName,3)
700 CrystMatrix_REAL fprime(1,1);
701 CrystMatrix_REAL fsecond(1,1);
707 fsecond=mNeutronScattLengthImag;
714 cctbx::eltbx::henke::table thenke(mSymbol);
715 cctbx::eltbx::fp_fdp f=thenke.at_angstrom(data.
GetWavelength()(0));
717 if(f.is_valid_fp()) fprime(0)=f.fp();
719 if(f.is_valid_fdp()) fsecond(0)=f.fdp();
742 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::SetSymbol():"<<
mName,5)
747 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::GetSymbol():"<<
mName,5)
753 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::GetElementName():"<<
mName,2)
756 cctbx::eltbx::tiny_pse::table tpse(mSymbol);
761 cout <<
"WARNING: could not interpret Symbol:"<<mSymbol<<endl;
771 void ScatteringPowerAtom::Print()
const
773 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::Print()",1)
774 cout << "ScatteringPowerAtom ("<<this->GetName()<<","
777 VFN_DEBUG_MESSAGE_SHORT("at "<<this,10)
783 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::InitAtNeutronScattCoeffs():"<<
mName,3)
787 cctbx::eltbx::neutron::neutron_news_1992_table nn92t(mSymbol);
789 mNeutronScattLengthImag=nn92t.bound_coh_scatt_length_imag();
793 cout <<
"WARNING: could not interpret symbol for neutron coeefs:"<<mSymbol<<endl;
796 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::InitAtNeutronScattCoeffs():End",3)
799 void ScatteringPowerAtom::InitRefParList()
801 VFN_DEBUG_MESSAGE(
"ScatteringPowerAtom::InitRefParList():"<<
mName,5)
804 gpRefParTypeScattPowTemperatureIso,REFPAR_DERIV_STEP_ABSOLUTE,
805 true,
true,
true,
false);
806 tmp.SetDerivStep(1e-3);
807 tmp.SetGlobalOptimStep(.5);
808 tmp.AssignClock(mClock);
812 REAL* bdata = (REAL*) mB.data();
814 RefinablePar B11(
"B11",&bdata[0],0.1,5.,
815 gpRefParTypeScattPowTemperatureAniso,REFPAR_DERIV_STEP_ABSOLUTE,
816 true,
true,
false,
false);
817 B11.SetDerivStep(1e-3);
818 B11.SetGlobalOptimStep(.5);
819 B11.AssignClock(mClock);
822 RefinablePar B22(
"B22",&bdata[1],0.1,5.,
823 gpRefParTypeScattPowTemperatureAniso,REFPAR_DERIV_STEP_ABSOLUTE,
824 true,
true,
false,
false);
825 B22.SetDerivStep(1e-3);
826 B22.SetGlobalOptimStep(.5);
827 B22.AssignClock(mClock);
830 RefinablePar B33(
"B33",&bdata[2],0.1,5.,
831 gpRefParTypeScattPowTemperatureAniso,REFPAR_DERIV_STEP_ABSOLUTE,
832 true,
true,
false,
false);
833 B33.SetDerivStep(1e-3);
834 B33.SetGlobalOptimStep(.5);
835 B33.AssignClock(mClock);
838 RefinablePar B12(
"B12",&bdata[3],-5,5.,
839 gpRefParTypeScattPowTemperatureAniso,REFPAR_DERIV_STEP_ABSOLUTE,
840 true,
true,
false,
false);
841 B12.SetDerivStep(1e-3);
842 B12.SetGlobalOptimStep(.5);
843 B12.AssignClock(mClock);
846 RefinablePar B13(
"B13",&bdata[4],-5,5.,
847 gpRefParTypeScattPowTemperatureAniso,REFPAR_DERIV_STEP_ABSOLUTE,
848 true,
true,
false,
false);
849 B13.SetDerivStep(1e-3);
850 B13.SetGlobalOptimStep(.5);
851 B13.AssignClock(mClock);
854 RefinablePar B23(
"B23",&bdata[5],-5,5.,
855 gpRefParTypeScattPowTemperatureAniso,REFPAR_DERIV_STEP_ABSOLUTE,
856 true,
true,
false,
false);
857 B23.SetDerivStep(1e-3);
858 B23.SetGlobalOptimStep(.5);
859 B23.AssignClock(mClock);
863 RefinablePar tmp(
"ML Error",&mMaximumLikelihoodPositionError,0.,1.,
864 gpRefParTypeScattPow,REFPAR_DERIV_STEP_ABSOLUTE,
865 false,
true,
true,
false);
866 tmp.SetDerivStep(1e-4);
867 tmp.SetGlobalOptimStep(.001);
868 tmp.AssignClock(mMaximumLikelihoodParClock);
872 RefinablePar tmp(
"ML-Nb Ghost Atoms",&mMaximumLikelihoodNbGhost,0.,10.,
873 gpRefParTypeScattPow,REFPAR_DERIV_STEP_ABSOLUTE,
874 true,
true,
true,
false);
875 tmp.SetDerivStep(1e-3);
876 tmp.SetGlobalOptimStep(.05);
877 tmp.AssignClock(mMaximumLikelihoodParClock);
881 RefinablePar tmp(
"Formal Charge",&mFormalCharge,-10.,10.,
882 gpRefParTypeScattPow,REFPAR_DERIV_STEP_ABSOLUTE,
883 true,
true,
true,
false);
884 tmp.SetDerivStep(1e-3);
885 tmp.SetGlobalOptimStep(.05);
886 tmp.AssignClock(mClock);
891 WXCrystObjBasic* ScatteringPowerAtom::WXCreate(wxWindow* parent)
894 mpWXCrystObj=
new WXScatteringPowerAtom(parent,
this);
904 ScatteringComponent::ScatteringComponent():
905 mX(0),mY(0),mZ(0),mOccupancy(0),mpScattPow(0),mDynPopCorr(0)
907 bool ScatteringComponent::operator==(
const ScatteringComponent& rhs)
const
909 return ((
mX==rhs.mX) && (mY==rhs.mY) && (mZ==rhs.mZ) &&
910 (mOccupancy==rhs.mOccupancy) && (
mpScattPow==rhs.mpScattPow));
912 bool ScatteringComponent::operator!=(
const ScatteringComponent& rhs)
const
914 return ((
mX!=rhs.mX) || (mY!=rhs.mY) || (mZ!=rhs.mZ) ||
915 (mOccupancy!=rhs.mOccupancy) || (
mpScattPow!=rhs.mpScattPow));
920 if(0!=mpScattPow) cout <<
" "<<mpScattPow->
GetName();
930 ScatteringComponentList::ScatteringComponentList()
934 ScatteringComponentList::ScatteringComponentList(
const long nbComponent)
939 ScatteringComponentList::ScatteringComponentList(
const ScatteringComponentList &old):
940 mvScattComp(old.mvScattComp)
944 ScatteringComponentList::~ScatteringComponentList()
954 VFN_DEBUG_MESSAGE(
"ScatteringComponentList::operator()("<<i<<
")",1)
958 throw ObjCrystException(
"ScatteringComponentList::operator()(i)::i>mNbComponent!!");
960 if(i<0)
throw ObjCrystException(
"ScatteringComponentList::operator()&(i)::i<0!!");
966 VFN_DEBUG_MESSAGE(
"ScatteringComponentList::operator()&("<<i<<
")",1)
970 throw ObjCrystException(
"ScatteringComponentList::operator()&(i)::i>mNbComponent!!");
972 if(i<0)
throw ObjCrystException(
"ScatteringComponentList::operator()&(i):: i<0!!");
980 VFN_DEBUG_MESSAGE(
"ScatteringComponentList::operator=()",1)
982 VFN_DEBUG_MESSAGE(
"ScatteringComponentList::operator=():End",0)
988 if( (*
this)(i) != rhs(i) )
return false;
999 VFN_DEBUG_MESSAGE(
"ScatteringComponentList::operator+=()",1)
1005 VFN_DEBUG_MESSAGE(
"ScatteringComponentList::operator++()",1)
1011 VFN_DEBUG_MESSAGE(
"ScatteringComponentList::operator--()",1)
1018 VFN_DEBUG_ENTRY(
"ScatteringComponentList::Print()",5)
1019 cout<<
"Number of Scattering components:"<<this->
GetNbComponent()<<endl;
1025 VFN_DEBUG_EXIT(
"ScatteringComponentList::Print()",5)
string mColourName
Colour for this ScatteringPower (from POVRay)
virtual REAL GetForwardScatteringFactor(const RadiationType) const
Get the scattering factor at (0,0,0).
const CrystVector_REAL & GetH() const
Return the 1D array of H coordinates for all reflections.
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 AddPar(const RefinablePar &newRefPar)
Add a refinable parameter.
RadiationType GetRadiationType() const
Neutron or x-ray experiment ? Wavelength ?
void SetColour(const string &colorName)
Set the colour from the associated POV-Ray name.
const CrystVector_REAL & GetSinThetaOverLambda() const
Return an array with for all reflections.
const RefinableObjClock & GetMaximumLikelihoodParClock() const
Get the clock value for the last change on the maximum likelihood parameters (positionnal error...
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...
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)
CrystVector_REAL GetWavelength() const
wavelength of the experiment (in Angstroems)
REAL GetMaximumLikelihoodPositionError() const
Maximum Likelihood: get the estimated error (sigma) on the positions for this kind of element...
long GetNbPar() const
Total number of refinable parameter in the object.
unsigned int GetMaxCovBonds() const
Maximum number of covalent bonds (from openbabel element.txt)
RefinablePar & GetPar(const long i)
Access all parameters in the order they were inputted.
void Print() const
Print the list of Scattering components. For debugging.
const ScatteringComponent & operator()(const long i) const
Access to a component.
Class to compute structure factors for a set of reflections and a Crystal.
RefinableObjClock mClockMaster
Master clock, which is changed whenever the object has been altered.
const CrystVector_REAL & GetL() const
Return the 1D array of L coordinates for all reflections.
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.
void operator++()
Add component (the whole list should be updated after that)
void Reset()
Reset the list.
string mName
Name for this RefinableObject. Should be unique, at least in the same scope.+.
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.
const ScatteringPower * mpScattPow
The ScatteringPower associated with this position.
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.
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.
virtual void SetBiso(const REAL newB)
Sets the isotropic temperature B factor.
virtual const string & GetClassName() const
Name for this class ("RefinableObj", "Crystal",...).
void operator=(const ScatteringComponentList &rhs)
Assignement operator.
output a number as a formatted float:
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",...).
output a string with a fixed length (adding necessary space or removing excess characters) : ...
ObjRegistry< ScatteringPower > gScatteringPowerRegistry("Global ScatteringPower Registry")
Global registry for all ScatteringPower objects.
int GetAtomicNumber() const
Atomic number for this atom.
Exception class for ObjCryst++ library.
long GetNbRefl() const
Return the number of reflections in this experiment.
The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++.
The Scattering Power for an Atom.
Generic class for parameters of refinable objects.
void SetMaximumLikelihoodPositionError(const REAL mle)
Maximum Likelihood: set the estimated error (sigma) on the positions for this kind of element...
void InitAtNeutronScattCoeffs()
virtual const string & GetName() const
Name of the object.
int mAtomicNumber
atomic number (Z) for the atom
RadiationType
Type of radiation used.
REAL GetBiso() const
Returns the isotropic temperature B factor.
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)
const CrystVector_REAL & GetK() const
Return the 1D array of K coordinates for all reflections.
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",..).
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 SetName(const string &name)
Name of the object.
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)
unsigned int mMaxCovBonds
Maximum number of covalent bonds.