Scine::Swoose  2.1.0
This is the SCINE module Swoose.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Scine::SwooseUtilities::FragmentAnalyzer Class Reference
Collaboration diagram for Scine::SwooseUtilities::FragmentAnalyzer:
Collaboration graph

Public Member Functions

 FragmentAnalyzer (const std::map< int, int > &formalCharges, const std::map< int, int > &unpairedElectrons)
 Constructor. More...
 
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 the fragment. More...
 
int getMolecularCharge () const
 Getter for the molecular charge of the fragment that was previously analyzed.
 
int getSpinMultiplicity () const
 Getter for the spin multiplicity of the fragment that was previously analyzed.
 

Constructor & Destructor Documentation

Scine::SwooseUtilities::FragmentAnalyzer::FragmentAnalyzer ( const std::map< int, int > &  formalCharges,
const std::map< int, int > &  unpairedElectrons 
)

Constructor.

Parameters
formalChargesA map containing the indices of atoms and their formal charge in the full system.
unpairedElectronsA map containing the indices of atoms and the number of unpaired electrons that can be assigned to that atom.

Member Function Documentation

bool Scine::SwooseUtilities::FragmentAnalyzer::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 the fragment.

Parameters
fragmentThe molecular structure representing the fragment.
atomIndexMappingVector of indices that correspond to the indices of the atoms inside the given fragment in the full system. Default value is an empty vector, i.e. the indices of the fragment equal the full system's indices.
Returns
bool Returns whether fragment is valid.

The documentation for this class was generated from the following files: