indigoX
IXElectronAssigner::Settings Struct Reference

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

+ Collaboration diagram for IXElectronAssigner::Settings:

Static Public Attributes

static AssignerAlgorithm Algorithm
 Which algorithm to use to assign electrons. More...
 
static eastl::vector_set< ElementAllowedElements
 Set of elements for which scores are available. More...
 
static utils::Option ChargedCarbon
 Allow carbons to have non zero formal charges. More...
 
static utils::Option ElectronPairs
 Assign electrons in pairs instead of singly. More...
 
static score_t Infinity
 Value of an infinite score. More...
 
static uint8_t MaxBondOrder
 Maximum bond order to assign. More...
 
static int16_t MaxChargeMagnitude
 The maximum allowed charge magnitude on an atom. More...
 
static uint16_t MaxNumResults
 Maximum number of degenerate score results to calculate. More...
 
static utils::Option Preassign
 Assign some electrons prior to performing optimisation. More...
 
static std::string ScoreFile
 Path to the assignment score file. More...
 

Member Data Documentation

◆ Algorithm

AssignerAlgorithm Algorithm
static

Which algorithm to use to assign electrons.

The default algorithm is the local optimisation method.

◆ AllowedElements

eastl::vector_set<Element> AllowedElements
static

Set of elements for which scores are available.

If a molecule contains elements not in this list, the assignment algorithms will not be able to execute and so an exception will be thrown when Initalise is called. Only add elements to this set if they have scores available. The default set of elements, given the default assignment score file, is: H, C, N, O, S, P, F, Cl, and Br.

◆ ChargedCarbon

utils::Option ChargedCarbon
static

Allow carbons to have non zero formal charges.

Default option is to allow. Valid options are Yes, No and Default.

◆ ElectronPairs

utils::Option ElectronPairs
static

Assign electrons in pairs instead of singly.

The default option (Auto) assigns pairs of electrons when there is an even number of electrons, and singly if there are an odd number of electrons. Valid options are Yes, No, Default and Auto.

◆ Infinity

score_t Infinity
static

Value of an infinite score.

Default value (which probably should not need to be changed) is std::numeric_limits<score_t>::max(). Any electron assignment with a final score of the infinite value is considered invalid.

Referenced by QueueItem::IsInfinite().

◆ MaxBondOrder

uint8_t MaxBondOrder
static

Maximum bond order to assign.

This limits the number of electrons which can be assigned to a bond to twice this value. Default value is 3.

Todo:
Convert to using the BondOrder enum.

◆ MaxChargeMagnitude

int16_t MaxChargeMagnitude
static

The maximum allowed charge magnitude on an atom.

Any assignment which results in the formal charge of an atom being larger than this value will be given an infinte score. If this value is negative, there is no limit applied. Default value is -1.

◆ MaxNumResults

uint16_t MaxNumResults
static

Maximum number of degenerate score results to calculate.

Optimisation algorithms are capable to returning multiple electron assignments with the same minimum score. This setting controls the maximum number of such multiples which will be returned. Small maximum values may result in the optimisation method not giving a correct minimum. Large values may result in large amounts of memory and computational time being required. If set to 0, all results will be returned. Default value is 64.

◆ Preassign

utils::Option Preassign
static

Assign some electrons prior to performing optimisation.

Default is to do so. Valid options are Yes, No and Default. Preassigned electrons are fixed and will not moving during the optimisation. The assigned electrons are as follows:

  • Six electrons on one coordinate F, Cl, and Br.
  • Four electrons on one coordinate O, and S.
  • Two electrons on one coordinate N.
  • Four electrons on two coordinate O, and S.
  • No electrons on all other types of atoms.
  • Two electrons on all bonds.

◆ ScoreFile

std::string ScoreFile
static

Path to the assignment score file.

The assignment score file contains the scores to be assigned to the various formal charge and bond order states obtained through an electron assignment. The path should be either relative to the data directory, or an absolute path.


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