and another block of warnings

This commit is contained in:
Greg Landrum
2016-03-30 14:03:54 +02:00
parent e04aed8ea8
commit ccbebcf3ba
2 changed files with 48 additions and 52 deletions

View File

@@ -13,50 +13,45 @@
#include <boost/cstdint.hpp>
namespace AvalonTools {
static int avalonSSSBits=0x007FFF;
static int avalonSimilarityBits=0xF07FFF;
std::string getCanonSmiles(RDKit::ROMol &mol,int flags=-1);
void getAvalonCountFP(const RDKit::ROMol &mol,RDKit::SparseIntVect<boost::uint32_t> &res,
unsigned int nBits=512,
bool isQuery=false,
bool resetVect=true,
unsigned int bitFlags=avalonSSSBits);
void getAvalonFP(const RDKit::ROMol &mol,ExplicitBitVect &res,
unsigned int nBits=512,
bool isQuery=false,
bool resetVect=true,
unsigned int bitFlags=avalonSSSBits);
void getAvalonFP(const RDKit::ROMol &mol,std::vector<boost::uint32_t> &res,
unsigned int nBits=512,
bool isQuery=false,
bool resetVect=true,
unsigned int bitFlags=avalonSSSBits);
unsigned int set2DCoords(RDKit::ROMol &mol,bool clearConfs=true);
static int avalonSSSBits = 0x007FFF;
static int avalonSimilarityBits = 0xF07FFF;
std::string getCanonSmiles(RDKit::ROMol &mol, int flags = -1);
void getAvalonCountFP(const RDKit::ROMol &mol,
RDKit::SparseIntVect<boost::uint32_t> &res,
unsigned int nBits = 512, bool isQuery = false,
bool resetVect = true,
unsigned int bitFlags = avalonSSSBits);
void getAvalonFP(const RDKit::ROMol &mol, ExplicitBitVect &res,
unsigned int nBits = 512, bool isQuery = false,
bool resetVect = true, unsigned int bitFlags = avalonSSSBits);
void getAvalonFP(const RDKit::ROMol &mol, std::vector<boost::uint32_t> &res,
unsigned int nBits = 512, bool isQuery = false,
bool resetVect = true, unsigned int bitFlags = avalonSSSBits);
unsigned int set2DCoords(RDKit::ROMol &mol, bool clearConfs = true);
std::string getCanonSmiles(const std::string &data,bool isSmiles,int flags=-1);
void getAvalonCountFP(const std::string &data,bool isSmiles,RDKit::SparseIntVect<boost::uint32_t> &res,
unsigned int nBits=512,
bool isQuery=false,
unsigned int bitFlags=avalonSSSBits);
void getAvalonFP(const std::string &data,bool isSmiles,ExplicitBitVect &res,
unsigned int nBits=512,
bool isQuery=false,
bool resetVect=true,
unsigned int bitFlags=avalonSSSBits);
void getAvalonFP(const std::string &data,bool isSmiles,std::vector<boost::uint32_t> &res,
unsigned int nBits=512,
bool isQuery=false,
bool resetVect=true,
unsigned int bitFlags=avalonSSSBits);
std::string getCanonSmiles(const std::string &data, bool isSmiles,
int flags = -1);
void getAvalonCountFP(const std::string &data, bool isSmiles,
RDKit::SparseIntVect<boost::uint32_t> &res,
unsigned int nBits = 512, bool isQuery = false,
unsigned int bitFlags = avalonSSSBits);
void getAvalonFP(const std::string &data, bool isSmiles, ExplicitBitVect &res,
unsigned int nBits = 512, bool isQuery = false,
bool resetVect = true, unsigned int bitFlags = avalonSSSBits);
void getAvalonFP(const std::string &data, bool isSmiles,
std::vector<boost::uint32_t> &res, unsigned int nBits = 512,
bool isQuery = false, bool resetVect = true,
unsigned int bitFlags = avalonSSSBits);
std::string set2DCoords(const std::string &data,bool isSmiles);
std::string set2DCoords(const std::string &data, bool isSmiles);
int initCheckMol(const std::string &optString);
RDKit::ROMOL_SPTR checkMol(int &errors, RDKit::ROMol& inMol);
RDKit::ROMOL_SPTR checkMol(int &errors, const std::string &data, bool isSmiles);
std::pair<std::string,int> checkMolString(const std::string &data, bool isSmiles);
std::string getCheckMolLog();
int initCheckMol(const std::string &optString);
RDKit::ROMOL_SPTR checkMol(int &errors, RDKit::ROMol &inMol);
RDKit::ROMOL_SPTR checkMol(int &errors, const std::string &data, bool isSmiles);
std::pair<std::string, int> checkMolString(const std::string &data,
bool isSmiles);
std::string getCheckMolLog();
void closeCheckMolFiles();
void closeCheckMolFiles();
}
#endif

