8 #ifndef SWOOSEUTILITIES_FRAGMENTANALYZER_H
9 #define SWOOSEUTILITIES_FRAGMENTANALYZER_H
20 namespace SwooseUtilities {
30 FragmentAnalyzer(
const std::map<int, int>& formalCharges,
const std::map<int, int>& unpairedElectrons);
54 int evaluateChargeOfFragment(
const Utils::AtomCollection& fragment,
const std::vector<int>& atomIndexMapping);
59 bool analyzeSpinMultiplicity(
const Utils::AtomCollection& fragment,
int numElectrons,
const std::vector<int>& atomIndexMapping);
64 int sumUpValuesOfAtomsInFragment(
const Utils::AtomCollection& fragment,
const std::vector<int>& atomIndexMapping,
65 const std::map<int, int>& valuesMap);
67 int molecularCharge_ = 0;
69 int spinMultiplicity_ = 1;
73 const std::map<int, int>& formalCharges_;
78 const std::map<int, int>& unpairedElectrons_;
84 #endif // SWOOSEUTILITIES_FRAGMENTANALYZER_H
bool analyzeFragment(const Utils::AtomCollection &fragment, const std::vector< int > &atomIndexMapping={})
Determines whether a given fragment is valid and if it is, evaluates the charge and multiplicity of t...
Definition: FragmentAnalyzer.cpp:19
FragmentAnalyzer(const std::map< int, int > &formalCharges, const std::map< int, int > &unpairedElectrons)
Constructor.
Definition: FragmentAnalyzer.cpp:15
int getMolecularCharge() const
Getter for the molecular charge of the fragment that was previously analyzed.
Definition: FragmentAnalyzer.cpp:41
int getSpinMultiplicity() const
Getter for the spin multiplicity of the fragment that was previously analyzed.
Definition: FragmentAnalyzer.cpp:37
Definition: FragmentAnalyzer.h:22