Update requirements.

Minor cleanups in some cpps
Finish the changes so that fileparsers don't throw exceptions unless
the file is not found.
This commit is contained in:
Greg Landrum
2008-08-19 03:05:58 +00:00
parent 66b621aca6
commit 4dc3d63fcd
5 changed files with 19 additions and 28 deletions

View File

@@ -76,7 +76,7 @@ namespace Gasteiger {
namespace RDKit {
/*! \brief compute the gaseiger partial charges and return a new molecule with the charges set
*
* Ref : J.Gasteiger, M. Marseli, "Iterative Equalization of Oribital Electronegatiity
* Ref : J.Gasteiger, M. Marsili, "Iterative Equalization of Oribital Electronegatiity
* A Rapid Access to Atomic Charges", Tetrahedron Vol 36 p3219 1980
*/
void computeGasteigerCharges(const ROMol *mol, int nIter, bool throwOnParamFailure) {

View File

@@ -295,6 +295,7 @@ namespace RDKit{
//@{
//! returns a pointer to our RingInfo structure
//! <b>Note:</b> the client should not delete this.
RingInfo *getRingInfo() const { return dp_ringInfo; };
//! provides access to all neighbors around an Atom

View File

@@ -43,10 +43,8 @@ namespace RDKit{
} catch (...) {
newM=0;
}
return static_cast<ROMol *>(newM);
if(!newM) return 0;
ROMol *res =new ROMol(*newM);
delete newM;
return res;
}
ROMol *MolFromSmarts(const char *smarts,bool mergeHs=false){
@@ -56,10 +54,7 @@ namespace RDKit{
} catch (...) {
newM=0;
}
if(!newM) return 0;
ROMol *res =new ROMol(*newM);
delete newM;
return res;
return static_cast<ROMol *>(newM);
}
ROMol *MolFromTPLFile(const char *filename, bool sanitize=true,
@@ -67,13 +62,13 @@ namespace RDKit{
RWMol *newM;
try {
newM = TPLFileToMol(filename,sanitize,skipFirstConf);
} catch (RDKit::BadFileException &e) {
PyErr_SetString(PyExc_IOError,e.message());
throw python::error_already_set();
} catch (...) {
newM=0;
}
if(!newM) return 0;
ROMol *res =new ROMol(*newM);
delete newM;
return res;
return static_cast<ROMol *>(newM);
}
ROMol *MolFromTPLBlock(std::string tplBlock, bool sanitize=true,
@@ -86,10 +81,7 @@ namespace RDKit{
} catch (...) {
newM=0;
}
if(!newM) return 0;
ROMol *res =new ROMol(*newM);
delete newM;
return res;
return static_cast<ROMol *>(newM);
}
ROMol *MolFromMolFile(const char *molFilename, bool sanitize=true, bool removeHs=true) {
@@ -99,11 +91,10 @@ namespace RDKit{
} catch (RDKit::BadFileException &e) {
PyErr_SetString(PyExc_IOError,e.message());
throw python::error_already_set();
} catch (...) {
newM=0;
}
if(!newM) return 0;
ROMol *res =new ROMol(*newM);
delete newM;
return res;
return static_cast<ROMol *>(newM);
}
ROMol *MolFromMolBlock(std::string molBlock, bool sanitize=true, bool removeHs=true) {
@@ -115,10 +106,7 @@ namespace RDKit{
} catch (...) {
newM=0;
}
if(!newM) return 0;
ROMol *res =new ROMol(*newM);
delete newM;
return res;
return static_cast<ROMol *>(newM);
}
}

View File

@@ -1,11 +1,13 @@
// $Id$
//
// Copyright (c) 2004-2006 greg Landrum and Rational Discovery LLC
// Copyright (c) 2004-2008 greg Landrum and Rational Discovery LLC
//
// @@ All Rights Reserved @@
//
#include <boost/python.hpp>
#define PY_ARRAY_UNIQUE_SYMBOL rdbase_array_API
#include <iostream>
#include <fstream>
#include <RDBoost/Wrap.h>
#include "numpy/oldnumeric.h"

View File

@@ -4,9 +4,9 @@ By: Greg Landrum
A. Required Python and the like:
1) Python 2.3 or later
2) Numeric Python (numpy.sourceforge.net)
binary versions for windows can be downloaded here:
http://biopython.org/DIST/Numeric-24.2.win32-py2.5.exe
2) NumPy (http://numpy.scipy.org/)
binary versions can be downloaded here:
http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103
3) [not required with Python2.5 and later] A database wrapper, one of:
- pyPgSQL (http://pypgsql.sourceforge.net/)
- pysqlite2 (http://www.initd.org/tracker/pysqlite/wiki/pysqlite)