BALL
1.4.2
|
A full or partial solution to the AStar-based bond order assignment problem. More...
#include <BALL/STRUCTURE/BONDORDERS/partialBondOrderAssignment.h>
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. More... | |
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. More... | |
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. More... | |
Public Attributes | |
float | estimated_atom_type_penalty |
float | estimated_bond_length_penalty |
vector< short > | bond_orders |
Position | last_bond |
AssignBondOrderProcessor * | abop |
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.
Enumerator | |
---|---|
SIMPLE | |
MEDIUM | |
TIGHT |
Definition at line 37 of file partialBondOrderAssignment.h.
BALL::PartialBondOrderAssignment::PartialBondOrderAssignment | ( | AssignBondOrderProcessor * | parent | ) |
BALL::PartialBondOrderAssignment::~PartialBondOrderAssignment | ( | ) |
void BALL::PartialBondOrderAssignment::clear | ( | ) |
float BALL::PartialBondOrderAssignment::coarsePenalty | ( | float | atom_type_penalty, |
float | bond_length_penalty | ||
) | const |
float BALL::PartialBondOrderAssignment::coarsePenalty | ( | ) | const |
boost::shared_ptr<BondOrderAssignment> BALL::PartialBondOrderAssignment::convertToFullAssignment | ( | ) |
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.
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.
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.
bool | - true, if the entry is still valid. |
bool | - false otherwise. |
|
inline |
Definition at line 66 of file partialBondOrderAssignment.h.
float BALL::PartialBondOrderAssignment::getAtomTypePenalty | ( | bool | include_heuristic_term = true , |
HEURISTIC_INDEX | heuristic_index = SIMPLE |
||
) |
Convenience function to obtain total atom type penalty value.
bool BALL::PartialBondOrderAssignment::operator< | ( | const PartialBondOrderAssignment & | b | ) | const |
AssignBondOrderProcessor* BALL::PartialBondOrderAssignment::abop |
Definition at line 110 of file partialBondOrderAssignment.h.
vector<short> BALL::PartialBondOrderAssignment::bond_orders |
Definition at line 105 of file partialBondOrderAssignment.h.
float BALL::PartialBondOrderAssignment::estimated_atom_type_penalty |
Definition at line 98 of file partialBondOrderAssignment.h.
float BALL::PartialBondOrderAssignment::estimated_bond_length_penalty |
Definition at line 100 of file partialBondOrderAssignment.h.
Position BALL::PartialBondOrderAssignment::last_bond |
Definition at line 108 of file partialBondOrderAssignment.h.