double DebyeWallerPeakWidth::calculate(const BaseBondGenerator& bnds) const
{
    using diffpy::mathutils::GAUSS_SIGMA_TO_FWHM;
    double msdval = bnds.msd();
    double rv = (msdval < 0.0) ? 0.0 : GAUSS_SIGMA_TO_FWHM * sqrt(msdval);
    return rv;
}
Пример #2
0
void BVSCalculator::addPairContribution(const BaseBondGenerator& bnds,
        int summationscale)
{
    const string& a0 = mstructure_cache.baresymbols[bnds.site0()];
    const string& a1 = mstructure_cache.baresymbols[bnds.site1()];
    int v0 = mstructure_cache.valences[bnds.site0()];
    int v1 = mstructure_cache.valences[bnds.site1()];
    const BVParametersTable& bvtb = *(this->getBVParamTable());
    const BVParam& bp = bvtb.lookup(a0, v0, a1, v1);
    // do nothing if there are no bond parameters for this pair
    if (&bp == &bvtb.none())    return;
    double valencehalf = bp.bondvalence(bnds.distance()) / 2.0;
    int pm0 = (v0 >= 0) ? 1 : -1;
    int pm1 = (v1 >= 0) ? 1 : -1;
    const double& o0 = mstructure->siteOccupancy(bnds.site0());
    const double& o1 = mstructure->siteOccupancy(bnds.site1());
    mvalue[bnds.site0()] += summationscale * pm0 * valencehalf * o1;
    mvalue[bnds.site1()] += summationscale * pm1 * valencehalf * o0;
}
Пример #3
0
void PairQuantity::configureBondGenerator(BaseBondGenerator& bnds) const
{
    bnds.setRmin(this->getRmin());
    bnds.setRmax(this->getRmax());
}
Пример #4
0
 // define contribution from a pair of atoms.  mvalue is a reference
 // to the internal array of result values.
 void addPairContribution(const BaseBondGenerator& bnds, int sumscale)
 {
     double rij = bnds.distance();
     double ljij = 4 * (pow(rij, -12) - pow(rij, -6));
     mvalue[0] += sumscale * ljij / 2.0;
 }
Пример #5
0
void DebyePDFCalculator::configureBondGenerator(BaseBondGenerator& bnds) const
{
    bnds.setRmin(this->rcalclo());
    bnds.setRmax(this->rcalchi());
}
Пример #6
0
void BVSCalculator::configureBondGenerator(BaseBondGenerator& bnds) const
{
    bnds.setRmax(this->getRmaxUsed());
}