View File

@@ -200,10 +200,9 @@ bool assignBondDirs(RWMol& mol, INT_PAIR_VECT& zBondPairs,
* be the same.
*/
Atom* findAlternatingBonds(
ROMol& mol, Atom* current, unsigned int desiredAtomicNumber,
int desiredAtomCharge, Bond::BondType desiredNextBondType,
Bond::BondType desiredEndingBondType, unsigned int currentPathLength,
unsigned int maxPathLength, Bond* lastBond,
ROMol& mol, Atom* current, int desiredAtomicNumber, int desiredAtomCharge,
Bond::BondType desiredNextBondType, Bond::BondType desiredEndingBondType,
unsigned int currentPathLength, unsigned int maxPathLength, Bond* lastBond,
/*OUT*/ std::stack<Bond*>& path, std::set<int>& _visited) {
// memory for what has been visited
if (lastBond == NULL) {
@@ -814,7 +813,8 @@ bool _Valence5NCleanUpA(RWMol& mol, Atom* atom) {
std::stack<Bond*> bestPath;
BOOST_FOREACH (match, fgpMatches) {
// does the match contains the current atom?
if (match[0].second == atom->getIdx() || match[1].second == atom->getIdx())
if (match[0].second == static_cast<int>(atom->getIdx()) ||
match[1].second == static_cast<int>(atom->getIdx()))
continue;
// set both matched N to Sn
mol.getAtomWithIdx(match[0].second)->setAtomicNum(50);
@@ -1329,7 +1329,7 @@ RWMol* InchiToMol(const std::string& inchi, ExtraInchiReturnValues& rv,
// calculate CIPCode as they might be used
UINT_VECT ranks;
Chirality::assignAtomCIPRanks(*m, ranks);
for (int i = 0; i < numStereo0D; i++) {
for (unsigned int i = 0; i < numStereo0D; i++) {
inchi_Stereo0D* stereo0DPtr = inchiOutput.stereo0D + i;
if (stereo0DPtr->parity == INCHI_PARITY_NONE ||
stereo0DPtr->parity == INCHI_PARITY_UNDEFINED)
@@ -1339,8 +1339,9 @@ RWMol* InchiToMol(const std::string& inchi, ExtraInchiReturnValues& rv,
break;
case INCHI_StereoType_DoubleBond: {
// find the bond
int left, right, leftNbr, originalLeftNbr, rightNbr,
originalRightNbr, extraLeftNbr, extraRightNbr;
unsigned int left, right;
int leftNbr, originalLeftNbr, rightNbr, originalRightNbr,
extraLeftNbr, extraRightNbr;
left = indexToAtomIndexMapping[stereo0DPtr->neighbor[1]];
right = indexToAtomIndexMapping[stereo0DPtr->neighbor[2]];
originalLeftNbr =
@@ -1556,7 +1557,7 @@ RWMol* InchiToMol(const std::string& inchi, ExtraInchiReturnValues& rv,
}
void fixOptionSymbol(const char* in, char* out) {
int i;
unsigned int i;
for (i = 0; i < strlen(in); i++) {
#ifdef _WIN32
if (in[i] == '-') out[i] = '/';
@@ -1576,7 +1577,7 @@ void rCleanUp(RWMol& mol) {
SubstructMatch(mol, *q, fgpMatches);
delete q;
// replace all matches
for (int match_id = 0; match_id < fgpMatches.size(); match_id++) {
for (unsigned int match_id = 0; match_id < fgpMatches.size(); match_id++) {
// collect matching atoms
int map[5];
MatchVectType match = fgpMatches[match_id];
@@ -1891,7 +1892,7 @@ std::string MolToInchi(const ROMol& mol, ExtraInchiReturnValues& rv,
inchi_Stereo0D* stereo0Ds;
if (stereo0DEntries.size()) {
stereo0Ds = new inchi_Stereo0D[stereo0DEntries.size()];
for (int i = 0; i < stereo0DEntries.size(); i++) {
for (unsigned int i = 0; i < stereo0DEntries.size(); i++) {
stereo0Ds[i] = stereo0DEntries[i];
}
} else {