mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
Modernization: use nullptr (#3143)
This commit is contained in:
@@ -43,7 +43,7 @@ class Catalog {
|
||||
typedef paramType paramType_t;
|
||||
|
||||
//------------------------------------
|
||||
Catalog() : d_fpLength(0), dp_cParams(0){};
|
||||
Catalog() : d_fpLength(0), dp_cParams(nullptr){};
|
||||
|
||||
//------------------------------------
|
||||
virtual ~Catalog() { delete dp_cParams; }
|
||||
@@ -371,7 +371,7 @@ class HierarchCatalog : public Catalog<entryType, paramType> {
|
||||
URANGE_CHECK(idx, this->getFPLength());
|
||||
typename boost::property_map<CatalogGraph, vertex_entry_t>::const_type
|
||||
pMap = boost::get(vertex_entry_t(), d_graph);
|
||||
const entryType *res = NULL;
|
||||
const entryType *res = nullptr;
|
||||
for (unsigned int i = idx; i < this->getNumEntries(); i++) {
|
||||
const entryType *e = pMap[i];
|
||||
if (e->getBitId() == static_cast<int>(idx)) {
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
*/
|
||||
class RDKIT_DATASTRUCTS_EXPORT ExplicitBitVect : public BitVect {
|
||||
public:
|
||||
ExplicitBitVect() : dp_bits(0), d_size(0), d_numOnBits(0){};
|
||||
ExplicitBitVect() : dp_bits(nullptr), d_size(0), d_numOnBits(0){};
|
||||
//! initialize with a particular size;
|
||||
explicit ExplicitBitVect(unsigned int size)
|
||||
: dp_bits(0), d_size(0), d_numOnBits(0) {
|
||||
: dp_bits(nullptr), d_size(0), d_numOnBits(0) {
|
||||
_initForSize(size);
|
||||
};
|
||||
//! initialize with a particular size and all bits set
|
||||
|
||||
@@ -58,8 +58,8 @@ struct FPBReader_impl;
|
||||
class RDKIT_DATASTRUCTS_EXPORT FPBReader {
|
||||
public:
|
||||
FPBReader()
|
||||
: dp_istrm(NULL),
|
||||
dp_impl(NULL),
|
||||
: dp_istrm(nullptr),
|
||||
dp_impl(nullptr),
|
||||
df_owner(false),
|
||||
df_init(false),
|
||||
df_lazyRead(false){};
|
||||
@@ -91,14 +91,14 @@ class RDKIT_DATASTRUCTS_EXPORT FPBReader {
|
||||
FPBReader(std::istream *inStream, bool takeOwnership = true,
|
||||
bool lazyRead = false)
|
||||
: dp_istrm(inStream),
|
||||
dp_impl(NULL),
|
||||
dp_impl(nullptr),
|
||||
df_owner(takeOwnership),
|
||||
df_init(false),
|
||||
df_lazyRead(lazyRead){};
|
||||
~FPBReader() {
|
||||
destroy();
|
||||
if (df_owner) delete dp_istrm;
|
||||
dp_istrm = NULL;
|
||||
dp_istrm = nullptr;
|
||||
df_init = false;
|
||||
};
|
||||
|
||||
@@ -271,7 +271,7 @@ class RDKIT_DATASTRUCTS_EXPORT FPBReader {
|
||||
throw BadFileException(errout.str());
|
||||
}
|
||||
dp_istrm = tmpStream;
|
||||
dp_impl = NULL;
|
||||
dp_impl = nullptr;
|
||||
df_owner = true;
|
||||
df_init = false;
|
||||
df_lazyRead = lazyRead;
|
||||
|
||||
@@ -33,16 +33,16 @@ typedef IntSet::const_iterator IntSetConstIter;
|
||||
*/
|
||||
class RDKIT_DATASTRUCTS_EXPORT SparseBitVect : public BitVect {
|
||||
public:
|
||||
SparseBitVect() : dp_bits(0), d_size(0){};
|
||||
SparseBitVect() : dp_bits(nullptr), d_size(0){};
|
||||
//! initialize with a particular size;
|
||||
explicit SparseBitVect(unsigned int size) : dp_bits(0), d_size(0) {
|
||||
explicit SparseBitVect(unsigned int size) : dp_bits(nullptr), d_size(0) {
|
||||
_initForSize(size);
|
||||
};
|
||||
|
||||
//! copy constructor
|
||||
SparseBitVect(const SparseBitVect &other) : BitVect(other) {
|
||||
d_size = 0;
|
||||
dp_bits = 0;
|
||||
dp_bits = nullptr;
|
||||
_initForSize(other.getNumBits());
|
||||
IntSet *bv = other.dp_bits;
|
||||
std::copy(bv->begin(), bv->end(), std::inserter(*dp_bits, dp_bits->end()));
|
||||
|
||||
@@ -119,7 +119,7 @@ RDKIT_DISTGEOMETRY_EXPORT ForceFields::ForceField *constructForceField(
|
||||
const BoundsMatrix &mmat, RDGeom::PointPtrVect &positions,
|
||||
const VECT_CHIRALSET &csets, double weightChiral = 1.0,
|
||||
double weightFourthDim = 0.1,
|
||||
std::map<std::pair<int, int>, double> *extraWeights = 0,
|
||||
std::map<std::pair<int, int>, double> *extraWeights = nullptr,
|
||||
double basinSizeTol = 5.0, boost::dynamic_bitset<> *fixedPts = nullptr);
|
||||
|
||||
//! Force field with experimental torsion angle preferences and 1-2/1-3 distance
|
||||
|
||||
@@ -19,7 +19,7 @@ class RDKIT_FORCEFIELD_EXPORT ForceFieldContrib {
|
||||
public:
|
||||
friend class ForceField;
|
||||
|
||||
ForceFieldContrib() : dp_forceField(0){};
|
||||
ForceFieldContrib() : dp_forceField(nullptr){};
|
||||
ForceFieldContrib(ForceFields::ForceField *owner) : dp_forceField(owner){};
|
||||
virtual ~ForceFieldContrib(){};
|
||||
|
||||
|
||||
@@ -19,24 +19,25 @@
|
||||
|
||||
namespace RDKit {
|
||||
namespace ForceFieldsHelper {
|
||||
void RDKIT_FORCEFIELD_EXPORT normalizeAngleDeg(double &angleDeg);
|
||||
void RDKIT_FORCEFIELD_EXPORT computeDihedral(const RDGeom::PointPtrVect &pos, unsigned int idx1,
|
||||
unsigned int idx2, unsigned int idx3, unsigned int idx4,
|
||||
double *dihedral = NULL, double *cosPhi = NULL,
|
||||
RDGeom::Point3D r[4] = NULL, RDGeom::Point3D t[2] = NULL,
|
||||
double d[2] = NULL);
|
||||
void RDKIT_FORCEFIELD_EXPORT computeDihedral(const double *pos, unsigned int idx1,
|
||||
unsigned int idx2, unsigned int idx3, unsigned int idx4,
|
||||
double *dihedral = NULL, double *cosPhi = NULL,
|
||||
RDGeom::Point3D r[4] = NULL, RDGeom::Point3D t[2] = NULL,
|
||||
double d[2] = NULL);
|
||||
void RDKIT_FORCEFIELD_EXPORT computeDihedral(const RDGeom::Point3D *p1, const RDGeom::Point3D *p2,
|
||||
const RDGeom::Point3D *p3, const RDGeom::Point3D *p4,
|
||||
double *dihedral = NULL, double *cosPhi = NULL,
|
||||
RDGeom::Point3D r[4] = NULL, RDGeom::Point3D t[2] = NULL,
|
||||
double d[2] = NULL);
|
||||
}
|
||||
}
|
||||
void RDKIT_FORCEFIELD_EXPORT normalizeAngleDeg(double &angleDeg);
|
||||
void RDKIT_FORCEFIELD_EXPORT computeDihedral(
|
||||
const RDGeom::PointPtrVect &pos, unsigned int idx1, unsigned int idx2,
|
||||
unsigned int idx3, unsigned int idx4, double *dihedral = nullptr,
|
||||
double *cosPhi = nullptr, RDGeom::Point3D r[4] = nullptr,
|
||||
RDGeom::Point3D t[2] = nullptr, double d[2] = nullptr);
|
||||
void RDKIT_FORCEFIELD_EXPORT computeDihedral(
|
||||
const double *pos, unsigned int idx1, unsigned int idx2, unsigned int idx3,
|
||||
unsigned int idx4, double *dihedral = nullptr, double *cosPhi = nullptr,
|
||||
RDGeom::Point3D r[4] = nullptr, RDGeom::Point3D t[2] = nullptr,
|
||||
double d[2] = nullptr);
|
||||
void RDKIT_FORCEFIELD_EXPORT
|
||||
computeDihedral(const RDGeom::Point3D *p1, const RDGeom::Point3D *p2,
|
||||
const RDGeom::Point3D *p3, const RDGeom::Point3D *p4,
|
||||
double *dihedral = nullptr, double *cosPhi = nullptr,
|
||||
RDGeom::Point3D r[4] = nullptr, RDGeom::Point3D t[2] = nullptr,
|
||||
double d[2] = nullptr);
|
||||
} // namespace ForceFieldsHelper
|
||||
} // namespace RDKit
|
||||
|
||||
namespace ForceFields {
|
||||
class ForceFieldContrib;
|
||||
@@ -80,7 +81,10 @@ class RDKIT_FORCEFIELD_EXPORT ForceField {
|
||||
public:
|
||||
//! construct with a dimension
|
||||
ForceField(unsigned int dimension = 3)
|
||||
: d_dimension(dimension), df_init(false), d_numPoints(0), dp_distMat(0){};
|
||||
: d_dimension(dimension),
|
||||
df_init(false),
|
||||
d_numPoints(0),
|
||||
dp_distMat(nullptr){};
|
||||
|
||||
~ForceField();
|
||||
|
||||
@@ -101,7 +105,7 @@ class RDKIT_FORCEFIELD_EXPORT ForceField {
|
||||
double *
|
||||
the positions need to be converted to double * here
|
||||
*/
|
||||
double calcEnergy(std::vector<double> *contribs = NULL) const;
|
||||
double calcEnergy(std::vector<double> *contribs = nullptr) const;
|
||||
|
||||
// these next two aren't const because they may update our
|
||||
// distance matrix
|
||||
@@ -200,7 +204,7 @@ class RDKIT_FORCEFIELD_EXPORT ForceField {
|
||||
- if the distance between i and j has not previously been calculated,
|
||||
our internal distance matrix will be updated.
|
||||
*/
|
||||
double distance(unsigned int i, unsigned int j, double *pos = 0);
|
||||
double distance(unsigned int i, unsigned int j, double *pos = nullptr);
|
||||
|
||||
//! returns the distance between two points
|
||||
/*!
|
||||
@@ -215,7 +219,7 @@ class RDKIT_FORCEFIELD_EXPORT ForceField {
|
||||
<b>Note:</b>
|
||||
The internal distance matrix is not updated in this case
|
||||
*/
|
||||
double distance(unsigned int i, unsigned int j, double *pos = 0) const;
|
||||
double distance(unsigned int i, unsigned int j, double *pos = nullptr) const;
|
||||
|
||||
//! returns the dimension of the forcefield
|
||||
unsigned int dimension() const { return d_dimension; }
|
||||
|
||||
@@ -168,7 +168,7 @@ class RDKIT_FORCEFIELD_EXPORT MMFFAromCollection {
|
||||
: false);
|
||||
}
|
||||
|
||||
MMFFAromCollection(const std::uint8_t mmffArom[]=nullptr);
|
||||
MMFFAromCollection(const std::uint8_t mmffArom[] = nullptr);
|
||||
std::vector<std::uint8_t> d_params; //!< the aromatic type vector
|
||||
};
|
||||
|
||||
@@ -187,7 +187,7 @@ class RDKIT_FORCEFIELD_EXPORT MMFFDefCollection {
|
||||
#else
|
||||
return ((atomType && (atomType <= d_params.size()))
|
||||
? &d_params[atomType - 1]
|
||||
: NULL);
|
||||
: nullptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ class RDKIT_FORCEFIELD_EXPORT MMFFPropCollection {
|
||||
|
||||
return ((bounds.first != bounds.second)
|
||||
? &d_params[bounds.first - d_iAtomType.begin()]
|
||||
: NULL);
|
||||
: nullptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ class RDKIT_FORCEFIELD_EXPORT MMFFPBCICollection {
|
||||
#else
|
||||
return ((atomType && (atomType <= d_params.size()))
|
||||
? &d_params[atomType - 1]
|
||||
: NULL);
|
||||
: nullptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ class RDKIT_FORCEFIELD_EXPORT MMFFChgCollection {
|
||||
const unsigned int bondType, const unsigned int iAtomType,
|
||||
const unsigned int jAtomType) const {
|
||||
int sign = -1;
|
||||
const MMFFChg *mmffChgParams = NULL;
|
||||
const MMFFChg *mmffChgParams = nullptr;
|
||||
unsigned int canIAtomType = iAtomType;
|
||||
unsigned int canJAtomType = jAtomType;
|
||||
if (iAtomType > jAtomType) {
|
||||
@@ -341,7 +341,7 @@ class RDKIT_FORCEFIELD_EXPORT MMFFBondCollection {
|
||||
const MMFFBond *operator()(const unsigned int bondType,
|
||||
const unsigned int atomType,
|
||||
const unsigned int nbrAtomType) const {
|
||||
const MMFFBond *mmffBondParams = NULL;
|
||||
const MMFFBond *mmffBondParams = nullptr;
|
||||
unsigned int canAtomType = atomType;
|
||||
unsigned int canNbrAtomType = nbrAtomType;
|
||||
if (atomType > nbrAtomType) {
|
||||
@@ -412,7 +412,7 @@ class RDKIT_FORCEFIELD_EXPORT MMFFBndkCollection {
|
||||
\return a pointer to the MMFFBndk object, NULL on failure.
|
||||
*/
|
||||
const MMFFBond *operator()(const int atomicNum, const int nbrAtomicNum) const {
|
||||
const MMFFBond *mmffBndkParams = NULL;
|
||||
const MMFFBond *mmffBndkParams = nullptr;
|
||||
unsigned int canAtomicNum = atomicNum;
|
||||
unsigned int canNbrAtomicNum = nbrAtomicNum;
|
||||
if (atomicNum > nbrAtomicNum) {
|
||||
@@ -468,7 +468,7 @@ class RDKIT_FORCEFIELD_EXPORT MMFFHerschbachLaurieCollection {
|
||||
\return a pointer to the MMFFHerschbachLaurie object, NULL on failure.
|
||||
*/
|
||||
const MMFFHerschbachLaurie *operator()(const int iRow, const int jRow) const {
|
||||
const MMFFHerschbachLaurie *mmffHerschbachLaurieParams = NULL;
|
||||
const MMFFHerschbachLaurie *mmffHerschbachLaurieParams = nullptr;
|
||||
unsigned int canIRow = iRow;
|
||||
unsigned int canJRow = jRow;
|
||||
if (iRow > jRow) {
|
||||
@@ -538,7 +538,7 @@ class RDKIT_FORCEFIELD_EXPORT MMFFCovRadPauEleCollection {
|
||||
|
||||
return ((bounds.first != bounds.second)
|
||||
? &d_params[bounds.first - d_atomicNum.begin()]
|
||||
: NULL);
|
||||
: nullptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -563,7 +563,7 @@ class RDKIT_FORCEFIELD_EXPORT MMFFAngleCollection {
|
||||
const unsigned int iAtomType,
|
||||
const unsigned int jAtomType,
|
||||
const unsigned int kAtomType) const {
|
||||
const MMFFAngle *mmffAngleParams = NULL;
|
||||
const MMFFAngle *mmffAngleParams = nullptr;
|
||||
unsigned int iter = 0;
|
||||
|
||||
// For bending of the i-j-k angle, a five-stage process based
|
||||
@@ -676,7 +676,7 @@ class RDKIT_FORCEFIELD_EXPORT MMFFStbnCollection {
|
||||
const unsigned int stretchBendType, const unsigned int bondType1,
|
||||
const unsigned int bondType2, const unsigned int iAtomType,
|
||||
const unsigned int jAtomType, const unsigned int kAtomType) const {
|
||||
const MMFFStbn *mmffStbnParams = NULL;
|
||||
const MMFFStbn *mmffStbnParams = nullptr;
|
||||
bool swap = false;
|
||||
unsigned int canIAtomType = iAtomType;
|
||||
unsigned int canKAtomType = kAtomType;
|
||||
@@ -783,7 +783,7 @@ class RDKIT_FORCEFIELD_EXPORT MMFFDfsbCollection {
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFStbn>>::const_iterator res2;
|
||||
std::map<const unsigned int, MMFFStbn>::const_iterator res3;
|
||||
const MMFFStbn *mmffDfsbParams = NULL;
|
||||
const MMFFStbn *mmffDfsbParams = nullptr;
|
||||
bool swap = false;
|
||||
unsigned int canPeriodicTableRow1 = periodicTableRow1;
|
||||
unsigned int canPeriodicTableRow3 = periodicTableRow3;
|
||||
@@ -823,7 +823,7 @@ class RDKIT_FORCEFIELD_EXPORT MMFFOopCollection {
|
||||
const unsigned int jAtomType,
|
||||
const unsigned int kAtomType,
|
||||
const unsigned int lAtomType) const {
|
||||
const MMFFOop *mmffOopParams = NULL;
|
||||
const MMFFOop *mmffOopParams = nullptr;
|
||||
unsigned int iter = 0;
|
||||
std::vector<unsigned int> canIKLAtomType(3);
|
||||
// For out-of-plane bending ijk; I , where j is the central
|
||||
@@ -933,7 +933,7 @@ class RDKIT_FORCEFIELD_EXPORT MMFFTorCollection {
|
||||
const std::pair<unsigned int, unsigned int> torType,
|
||||
const unsigned int iAtomType, const unsigned int jAtomType,
|
||||
const unsigned int kAtomType, const unsigned int lAtomType) const {
|
||||
const MMFFTor *mmffTorParams = NULL;
|
||||
const MMFFTor *mmffTorParams = nullptr;
|
||||
unsigned int iter = 0;
|
||||
unsigned int iWildCard = 0;
|
||||
unsigned int lWildCard = 0;
|
||||
@@ -1117,7 +1117,7 @@ class RDKIT_FORCEFIELD_EXPORT MMFFVdWCollection {
|
||||
|
||||
return ((bounds.first != bounds.second)
|
||||
? &d_params[bounds.first - d_atomType.begin()]
|
||||
: NULL);
|
||||
: nullptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ class RDKIT_FORCEFIELD_EXPORT ParamCollection {
|
||||
if (res != d_params.end()) {
|
||||
return &((*res).second);
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -38,8 +38,8 @@ class RDKIT_RDGEOMETRYLIB_EXPORT UniformGrid3D : public Grid3D {
|
||||
UniformGrid3D(double dimX, double dimY, double dimZ, double spacing = 0.5,
|
||||
RDKit::DiscreteValueVect::DiscreteValueType valType =
|
||||
RDKit::DiscreteValueVect::TWOBITVALUE,
|
||||
const RDGeom::Point3D *offset = 0) {
|
||||
if (offset == 0) {
|
||||
const RDGeom::Point3D *offset = nullptr) {
|
||||
if (offset == nullptr) {
|
||||
initGrid(dimX, dimY, dimZ, spacing, valType,
|
||||
Point3D(-0.5 * dimX, -0.5 * dimY, -0.5 * dimZ));
|
||||
} else {
|
||||
@@ -187,7 +187,7 @@ class RDKIT_RDGEOMETRYLIB_EXPORT UniformGrid3D : public Grid3D {
|
||||
void initGrid(double dimX, double dimY, double dimZ, double spacing,
|
||||
RDKit::DiscreteValueVect::DiscreteValueType valType,
|
||||
const RDGeom::Point3D &offSet,
|
||||
RDKit::DiscreteValueVect *data = 0);
|
||||
RDKit::DiscreteValueVect *data = nullptr);
|
||||
unsigned int d_numX, d_numY,
|
||||
d_numZ; //! number of grid points along x, y, z axes
|
||||
double d_spacing; //! grid spacing
|
||||
|
||||
@@ -28,7 +28,7 @@ class RDKIT_GRAPHMOL_EXPORT BondIterator_ {
|
||||
// FIX: I'm not pleased with the lack of internal testing code
|
||||
// (PREs and the like) in here
|
||||
public:
|
||||
BondIterator_() : _mol(NULL){};
|
||||
BondIterator_() : _mol(nullptr){};
|
||||
BondIterator_(ROMol *mol);
|
||||
BondIterator_(ROMol *mol, ROMol::EDGE_ITER pos);
|
||||
BondIterator_(const BondIterator_ &other);
|
||||
@@ -51,7 +51,7 @@ class RDKIT_GRAPHMOL_EXPORT BondIterator_ {
|
||||
//! but it theoretically ought to be RandomAccess.
|
||||
class RDKIT_GRAPHMOL_EXPORT ConstBondIterator_ {
|
||||
public:
|
||||
ConstBondIterator_() : _mol(NULL){};
|
||||
ConstBondIterator_() : _mol(nullptr){};
|
||||
ConstBondIterator_(ROMol const *mol);
|
||||
ConstBondIterator_(ROMol const *mol, ROMol::EDGE_ITER pos);
|
||||
ConstBondIterator_(const ConstBondIterator_ &other);
|
||||
|
||||
@@ -114,8 +114,8 @@ typedef boost::tuple<int, int, Bond *> PossibleType;
|
||||
RDKIT_GRAPHMOL_EXPORT void canonicalizeFragment(
|
||||
ROMol &mol, int atomIdx, std::vector<AtomColors> &colors,
|
||||
const std::vector<unsigned int> &ranks, MolStack &molStack,
|
||||
const boost::dynamic_bitset<> *bondsInPlay = 0,
|
||||
const std::vector<std::string> *bondSymbols = 0,
|
||||
const boost::dynamic_bitset<> *bondsInPlay = nullptr,
|
||||
const std::vector<std::string> *bondSymbols = nullptr,
|
||||
bool doIsomericSmiles = false, bool doRandom = false);
|
||||
|
||||
//! Check if a chiral atom needs to have its tag flipped after reading or before
|
||||
|
||||
@@ -72,7 +72,7 @@ class RDKIT_CHEMREACTIONS_EXPORT EnumerateLibraryBase {
|
||||
|
||||
//! construct with a chemical reaction and an enumeration strategy
|
||||
EnumerateLibraryBase(const ChemicalReaction &rxn,
|
||||
EnumerationStrategyBase *enumerator = 0)
|
||||
EnumerationStrategyBase *enumerator = nullptr)
|
||||
: m_rxn(rxn),
|
||||
m_enumerator(enumerator ? enumerator : new CartesianProductStrategy),
|
||||
m_initialEnumerator(m_enumerator->copy()) {
|
||||
@@ -82,7 +82,7 @@ class RDKIT_CHEMREACTIONS_EXPORT EnumerateLibraryBase {
|
||||
//! Copy constructor
|
||||
EnumerateLibraryBase(const EnumerateLibraryBase &rhs)
|
||||
: m_rxn(rhs.m_rxn),
|
||||
m_enumerator(rhs.m_enumerator ? rhs.m_enumerator->copy() : 0),
|
||||
m_enumerator(rhs.m_enumerator ? rhs.m_enumerator->copy() : nullptr),
|
||||
m_initialEnumerator(m_enumerator->copy()) {}
|
||||
|
||||
virtual ~EnumerateLibraryBase() {}
|
||||
|
||||
@@ -185,7 +185,7 @@ class RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction : public RDProps {
|
||||
*/
|
||||
void removeUnmappedReactantTemplates(double thresholdUnmappedAtoms = 0.2,
|
||||
bool moveToAgentTemplates = true,
|
||||
MOL_SPTR_VECT *targetVector = NULL);
|
||||
MOL_SPTR_VECT *targetVector = nullptr);
|
||||
|
||||
//! Removes the product templates from a reaction if its atom mapping ratio is
|
||||
// below a given threshold
|
||||
@@ -196,11 +196,11 @@ class RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction : public RDProps {
|
||||
*/
|
||||
void removeUnmappedProductTemplates(double thresholdUnmappedAtoms = 0.2,
|
||||
bool moveToAgentTemplates = true,
|
||||
MOL_SPTR_VECT *targetVector = NULL);
|
||||
MOL_SPTR_VECT *targetVector = nullptr);
|
||||
|
||||
/*! Removes the agent templates from a reaction if a pointer to a
|
||||
molecule vector is provided the agents are stored therein.*/
|
||||
void removeAgentTemplates(MOL_SPTR_VECT *targetVector = NULL);
|
||||
void removeAgentTemplates(MOL_SPTR_VECT *targetVector = nullptr);
|
||||
|
||||
//! Runs the reaction on a set of reactants
|
||||
/*!
|
||||
@@ -437,7 +437,7 @@ RDKIT_CHEMREACTIONS_EXPORT void addRecursiveQueriesToReaction(
|
||||
ChemicalReaction &rxn, const std::map<std::string, ROMOL_SPTR> &queries,
|
||||
const std::string &propName,
|
||||
std::vector<std::vector<std::pair<unsigned int, std::string>>>
|
||||
*reactantLabels = NULL);
|
||||
*reactantLabels = nullptr);
|
||||
|
||||
} // namespace RDKit
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction *RxnDataStreamToChemicalReaction(
|
||||
*/
|
||||
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction *RxnSmartsToChemicalReaction(
|
||||
const std::string &text,
|
||||
std::map<std::string, std::string> *replacements = 0,
|
||||
std::map<std::string, std::string> *replacements = nullptr,
|
||||
bool useSmiles = false);
|
||||
|
||||
//! Parse a ROMol into a ChemicalReaction, RXN role must be set before
|
||||
|
||||
@@ -230,7 +230,8 @@ RDKIT_CHEMTRANSFORMS_EXPORT ROMol *combineMols(
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT void addRecursiveQueries(
|
||||
ROMol &mol, const std::map<std::string, ROMOL_SPTR> &queries,
|
||||
const std::string &propName,
|
||||
std::vector<std::pair<unsigned int, std::string>> *reactantLabels = NULL);
|
||||
std::vector<std::pair<unsigned int, std::string>> *reactantLabels =
|
||||
nullptr);
|
||||
|
||||
//! \brief parses a query definition file and sets up a set of definitions
|
||||
//! suitable for use by addRecursiveQueries()
|
||||
|
||||
@@ -50,21 +50,23 @@ struct RDKIT_CHEMTRANSFORMS_EXPORT FragmenterBondType {
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT ROMol *fragmentOnBonds(
|
||||
const ROMol &mol, const std::vector<unsigned int> &bondIndices,
|
||||
bool addDummies = true,
|
||||
const std::vector<std::pair<unsigned int, unsigned int>> *dummyLabels = 0,
|
||||
const std::vector<Bond::BondType> *bondTypes = 0,
|
||||
std::vector<unsigned int> *nCutsPerAtom = 0);
|
||||
const std::vector<std::pair<unsigned int, unsigned int>> *dummyLabels =
|
||||
nullptr,
|
||||
const std::vector<Bond::BondType> *bondTypes = nullptr,
|
||||
std::vector<unsigned int> *nCutsPerAtom = nullptr);
|
||||
//! \overload
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT ROMol *fragmentOnBonds(
|
||||
const ROMol &mol, const std::vector<FragmenterBondType> &bondPatterns,
|
||||
const std::map<unsigned int, ROMOL_SPTR> *atomEnvirons = 0,
|
||||
std::vector<unsigned int> *nCutsPerAtom = 0);
|
||||
const std::map<unsigned int, ROMOL_SPTR> *atomEnvirons = nullptr,
|
||||
std::vector<unsigned int> *nCutsPerAtom = nullptr);
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT void fragmentOnSomeBonds(
|
||||
const ROMol &mol, const std::vector<unsigned int> &bondIndices,
|
||||
std::vector<ROMOL_SPTR> &resMols, unsigned int maxToCut = 1,
|
||||
bool addDummies = true,
|
||||
const std::vector<std::pair<unsigned int, unsigned int>> *dummyLabels = 0,
|
||||
const std::vector<Bond::BondType> *bondTypes = 0,
|
||||
std::vector<std::vector<unsigned int>> *nCutsPerAtom = 0);
|
||||
const std::vector<std::pair<unsigned int, unsigned int>> *dummyLabels =
|
||||
nullptr,
|
||||
const std::vector<Bond::BondType> *bondTypes = nullptr,
|
||||
std::vector<std::vector<unsigned int>> *nCutsPerAtom = nullptr);
|
||||
|
||||
//! \brief Fragments a molecule by breaking all BRICS bonds
|
||||
/*!
|
||||
@@ -77,14 +79,14 @@ RDKIT_CHEMTRANSFORMS_EXPORT ROMol *fragmentOnBRICSBonds(const ROMol &mol);
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT void constructFragmenterAtomTypes(
|
||||
std::istream *inStream, std::map<unsigned int, std::string> &defs,
|
||||
const std::string &comment = "//", bool validate = true,
|
||||
std::map<unsigned int, ROMOL_SPTR> *environs = 0);
|
||||
std::map<unsigned int, ROMOL_SPTR> *environs = nullptr);
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT void constructFragmenterAtomTypes(
|
||||
const std::string &str, std::map<unsigned int, std::string> &defs,
|
||||
const std::string &comment = "//", bool validate = true,
|
||||
std::map<unsigned int, ROMOL_SPTR> *environs = 0);
|
||||
std::map<unsigned int, ROMOL_SPTR> *environs = nullptr);
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT void constructBRICSAtomTypes(
|
||||
std::map<unsigned int, std::string> &defs,
|
||||
std::map<unsigned int, ROMOL_SPTR> *environs = 0);
|
||||
std::map<unsigned int, ROMOL_SPTR> *environs = nullptr);
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT void constructFragmenterBondTypes(
|
||||
std::istream *inStream,
|
||||
const std::map<unsigned int, std::string> &atomTypes,
|
||||
|
||||
@@ -45,10 +45,12 @@ class RDKIT_GRAPHMOL_EXPORT Conformer : public RDProps {
|
||||
friend class ROMol;
|
||||
|
||||
//! Constructor
|
||||
Conformer() : df_is3D(true), d_id(0), dp_mol(NULL) { d_positions.clear(); };
|
||||
Conformer() : df_is3D(true), d_id(0), dp_mol(nullptr) {
|
||||
d_positions.clear();
|
||||
};
|
||||
|
||||
//! Constructor with number of atoms specified ID specification
|
||||
Conformer(unsigned int numAtoms) : df_is3D(true), d_id(0), dp_mol(NULL) {
|
||||
Conformer(unsigned int numAtoms) : df_is3D(true), d_id(0), dp_mol(nullptr) {
|
||||
if (numAtoms) {
|
||||
d_positions.resize(numAtoms, RDGeom::Point3D(0.0, 0.0, 0.0));
|
||||
} else {
|
||||
|
||||
@@ -350,7 +350,7 @@ class RDKIT_DEPICTOR_EXPORT EmbeddedFrag {
|
||||
void randomSampleFlipsAndPermutations(unsigned int nBondsPerSample = 3,
|
||||
unsigned int nSamples = 100,
|
||||
int seed = 100,
|
||||
const DOUBLE_SMART_PTR *dmat = 0,
|
||||
const DOUBLE_SMART_PTR *dmat = nullptr,
|
||||
double mimicDmatWt = 0.0,
|
||||
bool permuteDeg4Nodes = false);
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ class RDKIT_DEPICTOR_EXPORT DepictException : public std::exception {
|
||||
|
||||
*/
|
||||
RDKIT_DEPICTOR_EXPORT unsigned int compute2DCoords(
|
||||
RDKit::ROMol &mol, const RDGeom::INT_POINT2D_MAP *coordMap = 0,
|
||||
RDKit::ROMol &mol, const RDGeom::INT_POINT2D_MAP *coordMap = nullptr,
|
||||
bool canonOrient = false, bool clearConfs = true,
|
||||
unsigned int nFlipsPerSample = 0, unsigned int nSamples = 0,
|
||||
int sampleSeed = 0, bool permuteDeg4Nodes = false, bool forceRDKit = false);
|
||||
@@ -126,7 +126,7 @@ RDKIT_DEPICTOR_EXPORT unsigned int compute2DCoords(
|
||||
|
||||
*/
|
||||
RDKIT_DEPICTOR_EXPORT unsigned int compute2DCoordsMimicDistMat(
|
||||
RDKit::ROMol &mol, const DOUBLE_SMART_PTR *dmat = 0,
|
||||
RDKit::ROMol &mol, const DOUBLE_SMART_PTR *dmat = nullptr,
|
||||
bool canonOrient = true, bool clearConfs = true, double weightDistMat = 0.5,
|
||||
unsigned int nFlipsPerSample = 3, unsigned int nSamples = 100,
|
||||
int sampleSeed = 25, bool permuteDeg4Nodes = true, bool forceRDKit = false);
|
||||
@@ -159,7 +159,7 @@ RDKIT_DEPICTOR_EXPORT unsigned int compute2DCoordsMimicDistMat(
|
||||
*/
|
||||
RDKIT_DEPICTOR_EXPORT void generateDepictionMatching2DStructure(
|
||||
RDKit::ROMol &mol, const RDKit::ROMol &reference, int confId = -1,
|
||||
RDKit::ROMol *referencePattern = static_cast<RDKit::ROMol *>(0),
|
||||
RDKit::ROMol *referencePattern = static_cast<RDKit::ROMol *>(nullptr),
|
||||
bool acceptFailure = false, bool forceRDKit = false);
|
||||
|
||||
//! \brief Generate a 2D depiction for a molecule where all or part of
|
||||
@@ -186,7 +186,7 @@ RDKIT_DEPICTOR_EXPORT void generateDepictionMatching2DStructure(
|
||||
*/
|
||||
RDKIT_DEPICTOR_EXPORT void generateDepictionMatching3DStructure(
|
||||
RDKit::ROMol &mol, const RDKit::ROMol &reference, int confId = -1,
|
||||
RDKit::ROMol *referencePattern = 0, bool acceptFailure = false,
|
||||
RDKit::ROMol *referencePattern = nullptr, bool acceptFailure = false,
|
||||
bool forceRDKit = false);
|
||||
}; // namespace RDDepict
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ const std::string chiNnVersion = "1.2.0";
|
||||
Note: this can be a time-consuming calculation.
|
||||
*/
|
||||
RDKIT_DESCRIPTORS_EXPORT double calcHallKierAlpha(
|
||||
const ROMol &mol, std::vector<double> *atomContribs = 0);
|
||||
const ROMol &mol, std::vector<double> *atomContribs = nullptr);
|
||||
const std::string hallKierAlphaVersion = "1.2.0";
|
||||
|
||||
//! calculate the Hall-Kier kappa1 value for a molecule
|
||||
|
||||
@@ -50,8 +50,8 @@ const std::string crippenVersion = "1.2.0";
|
||||
RDKIT_DESCRIPTORS_EXPORT void getCrippenAtomContribs(
|
||||
const ROMol &mol, std::vector<double> &logpContribs,
|
||||
std::vector<double> &mrContribs, bool force = false,
|
||||
std::vector<unsigned int> *atomTypes = 0,
|
||||
std::vector<std::string> *atomTypeLabels = 0);
|
||||
std::vector<unsigned int> *atomTypes = nullptr,
|
||||
std::vector<std::string> *atomTypeLabels = nullptr);
|
||||
|
||||
//! generate Wildman-Crippen LogP and MR estimates for a molecule
|
||||
/*!
|
||||
|
||||
@@ -143,13 +143,13 @@ RDKIT_DESCRIPTORS_EXPORT extern const std::string NumSpiroAtomsVersion;
|
||||
//! calculates the number of spiro atoms (atoms shared between rings that share
|
||||
// exactly one atom)
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumSpiroAtoms(
|
||||
const ROMol &mol, std::vector<unsigned int> *atoms = NULL);
|
||||
const ROMol &mol, std::vector<unsigned int> *atoms = nullptr);
|
||||
|
||||
RDKIT_DESCRIPTORS_EXPORT extern const std::string NumBridgeheadAtomsVersion;
|
||||
//! calculates the number of bridgehead atoms (atoms shared between rings that
|
||||
// share at least two bonds)
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumBridgeheadAtoms(
|
||||
const ROMol &mol, std::vector<unsigned int> *atoms = NULL);
|
||||
const ROMol &mol, std::vector<unsigned int> *atoms = nullptr);
|
||||
|
||||
RDKIT_DESCRIPTORS_EXPORT extern const std::string NumAtomStereoCentersVersion;
|
||||
//! calculates the total number of atom stereo centers
|
||||
|
||||
@@ -105,11 +105,11 @@ RDKIT_DESCRIPTORS_EXPORT double calcTPSA(const ROMol &mol, bool force = false,
|
||||
bool includeSandP = false);
|
||||
|
||||
RDKIT_DESCRIPTORS_EXPORT std::vector<double> calcSlogP_VSA(
|
||||
const ROMol &mol, std::vector<double> *bins = 0, bool force = false);
|
||||
const ROMol &mol, std::vector<double> *bins = nullptr, bool force = false);
|
||||
RDKIT_DESCRIPTORS_EXPORT std::vector<double> calcSMR_VSA(
|
||||
const ROMol &mol, std::vector<double> *bins = 0, bool force = false);
|
||||
const ROMol &mol, std::vector<double> *bins = nullptr, bool force = false);
|
||||
RDKIT_DESCRIPTORS_EXPORT std::vector<double> calcPEOE_VSA(
|
||||
const ROMol &mol, std::vector<double> *bins = 0, bool force = false);
|
||||
const ROMol &mol, std::vector<double> *bins = nullptr, bool force = false);
|
||||
RDKIT_DESCRIPTORS_EXPORT std::vector<double> calcCustomProp_VSA(
|
||||
const ROMol &mol, const std::string &customPropName,
|
||||
const std::vector<double> &bins, bool force = false);
|
||||
|
||||
@@ -51,7 +51,7 @@ struct RDKIT_DESCRIPTORS_EXPORT PropertyFunctor {
|
||||
double (*d_dataFunc)(const ROMol &);
|
||||
|
||||
PropertyFunctor(const std::string &name, const std::string &version,
|
||||
double (*func)(const ROMol &) = NULL)
|
||||
double (*func)(const ROMol &) = nullptr)
|
||||
: propName(name), propVersion(version), d_dataFunc(func) {}
|
||||
virtual ~PropertyFunctor(){};
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ struct RDKIT_DISTGEOMHELPERS_EXPORT EmbedParameters {
|
||||
boxSizeMult(2.0),
|
||||
randNegEig(true),
|
||||
numZeroFail(1),
|
||||
coordMap(NULL),
|
||||
coordMap(nullptr),
|
||||
optimizerForceTol(1e-3),
|
||||
ignoreSmoothingFailures(false),
|
||||
enforceChirality(true),
|
||||
@@ -282,7 +282,7 @@ inline int EmbedMolecule(
|
||||
bool clearConfs = true, bool useRandomCoords = false,
|
||||
double boxSizeMult = 2.0, bool randNegEig = true,
|
||||
unsigned int numZeroFail = 1,
|
||||
const std::map<int, RDGeom::Point3D> *coordMap = 0,
|
||||
const std::map<int, RDGeom::Point3D> *coordMap = nullptr,
|
||||
double optimizerForceTol = 1e-3, bool ignoreSmoothingFailures = false,
|
||||
bool enforceChirality = true, bool useExpTorsionAnglePrefs = false,
|
||||
bool useBasicKnowledge = false, bool verbose = false,
|
||||
@@ -381,7 +381,7 @@ inline void EmbedMultipleConfs(
|
||||
bool useRandomCoords = false, double boxSizeMult = 2.0,
|
||||
bool randNegEig = true, unsigned int numZeroFail = 1,
|
||||
double pruneRmsThresh = -1.0,
|
||||
const std::map<int, RDGeom::Point3D> *coordMap = 0,
|
||||
const std::map<int, RDGeom::Point3D> *coordMap = nullptr,
|
||||
double optimizerForceTol = 1e-3, bool ignoreSmoothingFailures = false,
|
||||
bool enforceChirality = true, bool useExpTorsionAnglePrefs = false,
|
||||
bool useBasicKnowledge = false, bool verbose = false,
|
||||
@@ -403,7 +403,7 @@ inline INT_VECT EmbedMultipleConfs(
|
||||
int seed = -1, bool clearConfs = true, bool useRandomCoords = false,
|
||||
double boxSizeMult = 2.0, bool randNegEig = true,
|
||||
unsigned int numZeroFail = 1, double pruneRmsThresh = -1.0,
|
||||
const std::map<int, RDGeom::Point3D> *coordMap = 0,
|
||||
const std::map<int, RDGeom::Point3D> *coordMap = nullptr,
|
||||
double optimizerForceTol = 1e-3, bool ignoreSmoothingFailures = false,
|
||||
bool enforceChirality = true, bool useExpTorsionAnglePrefs = false,
|
||||
bool useBasicKnowledge = false, bool verbose = false,
|
||||
|
||||
@@ -67,7 +67,7 @@ static inline int gettimeofday(struct timeval *tv, struct timezone *tz) {
|
||||
unsigned __int64 tmpres = 0;
|
||||
static int tzflag;
|
||||
|
||||
if (NULL != tv) {
|
||||
if (nullptr != tv) {
|
||||
GetSystemTimeAsFileTime(&ft);
|
||||
|
||||
tmpres |= ft.dwHighDateTime;
|
||||
@@ -81,7 +81,7 @@ static inline int gettimeofday(struct timeval *tv, struct timezone *tz) {
|
||||
tv->tv_usec = (long)(tmpres % 1000000UL);
|
||||
}
|
||||
|
||||
if (NULL != tz) {
|
||||
if (nullptr != tz) {
|
||||
if (!tzflag) {
|
||||
_tzset();
|
||||
tzflag++;
|
||||
@@ -96,7 +96,7 @@ static inline int gettimeofday(struct timeval *tv, struct timezone *tz) {
|
||||
static inline unsigned long long nanoClock(
|
||||
void) { // actually returns microseconds
|
||||
struct timeval t;
|
||||
gettimeofday(&t, (struct timezone *)0);
|
||||
gettimeofday(&t, (struct timezone *)nullptr);
|
||||
return t.tv_usec + t.tv_sec * 1000000ULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ RDKIT_FMCS_EXPORT void parseMCSParametersJSON(const char* json,
|
||||
MCSParameters* params);
|
||||
|
||||
RDKIT_FMCS_EXPORT MCSResult findMCS(const std::vector<ROMOL_SPTR>& mols,
|
||||
const MCSParameters* params = 0);
|
||||
const MCSParameters* params = nullptr);
|
||||
RDKIT_FMCS_EXPORT MCSResult findMCS_P(const std::vector<ROMOL_SPTR>& mols,
|
||||
const char* params_json);
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ class RDKIT_FMCS_EXPORT RingMatchTableSet {
|
||||
std::map<const INT_VECT*, unsigned> QueryRingIndex;
|
||||
|
||||
public:
|
||||
RingMatchTableSet() : QueryBondRingsIndeces(0) {}
|
||||
RingMatchTableSet() : QueryBondRingsIndeces(nullptr) {}
|
||||
|
||||
inline void clear() {
|
||||
if (QueryBondRingsIndeces) QueryBondRingsIndeces->clear();
|
||||
@@ -170,7 +170,7 @@ class RDKIT_FMCS_EXPORT RingMatchTableSet {
|
||||
#else // noticeable slowly:
|
||||
FMCS::SubstructMatchCustom(
|
||||
graph2, *targetMolecule, graph1, *query, parameters.AtomTyper,
|
||||
parameters.BondTyper, NULL, parameters.AtomCompareParameters,
|
||||
parameters.BondTyper, nullptr, parameters.AtomCompareParameters,
|
||||
bp, parameters.CompareFunctionsUserData);
|
||||
#endif
|
||||
if (match) m.setMatch(i, &*r2);
|
||||
|
||||
@@ -47,7 +47,7 @@ struct RDKIT_FMCS_EXPORT NewBond {
|
||||
: SourceAtomIdx(-1),
|
||||
BondIdx(-1),
|
||||
NewAtomIdx(-1),
|
||||
NewAtom(0),
|
||||
NewAtom(nullptr),
|
||||
EndAtomIdx(-1) {}
|
||||
|
||||
NewBond(unsigned from_atom, unsigned bond_idx, unsigned new_atom,
|
||||
|
||||
@@ -27,9 +27,9 @@ RDKIT_FMCS_EXPORT bool SubstructMatchCustomTable(
|
||||
const ROMol& querySrc // seed and full source query molecules
|
||||
,
|
||||
const MatchTable& atomMatchTable, const MatchTable& bondMatchTable,
|
||||
const MCSParameters* parameters = 0 // for final checker (CHIRALITY)
|
||||
const MCSParameters* parameters = nullptr // for final checker (CHIRALITY)
|
||||
,
|
||||
match_V_t* match = 0);
|
||||
match_V_t* match = nullptr);
|
||||
|
||||
RDKIT_FMCS_EXPORT bool SubstructMatchCustom(
|
||||
const FMCS::Graph& target, const ROMol& mol, const FMCS::Graph& query,
|
||||
@@ -38,6 +38,6 @@ RDKIT_FMCS_EXPORT bool SubstructMatchCustom(
|
||||
MCSAtomCompareFunction atomCompare, MCSBondCompareFunction bondCompare,
|
||||
MCSFinalMatchCheckFunction finalCompare,
|
||||
const MCSAtomCompareParameters& acp, const MCSBondCompareParameters& bcp,
|
||||
void* user_data, match_V_t* match = 0);
|
||||
void* user_data, match_V_t* match = nullptr);
|
||||
} // namespace FMCS
|
||||
} // namespace RDKit
|
||||
|
||||
@@ -125,7 +125,7 @@ class RDKIT_FMCS_EXPORT SubstructureCache {
|
||||
std::map<KeyNumericMetrics::TValue, size_t>::const_iterator entryit =
|
||||
NumericIndex.find(key.NumericMetrics.Value);
|
||||
if (NumericIndex.end() != entryit) return &ValueStorage[entryit->second];
|
||||
return NULL; // not found
|
||||
return nullptr; // not found
|
||||
}
|
||||
|
||||
// if find() did not found any entry for this key of seed a new entry will be
|
||||
|
||||
@@ -126,7 +126,7 @@ class RDKIT_FILEPARSERS_EXPORT ForwardSDMolSupplier : public MolSupplier {
|
||||
if (df_owner && dp_inStream) {
|
||||
delete dp_inStream;
|
||||
df_owner = false;
|
||||
dp_inStream = NULL;
|
||||
dp_inStream = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ class RDKIT_FILEPARSERS_EXPORT SDWriter : public MolWriter {
|
||||
//! \brief return the text that would be written to the file
|
||||
static std::string getText(const ROMol &mol, int confId = defaultConfId,
|
||||
bool kekulize = true, bool force_V3000 = false,
|
||||
int molid = -1, STR_VECT *propNames = NULL);
|
||||
int molid = -1, STR_VECT *propNames = nullptr);
|
||||
|
||||
//! \brief write a new molecule to the file
|
||||
void write(const ROMol &mol, int confId = defaultConfId);
|
||||
|
||||
@@ -546,12 +546,12 @@ class RDKIT_FILTERCATALOG_EXPORT FilterHierarchyMatcher
|
||||
// Register all known filter matcher types for serialization
|
||||
template <class Archive>
|
||||
void registerFilterMatcherTypes(Archive &ar) {
|
||||
ar.register_type(static_cast<FilterMatchOps::And *>(NULL));
|
||||
ar.register_type(static_cast<FilterMatchOps::Or *>(NULL));
|
||||
ar.register_type(static_cast<FilterMatchOps::Not *>(NULL));
|
||||
ar.register_type(static_cast<SmartsMatcher *>(NULL));
|
||||
ar.register_type(static_cast<ExclusionList *>(NULL));
|
||||
ar.register_type(static_cast<FilterHierarchyMatcher *>(NULL));
|
||||
ar.register_type(static_cast<FilterMatchOps::And *>(nullptr));
|
||||
ar.register_type(static_cast<FilterMatchOps::Or *>(nullptr));
|
||||
ar.register_type(static_cast<FilterMatchOps::Not *>(nullptr));
|
||||
ar.register_type(static_cast<SmartsMatcher *>(nullptr));
|
||||
ar.register_type(static_cast<ExclusionList *>(nullptr));
|
||||
ar.register_type(static_cast<FilterHierarchyMatcher *>(nullptr));
|
||||
}
|
||||
#endif
|
||||
} // namespace RDKit
|
||||
|
||||
@@ -55,9 +55,9 @@ unsigned int GetNumPropertyEntries(FilterCatalogParams::FilterCatalogs catalog);
|
||||
const FilterProperty_t *GetFilterProperties(
|
||||
FilterCatalogParams::FilterCatalogs catalog);
|
||||
|
||||
FilterCatalogEntry *MakeFilterCatalogEntry(const FilterData_t &,
|
||||
unsigned int num_props = 0,
|
||||
const FilterProperty_t *props = 0);
|
||||
FilterCatalogEntry *MakeFilterCatalogEntry(
|
||||
const FilterData_t &, unsigned int num_props = 0,
|
||||
const FilterProperty_t *props = nullptr);
|
||||
} // namespace RDKit
|
||||
|
||||
#endif
|
||||
|
||||
@@ -79,15 +79,15 @@ const std::string atomPairsVersion = "1.1.0";
|
||||
*/
|
||||
RDKIT_FINGERPRINTS_EXPORT SparseIntVect<std::int32_t> *getAtomPairFingerprint(
|
||||
const ROMol &mol, unsigned int minLength, unsigned int maxLength,
|
||||
const std::vector<std::uint32_t> *fromAtoms = 0,
|
||||
const std::vector<std::uint32_t> *ignoreAtoms = 0,
|
||||
const std::vector<std::uint32_t> *atomInvariants = 0,
|
||||
const std::vector<std::uint32_t> *fromAtoms = nullptr,
|
||||
const std::vector<std::uint32_t> *ignoreAtoms = nullptr,
|
||||
const std::vector<std::uint32_t> *atomInvariants = nullptr,
|
||||
bool includeChirality = false, bool use2D = true, int confId = -1);
|
||||
//! \overload
|
||||
RDKIT_FINGERPRINTS_EXPORT SparseIntVect<std::int32_t> *getAtomPairFingerprint(
|
||||
const ROMol &mol, const std::vector<std::uint32_t> *fromAtoms = 0,
|
||||
const std::vector<std::uint32_t> *ignoreAtoms = 0,
|
||||
const std::vector<std::uint32_t> *atomInvariants = 0,
|
||||
const ROMol &mol, const std::vector<std::uint32_t> *fromAtoms = nullptr,
|
||||
const std::vector<std::uint32_t> *ignoreAtoms = nullptr,
|
||||
const std::vector<std::uint32_t> *atomInvariants = nullptr,
|
||||
bool includeChirality = false, bool use2D = true, int confId = -1);
|
||||
|
||||
//! returns the hashed atom-pair fingerprint for a molecule
|
||||
@@ -121,9 +121,9 @@ RDKIT_FINGERPRINTS_EXPORT SparseIntVect<std::int32_t>
|
||||
*getHashedAtomPairFingerprint(
|
||||
const ROMol &mol, unsigned int nBits = 2048, unsigned int minLength = 1,
|
||||
unsigned int maxLength = maxPathLen - 1,
|
||||
const std::vector<std::uint32_t> *fromAtoms = 0,
|
||||
const std::vector<std::uint32_t> *ignoreAtoms = 0,
|
||||
const std::vector<std::uint32_t> *atomInvariants = 0,
|
||||
const std::vector<std::uint32_t> *fromAtoms = nullptr,
|
||||
const std::vector<std::uint32_t> *ignoreAtoms = nullptr,
|
||||
const std::vector<std::uint32_t> *atomInvariants = nullptr,
|
||||
bool includeChirality = false, bool use2D = true, int confId = -1);
|
||||
//! returns the hashed atom-pair fingerprint for a molecule as a bit vector
|
||||
/*!
|
||||
@@ -158,9 +158,9 @@ RDKIT_FINGERPRINTS_EXPORT ExplicitBitVect *
|
||||
getHashedAtomPairFingerprintAsBitVect(
|
||||
const ROMol &mol, unsigned int nBits = 2048, unsigned int minLength = 1,
|
||||
unsigned int maxLength = maxPathLen - 1,
|
||||
const std::vector<std::uint32_t> *fromAtoms = 0,
|
||||
const std::vector<std::uint32_t> *ignoreAtoms = 0,
|
||||
const std::vector<std::uint32_t> *atomInvariants = 0,
|
||||
const std::vector<std::uint32_t> *fromAtoms = nullptr,
|
||||
const std::vector<std::uint32_t> *ignoreAtoms = nullptr,
|
||||
const std::vector<std::uint32_t> *atomInvariants = nullptr,
|
||||
unsigned int nBitsPerEntry = 4, bool includeChirality = false,
|
||||
bool use2D = true, int confId = -1);
|
||||
|
||||
@@ -193,9 +193,9 @@ getHashedAtomPairFingerprintAsBitVect(
|
||||
RDKIT_FINGERPRINTS_EXPORT SparseIntVect<boost::int64_t>
|
||||
*getTopologicalTorsionFingerprint(
|
||||
const ROMol &mol, unsigned int targetSize = 4,
|
||||
const std::vector<std::uint32_t> *fromAtoms = 0,
|
||||
const std::vector<std::uint32_t> *ignoreAtoms = 0,
|
||||
const std::vector<std::uint32_t> *atomInvariants = 0,
|
||||
const std::vector<std::uint32_t> *fromAtoms = nullptr,
|
||||
const std::vector<std::uint32_t> *ignoreAtoms = nullptr,
|
||||
const std::vector<std::uint32_t> *atomInvariants = nullptr,
|
||||
bool includeChirality = false);
|
||||
//! returns a hashed topological-torsion fingerprint for a molecule
|
||||
/*!
|
||||
@@ -227,9 +227,9 @@ RDKIT_FINGERPRINTS_EXPORT SparseIntVect<boost::int64_t>
|
||||
RDKIT_FINGERPRINTS_EXPORT SparseIntVect<boost::int64_t> *
|
||||
getHashedTopologicalTorsionFingerprint(
|
||||
const ROMol &mol, unsigned int nBits = 2048, unsigned int targetSize = 4,
|
||||
const std::vector<std::uint32_t> *fromAtoms = 0,
|
||||
const std::vector<std::uint32_t> *ignoreAtoms = 0,
|
||||
const std::vector<std::uint32_t> *atomInvariants = 0,
|
||||
const std::vector<std::uint32_t> *fromAtoms = nullptr,
|
||||
const std::vector<std::uint32_t> *ignoreAtoms = nullptr,
|
||||
const std::vector<std::uint32_t> *atomInvariants = nullptr,
|
||||
bool includeChirality = false);
|
||||
//! returns a hashed topological-torsion fingerprint for a molecule as a bit
|
||||
// vector
|
||||
@@ -258,9 +258,9 @@ getHashedTopologicalTorsionFingerprint(
|
||||
RDKIT_FINGERPRINTS_EXPORT ExplicitBitVect *
|
||||
getHashedTopologicalTorsionFingerprintAsBitVect(
|
||||
const ROMol &mol, unsigned int nBits = 2048, unsigned int targetSize = 4,
|
||||
const std::vector<std::uint32_t> *fromAtoms = 0,
|
||||
const std::vector<std::uint32_t> *ignoreAtoms = 0,
|
||||
const std::vector<std::uint32_t> *atomInvariants = 0,
|
||||
const std::vector<std::uint32_t> *fromAtoms = nullptr,
|
||||
const std::vector<std::uint32_t> *ignoreAtoms = nullptr,
|
||||
const std::vector<std::uint32_t> *atomInvariants = nullptr,
|
||||
unsigned int nBitsPerEntry = 4, bool includeChirality = false);
|
||||
} // namespace AtomPairs
|
||||
} // namespace RDKit
|
||||
|
||||
@@ -128,7 +128,7 @@ const std::string morganConnectivityInvariantVersion = "1.0.0";
|
||||
*/
|
||||
RDKIT_FINGERPRINTS_EXPORT void getFeatureInvariants(
|
||||
const ROMol &mol, std::vector<std::uint32_t> &invars,
|
||||
std::vector<const ROMol *> *patterns = 0);
|
||||
std::vector<const ROMol *> *patterns = nullptr);
|
||||
const std::string morganFeatureInvariantVersion = "0.1.0";
|
||||
|
||||
} // namespace MorganFingerprints
|
||||
|
||||
@@ -55,10 +55,10 @@ RDKIT_FINGERPRINTS_EXPORT ExplicitBitVect *RDKFingerprintMol(
|
||||
unsigned int fpSize = 2048, unsigned int nBitsPerHash = 2,
|
||||
bool useHs = true, double tgtDensity = 0.0, unsigned int minSize = 128,
|
||||
bool branchedPaths = true, bool useBondOrder = true,
|
||||
std::vector<std::uint32_t> *atomInvariants = 0,
|
||||
const std::vector<std::uint32_t> *fromAtoms = 0,
|
||||
std::vector<std::vector<std::uint32_t>> *atomBits = 0,
|
||||
std::map<std::uint32_t, std::vector<std::vector<int>>> *bitInfo = 0);
|
||||
std::vector<std::uint32_t> *atomInvariants = nullptr,
|
||||
const std::vector<std::uint32_t> *fromAtoms = nullptr,
|
||||
std::vector<std::vector<std::uint32_t>> *atomBits = nullptr,
|
||||
std::map<std::uint32_t, std::vector<std::vector<int>>> *bitInfo = nullptr);
|
||||
const std::string RDKFingerprintMolVersion = "2.0.0";
|
||||
|
||||
//! \brief Generates a topological (Daylight like) fingerprint for a molecule
|
||||
@@ -105,9 +105,9 @@ const std::string RDKFingerprintMolVersion = "2.0.0";
|
||||
RDKIT_FINGERPRINTS_EXPORT ExplicitBitVect *LayeredFingerprintMol(
|
||||
const ROMol &mol, unsigned int layerFlags = 0xFFFFFFFF,
|
||||
unsigned int minPath = 1, unsigned int maxPath = 7,
|
||||
unsigned int fpSize = 2048, std::vector<unsigned int> *atomCounts = 0,
|
||||
ExplicitBitVect *setOnlyBits = 0, bool branchedPaths = true,
|
||||
const std::vector<std::uint32_t> *fromAtoms = 0);
|
||||
unsigned int fpSize = 2048, std::vector<unsigned int> *atomCounts = nullptr,
|
||||
ExplicitBitVect *setOnlyBits = nullptr, bool branchedPaths = true,
|
||||
const std::vector<std::uint32_t> *fromAtoms = nullptr);
|
||||
const unsigned int maxFingerprintLayers = 10;
|
||||
const std::string LayeredFingerprintMolVersion = "0.7.0";
|
||||
const unsigned int substructLayers = 0x07;
|
||||
@@ -143,17 +143,18 @@ const unsigned int substructLayers = 0x07;
|
||||
*/
|
||||
RDKIT_FINGERPRINTS_EXPORT ExplicitBitVect *PatternFingerprintMol(
|
||||
const ROMol &mol, unsigned int fpSize = 2048,
|
||||
std::vector<unsigned int> *atomCounts = 0,
|
||||
ExplicitBitVect *setOnlyBits = 0);
|
||||
std::vector<unsigned int> *atomCounts = nullptr,
|
||||
ExplicitBitVect *setOnlyBits = nullptr);
|
||||
|
||||
RDKIT_FINGERPRINTS_EXPORT SparseIntVect<boost::uint64_t>
|
||||
*getUnfoldedRDKFingerprintMol(
|
||||
const ROMol &mol, unsigned int minPath = 1, unsigned int maxPath = 7,
|
||||
bool useHs = true, bool branchedPaths = true, bool useBondOrder = true,
|
||||
std::vector<std::uint32_t> *atomInvariants = 0,
|
||||
const std::vector<std::uint32_t> *fromAtoms = 0,
|
||||
std::vector<std::vector<boost::uint64_t>> *atomBits = 0,
|
||||
std::map<boost::uint64_t, std::vector<std::vector<int>>> *bitInfo = 0);
|
||||
std::vector<std::uint32_t> *atomInvariants = nullptr,
|
||||
const std::vector<std::uint32_t> *fromAtoms = nullptr,
|
||||
std::vector<std::vector<boost::uint64_t>> *atomBits = nullptr,
|
||||
std::map<boost::uint64_t, std::vector<std::vector<int>>> *bitInfo =
|
||||
nullptr);
|
||||
|
||||
} // namespace RDKit
|
||||
|
||||
|
||||
@@ -104,10 +104,10 @@ const std::string morganFingerprintVersion = "1.0.0";
|
||||
*/
|
||||
RDKIT_FINGERPRINTS_EXPORT SparseIntVect<std::uint32_t> *getFingerprint(
|
||||
const ROMol &mol, unsigned int radius,
|
||||
std::vector<boost::uint32_t> *invariants = 0,
|
||||
const std::vector<boost::uint32_t> *fromAtoms = 0,
|
||||
std::vector<boost::uint32_t> *invariants = nullptr,
|
||||
const std::vector<boost::uint32_t> *fromAtoms = nullptr,
|
||||
bool useChirality = false, bool useBondTypes = true, bool useCounts = true,
|
||||
bool onlyNonzeroInvariants = false, BitInfoMap *atomsSettingBits = 0,
|
||||
bool onlyNonzeroInvariants = false, BitInfoMap *atomsSettingBits = nullptr,
|
||||
bool includeRedundantEnvironments = false);
|
||||
|
||||
//! returns the Morgan fingerprint for a molecule
|
||||
@@ -156,10 +156,10 @@ RDKIT_FINGERPRINTS_EXPORT SparseIntVect<std::uint32_t> *getFingerprint(
|
||||
*/
|
||||
RDKIT_FINGERPRINTS_EXPORT SparseIntVect<std::uint32_t> *getHashedFingerprint(
|
||||
const ROMol &mol, unsigned int radius, unsigned int nBits = 2048,
|
||||
std::vector<boost::uint32_t> *invariants = 0,
|
||||
const std::vector<boost::uint32_t> *fromAtoms = 0,
|
||||
std::vector<boost::uint32_t> *invariants = nullptr,
|
||||
const std::vector<boost::uint32_t> *fromAtoms = nullptr,
|
||||
bool useChirality = false, bool useBondTypes = true,
|
||||
bool onlyNonzeroInvariants = false, BitInfoMap *atomsSettingBits = 0,
|
||||
bool onlyNonzeroInvariants = false, BitInfoMap *atomsSettingBits = nullptr,
|
||||
bool includeRedundantEnvironments = false);
|
||||
|
||||
//! returns the Morgan fingerprint for a molecule as a bit vector
|
||||
@@ -198,10 +198,10 @@ RDKIT_FINGERPRINTS_EXPORT SparseIntVect<std::uint32_t> *getHashedFingerprint(
|
||||
*/
|
||||
RDKIT_FINGERPRINTS_EXPORT ExplicitBitVect *getFingerprintAsBitVect(
|
||||
const ROMol &mol, unsigned int radius, unsigned int nBits,
|
||||
std::vector<std::uint32_t> *invariants = 0,
|
||||
const std::vector<std::uint32_t> *fromAtoms = 0, bool useChirality = false,
|
||||
bool useBondTypes = true, bool onlyNonzeroInvariants = false,
|
||||
BitInfoMap *atomsSettingBits = 0,
|
||||
std::vector<std::uint32_t> *invariants = nullptr,
|
||||
const std::vector<std::uint32_t> *fromAtoms = nullptr,
|
||||
bool useChirality = false, bool useBondTypes = true,
|
||||
bool onlyNonzeroInvariants = false, BitInfoMap *atomsSettingBits = nullptr,
|
||||
bool includeRedundantEnvironments = false);
|
||||
|
||||
} // end of namespace MorganFingerprints
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace RDKit {
|
||||
class RDKIT_FRAGCATALOG_EXPORT FragCatalogEntry
|
||||
: public RDCatalog::CatalogEntry {
|
||||
public:
|
||||
FragCatalogEntry() : dp_mol(0), d_descrip(""), d_order(0) {
|
||||
FragCatalogEntry() : dp_mol(nullptr), d_descrip(""), d_order(0) {
|
||||
dp_props = new Dict();
|
||||
setBitId(-1);
|
||||
}
|
||||
@@ -38,10 +38,10 @@ class RDKIT_FRAGCATALOG_EXPORT FragCatalogEntry
|
||||
|
||||
~FragCatalogEntry() {
|
||||
delete dp_mol;
|
||||
dp_mol = 0;
|
||||
dp_mol = nullptr;
|
||||
if (dp_props) {
|
||||
delete dp_props;
|
||||
dp_props = 0;
|
||||
dp_props = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ static inline int gettimeofday(struct timeval* tv, struct timezone* tz) {
|
||||
unsigned __int64 tmpres = 0;
|
||||
static int tzflag;
|
||||
|
||||
if (NULL != tv) {
|
||||
if (nullptr != tv) {
|
||||
GetSystemTimeAsFileTime(&ft);
|
||||
|
||||
tmpres |= ft.dwHighDateTime;
|
||||
@@ -92,7 +92,7 @@ static inline int gettimeofday(struct timeval* tv, struct timezone* tz) {
|
||||
tv->tv_usec = (long)(tmpres % 1000000UL);
|
||||
}
|
||||
|
||||
if (NULL != tz) {
|
||||
if (nullptr != tz) {
|
||||
if (!tzflag) {
|
||||
_tzset();
|
||||
tzflag++;
|
||||
|
||||
@@ -65,8 +65,8 @@ class RDKIT_MOLALIGN_EXPORT MolAlignException : public std::exception {
|
||||
*/
|
||||
RDKIT_MOLALIGN_EXPORT double getAlignmentTransform(
|
||||
const ROMol &prbMol, const ROMol &refMol, RDGeom::Transform3D &trans,
|
||||
int prbCid = -1, int refCid = -1, const MatchVectType *atomMap = 0,
|
||||
const RDNumeric::DoubleVector *weights = 0, bool reflect = false,
|
||||
int prbCid = -1, int refCid = -1, const MatchVectType *atomMap = nullptr,
|
||||
const RDNumeric::DoubleVector *weights = nullptr, bool reflect = false,
|
||||
unsigned int maxIters = 50);
|
||||
|
||||
//! Optimally (minimum RMSD) align a molecule to another molecule
|
||||
@@ -98,8 +98,8 @@ RDKIT_MOLALIGN_EXPORT double getAlignmentTransform(
|
||||
*/
|
||||
RDKIT_MOLALIGN_EXPORT double alignMol(
|
||||
ROMol &prbMol, const ROMol &refMol, int prbCid = -1, int refCid = -1,
|
||||
const MatchVectType *atomMap = 0,
|
||||
const RDNumeric::DoubleVector *weights = 0, bool reflect = false,
|
||||
const MatchVectType *atomMap = nullptr,
|
||||
const RDNumeric::DoubleVector *weights = nullptr, bool reflect = false,
|
||||
unsigned int maxIters = 50);
|
||||
|
||||
//! Returns the optimal RMS for aligning two molecules, taking
|
||||
@@ -148,10 +148,10 @@ RDKIT_MOLALIGN_EXPORT double getBestRMS(
|
||||
conformations
|
||||
*/
|
||||
RDKIT_MOLALIGN_EXPORT void alignMolConformers(
|
||||
ROMol &mol, const std::vector<unsigned int> *atomIds = 0,
|
||||
const std::vector<unsigned int> *confIds = 0,
|
||||
const RDNumeric::DoubleVector *weights = 0, bool reflect = false,
|
||||
unsigned int maxIters = 50, std::vector<double> *RMSlist = 0);
|
||||
ROMol &mol, const std::vector<unsigned int> *atomIds = nullptr,
|
||||
const std::vector<unsigned int> *confIds = nullptr,
|
||||
const RDNumeric::DoubleVector *weights = nullptr, bool reflect = false,
|
||||
unsigned int maxIters = 50, std::vector<double> *RMSlist = nullptr);
|
||||
} // namespace MolAlign
|
||||
} // namespace RDKit
|
||||
#endif
|
||||
|
||||
@@ -188,8 +188,8 @@ class RDKIT_MOLALIGN_EXPORT LAP {
|
||||
class RDKIT_MOLALIGN_EXPORT SDM {
|
||||
public:
|
||||
// constructor
|
||||
SDM(const Conformer *prbConf = NULL, const Conformer *refConf = NULL,
|
||||
O3AConstraintVect *o3aConstraintVect = NULL)
|
||||
SDM(const Conformer *prbConf = nullptr, const Conformer *refConf = nullptr,
|
||||
O3AConstraintVect *o3aConstraintVect = nullptr)
|
||||
: d_prbConf(prbConf),
|
||||
d_refConf(refConf),
|
||||
d_o3aConstraintVect(o3aConstraintVect){};
|
||||
@@ -278,10 +278,10 @@ class RDKIT_MOLALIGN_EXPORT O3A {
|
||||
AtomTypeScheme atomTypes = MMFF94, const int prbCid = -1,
|
||||
const int refCid = -1, const bool reflect = false,
|
||||
const unsigned int maxIters = 50, unsigned int options = 0,
|
||||
const MatchVectType *constraintMap = NULL,
|
||||
const RDNumeric::DoubleVector *constraintWeights = NULL,
|
||||
LAP *extLAP = NULL, MolHistogram *extPrbHist = NULL,
|
||||
MolHistogram *extRefHist = NULL);
|
||||
const MatchVectType *constraintMap = nullptr,
|
||||
const RDNumeric::DoubleVector *constraintWeights = nullptr,
|
||||
LAP *extLAP = nullptr, MolHistogram *extPrbHist = nullptr,
|
||||
MolHistogram *extRefHist = nullptr);
|
||||
O3A(int (*costFunc)(const unsigned int, const unsigned int, double, void *),
|
||||
double (*weightFunc)(const unsigned int, const unsigned int, void *),
|
||||
double (*scoringFunc)(const unsigned int, const unsigned int, void *),
|
||||
@@ -289,9 +289,9 @@ class RDKIT_MOLALIGN_EXPORT O3A {
|
||||
const int refCid, const boost::dynamic_bitset<> &prbHvyAtoms,
|
||||
const boost::dynamic_bitset<> &refHvyAtoms, const bool reflect = false,
|
||||
const unsigned int maxIters = 50, unsigned int options = 0,
|
||||
O3AConstraintVect *o3aConstraintVect = NULL, ROMol *extWorkPrbMol = NULL,
|
||||
LAP *extLAP = NULL, MolHistogram *extPrbHist = NULL,
|
||||
MolHistogram *extRefHist = NULL);
|
||||
O3AConstraintVect *o3aConstraintVect = nullptr,
|
||||
ROMol *extWorkPrbMol = nullptr, LAP *extLAP = nullptr,
|
||||
MolHistogram *extPrbHist = nullptr, MolHistogram *extRefHist = nullptr);
|
||||
~O3A() {
|
||||
if (d_o3aMatchVect) {
|
||||
delete d_o3aMatchVect;
|
||||
@@ -346,8 +346,8 @@ RDKIT_MOLALIGN_EXPORT void getO3AForProbeConfs(
|
||||
std::vector<boost::shared_ptr<O3A>> &res, int numThreads = 1,
|
||||
O3A::AtomTypeScheme atomTypes = O3A::MMFF94, const int refCid = -1,
|
||||
const bool reflect = false, const unsigned int maxIters = 50,
|
||||
unsigned int options = 0, const MatchVectType *constraintMap = NULL,
|
||||
const RDNumeric::DoubleVector *constraintWeights = NULL);
|
||||
unsigned int options = 0, const MatchVectType *constraintMap = nullptr,
|
||||
const RDNumeric::DoubleVector *constraintWeights = nullptr);
|
||||
} // namespace MolAlign
|
||||
} // namespace RDKit
|
||||
#endif
|
||||
|
||||
@@ -16,7 +16,7 @@ class ROMol;
|
||||
//! This class is used to store ROMol objects in a MolCatalog
|
||||
class RDKIT_MOLCATALOG_EXPORT MolCatalogEntry : public RDCatalog::CatalogEntry {
|
||||
public:
|
||||
MolCatalogEntry() : dp_mol(0), d_order(0), d_descrip("") {
|
||||
MolCatalogEntry() : dp_mol(nullptr), d_order(0), d_descrip("") {
|
||||
dp_props = new Dict();
|
||||
setBitId(-1);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class RDKIT_MOLDRAW2D_EXPORT MolDraw2DCairo : public MolDraw2D {
|
||||
if (cairo_get_reference_count(dp_cr) > 0) {
|
||||
cairo_destroy(dp_cr);
|
||||
}
|
||||
dp_cr = NULL;
|
||||
dp_cr = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ void MolDraw2D::drawMolecule(const ROMol &mol, const std::string &legend,
|
||||
}
|
||||
}
|
||||
drawMolecule(mol, legend, highlight_atoms, &highlight_bonds,
|
||||
highlight_atom_map, NULL, highlight_radii, confId);
|
||||
highlight_atom_map, nullptr, highlight_radii, confId);
|
||||
}
|
||||
|
||||
void MolDraw2D::doContinuousHighlighting(
|
||||
@@ -143,13 +143,13 @@ void MolDraw2D::doContinuousHighlighting(
|
||||
|
||||
void drawMolecules(
|
||||
const std::vector<ROMOL_SPTR> &mols,
|
||||
const std::vector<std::string> *legends = NULL,
|
||||
const std::vector<std::vector<int> > *highlight_atoms = NULL,
|
||||
const std::vector<std::vector<int> > *highlight_bonds = NULL,
|
||||
const std::vector<std::map<int, DrawColour> > *highlight_atom_maps = NULL,
|
||||
const std::vector<std::map<int, DrawColour> > *highlight_bond_maps = NULL,
|
||||
const std::vector<std::map<int, double> > *highlight_radii = NULL,
|
||||
const std::vector<int> *confIds = NULL){};
|
||||
const std::vector<std::string> *legends = nullptr,
|
||||
const std::vector<std::vector<int>> *highlight_atoms = nullptr,
|
||||
const std::vector<std::vector<int>> *highlight_bonds = nullptr,
|
||||
const std::vector<std::map<int, DrawColour>> *highlight_atom_maps = nullptr,
|
||||
const std::vector<std::map<int, DrawColour>> *highlight_bond_maps = nullptr,
|
||||
const std::vector<std::map<int, double>> *highlight_radii = nullptr,
|
||||
const std::vector<int> *confIds = nullptr){};
|
||||
|
||||
void MolDraw2D::drawMolecule(const ROMol &mol,
|
||||
const vector<int> *highlight_atoms,
|
||||
@@ -206,8 +206,8 @@ void MolDraw2D::drawMolecule(const ROMol &mol,
|
||||
highlight_radii);
|
||||
// at this point we shouldn't be doing any more highlighting, so blow out
|
||||
// those variables:
|
||||
highlight_bonds = NULL;
|
||||
highlight_atoms = NULL;
|
||||
highlight_bonds = nullptr;
|
||||
highlight_atoms = nullptr;
|
||||
} else if (drawOptions().circleAtoms && highlight_atoms) {
|
||||
ROMol::VERTEX_ITER this_at, end_at;
|
||||
boost::tie(this_at, end_at) = mol.getVertices();
|
||||
|
||||
@@ -26,13 +26,15 @@ class RDKIT_MOLDRAW2D_EXPORT MultiMolDraw2D {
|
||||
virtual ~MultiMolDraw2D() {}
|
||||
virtual void drawMolecules(
|
||||
const std::vector<ROMOL_SPTR> &mols,
|
||||
const std::vector<std::string> *legends = NULL,
|
||||
const std::vector<std::vector<int>> *highlight_atoms = NULL,
|
||||
const std::vector<std::vector<int>> *highlight_bonds = NULL,
|
||||
const std::vector<std::map<int, DrawColour>> *highlight_atom_maps = NULL,
|
||||
const std::vector<std::map<int, DrawColour>> *highlight_bond_maps = NULL,
|
||||
const std::vector<std::map<int, double>> *highlight_radii = NULL,
|
||||
const std::vector<int> *confIds = NULL);
|
||||
const std::vector<std::string> *legends = nullptr,
|
||||
const std::vector<std::vector<int>> *highlight_atoms = nullptr,
|
||||
const std::vector<std::vector<int>> *highlight_bonds = nullptr,
|
||||
const std::vector<std::map<int, DrawColour>> *highlight_atom_maps =
|
||||
nullptr,
|
||||
const std::vector<std::map<int, DrawColour>> *highlight_bond_maps =
|
||||
nullptr,
|
||||
const std::vector<std::map<int, double>> *highlight_radii = nullptr,
|
||||
const std::vector<int> *confIds = nullptr);
|
||||
|
||||
virtual int width() const { return width_; }
|
||||
virtual int height() const { return height_; }
|
||||
|
||||
@@ -102,8 +102,9 @@ RDKIT_GRAPHMOL_EXPORT unsigned int getMolFrags(
|
||||
|
||||
*/
|
||||
RDKIT_GRAPHMOL_EXPORT std::vector<boost::shared_ptr<ROMol>> getMolFrags(
|
||||
const ROMol &mol, bool sanitizeFrags = true, std::vector<int> *frags = 0,
|
||||
std::vector<std::vector<int>> *fragsMolAtomMapping = 0,
|
||||
const ROMol &mol, bool sanitizeFrags = true,
|
||||
std::vector<int> *frags = nullptr,
|
||||
std::vector<std::vector<int>> *fragsMolAtomMapping = nullptr,
|
||||
bool copyConformers = true);
|
||||
|
||||
//! splits a molecule into pieces based on labels assigned using a query
|
||||
@@ -124,7 +125,7 @@ template <typename T>
|
||||
RDKIT_GRAPHMOL_EXPORT std::map<T, boost::shared_ptr<ROMol>>
|
||||
getMolFragsWithQuery(const ROMol &mol, T (*query)(const ROMol &, const Atom *),
|
||||
bool sanitizeFrags = true,
|
||||
const std::vector<T> *whiteList = 0,
|
||||
const std::vector<T> *whiteList = nullptr,
|
||||
bool negateList = false);
|
||||
|
||||
#if 0
|
||||
@@ -151,7 +152,7 @@ getMolFragsWithQuery(const ROMol &mol, T (*query)(const ROMol &, const Atom *),
|
||||
*/
|
||||
RDKIT_GRAPHMOL_EXPORT double computeBalabanJ(
|
||||
const ROMol &mol, bool useBO = true, bool force = false,
|
||||
const std::vector<int> *bondPath = 0, bool cacheIt = true);
|
||||
const std::vector<int> *bondPath = nullptr, bool cacheIt = true);
|
||||
//! \overload
|
||||
RDKIT_GRAPHMOL_EXPORT double computeBalabanJ(double *distMat, int nb, int nAts);
|
||||
|
||||
@@ -182,13 +183,13 @@ RDKIT_GRAPHMOL_EXPORT double computeBalabanJ(double *distMat, int nb, int nAts);
|
||||
*/
|
||||
RDKIT_GRAPHMOL_EXPORT ROMol *addHs(const ROMol &mol, bool explicitOnly = false,
|
||||
bool addCoords = false,
|
||||
const UINT_VECT *onlyOnAtoms = NULL,
|
||||
const UINT_VECT *onlyOnAtoms = nullptr,
|
||||
bool addResidueInfo = false);
|
||||
//! \overload
|
||||
// modifies the molecule in place
|
||||
RDKIT_GRAPHMOL_EXPORT void addHs(RWMol &mol, bool explicitOnly = false,
|
||||
bool addCoords = false,
|
||||
const UINT_VECT *onlyOnAtoms = NULL,
|
||||
const UINT_VECT *onlyOnAtoms = nullptr,
|
||||
bool addResidueInfo = false);
|
||||
|
||||
//! returns a copy of a molecule with hydrogens removed
|
||||
@@ -359,11 +360,11 @@ RDKIT_GRAPHMOL_EXPORT void parseAdjustQueryParametersFromJSON(
|
||||
\return the new molecule
|
||||
*/
|
||||
RDKIT_GRAPHMOL_EXPORT ROMol *adjustQueryProperties(
|
||||
const ROMol &mol, const AdjustQueryParameters *params = NULL);
|
||||
const ROMol &mol, const AdjustQueryParameters *params = nullptr);
|
||||
//! \overload
|
||||
// modifies the molecule in place
|
||||
RDKIT_GRAPHMOL_EXPORT void adjustQueryProperties(
|
||||
RWMol &mol, const AdjustQueryParameters *params = NULL);
|
||||
RWMol &mol, const AdjustQueryParameters *params = nullptr);
|
||||
|
||||
//! returns a copy of a molecule with the atoms renumbered
|
||||
/*!
|
||||
@@ -518,7 +519,7 @@ typedef enum {
|
||||
*/
|
||||
RDKIT_GRAPHMOL_EXPORT int setAromaticity(
|
||||
RWMol &mol, AromaticityModel model = AROMATICITY_DEFAULT,
|
||||
int (*func)(RWMol &) = NULL);
|
||||
int (*func)(RWMol &) = nullptr);
|
||||
|
||||
//! Designed to be called by the sanitizer to handle special cases before
|
||||
// anything is done.
|
||||
@@ -643,8 +644,8 @@ RDKIT_GRAPHMOL_EXPORT void setHybridization(ROMol &mol);
|
||||
RDKIT_GRAPHMOL_EXPORT int findSSSR(const ROMol &mol,
|
||||
std::vector<std::vector<int>> &res);
|
||||
//! \overload
|
||||
RDKIT_GRAPHMOL_EXPORT int findSSSR(const ROMol &mol,
|
||||
std::vector<std::vector<int>> *res = 0);
|
||||
RDKIT_GRAPHMOL_EXPORT int findSSSR(
|
||||
const ROMol &mol, std::vector<std::vector<int>> *res = nullptr);
|
||||
|
||||
//! use a DFS algorithm to identify ring bonds and atoms in a molecule
|
||||
/*!
|
||||
@@ -710,8 +711,8 @@ RDKIT_GRAPHMOL_EXPORT int symmetrizeSSSR(ROMol &mol);
|
||||
*/
|
||||
RDKIT_GRAPHMOL_EXPORT double *getAdjacencyMatrix(
|
||||
const ROMol &mol, bool useBO = false, int emptyVal = 0, bool force = false,
|
||||
const char *propNamePrefix = 0,
|
||||
const boost::dynamic_bitset<> *bondsToUse = 0);
|
||||
const char *propNamePrefix = nullptr,
|
||||
const boost::dynamic_bitset<> *bondsToUse = nullptr);
|
||||
|
||||
//! Computes the molecule's topological distance matrix
|
||||
/*!
|
||||
@@ -735,11 +736,9 @@ RDKIT_GRAPHMOL_EXPORT double *getAdjacencyMatrix(
|
||||
|
||||
|
||||
*/
|
||||
RDKIT_GRAPHMOL_EXPORT double *getDistanceMat(const ROMol &mol,
|
||||
bool useBO = false,
|
||||
bool useAtomWts = false,
|
||||
bool force = false,
|
||||
const char *propNamePrefix = 0);
|
||||
RDKIT_GRAPHMOL_EXPORT double *getDistanceMat(
|
||||
const ROMol &mol, bool useBO = false, bool useAtomWts = false,
|
||||
bool force = false, const char *propNamePrefix = nullptr);
|
||||
|
||||
//! Computes the molecule's topological distance matrix
|
||||
/*!
|
||||
@@ -790,11 +789,9 @@ RDKIT_GRAPHMOL_EXPORT double *getDistanceMat(
|
||||
In other cases the caller is responsible for freeing the memory.
|
||||
|
||||
*/
|
||||
RDKIT_GRAPHMOL_EXPORT double *get3DDistanceMat(const ROMol &mol,
|
||||
int confId = -1,
|
||||
bool useAtomWts = false,
|
||||
bool force = false,
|
||||
const char *propNamePrefix = 0);
|
||||
RDKIT_GRAPHMOL_EXPORT double *get3DDistanceMat(
|
||||
const ROMol &mol, int confId = -1, bool useAtomWts = false,
|
||||
bool force = false, const char *propNamePrefix = nullptr);
|
||||
//! Find the shortest path between two atoms
|
||||
/*!
|
||||
Uses the Bellman-Ford algorithm
|
||||
|
||||
@@ -67,7 +67,7 @@ RDKIT_MOLTRANSFORMS_EXPORT RDGeom::Point3D computeCentroid(
|
||||
RDKIT_MOLTRANSFORMS_EXPORT bool computePrincipalAxesAndMoments(
|
||||
const RDKit::Conformer &conf, Eigen::Matrix3d &axes,
|
||||
Eigen::Vector3d &moments, bool ignoreHs = false, bool force = false,
|
||||
const std::vector<double> *weights = NULL);
|
||||
const std::vector<double> *weights = nullptr);
|
||||
//! Compute principal axes and moments from the gyration matrix of a conformer
|
||||
/*!
|
||||
|
||||
@@ -90,7 +90,7 @@ RDKIT_MOLTRANSFORMS_EXPORT bool
|
||||
computePrincipalAxesAndMomentsFromGyrationMatrix(
|
||||
const RDKit::Conformer &conf, Eigen::Matrix3d &axes,
|
||||
Eigen::Vector3d &moments, bool ignoreHs = false, bool force = false,
|
||||
const std::vector<double> *weights = NULL);
|
||||
const std::vector<double> *weights = nullptr);
|
||||
#endif
|
||||
|
||||
//! Compute the transformation require to orient the conformation
|
||||
@@ -110,7 +110,7 @@ computePrincipalAxesAndMomentsFromGyrationMatrix(
|
||||
\param ignoreHs Optionally ignore hydrogens
|
||||
*/
|
||||
RDKIT_MOLTRANSFORMS_EXPORT RDGeom::Transform3D *computeCanonicalTransform(
|
||||
const RDKit::Conformer &conf, const RDGeom::Point3D *center = 0,
|
||||
const RDKit::Conformer &conf, const RDGeom::Point3D *center = nullptr,
|
||||
bool normalizeCovar = false, bool ignoreHs = true);
|
||||
|
||||
//! Transform the conformation using the specified transformation
|
||||
@@ -131,7 +131,7 @@ RDKIT_MOLTRANSFORMS_EXPORT void transformConformer(
|
||||
|
||||
*/
|
||||
RDKIT_MOLTRANSFORMS_EXPORT void canonicalizeConformer(
|
||||
RDKit::Conformer &conf, const RDGeom::Point3D *center = 0,
|
||||
RDKit::Conformer &conf, const RDGeom::Point3D *center = nullptr,
|
||||
bool normalizeCovar = false, bool ignoreHs = true);
|
||||
|
||||
//! Canonicalize all the conformations in a molecule
|
||||
|
||||
@@ -28,7 +28,7 @@ class RDKIT_GRAPHMOL_EXPORT QueryAtom : public Atom {
|
||||
public:
|
||||
typedef Queries::Query<int, Atom const *, true> QUERYATOM_QUERY;
|
||||
|
||||
QueryAtom() : Atom(), dp_query(NULL){};
|
||||
QueryAtom() : Atom(), dp_query(nullptr){};
|
||||
explicit QueryAtom(int num) : Atom(num), dp_query(makeAtomNumQuery(num)){};
|
||||
explicit QueryAtom(const Atom &other)
|
||||
: Atom(other), dp_query(makeAtomNumQuery(other.getAtomicNum())){};
|
||||
@@ -48,7 +48,7 @@ class RDKIT_GRAPHMOL_EXPORT QueryAtom : public Atom {
|
||||
Atom *copy() const;
|
||||
|
||||
// This method can be used to distinguish query atoms from standard atoms:
|
||||
bool hasQuery() const { return dp_query != 0; };
|
||||
bool hasQuery() const { return dp_query != nullptr; };
|
||||
|
||||
//! replaces our current query with the value passed in
|
||||
void setQuery(QUERYATOM_QUERY *what) {
|
||||
|
||||
@@ -29,7 +29,7 @@ class RDKIT_GRAPHMOL_EXPORT QueryBond : public Bond {
|
||||
public:
|
||||
typedef Queries::Query<int, Bond const *, true> QUERYBOND_QUERY;
|
||||
|
||||
QueryBond() : Bond(), dp_query(NULL){};
|
||||
QueryBond() : Bond(), dp_query(nullptr){};
|
||||
//! initialize with a particular bond order
|
||||
explicit QueryBond(BondType bT);
|
||||
//! initialize from a bond
|
||||
@@ -57,7 +57,7 @@ class RDKIT_GRAPHMOL_EXPORT QueryBond : public Bond {
|
||||
bool QueryMatch(QueryBond const *what) const;
|
||||
|
||||
// This method can be used to distinguish query bonds from standard bonds
|
||||
bool hasQuery() const { return dp_query != 0; };
|
||||
bool hasQuery() const { return dp_query != nullptr; };
|
||||
|
||||
//! returns our current query
|
||||
QUERYBOND_QUERY *getQuery() const { return dp_query; };
|
||||
|
||||
@@ -775,7 +775,7 @@ class HasPropQuery : public Queries::EqualityQuery<int, TargetPtr, true> {
|
||||
: Queries::EqualityQuery<int, TargetPtr, true>(), propname(v) {
|
||||
// default is to just do a number of rings query:
|
||||
this->setDescription("AtomHasProp");
|
||||
this->setDataFunc(0);
|
||||
this->setDataFunc(nullptr);
|
||||
};
|
||||
|
||||
virtual bool Match(const TargetPtr what) const {
|
||||
@@ -828,7 +828,7 @@ class HasPropWithValueQuery
|
||||
tolerance(tol) {
|
||||
// default is to just do a number of rings query:
|
||||
this->setDescription("HasPropWithValue");
|
||||
this->setDataFunc(0);
|
||||
this->setDataFunc(nullptr);
|
||||
};
|
||||
|
||||
virtual bool Match(const TargetPtr what) const {
|
||||
@@ -892,7 +892,7 @@ class HasPropWithValueQuery<TargetPtr, std::string>
|
||||
RDUNUSED_PARAM(tol);
|
||||
// default is to just do a number of rings query:
|
||||
this->setDescription("HasPropWithValue");
|
||||
this->setDataFunc(0);
|
||||
this->setDataFunc(nullptr);
|
||||
};
|
||||
|
||||
virtual bool Match(const TargetPtr what) const {
|
||||
@@ -962,7 +962,7 @@ class HasPropWithValueQuery<TargetPtr, ExplicitBitVect>
|
||||
val(v),
|
||||
tol(tol) {
|
||||
this->setDescription("HasPropWithValue");
|
||||
this->setDataFunc(0);
|
||||
this->setDataFunc(nullptr);
|
||||
};
|
||||
|
||||
virtual bool Match(const TargetPtr what) const {
|
||||
|
||||
@@ -282,7 +282,7 @@ class RDKIT_GRAPHMOL_EXPORT ROMol : public RDProps {
|
||||
*/
|
||||
ROMol(const ROMol &other, bool quickCopy = false, int confId = -1)
|
||||
: RDProps() {
|
||||
dp_ringInfo = 0;
|
||||
dp_ringInfo = nullptr;
|
||||
initFromOther(other, quickCopy, confId);
|
||||
numBonds = rdcast<unsigned int>(boost::num_edges(d_graph));
|
||||
};
|
||||
|
||||
@@ -32,7 +32,8 @@ namespace ReducedGraphs {
|
||||
|
||||
*/
|
||||
RDKIT_REDUCEDGRAPHS_EXPORT ROMol *generateMolExtendedReducedGraph(
|
||||
const ROMol &mol, std::vector<boost::dynamic_bitset<>> *atomTypes = 0);
|
||||
const ROMol &mol,
|
||||
std::vector<boost::dynamic_bitset<>> *atomTypes = nullptr);
|
||||
//! \brief Generates a ErG fingerprint vector for a molecule that's already a
|
||||
// reduced graph
|
||||
/*!
|
||||
@@ -53,7 +54,7 @@ RDKIT_REDUCEDGRAPHS_EXPORT ROMol *generateMolExtendedReducedGraph(
|
||||
*/
|
||||
RDKIT_REDUCEDGRAPHS_EXPORT RDNumeric::DoubleVector *
|
||||
generateErGFingerprintForReducedGraph(
|
||||
const ROMol &mol, std::vector<boost::dynamic_bitset<>> *atomTypes = 0,
|
||||
const ROMol &mol, std::vector<boost::dynamic_bitset<>> *atomTypes = nullptr,
|
||||
double fuzzIncrement = 0.3, unsigned int minPath = 1,
|
||||
unsigned int maxPath = 15);
|
||||
|
||||
@@ -75,7 +76,7 @@ generateErGFingerprintForReducedGraph(
|
||||
|
||||
*/
|
||||
RDKIT_REDUCEDGRAPHS_EXPORT RDNumeric::DoubleVector *getErGFingerprint(
|
||||
const ROMol &mol, std::vector<boost::dynamic_bitset<>> *atomTypes = 0,
|
||||
const ROMol &mol, std::vector<boost::dynamic_bitset<>> *atomTypes = nullptr,
|
||||
double fuzzIncrement = 0.3, unsigned int minPath = 1,
|
||||
unsigned int maxPath = 15);
|
||||
} // namespace ReducedGraphs
|
||||
|
||||
@@ -198,7 +198,7 @@ class RDKIT_GRAPHMOL_EXPORT RingInfo {
|
||||
const VECT_INT_VECT &bondRingFamilies() const { return d_bondRingFamilies; };
|
||||
|
||||
//! check if the ring families have been initialized
|
||||
bool areRingFamiliesInitialized() const { return dp_urfData != NULL; }
|
||||
bool areRingFamiliesInitialized() const { return dp_urfData != nullptr; }
|
||||
#endif
|
||||
|
||||
//@}
|
||||
|
||||
@@ -54,7 +54,7 @@ typedef enum {
|
||||
class RDKIT_SLNPARSE_EXPORT AttribType {
|
||||
public:
|
||||
AttribType()
|
||||
: first(""), second(""), op(""), negated(false), structQuery(0){};
|
||||
: first(""), second(""), op(""), negated(false), structQuery(nullptr){};
|
||||
std::string first;
|
||||
std::string second;
|
||||
std::string op;
|
||||
|
||||
@@ -275,7 +275,7 @@ int addBranchToMol(std::vector<RWMol *> &molList, unsigned int molIdx,
|
||||
} else {
|
||||
delete bond;
|
||||
}
|
||||
bond = 0;
|
||||
bond = nullptr;
|
||||
|
||||
delete branch;
|
||||
unsigned int sz = molList.size();
|
||||
|
||||
@@ -1951,7 +1951,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
|
||||
}
|
||||
else
|
||||
/* Can't grow it, we don't own it. */
|
||||
b->yy_ch_buf = 0;
|
||||
b->yy_ch_buf = nullptr;
|
||||
|
||||
if ( ! b->yy_ch_buf )
|
||||
YY_FATAL_ERROR(
|
||||
@@ -2288,7 +2288,7 @@ static void yysln__load_buffer_state (yyscan_t yyscanner)
|
||||
return;
|
||||
|
||||
if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
|
||||
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
|
||||
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) nullptr;
|
||||
|
||||
if ( b->yy_is_our_buffer )
|
||||
yysln_free((void *) b->yy_ch_buf ,yyscanner );
|
||||
@@ -2366,7 +2366,7 @@ extern int isatty (int );
|
||||
void yysln_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
|
||||
{
|
||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||
if (new_buffer == NULL)
|
||||
if (new_buffer == nullptr)
|
||||
return;
|
||||
|
||||
yysln_ensure_buffer_stack(yyscanner);
|
||||
@@ -2401,7 +2401,7 @@ void yysln_pop_buffer_state (yyscan_t yyscanner)
|
||||
return;
|
||||
|
||||
yysln__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
|
||||
YY_CURRENT_BUFFER_LVALUE = NULL;
|
||||
YY_CURRENT_BUFFER_LVALUE = nullptr;
|
||||
if (yyg->yy_buffer_stack_top > 0)
|
||||
--yyg->yy_buffer_stack_top;
|
||||
|
||||
@@ -2472,7 +2472,7 @@ YY_BUFFER_STATE yysln__scan_buffer (char * base, yy_size_t size , yyscan_t yys
|
||||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
||||
base[size-1] != YY_END_OF_BUFFER_CHAR )
|
||||
/* They forgot to leave room for the EOB's. */
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
b = (YY_BUFFER_STATE) yysln_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
|
||||
if ( ! b )
|
||||
@@ -2481,7 +2481,7 @@ YY_BUFFER_STATE yysln__scan_buffer (char * base, yy_size_t size , yyscan_t yys
|
||||
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
|
||||
b->yy_buf_pos = b->yy_ch_buf = base;
|
||||
b->yy_is_our_buffer = 0;
|
||||
b->yy_input_file = 0;
|
||||
b->yy_input_file = nullptr;
|
||||
b->yy_n_chars = b->yy_buf_size;
|
||||
b->yy_is_interactive = 0;
|
||||
b->yy_at_bol = 1;
|
||||
@@ -2779,14 +2779,14 @@ void yysln_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
|
||||
int yysln_lex_init(yyscan_t* ptr_yy_globals)
|
||||
|
||||
{
|
||||
if (ptr_yy_globals == NULL){
|
||||
if (ptr_yy_globals == nullptr){
|
||||
errno = EINVAL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
*ptr_yy_globals = (yyscan_t) yysln_alloc ( sizeof( struct yyguts_t ), NULL );
|
||||
*ptr_yy_globals = (yyscan_t) yysln_alloc ( sizeof( struct yyguts_t ), nullptr );
|
||||
|
||||
if (*ptr_yy_globals == NULL){
|
||||
if (*ptr_yy_globals == nullptr){
|
||||
errno = ENOMEM;
|
||||
return 1;
|
||||
}
|
||||
@@ -2812,14 +2812,14 @@ int yysln_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals
|
||||
|
||||
yysln_set_extra (yy_user_defined, &dummy_yyguts);
|
||||
|
||||
if (ptr_yy_globals == NULL){
|
||||
if (ptr_yy_globals == nullptr){
|
||||
errno = EINVAL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
*ptr_yy_globals = (yyscan_t) yysln_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
|
||||
|
||||
if (*ptr_yy_globals == NULL){
|
||||
if (*ptr_yy_globals == nullptr){
|
||||
errno = ENOMEM;
|
||||
return 1;
|
||||
}
|
||||
@@ -2840,24 +2840,24 @@ static int yy_init_globals (yyscan_t yyscanner)
|
||||
* This function is called from yysln_lex_destroy(), so don't allocate here.
|
||||
*/
|
||||
|
||||
yyg->yy_buffer_stack = 0;
|
||||
yyg->yy_buffer_stack = nullptr;
|
||||
yyg->yy_buffer_stack_top = 0;
|
||||
yyg->yy_buffer_stack_max = 0;
|
||||
yyg->yy_c_buf_p = (char *) 0;
|
||||
yyg->yy_c_buf_p = (char *) nullptr;
|
||||
yyg->yy_init = 0;
|
||||
yyg->yy_start = 0;
|
||||
|
||||
yyg->yy_start_stack_ptr = 0;
|
||||
yyg->yy_start_stack_depth = 0;
|
||||
yyg->yy_start_stack = NULL;
|
||||
yyg->yy_start_stack = nullptr;
|
||||
|
||||
/* Defined in main.c */
|
||||
#ifdef YY_STDINIT
|
||||
yyin = stdin;
|
||||
yyout = stdout;
|
||||
#else
|
||||
yyin = (FILE *) 0;
|
||||
yyout = (FILE *) 0;
|
||||
yyin = (FILE *) nullptr;
|
||||
yyout = (FILE *) nullptr;
|
||||
#endif
|
||||
|
||||
/* For future reference: Set errno on error, since we are called by
|
||||
@@ -2874,17 +2874,17 @@ int yysln_lex_destroy (yyscan_t yyscanner)
|
||||
/* Pop the buffer stack, destroying each element. */
|
||||
while(YY_CURRENT_BUFFER){
|
||||
yysln__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
|
||||
YY_CURRENT_BUFFER_LVALUE = NULL;
|
||||
YY_CURRENT_BUFFER_LVALUE = nullptr;
|
||||
yysln_pop_buffer_state(yyscanner);
|
||||
}
|
||||
|
||||
/* Destroy the stack itself. */
|
||||
yysln_free(yyg->yy_buffer_stack ,yyscanner);
|
||||
yyg->yy_buffer_stack = NULL;
|
||||
yyg->yy_buffer_stack = nullptr;
|
||||
|
||||
/* Destroy the start condition stack. */
|
||||
yysln_free(yyg->yy_start_stack ,yyscanner );
|
||||
yyg->yy_start_stack = NULL;
|
||||
yyg->yy_start_stack = nullptr;
|
||||
|
||||
/* Reset the globals. This is important in a non-reentrant scanner so the next time
|
||||
* yysln_lex() is called, initialization will occur. */
|
||||
@@ -2892,7 +2892,7 @@ int yysln_lex_destroy (yyscan_t yyscanner)
|
||||
|
||||
/* Destroy the main struct (reentrant only). */
|
||||
yysln_free ( yyscanner , yyscanner );
|
||||
yyscanner = NULL;
|
||||
yyscanner = nullptr;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1953,7 +1953,7 @@ yyreduce:
|
||||
#line 404 "sln.yy" /* yacc.c:1651 */
|
||||
{
|
||||
if(!doQueries){
|
||||
yysln_error(input,molList,doQueries,0,"sequential bonds not allowed in non-queries");
|
||||
yysln_error(input,molList,doQueries,nullptr,"sequential bonds not allowed in non-queries");
|
||||
YYABORT;
|
||||
} else {
|
||||
RDKit::QueryBond *b1=static_cast<RDKit::QueryBond *>((yyvsp[-1].bond_T));
|
||||
|
||||
@@ -73,7 +73,7 @@ BOOST_PYTHON_MODULE(rdScaffoldNetwork) {
|
||||
boost::python::type_id<std::vector<ScaffoldNetwork::NetworkEdge>>();
|
||||
const boost::python::converter::registration *reg =
|
||||
boost::python::converter::registry::query(info);
|
||||
if (reg == NULL || (*reg).m_to_python == NULL) {
|
||||
if (reg == nullptr || (*reg).m_to_python == nullptr) {
|
||||
python::class_<std::vector<ScaffoldNetwork::NetworkEdge>>(
|
||||
"NetworkEdge_VECT")
|
||||
.def(python::vector_indexing_suite<
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace MolShapes {
|
||||
*/
|
||||
RDKIT_SHAPEHELPERS_EXPORT void EncodeShape(
|
||||
const ROMol &mol, RDGeom::UniformGrid3D &grid, int confId = -1,
|
||||
const RDGeom::Transform3D *trans = 0, double vdwScale = 0.8,
|
||||
const RDGeom::Transform3D *trans = nullptr, double vdwScale = 0.8,
|
||||
double stepSize = 0.25, int maxLayers = -1, bool ignoreHs = true);
|
||||
|
||||
//! Emcode the shape of a conformer on to a grid
|
||||
@@ -66,7 +66,7 @@ RDKIT_SHAPEHELPERS_EXPORT void EncodeShape(
|
||||
*/
|
||||
RDKIT_SHAPEHELPERS_EXPORT void EncodeShape(
|
||||
const Conformer &conf, RDGeom::UniformGrid3D &grid,
|
||||
const RDGeom::Transform3D *trans = 0, double vdwScale = 0.8,
|
||||
const RDGeom::Transform3D *trans = nullptr, double vdwScale = 0.8,
|
||||
double stepSize = 0.25, int maxLayers = -1, bool ignoreHs = true);
|
||||
} // namespace MolShapes
|
||||
} // namespace RDKit
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace MolShapes {
|
||||
//! from the origin
|
||||
RDKIT_SHAPEHELPERS_EXPORT void computeConfDimsAndOffset(
|
||||
const Conformer &conf, RDGeom::Point3D &dims, RDGeom::Point3D &offSet,
|
||||
const RDGeom::Transform3D *trans = 0, double padding = 2.5);
|
||||
const RDGeom::Transform3D *trans = nullptr, double padding = 2.5);
|
||||
|
||||
//! Compute the box that will fit the conformer
|
||||
/*!
|
||||
@@ -42,7 +42,7 @@ RDKIT_SHAPEHELPERS_EXPORT void computeConfDimsAndOffset(
|
||||
*/
|
||||
RDKIT_SHAPEHELPERS_EXPORT void computeConfBox(
|
||||
const Conformer &conf, RDGeom::Point3D &leftBottom,
|
||||
RDGeom::Point3D &rightTop, const RDGeom::Transform3D *trans = 0,
|
||||
RDGeom::Point3D &rightTop, const RDGeom::Transform3D *trans = nullptr,
|
||||
double padding = 2.5);
|
||||
|
||||
//! Compute the union of two boxes
|
||||
@@ -60,7 +60,7 @@ RDKIT_SHAPEHELPERS_EXPORT void computeUnionBox(
|
||||
*/
|
||||
RDKIT_SHAPEHELPERS_EXPORT std::vector<double> getConfDimensions(
|
||||
const Conformer &conf, double padding = 2.5,
|
||||
const RDGeom::Point3D *center = 0, bool ignoreHs = true);
|
||||
const RDGeom::Point3D *center = nullptr, bool ignoreHs = true);
|
||||
|
||||
//! Compute the shape tversky index between two molecule based on a
|
||||
// predefined alignment
|
||||
|
||||
@@ -65,7 +65,7 @@ RDKIT_SMILESPARSE_EXPORT Bond *SmilesToBond(const std::string &smi);
|
||||
*/
|
||||
inline RWMol *SmilesToMol(
|
||||
const std::string &smi, int debugParse = 0, bool sanitize = true,
|
||||
std::map<std::string, std::string> *replacements = 0) {
|
||||
std::map<std::string, std::string> *replacements = nullptr) {
|
||||
SmilesParserParams params;
|
||||
params.debugParse = debugParse;
|
||||
params.replacements = replacements;
|
||||
@@ -93,7 +93,7 @@ inline RWMol *SmilesToMol(
|
||||
*/
|
||||
RDKIT_SMILESPARSE_EXPORT RWMol *SmartsToMol(
|
||||
const std::string &sma, int debugParse = 0, bool mergeHs = false,
|
||||
std::map<std::string, std::string> *replacements = 0);
|
||||
std::map<std::string, std::string> *replacements = nullptr);
|
||||
|
||||
RDKIT_SMILESPARSE_EXPORT Atom *SmartsToAtom(const std::string &sma);
|
||||
RDKIT_SMILESPARSE_EXPORT Bond *SmartsToBond(const std::string &sma);
|
||||
|
||||
@@ -39,7 +39,7 @@ RDKIT_SMILESPARSE_EXPORT bool inOrganicSubset(int atomicNumber);
|
||||
*/
|
||||
RDKIT_SMILESPARSE_EXPORT std::string GetAtomSmiles(const Atom *atom,
|
||||
bool doKekule = false,
|
||||
const Bond *bondIn = 0,
|
||||
const Bond *bondIn = nullptr,
|
||||
bool allHsExplicit = false,
|
||||
bool isomericSmiles = true);
|
||||
|
||||
@@ -121,9 +121,9 @@ RDKIT_SMILESPARSE_EXPORT std::vector<std::string> MolToRandomSmilesVect(
|
||||
*/
|
||||
RDKIT_SMILESPARSE_EXPORT std::string MolFragmentToSmiles(
|
||||
const ROMol &mol, const std::vector<int> &atomsToUse,
|
||||
const std::vector<int> *bondsToUse = 0,
|
||||
const std::vector<std::string> *atomSymbols = 0,
|
||||
const std::vector<std::string> *bondSymbols = 0,
|
||||
const std::vector<int> *bondsToUse = nullptr,
|
||||
const std::vector<std::string> *atomSymbols = nullptr,
|
||||
const std::vector<std::string> *bondSymbols = nullptr,
|
||||
bool doIsomericSmiles = true, bool doKekule = false, int rootedAtAtom = -1,
|
||||
bool canonical = true, bool allBondsExplicit = false,
|
||||
bool allHsExplicit = false);
|
||||
@@ -174,9 +174,9 @@ RDKIT_SMILESPARSE_EXPORT std::string MolToCXSmiles(
|
||||
*/
|
||||
RDKIT_SMILESPARSE_EXPORT std::string MolFragmentToCXSmiles(
|
||||
const ROMol &mol, const std::vector<int> &atomsToUse,
|
||||
const std::vector<int> *bondsToUse = 0,
|
||||
const std::vector<std::string> *atomSymbols = 0,
|
||||
const std::vector<std::string> *bondSymbols = 0,
|
||||
const std::vector<int> *bondsToUse = nullptr,
|
||||
const std::vector<std::string> *atomSymbols = nullptr,
|
||||
const std::vector<std::string> *bondSymbols = nullptr,
|
||||
bool doIsomericSmiles = true, bool doKekule = false, int rootedAtAtom = -1,
|
||||
bool canonical = true, bool allBondsExplicit = false,
|
||||
bool allHsExplicit = false);
|
||||
|
||||
@@ -2132,7 +2132,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
|
||||
}
|
||||
else
|
||||
/* Can't grow it, we don't own it. */
|
||||
b->yy_ch_buf = NULL;
|
||||
b->yy_ch_buf = nullptr;
|
||||
|
||||
if ( ! b->yy_ch_buf )
|
||||
YY_FATAL_ERROR(
|
||||
@@ -2477,7 +2477,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
|
||||
return;
|
||||
|
||||
if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
|
||||
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
|
||||
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) nullptr;
|
||||
|
||||
if ( b->yy_is_our_buffer )
|
||||
yyfree( (void *) b->yy_ch_buf , yyscanner );
|
||||
@@ -2551,7 +2551,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
|
||||
void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
|
||||
{
|
||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||
if (new_buffer == NULL)
|
||||
if (new_buffer == nullptr)
|
||||
return;
|
||||
|
||||
yyensure_buffer_stack(yyscanner);
|
||||
@@ -2586,7 +2586,7 @@ void yypop_buffer_state (yyscan_t yyscanner)
|
||||
return;
|
||||
|
||||
yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
|
||||
YY_CURRENT_BUFFER_LVALUE = NULL;
|
||||
YY_CURRENT_BUFFER_LVALUE = nullptr;
|
||||
if (yyg->yy_buffer_stack_top > 0)
|
||||
--yyg->yy_buffer_stack_top;
|
||||
|
||||
@@ -2657,7 +2657,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann
|
||||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
||||
base[size-1] != YY_END_OF_BUFFER_CHAR )
|
||||
/* They forgot to leave room for the EOB's. */
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
|
||||
if ( ! b )
|
||||
@@ -2666,7 +2666,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann
|
||||
b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
|
||||
b->yy_buf_pos = b->yy_ch_buf = base;
|
||||
b->yy_is_our_buffer = 0;
|
||||
b->yy_input_file = NULL;
|
||||
b->yy_input_file = nullptr;
|
||||
b->yy_n_chars = b->yy_buf_size;
|
||||
b->yy_is_interactive = 0;
|
||||
b->yy_at_bol = 1;
|
||||
@@ -2965,14 +2965,14 @@ void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
|
||||
*/
|
||||
int yylex_init(yyscan_t* ptr_yy_globals)
|
||||
{
|
||||
if (ptr_yy_globals == NULL){
|
||||
if (ptr_yy_globals == nullptr){
|
||||
errno = EINVAL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
*ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
|
||||
*ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), nullptr );
|
||||
|
||||
if (*ptr_yy_globals == NULL){
|
||||
if (*ptr_yy_globals == nullptr){
|
||||
errno = ENOMEM;
|
||||
return 1;
|
||||
}
|
||||
@@ -2996,14 +2996,14 @@ int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
|
||||
|
||||
yyset_extra (yy_user_defined, &dummy_yyguts);
|
||||
|
||||
if (ptr_yy_globals == NULL){
|
||||
if (ptr_yy_globals == nullptr){
|
||||
errno = EINVAL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
*ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
|
||||
|
||||
if (*ptr_yy_globals == NULL){
|
||||
if (*ptr_yy_globals == nullptr){
|
||||
errno = ENOMEM;
|
||||
return 1;
|
||||
}
|
||||
@@ -3024,24 +3024,24 @@ static int yy_init_globals (yyscan_t yyscanner)
|
||||
* This function is called from yylex_destroy(), so don't allocate here.
|
||||
*/
|
||||
|
||||
yyg->yy_buffer_stack = NULL;
|
||||
yyg->yy_buffer_stack = nullptr;
|
||||
yyg->yy_buffer_stack_top = 0;
|
||||
yyg->yy_buffer_stack_max = 0;
|
||||
yyg->yy_c_buf_p = NULL;
|
||||
yyg->yy_c_buf_p = nullptr;
|
||||
yyg->yy_init = 0;
|
||||
yyg->yy_start = 0;
|
||||
|
||||
yyg->yy_start_stack_ptr = 0;
|
||||
yyg->yy_start_stack_depth = 0;
|
||||
yyg->yy_start_stack = NULL;
|
||||
yyg->yy_start_stack = nullptr;
|
||||
|
||||
/* Defined in main.c */
|
||||
#ifdef YY_STDINIT
|
||||
yyin = stdin;
|
||||
yyout = stdout;
|
||||
#else
|
||||
yyin = NULL;
|
||||
yyout = NULL;
|
||||
yyin = nullptr;
|
||||
yyout = nullptr;
|
||||
#endif
|
||||
|
||||
/* For future reference: Set errno on error, since we are called by
|
||||
@@ -3058,17 +3058,17 @@ int yylex_destroy (yyscan_t yyscanner)
|
||||
/* Pop the buffer stack, destroying each element. */
|
||||
while(YY_CURRENT_BUFFER){
|
||||
yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
|
||||
YY_CURRENT_BUFFER_LVALUE = NULL;
|
||||
YY_CURRENT_BUFFER_LVALUE = nullptr;
|
||||
yypop_buffer_state(yyscanner);
|
||||
}
|
||||
|
||||
/* Destroy the stack itself. */
|
||||
yyfree(yyg->yy_buffer_stack , yyscanner);
|
||||
yyg->yy_buffer_stack = NULL;
|
||||
yyg->yy_buffer_stack = nullptr;
|
||||
|
||||
/* Destroy the start condition stack. */
|
||||
yyfree( yyg->yy_start_stack , yyscanner );
|
||||
yyg->yy_start_stack = NULL;
|
||||
yyg->yy_start_stack = nullptr;
|
||||
|
||||
/* Reset the globals. This is important in a non-reentrant scanner so the next time
|
||||
* yylex() is called, initialization will occur. */
|
||||
@@ -3076,7 +3076,7 @@ int yylex_destroy (yyscan_t yyscanner)
|
||||
|
||||
/* Destroy the main struct (reentrant only). */
|
||||
yyfree ( yyscanner , yyscanner );
|
||||
yyscanner = NULL;
|
||||
yyscanner = nullptr;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -2409,7 +2409,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
|
||||
}
|
||||
else
|
||||
/* Can't grow it, we don't own it. */
|
||||
b->yy_ch_buf = NULL;
|
||||
b->yy_ch_buf = nullptr;
|
||||
|
||||
if ( ! b->yy_ch_buf )
|
||||
YY_FATAL_ERROR(
|
||||
@@ -2754,7 +2754,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
|
||||
return;
|
||||
|
||||
if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
|
||||
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
|
||||
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) nullptr;
|
||||
|
||||
if ( b->yy_is_our_buffer )
|
||||
yyfree( (void *) b->yy_ch_buf , yyscanner );
|
||||
@@ -2828,7 +2828,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
|
||||
void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
|
||||
{
|
||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||
if (new_buffer == NULL)
|
||||
if (new_buffer == nullptr)
|
||||
return;
|
||||
|
||||
yyensure_buffer_stack(yyscanner);
|
||||
@@ -2863,7 +2863,7 @@ void yypop_buffer_state (yyscan_t yyscanner)
|
||||
return;
|
||||
|
||||
yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
|
||||
YY_CURRENT_BUFFER_LVALUE = NULL;
|
||||
YY_CURRENT_BUFFER_LVALUE = nullptr;
|
||||
if (yyg->yy_buffer_stack_top > 0)
|
||||
--yyg->yy_buffer_stack_top;
|
||||
|
||||
@@ -2934,7 +2934,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann
|
||||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
||||
base[size-1] != YY_END_OF_BUFFER_CHAR )
|
||||
/* They forgot to leave room for the EOB's. */
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
|
||||
if ( ! b )
|
||||
@@ -2943,7 +2943,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann
|
||||
b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
|
||||
b->yy_buf_pos = b->yy_ch_buf = base;
|
||||
b->yy_is_our_buffer = 0;
|
||||
b->yy_input_file = NULL;
|
||||
b->yy_input_file = nullptr;
|
||||
b->yy_n_chars = b->yy_buf_size;
|
||||
b->yy_is_interactive = 0;
|
||||
b->yy_at_bol = 1;
|
||||
@@ -3201,14 +3201,14 @@ void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
|
||||
*/
|
||||
int yylex_init(yyscan_t* ptr_yy_globals)
|
||||
{
|
||||
if (ptr_yy_globals == NULL){
|
||||
if (ptr_yy_globals == nullptr){
|
||||
errno = EINVAL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
*ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
|
||||
*ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), nullptr );
|
||||
|
||||
if (*ptr_yy_globals == NULL){
|
||||
if (*ptr_yy_globals == nullptr){
|
||||
errno = ENOMEM;
|
||||
return 1;
|
||||
}
|
||||
@@ -3232,14 +3232,14 @@ int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
|
||||
|
||||
yyset_extra (yy_user_defined, &dummy_yyguts);
|
||||
|
||||
if (ptr_yy_globals == NULL){
|
||||
if (ptr_yy_globals == nullptr){
|
||||
errno = EINVAL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
*ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
|
||||
|
||||
if (*ptr_yy_globals == NULL){
|
||||
if (*ptr_yy_globals == nullptr){
|
||||
errno = ENOMEM;
|
||||
return 1;
|
||||
}
|
||||
@@ -3260,24 +3260,24 @@ static int yy_init_globals (yyscan_t yyscanner)
|
||||
* This function is called from yylex_destroy(), so don't allocate here.
|
||||
*/
|
||||
|
||||
yyg->yy_buffer_stack = NULL;
|
||||
yyg->yy_buffer_stack = nullptr;
|
||||
yyg->yy_buffer_stack_top = 0;
|
||||
yyg->yy_buffer_stack_max = 0;
|
||||
yyg->yy_c_buf_p = NULL;
|
||||
yyg->yy_c_buf_p = nullptr;
|
||||
yyg->yy_init = 0;
|
||||
yyg->yy_start = 0;
|
||||
|
||||
yyg->yy_start_stack_ptr = 0;
|
||||
yyg->yy_start_stack_depth = 0;
|
||||
yyg->yy_start_stack = NULL;
|
||||
yyg->yy_start_stack = nullptr;
|
||||
|
||||
/* Defined in main.c */
|
||||
#ifdef YY_STDINIT
|
||||
yyin = stdin;
|
||||
yyout = stdout;
|
||||
#else
|
||||
yyin = NULL;
|
||||
yyout = NULL;
|
||||
yyin = nullptr;
|
||||
yyout = nullptr;
|
||||
#endif
|
||||
|
||||
/* For future reference: Set errno on error, since we are called by
|
||||
@@ -3294,17 +3294,17 @@ int yylex_destroy (yyscan_t yyscanner)
|
||||
/* Pop the buffer stack, destroying each element. */
|
||||
while(YY_CURRENT_BUFFER){
|
||||
yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
|
||||
YY_CURRENT_BUFFER_LVALUE = NULL;
|
||||
YY_CURRENT_BUFFER_LVALUE = nullptr;
|
||||
yypop_buffer_state(yyscanner);
|
||||
}
|
||||
|
||||
/* Destroy the stack itself. */
|
||||
yyfree(yyg->yy_buffer_stack , yyscanner);
|
||||
yyg->yy_buffer_stack = NULL;
|
||||
yyg->yy_buffer_stack = nullptr;
|
||||
|
||||
/* Destroy the start condition stack. */
|
||||
yyfree( yyg->yy_start_stack , yyscanner );
|
||||
yyg->yy_start_stack = NULL;
|
||||
yyg->yy_start_stack = nullptr;
|
||||
|
||||
/* Reset the globals. This is important in a non-reentrant scanner so the next time
|
||||
* yylex() is called, initialization will occur. */
|
||||
@@ -3312,7 +3312,7 @@ int yylex_destroy (yyscan_t yyscanner)
|
||||
|
||||
/* Destroy the main struct (reentrant only). */
|
||||
yyfree ( yyscanner , yyscanner );
|
||||
yyscanner = NULL;
|
||||
yyscanner = nullptr;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ typedef boost::tuples::tuple<std::uint32_t, std::uint32_t, std::uint32_t>
|
||||
|
||||
RDKIT_SUBGRAPHS_EXPORT DiscrimTuple calcPathDiscriminators(
|
||||
const ROMol &mol, const PATH_TYPE &path, bool useBO = true,
|
||||
std::vector<std::uint32_t> *extraInvars = 0);
|
||||
std::vector<std::uint32_t> *extraInvars = nullptr);
|
||||
RDKIT_SUBGRAPHS_EXPORT PATH_LIST uniquifyPaths(const ROMol &mol,
|
||||
const PATH_LIST &allPathsb,
|
||||
bool useBO = true);
|
||||
|
||||
@@ -163,7 +163,7 @@ class VF2SubState {
|
||||
if (sortNodes) {
|
||||
order = SortNodesByFrequency(ag1);
|
||||
} else {
|
||||
order = NULL;
|
||||
order = nullptr;
|
||||
}
|
||||
|
||||
core_len = 0;
|
||||
@@ -184,7 +184,7 @@ class VF2SubState {
|
||||
core_2[i] = NULL_NODE;
|
||||
term_2[i] = 0;
|
||||
}
|
||||
vs_compared = 0;
|
||||
vs_compared = nullptr;
|
||||
// vs_compared = new int[n1*n2];
|
||||
// memset((void *)vs_compared,0,n1*n2*sizeof(int));
|
||||
|
||||
@@ -287,7 +287,7 @@ class VF2SubState {
|
||||
boost::adjacent_vertices(core_1[*n1iter_beg], *g2);
|
||||
pair.hasiter = true;
|
||||
}
|
||||
} else if (pair.n1 == 0 && order != NULL) {
|
||||
} else if (pair.n1 == 0 && order != nullptr) {
|
||||
// Optimisation: if the order vector is laid out in a DFS/BFS then this
|
||||
// loop can be replaced with:
|
||||
// pair.n1=order[core_len];
|
||||
|
||||
@@ -378,7 +378,7 @@ class RDKIT_SUBSTRUCTLIBRARY_EXPORT SubstructLibrary {
|
||||
fps(nullptr) {}
|
||||
|
||||
SubstructLibrary(boost::shared_ptr<MolHolderBase> molecules)
|
||||
: molholder(molecules), fpholder(), mols(molholder.get()), fps(0) {}
|
||||
: molholder(molecules), fpholder(), mols(molholder.get()), fps(nullptr) {}
|
||||
|
||||
SubstructLibrary(boost::shared_ptr<MolHolderBase> molecules,
|
||||
boost::shared_ptr<FPHolderBase> fingerprints)
|
||||
|
||||
@@ -150,11 +150,11 @@ void serialize(Archive &ar, RDKit::PatternHolder &pattern_holder,
|
||||
|
||||
template <class Archive>
|
||||
void registerSubstructLibraryTypes(Archive &ar) {
|
||||
ar.register_type(static_cast<RDKit::MolHolder *>(NULL));
|
||||
ar.register_type(static_cast<RDKit::CachedMolHolder *>(NULL));
|
||||
ar.register_type(static_cast<RDKit::CachedSmilesMolHolder *>(NULL));
|
||||
ar.register_type(static_cast<RDKit::CachedTrustedSmilesMolHolder *>(NULL));
|
||||
ar.register_type(static_cast<RDKit::PatternHolder *>(NULL));
|
||||
ar.register_type(static_cast<RDKit::MolHolder *>(nullptr));
|
||||
ar.register_type(static_cast<RDKit::CachedMolHolder *>(nullptr));
|
||||
ar.register_type(static_cast<RDKit::CachedSmilesMolHolder *>(nullptr));
|
||||
ar.register_type(static_cast<RDKit::CachedTrustedSmilesMolHolder *>(nullptr));
|
||||
ar.register_type(static_cast<RDKit::PatternHolder *>(nullptr));
|
||||
}
|
||||
|
||||
template <class Archive>
|
||||
|
||||
@@ -33,7 +33,7 @@ class RDKIT_TRAJECTORY_EXPORT Snapshot {
|
||||
\param energy is the energy associated with this set of coordinates
|
||||
*/
|
||||
Snapshot(boost::shared_array<double> pos, double energy = 0.0)
|
||||
: d_trajectory(NULL), d_energy(energy), d_pos(pos) {}
|
||||
: d_trajectory(nullptr), d_energy(energy), d_pos(pos) {}
|
||||
/*! \return a const pointer to the parent Trajectory
|
||||
*/
|
||||
const Trajectory *trajectory() const { return d_trajectory; }
|
||||
|
||||
@@ -29,7 +29,7 @@ class RDKIT_TRAJECTORY_EXPORT Trajectory {
|
||||
the Trajectory takes ownership of the SnapshotVect
|
||||
*/
|
||||
Trajectory(unsigned int dimension, unsigned int numPoints,
|
||||
SnapshotVect *snapshotVect = NULL);
|
||||
SnapshotVect *snapshotVect = nullptr);
|
||||
/*! \brief Copy constructor
|
||||
*/
|
||||
Trajectory(const Trajectory &other);
|
||||
|
||||
@@ -27,14 +27,14 @@ T *MolSupplIter(T *suppl) {
|
||||
|
||||
template <typename T>
|
||||
ROMol *MolForwardSupplNext(T *suppl) {
|
||||
ROMol *res = 0;
|
||||
ROMol *res = nullptr;
|
||||
if (!suppl->atEnd()) {
|
||||
try {
|
||||
res = suppl->next();
|
||||
} catch (const FileParseException&) {
|
||||
throw;
|
||||
} catch (...) {
|
||||
res = 0;
|
||||
res = nullptr;
|
||||
}
|
||||
} else {
|
||||
PyErr_SetString(PyExc_StopIteration, "End of supplier hit");
|
||||
@@ -49,14 +49,14 @@ ROMol *MolForwardSupplNext(T *suppl) {
|
||||
|
||||
template <typename T>
|
||||
ROMol *MolSupplNext(T *suppl) {
|
||||
ROMol *res = 0;
|
||||
ROMol *res = nullptr;
|
||||
if (!suppl->atEnd()) {
|
||||
try {
|
||||
res = suppl->next();
|
||||
} catch (const FileParseException&) {
|
||||
throw;
|
||||
} catch (...) {
|
||||
res = 0;
|
||||
res = nullptr;
|
||||
}
|
||||
} else {
|
||||
PyErr_SetString(PyExc_StopIteration, "End of supplier hit");
|
||||
@@ -68,14 +68,14 @@ ROMol *MolSupplNext(T *suppl) {
|
||||
|
||||
template <typename T>
|
||||
ROMol *MolSupplNextAcceptNullLastMolecule(T *suppl) {
|
||||
ROMol *res = 0;
|
||||
ROMol *res = nullptr;
|
||||
if (!suppl->atEnd()) {
|
||||
try {
|
||||
res = suppl->next();
|
||||
} catch (const FileParseException&) {
|
||||
throw;
|
||||
} catch (...) {
|
||||
res = 0;
|
||||
res = nullptr;
|
||||
}
|
||||
} else {
|
||||
PyErr_SetString(PyExc_StopIteration, "End of supplier hit");
|
||||
@@ -86,7 +86,7 @@ ROMol *MolSupplNextAcceptNullLastMolecule(T *suppl) {
|
||||
|
||||
template <typename T>
|
||||
ROMol *MolSupplGetItem(T *suppl, int idx) {
|
||||
ROMol *res = 0;
|
||||
ROMol *res = nullptr;
|
||||
if (idx < 0) {
|
||||
idx = suppl->length() + idx;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ ROMol *MolSupplGetItem(T *suppl, int idx) {
|
||||
PyErr_SetString(PyExc_IndexError, "invalid index");
|
||||
throw boost::python::error_already_set();
|
||||
} else {
|
||||
res = 0;
|
||||
res = nullptr;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
|
||||
@@ -89,14 +89,14 @@ class RDKIT_GRAPHMOL_EXPORT canon_atom {
|
||||
std::vector<bondholder> bonds;
|
||||
|
||||
canon_atom()
|
||||
: atom(NULL),
|
||||
: atom(nullptr),
|
||||
index(-1),
|
||||
degree(0),
|
||||
totalNumHs(0),
|
||||
hasRingNbr(false),
|
||||
isRingStereoAtom(false),
|
||||
nbrIds(NULL),
|
||||
p_symbol(NULL){};
|
||||
nbrIds(nullptr),
|
||||
p_symbol(nullptr){};
|
||||
|
||||
~canon_atom() { free(nbrIds); }
|
||||
};
|
||||
@@ -126,14 +126,14 @@ class RDKIT_GRAPHMOL_EXPORT SpecialChiralityAtomCompareFunctor {
|
||||
const boost::dynamic_bitset<> *dp_atomsInPlay, *dp_bondsInPlay;
|
||||
|
||||
SpecialChiralityAtomCompareFunctor()
|
||||
: dp_atoms(NULL),
|
||||
dp_mol(NULL),
|
||||
dp_atomsInPlay(NULL),
|
||||
dp_bondsInPlay(NULL){};
|
||||
: dp_atoms(nullptr),
|
||||
dp_mol(nullptr),
|
||||
dp_atomsInPlay(nullptr),
|
||||
dp_bondsInPlay(nullptr){};
|
||||
SpecialChiralityAtomCompareFunctor(
|
||||
Canon::canon_atom *atoms, const ROMol &m,
|
||||
const boost::dynamic_bitset<> *atomsInPlay = NULL,
|
||||
const boost::dynamic_bitset<> *bondsInPlay = NULL)
|
||||
const boost::dynamic_bitset<> *atomsInPlay = nullptr,
|
||||
const boost::dynamic_bitset<> *bondsInPlay = nullptr)
|
||||
: dp_atoms(atoms),
|
||||
dp_mol(&m),
|
||||
dp_atomsInPlay(atomsInPlay),
|
||||
@@ -182,14 +182,14 @@ class RDKIT_GRAPHMOL_EXPORT SpecialSymmetryAtomCompareFunctor {
|
||||
const boost::dynamic_bitset<> *dp_atomsInPlay, *dp_bondsInPlay;
|
||||
|
||||
SpecialSymmetryAtomCompareFunctor()
|
||||
: dp_atoms(NULL),
|
||||
dp_mol(NULL),
|
||||
dp_atomsInPlay(NULL),
|
||||
dp_bondsInPlay(NULL){};
|
||||
: dp_atoms(nullptr),
|
||||
dp_mol(nullptr),
|
||||
dp_atomsInPlay(nullptr),
|
||||
dp_bondsInPlay(nullptr){};
|
||||
SpecialSymmetryAtomCompareFunctor(
|
||||
Canon::canon_atom *atoms, const ROMol &m,
|
||||
const boost::dynamic_bitset<> *atomsInPlay = NULL,
|
||||
const boost::dynamic_bitset<> *bondsInPlay = NULL)
|
||||
const boost::dynamic_bitset<> *atomsInPlay = nullptr,
|
||||
const boost::dynamic_bitset<> *bondsInPlay = nullptr)
|
||||
: dp_atoms(atoms),
|
||||
dp_mol(&m),
|
||||
dp_atomsInPlay(atomsInPlay),
|
||||
@@ -380,17 +380,17 @@ class RDKIT_GRAPHMOL_EXPORT AtomCompareFunctor {
|
||||
bool df_useChiralityRings;
|
||||
|
||||
AtomCompareFunctor()
|
||||
: dp_atoms(NULL),
|
||||
dp_mol(NULL),
|
||||
dp_atomsInPlay(NULL),
|
||||
dp_bondsInPlay(NULL),
|
||||
: dp_atoms(nullptr),
|
||||
dp_mol(nullptr),
|
||||
dp_atomsInPlay(nullptr),
|
||||
dp_bondsInPlay(nullptr),
|
||||
df_useNbrs(false),
|
||||
df_useIsotopes(true),
|
||||
df_useChirality(true),
|
||||
df_useChiralityRings(true){};
|
||||
AtomCompareFunctor(Canon::canon_atom *atoms, const ROMol &m,
|
||||
const boost::dynamic_bitset<> *atomsInPlay = NULL,
|
||||
const boost::dynamic_bitset<> *bondsInPlay = NULL)
|
||||
const boost::dynamic_bitset<> *atomsInPlay = nullptr,
|
||||
const boost::dynamic_bitset<> *bondsInPlay = nullptr)
|
||||
: dp_atoms(atoms),
|
||||
dp_mol(&m),
|
||||
dp_atomsInPlay(atomsInPlay),
|
||||
@@ -514,7 +514,7 @@ class RDKIT_GRAPHMOL_EXPORT ChiralAtomCompareFunctor {
|
||||
const ROMol *dp_mol;
|
||||
bool df_useNbrs;
|
||||
ChiralAtomCompareFunctor()
|
||||
: dp_atoms(NULL), dp_mol(NULL), df_useNbrs(false){};
|
||||
: dp_atoms(nullptr), dp_mol(nullptr), df_useNbrs(false){};
|
||||
ChiralAtomCompareFunctor(Canon::canon_atom *atoms, const ROMol &m)
|
||||
: dp_atoms(atoms), dp_mol(&m), df_useNbrs(false){};
|
||||
int operator()(int i, int j) const {
|
||||
@@ -725,8 +725,9 @@ RDKIT_GRAPHMOL_EXPORT void rankFragmentAtoms(
|
||||
const ROMol &mol, std::vector<unsigned int> &res,
|
||||
const boost::dynamic_bitset<> &atomsInPlay,
|
||||
const boost::dynamic_bitset<> &bondsInPlay,
|
||||
const std::vector<std::string> *atomSymbols = NULL, bool breakTies = true,
|
||||
bool includeChirality = true, bool includeIsotopes = true);
|
||||
const std::vector<std::string> *atomSymbols = nullptr,
|
||||
bool breakTies = true, bool includeChirality = true,
|
||||
bool includeIsotopes = true);
|
||||
|
||||
RDKIT_GRAPHMOL_EXPORT void chiralRankMolAtoms(const ROMol &mol,
|
||||
std::vector<unsigned int> &res);
|
||||
|
||||
@@ -44,7 +44,7 @@ class BitCorrMatGenerator {
|
||||
~BitCorrMatGenerator() { delete[] dp_corrMat; }
|
||||
|
||||
void initGenerator() {
|
||||
dp_corrMat = 0;
|
||||
dp_corrMat = nullptr;
|
||||
d_descs.resize(0);
|
||||
d_nExamples = 0;
|
||||
};
|
||||
|
||||
@@ -120,9 +120,9 @@ class RDKIT_INFOTHEORY_EXPORT InfoBitRanker {
|
||||
d_clsCount.resize(d_classes, 0);
|
||||
d_nInst = 0;
|
||||
d_top = 0;
|
||||
dp_topBits = 0;
|
||||
dp_topBits = nullptr;
|
||||
d_biasList.resize(0);
|
||||
dp_maskBits = 0;
|
||||
dp_maskBits = nullptr;
|
||||
}
|
||||
|
||||
~InfoBitRanker() {
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Alignments {
|
||||
double RDKIT_ALIGNMENT_EXPORT
|
||||
AlignPoints(const RDGeom::Point3DConstPtrVect &refPoints,
|
||||
const RDGeom::Point3DConstPtrVect &probePoints,
|
||||
RDGeom::Transform3D &trans, const DoubleVector *weights = 0,
|
||||
RDGeom::Transform3D &trans, const DoubleVector *weights = nullptr,
|
||||
bool reflect = false, unsigned int maxIterations = 50);
|
||||
} // namespace Alignments
|
||||
} // namespace RDNumeric
|
||||
|
||||
@@ -53,11 +53,9 @@ We use the iterative power method, which works like this:
|
||||
|
||||
|
||||
*/
|
||||
bool RDKIT_EIGENSOLVERS_EXPORT powerEigenSolver(unsigned int numEig,
|
||||
DoubleSymmMatrix &mat,
|
||||
DoubleVector &eigenValues,
|
||||
DoubleMatrix *eigenVectors = 0,
|
||||
int seed = -1);
|
||||
bool RDKIT_EIGENSOLVERS_EXPORT powerEigenSolver(
|
||||
unsigned int numEig, DoubleSymmMatrix &mat, DoubleVector &eigenValues,
|
||||
DoubleMatrix *eigenVectors = nullptr, int seed = -1);
|
||||
//! \overload
|
||||
static inline bool powerEigenSolver(unsigned int numEig, DoubleSymmMatrix &mat,
|
||||
DoubleVector &eigenValues,
|
||||
|
||||
@@ -251,7 +251,7 @@ int minimize(unsigned int dim, double *pos, double gradTol,
|
||||
if (snapshotVect && snapshotFreq) {
|
||||
RDKit::Snapshot s(boost::shared_array<double>(newPos), fp);
|
||||
snapshotVect->push_back(s);
|
||||
newPos = NULL;
|
||||
newPos = nullptr;
|
||||
}
|
||||
CLEANUP();
|
||||
return 0;
|
||||
@@ -275,7 +275,7 @@ int minimize(unsigned int dim, double *pos, double gradTol,
|
||||
if (snapshotVect && snapshotFreq) {
|
||||
RDKit::Snapshot s(boost::shared_array<double>(newPos), fp);
|
||||
snapshotVect->push_back(s);
|
||||
newPos = NULL;
|
||||
newPos = nullptr;
|
||||
}
|
||||
CLEANUP();
|
||||
return 0;
|
||||
@@ -382,8 +382,8 @@ int minimize(unsigned int dim, double *pos, double gradTol,
|
||||
unsigned int &numIters, double &funcVal, EnergyFunctor func,
|
||||
GradientFunctor gradFunc, double funcTol = TOLX,
|
||||
unsigned int maxIts = MAXITS) {
|
||||
return minimize(dim, pos, gradTol, numIters, funcVal, func, gradFunc, 0, NULL,
|
||||
funcTol, maxIts);
|
||||
return minimize(dim, pos, gradTol, numIters, funcVal, func, gradFunc, 0,
|
||||
nullptr, funcTol, maxIts);
|
||||
}
|
||||
|
||||
} // namespace BFGSOpt
|
||||
|
||||
@@ -55,8 +55,8 @@ class Query {
|
||||
Query()
|
||||
: d_description(""),
|
||||
df_negate(false),
|
||||
d_matchFunc(NULL),
|
||||
d_dataFunc(NULL){};
|
||||
d_matchFunc(nullptr),
|
||||
d_dataFunc(nullptr){};
|
||||
virtual ~Query() { this->d_children.clear(); };
|
||||
|
||||
//! sets whether or not we are negated
|
||||
@@ -163,7 +163,7 @@ class Query {
|
||||
MatchFuncArgType TypeConvert(MatchFuncArgType what,
|
||||
Int2Type<false> /*d*/) const {
|
||||
MatchFuncArgType mfArg;
|
||||
if (this->d_dataFuncSameType != NULL &&
|
||||
if (this->d_dataFuncSameType != nullptr &&
|
||||
std::is_same<MatchFuncArgType, DataFuncArgType>::value) {
|
||||
mfArg = this->d_dataFuncSameType(what);
|
||||
} else {
|
||||
|
||||
@@ -165,7 +165,7 @@ class RDKIT_RDBOOST_EXPORT RDUNUSED NOGIL {
|
||||
|
||||
inline ~NOGIL() {
|
||||
PyEval_RestoreThread(m_thread_state);
|
||||
m_thread_state = NULL;
|
||||
m_thread_state = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -18,7 +18,7 @@ void rdkit_import_array()
|
||||
// returns void)
|
||||
import_array();
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
return NULL;
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -142,10 +142,10 @@ class streambuf : public std::basic_streambuf<char> {
|
||||
py_seek(getattr(python_file_obj, "seek", bp::object())),
|
||||
py_tell(getattr(python_file_obj, "tell", bp::object())),
|
||||
buffer_size(buffer_size_ != 0 ? buffer_size_ : default_buffer_size),
|
||||
write_buffer(0),
|
||||
write_buffer(nullptr),
|
||||
pos_of_read_buffer_end_in_py_file(0),
|
||||
pos_of_write_buffer_end_in_py_file(buffer_size),
|
||||
farthest_pptr(0) {
|
||||
farthest_pptr(nullptr) {
|
||||
TEST_ASSERT(buffer_size != 0);
|
||||
/* Some Python file objects (e.g. sys.stdout and sys.stdin)
|
||||
have non-functional seek and tell. If so, assign None to
|
||||
@@ -179,7 +179,7 @@ class streambuf : public std::basic_streambuf<char> {
|
||||
farthest_pptr = pptr();
|
||||
} else {
|
||||
// The first attempt at output will result in a call to overflow
|
||||
setp(0, 0);
|
||||
setp(nullptr, nullptr);
|
||||
}
|
||||
|
||||
if (py_tell != bp::object()) {
|
||||
@@ -259,7 +259,7 @@ class streambuf : public std::basic_streambuf<char> {
|
||||
bp::ssize_t py_n_read;
|
||||
if (PyBytes_AsStringAndSize(read_buffer.ptr(), &read_buffer_data,
|
||||
&py_n_read) == -1) {
|
||||
setg(0, 0, 0);
|
||||
setg(nullptr, nullptr, nullptr);
|
||||
throw std::invalid_argument(
|
||||
"The method 'read' of the Python file object "
|
||||
"did not return a string.");
|
||||
|
||||
@@ -71,7 +71,7 @@ class RDKIT_RDGENERAL_EXPORT Dict {
|
||||
if (other._hasNonPodData) _hasNonPodData = true;
|
||||
for (size_t i = 0; i < other._data.size(); ++i) {
|
||||
const Pair &pair = other._data[i];
|
||||
Pair *target = 0;
|
||||
Pair *target = nullptr;
|
||||
for (size_t i = 0; i < _data.size(); ++i) {
|
||||
if (_data[i].key == pair.key) {
|
||||
target = &_data[i];
|
||||
|
||||
@@ -36,8 +36,8 @@ class RDKIT_RDGENERAL_EXPORT rdLogger {
|
||||
: dp_dest(dest),
|
||||
df_owner(owner),
|
||||
df_enabled(true),
|
||||
tee(NULL),
|
||||
teestream(NULL){};
|
||||
tee(nullptr),
|
||||
teestream(nullptr){};
|
||||
|
||||
//! Sets a stream to tee the output to.
|
||||
void SetTee(std::ostream &stream) {
|
||||
@@ -53,8 +53,8 @@ class RDKIT_RDGENERAL_EXPORT rdLogger {
|
||||
if (dp_dest) {
|
||||
delete teestream;
|
||||
delete tee;
|
||||
tee = NULL;
|
||||
teestream = NULL;
|
||||
tee = nullptr;
|
||||
teestream = nullptr;
|
||||
}
|
||||
}
|
||||
~rdLogger() {
|
||||
@@ -63,12 +63,12 @@ class RDKIT_RDGENERAL_EXPORT rdLogger {
|
||||
if (df_owner) {
|
||||
delete dp_dest;
|
||||
}
|
||||
dp_dest = NULL;
|
||||
dp_dest = nullptr;
|
||||
}
|
||||
delete teestream;
|
||||
teestream = NULL;
|
||||
teestream = nullptr;
|
||||
delete tee;
|
||||
tee = NULL;
|
||||
tee = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -367,7 +367,7 @@ RDKIT_RDGENERAL_EXPORT void Intersect(const INT_VECT &r1, const INT_VECT &r2,
|
||||
from the union.
|
||||
*/
|
||||
RDKIT_RDGENERAL_EXPORT void Union(const VECT_INT_VECT &rings, INT_VECT &res,
|
||||
const INT_VECT *exclude = NULL);
|
||||
const INT_VECT *exclude = nullptr);
|
||||
|
||||
//! given a current combination of numbers change it to the next possible
|
||||
// combination
|
||||
|
||||
@@ -225,7 +225,7 @@ RDKit::INT_VECT MaxMinPicker::lazyPick(T &func, unsigned int poolSize,
|
||||
double maxOFmin = -1.0;
|
||||
double tmpThreshold = -1.0;
|
||||
while (picked < pickSize) {
|
||||
unsigned int *pick_prev = 0;
|
||||
unsigned int *pick_prev = nullptr;
|
||||
maxOFmin = -1.0;
|
||||
prev = &pool_list;
|
||||
do {
|
||||
|
||||
Reference in New Issue
Block a user