BALL
1.4.1
|
Assignment of bond orders from topology information. More...
#include <BALL/STRUCTURE/assignBondOrderProcessor.h>
Classes | |
struct | Algorithm |
struct | Default |
Default values for options. More... | |
struct | Option |
Option names. More... |
Public Attributes | |
Public Attributes | |
Options | options |
the processor's options |
Protected Member Functions | |
bool | readOptions_ () |
bool | readAtomPenalties_ () throw (Exception::FileNotFound()) |
bool | preassignPenaltyClasses_ () |
int | getPenaltyClass_ (Atom *atom) |
bool | precomputeBondLengthPenalties_ () |
float | computeVirtualHydrogens_ (Atom *atom) |
bool | apply_ (BondOrderAssignment &solution) |
void | storeOriginalConfiguration_ () |
int | getQueueSize_ (const BondOrderAssignment &sol) |
float | getTotalCharge_ (const BondOrderAssignment &sol) |
float | getTotalPenalty_ (const BondOrderAssignment &sol) |
int | getNumberOfNodeExpansions_ (const BondOrderAssignment &sol) |
AssignBondOrderProcessor (const AssignBondOrderProcessor &abop) | |
AssignBondOrderProcessor & | operator= (const AssignBondOrderProcessor &abop) |
Friends | |
class | PartialBondOrderAssignment |
class | BondOrderAssignment |
class | PQ_Entry_ |
class | BondOrderAssignmentStrategy |
class | AStarBondOrderStrategy |
class | BranchAndBoundBondOrderStrategy |
class | FPTBondOrderStrategy |
class | ILPBondOrderStrategy |
class | KGreedyBondOrderStrategy |
Additional Inherited Members | |
![]() | |
typedef Processor::Result | result_type |
typedef AtomContainer | argument_type |
typedef AtomContainer & | argument_reference |
typedef const AtomContainer & | const_argument_reference |
typedef AtomContainer * | argument_pointer |
typedef const AtomContainer * | const_argument_pointer |
Assignment of bond orders from topology information.
Called with default options the processor computes up to Default::MAX_NUMBER_OF_SOLUTIONS many possible bond orders with optimal value and applies the first solution found to the given AtomContainer.
All further optimal solutions can be applied by calling the method apply() . Additional solutions can be computed by calling the method computeNextSolution() (except when using the FPT strategy which currently does not support this behaviour).
Definition at line 92 of file assignBondOrderProcessor.h.
BALL::AssignBondOrderProcessor::AssignBondOrderProcessor | ( | ) |
Default Constructor.
|
virtual |
Destructor.
|
protected |
Applies the i-th precomputed bond order assignment.
Sets the AtomContainer's bond orders to the ones found in the (already computed!) i-th solution, start counting at 0!
i | index of the solution whose bond orders should be assigned. |
|
protected |
Applies the given solution.
void BALL::AssignBondOrderProcessor::clear | ( | ) |
Clears the data structures.
NOTE: The options remain! Use setDefaultOptions() to clear the options.
Computes and applies one of the next best solutions.
Ignores the options MAX_NUMBER_OF_SOLUTIONS and COMPUTE_ALSO_NON_OPTIMAL_SOLUTIONS .
Adds missing hydrogens as virtual hydrogens to the given atom, determines the possible penalty blocks, and returns the maximal possible atom type penalty.
"virtual" means that NO atoms and bonds are added to the original AtomContainer.
atom | the atom, to which the virtual hydrogens should be added. |
float BALL::AssignBondOrderProcessor::evaluatePenalty | ( | AtomContainer * | ac | ) |
Evaluates the AtomContainer's bond orders as specified in the Options and returns the computed penalty.
ac | AtomContainer, whose bond orders should be evaluated. |
|
virtual |
Processor method which is called after the operator()-call.
Reimplemented from BALL::UnaryProcessor< AtomContainer >.
|
inline |
Returns a pointer to the original Molecule as AtomContainer.
Definition at line 395 of file assignBondOrderProcessor.h.
|
inline |
Returns a nonmutable pointer to the original Molecule as AtomContainer.
Definition at line 399 of file assignBondOrderProcessor.h.
Returns the number of added hydrogens in solution i.
NOTE: Hydrogens can only be added using the Option::ADD_HYDROGENS-option.
Definition at line 366 of file assignBondOrderProcessor.h.
|
inline |
Returns the number of already computed solutions.
NOTE: Having applied the operator with option Option Algorithm::A_STAR this method returns the number of optimal solutions+1!
Definition at line 390 of file assignBondOrderProcessor.h.
|
inline |
Definition at line 454 of file assignBondOrderProcessor.h.
|
inlineprotected |
Definition at line 653 of file assignBondOrderProcessor.h.
|
protected |
Finds the first matching SMARTS-expression in the penalty-vector and returns its index.
int | -1 if there is no matching expression |
|
inline |
Definition at line 471 of file assignBondOrderProcessor.h.
|
inlineprotected |
Definition at line 617 of file assignBondOrderProcessor.h.
const System& BALL::AssignBondOrderProcessor::getSolution | ( | Position | i | ) | throw (Exception::IndexOverflow) |
Returns a reference to the original system to which solution i was applied.
NOTE: This method has the same effect as calling apply(i)!
i | index of the solution, whose bond order assignment should be applied. |
Returns the total charge of solution i.
NOTE: This method is still experimental.
i | index of the solution, whose charge should be computed. |
Definition at line 418 of file assignBondOrderProcessor.h.
|
inlineprotected |
Returns the total charge of a solution.
sol | solution, whose charge should be computed. |
Definition at line 625 of file assignBondOrderProcessor.h.
Returns the total penalty of solution i.
i | index of the solution, whose penalty should be returned. |
Definition at line 437 of file assignBondOrderProcessor.h.
|
inlineprotected |
Returns the total penalty of the given solution.
sol | solution, whose penalty should be returned. |
Definition at line 643 of file assignBondOrderProcessor.h.
|
inline |
Checks the options.
Definition at line 519 of file assignBondOrderProcessor.h.
|
virtual |
Operator () for the processor
Called with Default-options the processor computes all possible bond order assignments with optimal atomic penalty value and applies the first solution to the given AtomContainer.
NOTE: Having used the Algorithm::A_STAR-option (default) the method getNumberOfComputedSolutions() will return the number of optimal solutions+1!
ac | the AtomContainer to which the processor is applied. |
Reimplemented from BALL::UnaryProcessor< AtomContainer >.
|
protected |
|
protected |
Assigns every atom of the AtomContainer to which the processor is applied to a block of possible valences and the corresponding penalties.
bool | - false if the AtomContainer to which the processor is applied to has an atom with no matching penalty block. |
bool | - true otherwise |
|
protected |
Precomputes for every bond of the AtomContainer, to which the processor is applied to, the possible bond length penalties resulting from deviation of the actual bond length to a standard length for bonds with same atom types and the chosen bond order.
bool | - false if the AtomContainer is invalid or the processor is in an invalid state |
bool | - true otherwise |
|
protected |
Reads and stores the penalty-INIFile (for example BondOrder.ini).
|
protected |
Reads, checks and stores the options.
void BALL::AssignBondOrderProcessor::resetBondOrders | ( | ) |
Resets all bond orders and assigned hydrogens.
Assigns the original bond order assignments to the AtomContainer we are operating on.
void BALL::AssignBondOrderProcessor::setDefaultOptions | ( | ) |
Resets the options to default values.
|
virtual |
Processor method which is called before the operator()-call.
Reimplemented from BALL::UnaryProcessor< AtomContainer >.
|
protected |
Stores the original configuration of the AtomContainer.
|
friend |
Definition at line 104 of file assignBondOrderProcessor.h.
|
friend |
Definition at line 97 of file assignBondOrderProcessor.h.
|
friend |
Definition at line 102 of file assignBondOrderProcessor.h.
|
friend |
Definition at line 105 of file assignBondOrderProcessor.h.
|
friend |
Definition at line 106 of file assignBondOrderProcessor.h.
|
friend |
Definition at line 107 of file assignBondOrderProcessor.h.
|
friend |
Definition at line 108 of file assignBondOrderProcessor.h.
|
friend |
Definition at line 96 of file assignBondOrderProcessor.h.
|
friend |
Definition at line 99 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 727 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 745 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 733 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 774 of file assignBondOrderProcessor.h.
Definition at line 692 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 717 of file assignBondOrderProcessor.h.
Definition at line 767 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 764 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 763 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 765 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 663 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 720 of file assignBondOrderProcessor.h.
Definition at line 777 of file assignBondOrderProcessor.h.
Definition at line 669 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 748 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 742 of file assignBondOrderProcessor.h.
|
protected |
Processor is in an evaluation mode. Default is false.
Definition at line 659 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 707 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 666 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 672 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 724 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 730 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 736 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 739 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 704 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 688 of file assignBondOrderProcessor.h.
Definition at line 682 of file assignBondOrderProcessor.h.
Options BALL::AssignBondOrderProcessor::options |
the processor's options
Definition at line 534 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 762 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 710 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 714 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 785 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 779 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 701 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 751 of file assignBondOrderProcessor.h.
|
protected |
Processor is in a useable valid state.
Definition at line 656 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 696 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 691 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 685 of file assignBondOrderProcessor.h.