8 #ifndef SWOOSEUTILITIES_FRAGMENTATIONHELPER_H
9 #define SWOOSEUTILITIES_FRAGMENTATIONHELPER_H
28 class BondOrderCollection;
31 namespace SwooseUtilities {
34 static constexpr
int indexForSaturatingAtoms = -1;
36 static constexpr
int minimumSubsystemSize_ = 20;
38 namespace FragmentationHelper {
53 void addAtomsUpToReasonableCut(Utils::AtomCollection& atomsToAdd, std::vector<int>& alreadyAddedAtoms,
54 std::deque<bool>& isSaturatingAtom,
int atomInside,
int atomOutside,
55 const Utils::AtomCollection& fullStructure,
const std::vector<std::list<int>>& listsOfNeighbors,
56 double probabilityToDivide, std::shared_ptr<std::mt19937> randomEngine);
64 void addMoreAtomsToSubsystem(
const Utils::AtomCollection& atomsToAdd, Utils::AtomCollection& subsystem,
65 const std::deque<bool>& isSaturatingAtom,
bool addSaturatingAtoms);
71 void checkSizeOfSubsystem(
int size,
double& additionToRadius,
bool& unsuccessfulFragmentation,
int fragmentIndex,
72 int fullStructureSize,
int maximumSubsystemSize, Core::Log& log);
76 void updateInformationForIndexMapping(
const Utils::AtomCollection& subsystem,
77 const Utils::AtomCollection& fullStructure, std::vector<int>& atomIndexMapping);
82 std::vector<int> calculateSubgraphSizes(
const Utils::AtomCollection& fullStructure,
const Utils::BondOrderCollection& bondOrders);
89 bool atomIsCloseToExistingAtom(
const Utils::Atom& atom,
const Utils::AtomCollection& existingAtoms);
100 bool isDivisibleAtBond(
int atomInside,
int atomOutside,
const Utils::AtomCollection& fullStructure,
101 const std::vector<std::list<int>>& listsOfNeighbors,
double probabilityToDivide,
102 std::shared_ptr<std::mt19937> randomEngine);
109 Utils::AtomCollection mergeSubsystems(std::vector<int>& atomIndexMapping, std::vector<Utils::AtomCollection> subsystems,
110 std::vector<std::vector<int>> atomIndexMappings);
116 #endif // SWOOSEUTILITIES_FRAGMENTATIONHELPER_H