Esempio n. 1
0
double Energy::fb(const AMod::Arrow& arrowSR) {
  const AMod::Atom& ai = arrowSR.host();
  const AMod::Arrow& arij = arrowSR;
  const BondDatumSR& bdij = bondDataSR[arij.bond().id()];
  const double rij = arij.bond().r;
  const double Nij = bdij.N_[arij.position()];
  double costhijk;
  double Nijk;
  int k, kmax = ai.arrows.size();
  double sum = 0.0;
  for(k = 0; k < kmax; k++) {
    if(k == arij.id()) continue;
    const AMod::Arrow& arik = ai.arrows[k];
    const BondDatumSR& bdik = bondDataSR[arik.bond().id()];
    costhijk = costh(arij.dx,arik.dx);
    Nijk = Nij-bdik.SdN;
    sum += bdik.SdN*fH(rij-arik.bond().r)*fG(costhijk,Nijk);
  }
  return 1.0/std::sqrt(1.0+sum);
}
Esempio n. 2
0
Vector4 Rgba::ToVector4() const {
	return Vector4(fR(), fG(), fB(), fA());
}