ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/openbabel/patty.cpp
(Generate patch)

Comparing trunk/src/openbabel/patty.cpp (file contents):
Revision 741 by tim, Wed Nov 16 19:42:11 2005 UTC vs.
Revision 819 by tim, Fri Dec 16 21:52:50 2005 UTC

# Line 75 | Line 75 | void patty::read_rules(const string &infile)
75      ifsP= &ifs;
76      if (!ifs)
77      {
78 <        if (getenv("BABEL_DATADIR") == NULL)
78 >        if (getenv("FORCE_PARAM_PATH") == NULL)
79          {
80   #ifdef HAVE_SSTREAM
81            stringstream errorMsg;
82   #else
83            strstream errorMsg;
84   #endif
85 <          errorMsg << "The BABEL_DATADIR environment variable is not defined" << endl;
85 >          errorMsg << "The FORCE_PARAM_PATH environment variable is not defined" << endl;
86            errorMsg << "Please define it so the program can find " << infile << endl;
87 <          obErrorLog.ThrowError(__FUNCTION__, errorMsg.str(), obWarning);
87 >          obErrorLog.ThrowError(__func__, errorMsg.str(), obWarning);
88              //            exit(0);
89          }
90          else
91 <            strcpy(patty_dir,getenv("BABEL_DATADIR"));
91 >            strcpy(patty_dir,getenv("FORCE_PARAM_PATH"));
92          strcat(patty_dir,FILE_SEP_CHAR);
93          strcat(patty_dir,infile.c_str());
94          ifs1.open(patty_dir);
# Line 108 | Line 108 | void patty::read_rules(const string &infile)
108        strstream errorMsg;
109   #endif
110          errorMsg << "Could not open " << patty_dir << endl;
111 <        obErrorLog.ThrowError(__FUNCTION__, errorMsg.str(), obWarning);
111 >        obErrorLog.ThrowError(__func__, errorMsg.str(), obWarning);
112          //        exit(0);
113      }
114      while (ifsP->getline(buffer,BUFF_SIZE))
# Line 161 | Line 161 | void patty::assign_types(OBMol &mol, std::vector<std::
161   {
162      atm_typ.resize(mol.NumAtoms()+1);
163  
164 <    obErrorLog.ThrowError(__FUNCTION__,
164 >    obErrorLog.ThrowError(__func__,
165                            "Ran OpenBabel::PATTY::AssignTypes", obAuditMsg);
166  
167      for (unsigned int i = 0; i < _sp.size(); i++)
# Line 179 | Line 179 | void patty::assign_types(OBMol &mol, std::vector<std::
179                  strstream errorMsg;
180   #endif
181                  errorMsg << typ[i] << " " << smarts[i] << " matched ";
182 <                obErrorLog.ThrowError(__FUNCTION__, errorMsg.str(), obDebug);
182 >                obErrorLog.ThrowError(__func__, errorMsg.str(), obDebug);
183                }
184  
185              for (unsigned int j = 0; j < match.size(); j++)
# Line 192 | Line 192 | void patty::assign_types(OBMol &mol, std::vector<std::
192                      strstream errorMsg;
193   #endif
194                      errorMsg << match[j][0] << " ";
195 <                    obErrorLog.ThrowError(__FUNCTION__, errorMsg.str(), obDebug);
195 >                    obErrorLog.ThrowError(__func__, errorMsg.str(), obDebug);
196                    }
197                  atm_typ[match[j][0]] = typ[i];
198              }
# Line 204 | Line 204 | void patty::assign_types(OBMol &mol,vector<int> &atm_t
204   {
205      atm_typ.resize(mol.NumAtoms()+1);
206  
207 <    obErrorLog.ThrowError(__FUNCTION__,
207 >    obErrorLog.ThrowError(__func__,
208                            "Ran OpenBabel::PATTY::AssignTypes", obAuditMsg);
209  
210      for (unsigned int i = 0; i < _sp.size(); i++)
# Line 222 | Line 222 | void patty::assign_types(OBMol &mol,vector<int> &atm_t
222                      strstream errorMsg;
223   #endif
224                      errorMsg << typ[i] << " " << smarts[i] << " matched " ;
225 <                    obErrorLog.ThrowError(__FUNCTION__, errorMsg.str(), obDebug);
225 >                    obErrorLog.ThrowError(__func__, errorMsg.str(), obDebug);
226                }
227  
228              for (unsigned int j = 0; j < match.size(); j++)
# Line 235 | Line 235 | void patty::assign_types(OBMol &mol,vector<int> &atm_t
235                      strstream errorMsg;
236   #endif
237                      errorMsg << match[j][0] << " ";
238 <                    obErrorLog.ThrowError(__FUNCTION__, errorMsg.str(), obDebug);
238 >                    obErrorLog.ThrowError(__func__, errorMsg.str(), obDebug);
239                    }
240                  atm_typ[match[j][0]] = type_to_int(typ[i]);
241              }
# Line 286 | Line 286 | int patty::type_to_int(const string &type, bool failOn
286   #endif
287            errorMsg << "Unable to find type of feature passed in " << endl;
288            errorMsg << "Feature passed in is " << type << endl;
289 <          obErrorLog.ThrowError(__FUNCTION__, errorMsg.str(), obInfo);
289 >          obErrorLog.ThrowError(__func__, errorMsg.str(), obInfo);
290            //      exit(-1);
291          }
292        else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines