mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
@@ -179,14 +179,16 @@ void computeInitialCoords(RDKit::ROMol &mol,
|
||||
for (unsigned int i = 0; i < mol.getNumAtoms(); ++i) {
|
||||
atomRanks[i] = getAtomDepictRank(mol.getAtomWithIdx(i));
|
||||
}
|
||||
RDKit::MolOps::assignStereochemistry(mol, false);
|
||||
|
||||
efrags.clear();
|
||||
RDKit::VECT_INT_VECT arings;
|
||||
|
||||
// first find all the rings
|
||||
RDKit::MolOps::symmetrizeSSSR(mol, arings);
|
||||
|
||||
// do stereochemistry
|
||||
RDKit::MolOps::assignStereochemistry(mol, false);
|
||||
|
||||
efrags.clear();
|
||||
|
||||
// user specfied coordinates exist
|
||||
bool preSpec = false;
|
||||
// first embed any atoms for which the coordinates have been specified.
|
||||
|
||||
@@ -802,6 +802,27 @@ void testGitHubIssue910() {
|
||||
delete m;
|
||||
}
|
||||
}
|
||||
|
||||
void testGitHubIssue1073() {
|
||||
// computeInitialCoords() should call the SSSR code before it calls
|
||||
// assignStereochemistry()
|
||||
{
|
||||
std::string smarts = "[a]12[a][a][a][a][a]1[a][a][a]2";
|
||||
RWMol *m = SmartsToMol(smarts);
|
||||
TEST_ASSERT(m);
|
||||
|
||||
RDDepict::compute2DCoords(*m);
|
||||
|
||||
RingInfo *ri = m->getRingInfo();
|
||||
TEST_ASSERT(ri->isInitialized());
|
||||
TEST_ASSERT(ri->isAtomInRingOfSize(0, 6));
|
||||
TEST_ASSERT(ri->isAtomInRingOfSize(0, 5));
|
||||
TEST_ASSERT(!ri->isAtomInRingOfSize(0, 9));
|
||||
|
||||
delete m;
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
RDLog::InitLogs();
|
||||
#if 1
|
||||
@@ -965,5 +986,13 @@ int main() {
|
||||
testGitHubIssue910();
|
||||
BOOST_LOG(rdInfoLog)
|
||||
<< "***********************************************************\n";
|
||||
|
||||
BOOST_LOG(rdInfoLog)
|
||||
<< "***********************************************************\n";
|
||||
BOOST_LOG(rdInfoLog) << " Test GitHub Issue 1073\n";
|
||||
testGitHubIssue1073();
|
||||
BOOST_LOG(rdInfoLog)
|
||||
<< "***********************************************************\n";
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user