Beispiel #1
0
void
hAccFuncCalc(OpenBabel::OBMol* mol, Pharmacophore* pharmacophore)
{
   // Create for every hydrogen acceptor a pharmacophore point
   std::vector<OpenBabel::OBAtom*>::iterator ai;
   for (OpenBabel::OBAtom* atom = mol->BeginAtom(ai); atom; atom = mol->NextAtom(ai))
   {
      if (atom->GetAtomicNum() == 7 || atom->GetAtomicNum() == 8)
      {
         if (atom->GetFormalCharge() <= 0)
         {        
            if(_hAccDelocalized(atom) || (_hAccCalcAccSurf(atom) < 0.02))
            {
               continue;
            }
            PharmacophorePoint p;
            p.func = HACC;
            p.point.x = atom->x();
            p.point.y = atom->y();
            p.point.z = atom->z();
            p.hasNormal = true;
            p.alpha = funcSigma[HACC];
            p.normal = _hAccCalcNormal(atom);
            pharmacophore->push_back(p);
         }
      }
   }
}
Beispiel #2
0
void
hDonFuncCalc(OpenBabel::OBMol* mol, Pharmacophore* pharmacophore)
{
   // Create for every hydrogen donor a pharmacophore point
   std::vector<OpenBabel::OBAtom*>::iterator ai;
   for (OpenBabel::OBAtom* a = mol->BeginAtom(ai); a; a = mol->NextAtom(ai))
   {
      if (a->GetAtomicNum() == 7 || a->GetAtomicNum() == 8)
      {
         if (a->GetFormalCharge() >= 0 && ((a->GetImplicitValence() - a->GetHvyValence()) !=0)) 
         {
            PharmacophorePoint p;
            p.func = HDON;
            p.point.x = a->x();
            p.point.y = a->y();
            p.point.z = a->z();
            p.hasNormal = true;
            p.alpha = funcSigma[HDON];
            p.normal = _hDonCalcNormal(a);
            pharmacophore->push_back(p);
         }
      }
   }
}