indigoX
IXElectronAssigner Class Reference

#include <indigox/algorithm/electron_assignment/assigner.hpp>

Classes

class  AssignAlgorithm
 Base class for an electron assignment algorithm. More...
 
struct  Settings
 

Public Types

enum  AssignerAlgorithm
 Enum of the various electron assignment optimisation algorithms. More...
 

Public Member Functions

 IXElectronAssigner ()=delete
 
bool ApplyAssignment (size_t idx)
 Apply the given assignment. More...
 
graph::AssignmentGraph GetAssignmentGraph ()
 Get the AssignmentGraph used by the assignment algorithm. More...
 
size_t GetOptimalCount () const
 
score_t GetOptimisedScore () const
 
void LoadScoreTable ()
 Load the current score file. More...
 
size_t Run ()
 Run the electron assignment. More...
 

Friends

ElectronAssigner CreateElectronAssigner (const Molecule &m)
 Friendship allows creation of electron assigner instances. More...
 

Member Enumeration Documentation

◆ AssignerAlgorithm

enum AssignerAlgorithm
strong

Enum of the various electron assignment optimisation algorithms.

Enumerator
LocalOptimisation 

The local optimisation method.

AStar 

An A* path finding method.

FPT 

A dynamic programming method.

Constructor & Destructor Documentation

◆ IXElectronAssigner()

IXElectronAssigner ( )
delete

Member Function Documentation

◆ ApplyAssignment()

bool ApplyAssignment ( size_t  idx)
inline

Apply the given assignment.

A number of situations will result in unsuscessful application of an assignment. If the requested index is outside the range of the available assignments, if the associated molecule is no longer valid, if any of the expected atom or bond instances are no longer valid. In the later cases, the assignment may be partially applied.

Parameters
idxthe index number of the assignment to apply.
Returns
if the assignment application was successful or not.

◆ GetAssignmentGraph()

graph::AssignmentGraph GetAssignmentGraph ( )
inline

Get the AssignmentGraph used by the assignment algorithm.

Returns
the AssignmentGraph used by the algorithm.

◆ GetOptimalCount()

size_t GetOptimalCount ( ) const
inline

◆ GetOptimisedScore()

score_t GetOptimisedScore ( ) const
inline

◆ LoadScoreTable()

void LoadScoreTable ( )

Load the current score file.

Loads the current set score file. First attempts to load a path relative to the data directory. If that fails, attempts to load an absolute path.

◆ Run()

size_t Run ( )

Run the electron assignment.

Initalises and runs the assignment algorithm based on the current settings of both the IXElectronAssigner and the algorithm to run. Before running, performs a sanity check to ensure that the molecule meets the allowed elements rules.

Returns
the number of electron assignments found.

Friends And Related Function Documentation

◆ CreateElectronAssigner

ElectronAssigner CreateElectronAssigner ( const Molecule m)
friend

Friendship allows creation of electron assigner instances.

Parameters
mthe molecule this electron assigner is for.
Returns
a new ElectronAssigner.

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