ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/src/openbabel/mol.cpp
(Generate patch)

Comparing trunk/OOPSE-2.0/src/openbabel/mol.cpp (file contents):
Revision 2517 by tim, Wed Nov 16 19:42:11 2005 UTC vs.
Revision 2518 by tim, Fri Dec 16 21:52:50 2005 UTC

# Line 81 | Line 81 | void OBMol::SetTorsion(OBAtom *a,OBAtom *b,OBAtom *c,
81      vector<int> tor;
82      vector<int> atoms;
83  
84 <    obErrorLog.ThrowError(__FUNCTION__,
84 >    obErrorLog.ThrowError(__func__,
85                            "Ran OpenBabel::SetTorsion", obAuditMsg);
86  
87      tor.push_back(a->GetCIdx());
# Line 632 | Line 632 | OBAtom *OBMol::GetAtom(int idx)
632   {
633      if ((unsigned)idx < 1 || (unsigned)idx > NumAtoms())
634      {
635 <        obErrorLog.ThrowError(__FUNCTION__, "Requested Atom Out of Range", obDebug);
635 >        obErrorLog.ThrowError(__func__, "Requested Atom Out of Range", obDebug);
636          return((OBAtom*)NULL);
637      }
638  
# Line 650 | Line 650 | OBBond *OBMol::GetBond(int idx)
650   {
651      if (idx < 0 || (unsigned)idx >= NumBonds())
652      {
653 <      obErrorLog.ThrowError(__FUNCTION__, "Requested Bond Out of Range", obDebug);
653 >      obErrorLog.ThrowError(__func__, "Requested Bond Out of Range", obDebug);
654          return((OBBond*)NULL);
655      }
656  
# Line 678 | Line 678 | OBResidue *OBMol::GetResidue(int idx)
678   {
679      if (idx < 0 || (unsigned)idx >= NumResidues())
680      {
681 <      obErrorLog.ThrowError(__FUNCTION__, "Requested Residue Out of Range", obDebug);
681 >      obErrorLog.ThrowError(__func__, "Requested Residue Out of Range", obDebug);
682          return((OBResidue*)NULL);
683      }
684  
# Line 748 | Line 748 | string OBMol::GetFormula()
748    if (dp != NULL) // we already set the formula
749      return dp->GetValue();
750  
751 <  obErrorLog.ThrowError(__FUNCTION__,
751 >  obErrorLog.ThrowError(__func__,
752                          "Ran OpenBabel::SetFormula -- Hill order formula",
753                          obAuditMsg);
754  
# Line 848 | Line 848 | int OBMol::GetTotalCharge()
848          return(_totalCharge);
849      else // calculate from atomic formal charges (seems the best default)
850      {
851 <      obErrorLog.ThrowError(__FUNCTION__,
851 >      obErrorLog.ThrowError(__func__,
852                              "Ran OpenBabel::GetTotalCharge -- calculated from formal charges",
853                              obAuditMsg);
854  
# Line 881 | Line 881 | unsigned int OBMol::GetTotalSpinMultiplicity()
881          return(_totalSpin);
882      else // calculate from atomic spin information (assuming high-spin case)
883      {
884 <        obErrorLog.ThrowError(__FUNCTION__,
884 >        obErrorLog.ThrowError(__func__,
885                                "Ran OpenBabel::GetTotalSpinMultiplicity -- calculating from atomic spins and high spin",
886                                obAuditMsg);
887  
# Line 1052 | Line 1052 | bool OBMol::Clear()
1052  
1053   bool OBMol::Clear()
1054   {
1055 <  obErrorLog.ThrowError(__FUNCTION__,
1055 >  obErrorLog.ThrowError(__func__,
1056                          "Ran OpenBabel::Clear Molecule", obAuditMsg);
1057  
1058      vector<OBNodeBase*>::iterator i;
# Line 1134 | Line 1134 | void OBMol::EndModify(bool nukePerceivedData)
1134   {
1135      if (_mod == 0)
1136      {
1137 <        obErrorLog.ThrowError(__FUNCTION__, "_mod is negative - EndModify() called too many times", obDebug);
1137 >        obErrorLog.ThrowError(__func__, "_mod is negative - EndModify() called too many times", obDebug);
1138          return;
1139      }
1140  
# Line 1413 | Line 1413 | bool OBMol::StripSalts()
1413      if (cfl.empty() || cfl.size() == 1)
1414          return(false);
1415  
1416 <    obErrorLog.ThrowError(__FUNCTION__,
1416 >    obErrorLog.ThrowError(__func__,
1417                            "Ran OpenBabel::StripSalts", obAuditMsg);
1418  
1419      max = cfl.begin();
# Line 1448 | Line 1448 | bool OBMol::DeleteNonPolarHydrogens()
1448      vector<OBNodeBase*>::iterator i;
1449      vector<OBNodeBase*> delatoms;
1450  
1451 <    obErrorLog.ThrowError(__FUNCTION__,
1451 >    obErrorLog.ThrowError(__func__,
1452                            "Ran OpenBabel::DeleteHydrogens -- nonpolar",
1453                            obAuditMsg);
1454  
# Line 1489 | Line 1489 | bool OBMol::DeleteHydrogens()
1489      vector<OBNodeBase*>::iterator i;
1490      vector<OBNodeBase*> delatoms,va;
1491  
1492 <    obErrorLog.ThrowError(__FUNCTION__,
1492 >    obErrorLog.ThrowError(__func__,
1493                            "Ran OpenBabel::DeleteHydrogens", obAuditMsg);
1494  
1495      for (atom = BeginAtom(i);atom;atom = NextAtom(i))
# Line 1627 | Line 1627 | bool OBMol::AddHydrogens(bool polaronly,bool correctFo
1627      SetHydrogensAdded();
1628  
1629      if (!polaronly)
1630 <      obErrorLog.ThrowError(__FUNCTION__,
1630 >      obErrorLog.ThrowError(__func__,
1631                              "Ran OpenBabel::AddHydrogens", obAuditMsg);
1632      else
1633 <          obErrorLog.ThrowError(__FUNCTION__,
1633 >          obErrorLog.ThrowError(__func__,
1634                            "Ran OpenBabel::AddHydrogens -- polar only", obAuditMsg);
1635  
1636      //count up number of hydrogens to add
# Line 1831 | Line 1831 | bool OBMol::CorrectForPH()
1831          return(true);
1832      phmodel.CorrectForPH(*this);
1833  
1834 <    obErrorLog.ThrowError(__FUNCTION__,
1834 >    obErrorLog.ThrowError(__func__,
1835                            "Ran OpenBabel::CorrectForPH", obAuditMsg);
1836  
1837      return(true);
# Line 1845 | Line 1845 | bool OBMol::AssignSpinMultiplicity()
1845  
1846      SetSpinMultiplicityAssigned();
1847  
1848 <    obErrorLog.ThrowError(__FUNCTION__,
1848 >    obErrorLog.ThrowError(__func__,
1849                            "Ran OpenBabel::AssignSpinMultiplicity",
1850                            obAuditMsg);
1851  
# Line 2114 | Line 2114 | void CorrectBadResonanceForm(OBMol &mol)
2114      vector<vector<int> > mlist;
2115      vector<vector<int> >::iterator i;
2116  
2117 <    obErrorLog.ThrowError(__FUNCTION__,
2117 >    obErrorLog.ThrowError(__func__,
2118                            "Ran OpenBabel::CorrectBadResonanceForm", obAuditMsg);
2119  
2120      OBSmartsPattern acid;
# Line 2321 | Line 2321 | bool OBMol::Kekulize()
2321      // Not quite sure why this is here -GRH 2003
2322      //  if (NumAtoms() > 255) return(false);
2323  
2324 <    obErrorLog.ThrowError(__FUNCTION__,
2324 >    obErrorLog.ThrowError(__func__,
2325                            "Ran OpenBabel::Kekulize", obAuditMsg);
2326  
2327      for (bond = BeginBond(i);bond;bond = NextBond(i))
# Line 2406 | Line 2406 | bool OBMol::AddBond(int first,int second,int order,int
2406          end = GetAtom(second);
2407          if (!bgn || !end)
2408          {
2409 <            obErrorLog.ThrowError(__FUNCTION__, "Unable to add bond - invalid atom index", obDebug);
2409 >            obErrorLog.ThrowError(__func__, "Unable to add bond - invalid atom index", obDebug);
2410              return(false);
2411          }
2412          bond->Set(_nbonds,bgn,end,order,stereo);
# Line 2491 | Line 2491 | void OBMol::Align(OBAtom *a1,OBAtom *a2,vector3 &p1,ve
2491   {
2492      vector<int> children;
2493  
2494 <    obErrorLog.ThrowError(__FUNCTION__,
2494 >    obErrorLog.ThrowError(__func__,
2495                            "Ran OpenBabel::Align", obAuditMsg);
2496  
2497      //find which atoms to rotate
# Line 2541 | Line 2541 | void OBMol::ToInertialFrame(int conf,double *rmat)
2541      double mass = 0.0;
2542      double center[3],m[3][3];
2543  
2544 <    obErrorLog.ThrowError(__FUNCTION__,
2544 >    obErrorLog.ThrowError(__func__,
2545                            "Ran OpenBabel::ToInertialFrame", obAuditMsg);
2546  
2547      for (i = 0;i < 3;i++)
# Line 2890 | Line 2890 | void OBMol::RenumberAtoms(vector<OBNodeBase*> &v)
2890      if (Empty())
2891          return;
2892  
2893 <    obErrorLog.ThrowError(__FUNCTION__,
2893 >    obErrorLog.ThrowError(__func__,
2894                            "Ran OpenBabel::RenumberAtoms", obAuditMsg);
2895  
2896      OBAtom *atom;
# Line 2962 | Line 2962 | void OBMol::ConnectTheDots(void)
2962          return;
2963      if (_dimension != 3) return; // not useful on non-3D structures
2964  
2965 <    obErrorLog.ThrowError(__FUNCTION__,
2965 >    obErrorLog.ThrowError(__func__,
2966                            "Ran OpenBabel::ConnectTheDots", obAuditMsg);
2967  
2968      int j,k,max;
# Line 3087 | Line 3087 | void OBMol::PerceiveBondOrders()
3087          return;
3088      if (_dimension != 3) return; // not useful on non-3D structures
3089  
3090 <    obErrorLog.ThrowError(__FUNCTION__,
3090 >    obErrorLog.ThrowError(__func__,
3091                            "Ran OpenBabel::PerceiveBondOrders", obAuditMsg);
3092  
3093      OBAtom *atom, *b, *c;
# Line 3363 | Line 3363 | void OBMol::Center()
3363      size = NumAtoms();
3364      fsize = -1.0/(double)NumAtoms();
3365  
3366 <    obErrorLog.ThrowError(__FUNCTION__,
3366 >    obErrorLog.ThrowError(__func__,
3367                            "Ran OpenBabel::Center", obAuditMsg);
3368  
3369      vector<double*>::iterator i;
# Line 3393 | Line 3393 | vector3 OBMol::Center(int nconf)
3393  
3394   vector3 OBMol::Center(int nconf)
3395   {
3396 <    obErrorLog.ThrowError(__FUNCTION__,
3396 >    obErrorLog.ThrowError(__func__,
3397                            "Ran OpenBabel::Center", obAuditMsg);
3398  
3399      SetConformer(nconf);
# Line 3438 | Line 3438 | void OBMol::Translate(const vector3 &v,int nconf)
3438    positions in the current conformer are translated. */
3439   void OBMol::Translate(const vector3 &v,int nconf)
3440   {
3441 <    obErrorLog.ThrowError(__FUNCTION__,
3441 >    obErrorLog.ThrowError(__func__,
3442                            "Ran OpenBabel::Translate", obAuditMsg);
3443  
3444      int i,size;
# Line 3481 | Line 3481 | void OBMol::Rotate(const double m[9],int nconf)
3481      double x,y,z;
3482      double *c = (nconf == OB_CURRENT_CONFORMER)? _c : GetConformer(nconf);
3483  
3484 <    obErrorLog.ThrowError(__FUNCTION__,
3484 >    obErrorLog.ThrowError(__func__,
3485                            "Ran OpenBabel::Rotate", obAuditMsg);
3486  
3487      size = NumAtoms();
# Line 3539 | Line 3539 | bool OBMol::ConvertDativeBonds()
3539   ///Converts for instance [N+]([O-])=O to N(=O)=O
3540   bool OBMol::ConvertDativeBonds()
3541   {
3542 <  obErrorLog.ThrowError(__FUNCTION__,
3542 >  obErrorLog.ThrowError(__func__,
3543                          "Ran OpenBabel::ConvertDativeBonds", obAuditMsg);
3544  
3545          //Look for + and - charges on adjacent atoms

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines