mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
backup
This commit is contained in:
@@ -74,14 +74,15 @@ class MolMatchFinalCheckFunctor {
|
||||
// check chiral atoms:
|
||||
for (unsigned int i = 0; i < d_query.getNumAtoms(); ++i) {
|
||||
const Atom *qAt = d_query.getAtomWithIdx(c1[i]);
|
||||
if (qAt->getChiralTag() != Atom::CHI_TETRAHEDRAL_CW &&
|
||||
qAt->getChiralTag() != Atom::CHI_TETRAHEDRAL_CCW)
|
||||
if (qAt->getDegree()<3 || // FIX: doesn't deal with "explicit" Hs properly
|
||||
(qAt->getChiralTag() != Atom::CHI_TETRAHEDRAL_CW &&
|
||||
qAt->getChiralTag() != Atom::CHI_TETRAHEDRAL_CCW))
|
||||
continue;
|
||||
const Atom *mAt = d_mol.getAtomWithIdx(c2[i]);
|
||||
if (mAt->getChiralTag() != Atom::CHI_TETRAHEDRAL_CW &&
|
||||
mAt->getChiralTag() != Atom::CHI_TETRAHEDRAL_CCW)
|
||||
return false;
|
||||
if (qAt->getDegree() != mAt->getDegree()) return false;
|
||||
if (qAt->getDegree() > mAt->getDegree()) return false;
|
||||
INT_LIST qOrder;
|
||||
for (unsigned int j = 0; j < d_query.getNumAtoms(); ++j) {
|
||||
const Bond *qB = d_query.getBondBetweenAtoms(c1[i], c1[j]);
|
||||
@@ -100,7 +101,16 @@ class MolMatchFinalCheckFunctor {
|
||||
if (mOrder.size() == mAt->getDegree()) break;
|
||||
}
|
||||
}
|
||||
int mPermCount = mAt->getPerturbationOrder(mOrder);
|
||||
INT_LIST moOrder;
|
||||
ROMol::OEDGE_ITER dbeg, dend;
|
||||
boost::tie(dbeg, dend) = d_mol.getAtomBonds(mAt);
|
||||
while (dbeg != dend) {
|
||||
int dbidx=d_mol[*dbeg]->getIdx();
|
||||
if(std::find(mOrder.begin(),mOrder.end(),dbidx)!=mOrder.end())
|
||||
moOrder.push_back(dbidx);
|
||||
++dbeg;
|
||||
}
|
||||
int mPermCount = static_cast<int>(countSwapsToInterconvert(moOrder,mOrder));
|
||||
|
||||
if ((qPermCount % 2 == mPermCount % 2 &&
|
||||
qAt->getChiralTag() != mAt->getChiralTag()) ||
|
||||
|
||||
Reference in New Issue
Block a user