| 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); |
| 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)) |
| 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++) |
| 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++) |
| 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 |
|
} |
| 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++) |
| 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++) |
| 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 |
|
} |
| 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 |