Skip to content

Commit 5fe19f6

Browse files
use fragment atoms directly in loop
1 parent 24a9c62 commit 5fe19f6

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/nodes/detectMolecules.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ NodeConstants::ProcessResult DetectMoleculesNode::process()
9797

9898
// Set up the return value and bind its contents
9999
NETADefinition bestNETA;
100-
std::vector<StructureAtom *> rootAtoms;
100+
std::vector<const StructureAtom *> rootAtoms;
101101

102102
// Maintain a set of atoms matched by any NETA description we generate
103103
std::set<const StructureAtom *> alreadyMatched;
@@ -113,10 +113,9 @@ NodeConstants::ProcessResult DetectMoleculesNode::process()
113113
NETADefinition::NETACreationFlags::IncludeRootElement));
114114

115115
// Apply this match over the whole fragment
116-
std::vector<StructureAtom *> currentRootAtoms;
117-
for (auto fragmentAtomIndex : fragment)
116+
std::vector<const StructureAtom *> currentRootAtoms;
117+
for (auto fragmentAtom : fragmentAtoms)
118118
{
119-
const auto fragmentAtom = inputStructure_.atom(fragmentAtomIndex);
120119
if (neta.matches(fragmentAtom))
121120
{
122121
currentRootAtoms.push_back(fragmentAtom);

0 commit comments

Comments
 (0)