Scine::Swoose  2.1.0
This is the SCINE module Swoose.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Scine::MMParametrization::FragmentDataDistributor Class Reference

This class handles the distribution of the available data for the parameter optimization. This mainly includes the task of providing a list of candidate fragments from which to take reference data for the parameters associated with a given atom. More...

#include <FragmentDataDistributor.h>

Collaboration diagram for Scine::MMParametrization::FragmentDataDistributor:
Collaboration graph

Public Member Functions

 FragmentDataDistributor (ParametrizationData &data, Core::Log &log)
 Constructor. More...
 
bool referenceDataIsSufficient (bool refineConnectivity, std::vector< int > failedCalculations={}, std::vector< std::vector< std::string >> failedCalculationIds={}) const
 Checks whether the reference data that has already been collected is sufficient to perform the parametrization. Returns true, if this is the case. More...
 
std::vector< int > getCandidateFragments (int fragmentIndex) const
 Returns the indices of candidate fragments to get the data from for the given fragment index 'fragmentIndex'.
 
void updateCandidateFragments (int fragmentIndex, std::vector< int > &listOfCandidates) const
 Updates a given list of candidate fragments to get the data from for the given fragment index 'fragmentIndex'.
 
void updateCandidateFragmentsWithThirdShellNeighbors (int fragmentIndex, std::vector< int > &listOfCandidates) const
 Updates a given list of candidate fragments with third shell neighboring atoms (neighbors of neighbors of neighbors) to get the data from for the given fragment index 'fragmentIndex'. This can be necessary for terminal atoms, because their parameters may otherwise be depending only on a small number of candidate fragments, of which one must lead to convergenced reference calculations.
 

Detailed Description

This class handles the distribution of the available data for the parameter optimization. This mainly includes the task of providing a list of candidate fragments from which to take reference data for the parameters associated with a given atom.

Constructor & Destructor Documentation

Scine::MMParametrization::FragmentDataDistributor::FragmentDataDistributor ( ParametrizationData data,
Core::Log log 
)
explicit

Constructor.

Parameters
dataThe parametrization data object used throughout the whole parametrization process.

Member Function Documentation

bool Scine::MMParametrization::FragmentDataDistributor::referenceDataIsSufficient ( bool  refineConnectivity,
std::vector< int >  failedCalculations = {},
std::vector< std::vector< std::string >>  failedCalculationIds = {} 
) const

Checks whether the reference data that has already been collected is sufficient to perform the parametrization. Returns true, if this is the case.

Parameters
refineConnectivityDecides whether reference bond orders are calculated during the parametrization process.
failedCalculationsA vector containing integers that denote which of the calculations failed for a given fragment: Multiple of 2 -> Hessian failed, Multiple of 3 -> Atomic charges failed, Multiple of 5 -> Bond orders failed. Default: empty list -> this check will not be performed.
failedCalculationIdsA vector containing the Database IDs of the failed calculations. Note that this can be useful for debugging when only few calculations fail and the parametrization cannot be successful anymore.
Exceptions
std::runtime_errorThrows if the parametrization cannot be completed anymore because too many calculations already failed.

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