refactor: DetectMolecules TY - #2561
Conversation
| // Loop over fragments of this size | ||
| while (!fragments.empty()) | ||
| { | ||
| printf("FRAGs now %li\n", fragments.size()); |
There was a problem hiding this comment.
Using
const auto nFragments = fragments.size()
after line 174, we could make this abit nicer?
| printf("FRAGs now %li\n", fragments.size()); | |
| printf("Found %li fragments\n", fragments.size()); |
There was a problem hiding this comment.
Of course, nFragments - fragments.size() is the running number of fragments found within this current size class.
There was a problem hiding this comment.
So, perhaps a better log would be
message("Found {} fragments of size {} \n", nFragments - fragments.size(), _);
There was a problem hiding this comment.
Ah, it's just a debug line I left in - I'll remove it now.
| */ | ||
|
|
||
| // Copy atom and bond information from one structure to another | ||
| Structure &DetectMoleculesNode::copyStructureAtomsAndBonds(Structure &target, const std::vector<int> fragmentAtomIndices) const |
There was a problem hiding this comment.
This is a small thing, but did copy...( not approach what is going on here as well as duplicate...( ?
Personally I prefer "copy", just feels more idiomatic.
There was a problem hiding this comment.
I think I called it duplicate... while I was reworking stuff to keep it separate, but either way happy to revert to copy.
No description provided.