BALL
1.4.2
|
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 More... | |
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 | |
Public Types inherited from BALL::UnaryFunctor< AtomContainer, Processor::Result > | |
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 88 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 391 of file assignBondOrderProcessor.h.
|
inline |
Returns a nonmutable pointer to the original Molecule as AtomContainer.
Definition at line 395 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 362 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 386 of file assignBondOrderProcessor.h.
|
inline |
Definition at line 450 of file assignBondOrderProcessor.h.
|
inlineprotected |
Definition at line 649 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 467 of file assignBondOrderProcessor.h.
|
inlineprotected |
Definition at line 613 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 414 of file assignBondOrderProcessor.h.
|
inlineprotected |
Returns the total charge of a solution.
sol | solution, whose charge should be computed. |
Definition at line 621 of file assignBondOrderProcessor.h.
Returns the total penalty of solution i.
i | index of the solution, whose penalty should be returned. |
Definition at line 433 of file assignBondOrderProcessor.h.
|
inlineprotected |
Returns the total penalty of the given solution.
sol | solution, whose penalty should be returned. |
Definition at line 639 of file assignBondOrderProcessor.h.
|
inline |
Checks the options.
Definition at line 515 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 100 of file assignBondOrderProcessor.h.
|
friend |
Definition at line 93 of file assignBondOrderProcessor.h.
|
friend |
Definition at line 98 of file assignBondOrderProcessor.h.
|
friend |
Definition at line 101 of file assignBondOrderProcessor.h.
|
friend |
Definition at line 102 of file assignBondOrderProcessor.h.
|
friend |
Definition at line 103 of file assignBondOrderProcessor.h.
|
friend |
Definition at line 104 of file assignBondOrderProcessor.h.
|
friend |
Definition at line 92 of file assignBondOrderProcessor.h.
|
friend |
Definition at line 95 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 723 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 741 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 729 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 770 of file assignBondOrderProcessor.h.
Definition at line 688 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 713 of file assignBondOrderProcessor.h.
Definition at line 763 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 760 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 759 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 761 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 659 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 716 of file assignBondOrderProcessor.h.
Definition at line 773 of file assignBondOrderProcessor.h.
Definition at line 665 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 744 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 738 of file assignBondOrderProcessor.h.
|
protected |
Processor is in an evaluation mode. Default is false.
Definition at line 655 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 703 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 662 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 668 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 720 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 726 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 732 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 735 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 700 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 684 of file assignBondOrderProcessor.h.
Definition at line 678 of file assignBondOrderProcessor.h.
Options BALL::AssignBondOrderProcessor::options |
the processor's options
Definition at line 530 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 758 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 706 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 710 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 781 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 775 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 697 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 747 of file assignBondOrderProcessor.h.
|
protected |
Processor is in a useable valid state.
Definition at line 652 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 692 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 687 of file assignBondOrderProcessor.h.
|
protected |
Definition at line 681 of file assignBondOrderProcessor.h.