@@ -30,14 +30,16 @@ using namespace std;
3030// Constructors --------------------------------------------------------------
3131
3232JeongPeakWidth::JeongPeakWidth () :
33- mdelta1 (0.0 ), mdelta2(0.0 ), mqbroad(0.0 )
33+ mdelta1 (0.0 ), mdelta2(0.0 ), mqbroad(0.0 ), mqbroad_seperable( 0.0 )
3434{
3535 this ->registerDoubleAttribute (" delta1" ,
3636 this , &JeongPeakWidth::getDelta1, &JeongPeakWidth::setDelta1);
3737 this ->registerDoubleAttribute (" delta2" ,
3838 this , &JeongPeakWidth::getDelta2, &JeongPeakWidth::setDelta2);
3939 this ->registerDoubleAttribute (" qbroad" ,
4040 this , &JeongPeakWidth::getQbroad, &JeongPeakWidth::setQbroad);
41+ this ->registerDoubleAttribute (" qbroad_seperable" ,
42+ this , &JeongPeakWidth::getQbroad_seperable, &JeongPeakWidth::setQbroad_seperable);
4143}
4244
4345
@@ -69,7 +71,8 @@ double JeongPeakWidth::calculate(const BaseBondGenerator& bnds) const
6971 double corr = this ->msdSharpeningRatio (r);
7072 // avoid calculating square root of negative value
7173 double fwhm = (corr <= 0 ) ? 0.0 :
72- (sqrt (corr) * this ->DebyeWallerPeakWidth ::calculate (bnds));
74+ (sqrt (corr) * this ->DebyeWallerPeakWidth ::calculate (bnds) +
75+ pow (this ->getQbroad_seperable ()*r, 2 ));
7376 return fwhm;
7477}
7578
@@ -82,7 +85,7 @@ double JeongPeakWidth::maxWidth(StructureAdapterPtr stru,
8285 this ->msdSharpeningRatio (rmin),
8386 this ->msdSharpeningRatio (rmax));
8487 // if the sharpening factor is larger than 1 adjust the maximum width
85- double rv = maxwidth0 * sqrt (max (1.0 , maxmsdsharp));
88+ double rv = maxwidth0 * sqrt (max (1.0 , maxmsdsharp))+ pow ( this -> getQbroad_seperable ()*rmax, 2 ) ;
8689 return rv;
8790}
8891
@@ -118,6 +121,19 @@ const double& JeongPeakWidth::getQbroad() const
118121}
119122
120123
124+ const double & JeongPeakWidth::getQbroad_seperable () const
125+ {
126+ return mqbroad_seperable;
127+ }
128+
129+
130+ void JeongPeakWidth::setQbroad_seperable (double qbroad_seperable)
131+ {
132+ if (mqbroad_seperable != qbroad_seperable) mticker.click ();
133+ mqbroad_seperable = qbroad_seperable;
134+ }
135+
136+
121137void JeongPeakWidth::setQbroad (double qbroad)
122138{
123139 if (mqbroad != qbroad) mticker.click ();
0 commit comments