Loading...
Searching...
No Matches
BALL::PartialBondOrderAssignment Class Reference

A full or partial solution to the AStar-based bond order assignment problem. More...

`#include <BALL/STRUCTURE/BONDORDERS/partialBondOrderAssignment.h>`

Inheritance diagram for BALL::PartialBondOrderAssignment:

## Public Types

enum | HEURISTIC_INDEX { SIMPLE , MEDIUM , TIGHT }

## Public Member Functions

| PartialBondOrderAssignment (AssignBondOrderProcessor *parent)
| ~PartialBondOrderAssignment ()
boost::shared_ptr< BondOrderAssignment > | convertToFullAssignment ()
void | clear ()
bool | operator< (const PartialBondOrderAssignment &b) const
float | coarsePenalty (float atom_type_penalty, float bond_length_penalty) const
float | coarsePenalty () const
float | finePenalty () const
float | getAtomTypePenalty (bool include_heuristic_term=true, HEURISTIC_INDEX heuristic_index=SIMPLE)
| Convenience function to obtain total atom type penalty value.
bool | estimatePenalty_ (bool include_heuristic_term=true, HEURISTIC_INDEX heuristic_index=SIMPLE)
float | estimateAtomTypePenalty_ (Atom *atom, Index atom_index, int fixed_valence, int fixed_virtual_order, int num_free_bonds, HEURISTIC_INDEX heuristic_index)
| Estimates the atom type penalty for a given unclosed atom.
float | estimateBondLengthPenalty_ (Index atom_index, const vector< Bond * > &free_bonds, int fixed_virtual_order, int fixed_valence, int num_free_bonds)
| Estimates the bond length penalty for a given unclosed atom.

## Public Attributes

float | estimated_atom_type_penalty
float | estimated_bond_length_penalty
vector< short > | bond_orders
Position | last_bond
AssignBondOrderProcessor * | abop

## Detailed Description

A full or partial solution to the AStar-based bond order assignment problem.

This class represents a full or partial bond order assignment. It is a very basic representation without any convenience functionality. This class exists because sometimes we need a representation that is as small as possible - we need many of these during the AStar runs, e.g., and memory quickly becomes an issue. Please note that we explicitly avoid virtual functions here to save the vtable - inheriting from this class makes no sense, anyhow.

Definition at line 33 of file partialBondOrderAssignment.h.

## Member Enumeration Documentation

## HEURISTIC_INDEX

enum BALL::PartialBondOrderAssignment::HEURISTIC_INDEX

Enumerator
SIMPLE |
MEDIUM |
TIGHT |

Definition at line 37 of file partialBondOrderAssignment.h.

## Constructor & Destructor Documentation

## PartialBondOrderAssignment()

BALL::PartialBondOrderAssignment::PartialBondOrderAssignment | ( | AssignBondOrderProcessor * | parent | ) |

## ~PartialBondOrderAssignment()

BALL::PartialBondOrderAssignment::~PartialBondOrderAssignment | ( |  | ) |

## Member Function Documentation

## clear()

void BALL::PartialBondOrderAssignment::clear | ( |  | ) |

## coarsePenalty() [1/2]

float BALL::PartialBondOrderAssignment::coarsePenalty | ( |  | ) | const

## coarsePenalty() [2/2]

float BALL::PartialBondOrderAssignment::coarsePenalty | ( | float | atom_type_penalty,
|  | float | bond_length_penalty ) const

## convertToFullAssignment()

boost::shared_ptr< BondOrderAssignment > BALL::PartialBondOrderAssignment::convertToFullAssignment | ( |  | ) |

## estimateAtomTypePenalty_()

float BALL::PartialBondOrderAssignment::estimateAtomTypePenalty_ | ( | Atom * | atom,
|  | Index | atom_index,
|  | int | fixed_valence,
|  | int | fixed_virtual_order,
|  | int | num_free_bonds,
|  | HEURISTIC_INDEX | heuristic_index )

Estimates the atom type penalty for a given unclosed atom.

## estimateBondLengthPenalty_()

float BALL::PartialBondOrderAssignment::estimateBondLengthPenalty_ | ( | Index | atom_index,
|  | const vector< Bond * > & | free_bonds,
|  | int | fixed_virtual_order,
|  | int | fixed_valence,
|  | int | num_free_bonds )

Estimates the bond length penalty for a given unclosed atom.

## estimatePenalty_()

bool BALL::PartialBondOrderAssignment::estimatePenalty_ | ( | bool | include_heuristic_term = true,
|  | HEURISTIC_INDEX | heuristic_index = SIMPLE )

Estimates the objective function f = g* + h* of the ASTAR - algorithm, if include_heuristic_term == true, otherwise compute only f = g*. The result is stored in the PartialBondOrderAssignment entry's member estimated_atom_type_penalty.

Return values

  bool | - true, if the entry is still valid.
  bool | - false otherwise.

## finePenalty()

float BALL::PartialBondOrderAssignment::finePenalty | ( |  | ) | const

inline

Definition at line 66 of file partialBondOrderAssignment.h.

## getAtomTypePenalty()

float BALL::PartialBondOrderAssignment::getAtomTypePenalty | ( | bool | include_heuristic_term = true,
|  | HEURISTIC_INDEX | heuristic_index = SIMPLE )

Convenience function to obtain total atom type penalty value.

## operator<()

bool BALL::PartialBondOrderAssignment::operator< | ( | const PartialBondOrderAssignment & | b | ) | const

## Member Data Documentation

## abop

AssignBondOrderProcessor* BALL::PartialBondOrderAssignment::abop

Definition at line 110 of file partialBondOrderAssignment.h.

## bond_orders

vector<short> BALL::PartialBondOrderAssignment::bond_orders

Definition at line 105 of file partialBondOrderAssignment.h.

## estimated_atom_type_penalty

float BALL::PartialBondOrderAssignment::estimated_atom_type_penalty

Definition at line 98 of file partialBondOrderAssignment.h.

## estimated_bond_length_penalty

float BALL::PartialBondOrderAssignment::estimated_bond_length_penalty

Definition at line 100 of file partialBondOrderAssignment.h.

## last_bond

Position BALL::PartialBondOrderAssignment::last_bond

Definition at line 108 of file partialBondOrderAssignment.h.