mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-07 22:44:25 +08:00
MolEnumerator::enumerate() should call updatePropertyCache() (#3420)
This commit is contained in:
@@ -60,6 +60,7 @@ MolBundle enumerate(const ROMol &mol, const MolEnumeratorParams ¶ms) {
|
||||
enumerateVariations(variations, variationCounts, params);
|
||||
for (const auto &variation : variations) {
|
||||
auto newMol = (*op)(variation);
|
||||
newMol->updatePropertyCache(false);
|
||||
res.addMol(ROMOL_SPTR(newMol.release()));
|
||||
}
|
||||
return res;
|
||||
|
||||
@@ -134,6 +134,10 @@ M END
|
||||
new MolEnumerator::PositionVariationOp());
|
||||
auto bundle = MolEnumerator::enumerate(*mol1, ps);
|
||||
CHECK(bundle.size() == 3);
|
||||
|
||||
CHECK(bundle.getMols()[0]->getAtomWithIdx(0)->getDegree()==3);
|
||||
CHECK(bundle.getMols()[0]->getAtomWithIdx(0)->getImplicitValence()==0);
|
||||
|
||||
std::vector<std::string> tsmis = {"COc1ccncc1", "COc1ccccn1", "COc1cccnc1"};
|
||||
std::vector<std::string> smis;
|
||||
for (const auto molp : bundle.getMols()) {
|
||||
|
||||
Reference in New Issue
Block a user