Huge refactoring: molecule::ListOfBondsPerAtom and molecule::NumberOfBondsPerAtom removed, atom::ListOfBonds introduced. Unit Test for ListOfBonds manipulation introduced.
- changes to builder.cpp: removed CreateListOfBondsPerAtom() calls, as the creation of the global arrays is not necessary anymore
- changes to LinkedCell: LinkedCell::CheckBounds(int[NDIM]) does not admonish out of bonds as this is not desired for the local offset which may become out of bounds.
- changes to lists.hpp templates: BUGFIX: unlink() now sets ->next and ->previous to NULL, cleanup() uses removedwithoutcheck()
- new templates for molecule.hpp: SumPerAtom() allows for summation of the return value of atom:...() member fiunctions. This is needed e.g. for atom::CorrectBondDegree()
- changes to class molecule:
- changes due to ListOfBondsPerAtom -> atom::ListOfBonds: GuesstimateFragmentCount(), FragmentMolecule(), FillSPListandLabelVertices(), ScanForPeriodicCorrection(), DeterminePeriodicCenter(), CyclicStructureAnalysis(), InitComponentNumbers(), FindNextUnused(), CheckAdjacencyFileAgainstMolecule(), PickLocalBackEdges(), BreadthFirstSearchAdd(), BuildInducedSubgraph(), CheckForConnectedSubgraph(), molecule(), ~molecule(), AddHydrogenReplacementAtom(), RemoveBonds(), OutputListOfBonds(), removed CreateListOfBondsPerAtom()
- due to removal of CreateListOfBonds(): FragmentMolecule(), CreateAdjacencyListFromDbondFile(), CreateAdjacencyList(), SetNextComponentNumber()
- ActOnAllAtoms() used: CreateAdjacencyList() - uses atom::OutputBondOfAtom(), StoreAdjacencyToFile() - uses atom::OutputAdjacency(),
- SumPerAtom() used: CorrectBondDegree() - uses atom::CorrectBondDegree(),
- function removed: molecule::CountAtomsBonds() - shifted to atom::CountBonds(), OutputComponentNumber() - shifted to atom::OutputComponentNumber()
- CountCyclicBonds() - manipulates molecule::NoCyclicBonds directly.
- rewritten DepthFirstSearchAnalysis() - refactored to CyclicBondAnalysis(), OutputGraphInfoPerAtom(), OutputGraphInfoPerBond()
- rewritten RemoveAtom() - uses RemoveBonds()
- FIX: rewritten CleanupMolecule() - cleanup was wrong order, now is first bonds, then atoms
- rewritten BreadthFirstSearchAdd() - uses molecule::CopyBond() (equal code was present multiple(!) times before)
- new functions CyclicBondAnalysis(), OutputGraphInfoPerAtom(), OutputGraphInfoPerBond(), CopyBond()
Signed-off-by: Frederik Heber <heber@…>
|