BALL  1.5.0
assignBondOrderProcessor.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_STRUCTURE_ASSIGNBONDORDERPROCESSOR_H
6 #define BALL_STRUCTURE_ASSIGNBONDORDERPROCESSOR_H
7 
8 #ifndef BALL_CONCEPT_PROCESSOR_H
9  #include <BALL/CONCEPT/processor.h>
10 #endif
11 
12 #ifndef BALL_KERNEL_ATOMCONTAINER_H
14 #endif
15 
16 #ifndef BALL_DATATYPE_HASHMAP_H
17  #include <BALL/DATATYPE/hashMap.h>
18 #endif
19 
20 #ifndef BALL_DATATYPE_HASHSET_H
21  #include <BALL/DATATYPE/hashSet.h>
22 #endif
23 
24 #ifndef BALL_KERNEL_BOND_H
25  #include <BALL/KERNEL/bond.h>
26 #endif
27 
28 #ifndef BALL_DATATYPE_OPTIONS_H
29 # include <BALL/DATATYPE/options.h>
30 #endif
31 
32 #ifndef BALL_COMMON_EXCEPTION_H
33 # include <BALL/COMMON/exception.h>
34 #endif
35 
36 #ifndef BALL_SYSTEM_TIMER_H
37 # include <BALL/SYSTEM/timer.h>
38 #endif
39 
40 #ifndef BALL_STRUCTURE_BONDORDERS_BONDORDERASSIGNMENTSTRATEGY_H
42 #endif
43 
44 #ifndef BALL_STRUCTURE_BONDORDERS_BONDORDERASSIGNMENT_H
46 #endif
47 
48 #ifndef BALL_STRUCTURE_BONDORDERS_PARTIALBONDORDERASSIGNMENT_H
50 #endif
51 
52 #include <map>
53 #include <vector>
54 
55 namespace BALL
56 {
89  : public UnaryProcessor<AtomContainer>
90  {
91  protected:
93  friend class BondOrderAssignment;
94 
95  class PQ_Entry_;
96  friend class PQ_Entry_;
97 
99 
102  friend class FPTBondOrderStrategy;
103  friend class ILPBondOrderStrategy;
105 
106  public:
107 
111  struct BALL_EXPORT Option
113  {
117  static const char* OVERWRITE_SINGLE_BOND_ORDERS;
118 
123  static const char* OVERWRITE_DOUBLE_BOND_ORDERS;
124 
129  static const char* OVERWRITE_TRIPLE_BOND_ORDERS;
130 
140  static const char* OVERWRITE_SELECTED_BONDS;
141 
146  static const char* ADD_HYDROGENS; //TODO
147 
152  static const char* COMPUTE_ALSO_CONNECTIVITY; //TODO
153 
158  static const char* CONNECTIVITY_CUTOFF; //TODO
159 
162  static const char* USE_FINE_PENALTY;
163 
166  static const char* KEKULIZE_RINGS;
167 
170  static const char* ALGORITHM;
171 
174  static const char* INIFile;
175 
178  static const char* MAX_BOND_ORDER;
179 
188  static const char* MAX_NUMBER_OF_SOLUTIONS;
189 
200  static const char* MAX_PENALTY;
201 
212 
218  static const char* BOND_LENGTH_WEIGHTING;
219 
224  static const char* APPLY_FIRST_SOLUTION;
225 
226  };
227 
230  {
231  static const bool OVERWRITE_SINGLE_BOND_ORDERS;
232  static const bool OVERWRITE_DOUBLE_BOND_ORDERS;
233  static const bool OVERWRITE_TRIPLE_BOND_ORDERS;
234  static const bool OVERWRITE_SELECTED_BONDS;
235  static const bool ADD_HYDROGENS;
236  static const bool COMPUTE_ALSO_CONNECTIVITY;
237  static const float CONNECTIVITY_CUTOFF;
238  static const bool USE_FINE_PENALTY;
239  static const bool KEKULIZE_RINGS;
240  static const String ALGORITHM;
241  static const String INIFile;
242  static const int MAX_BOND_ORDER;
243  static const int MAX_NUMBER_OF_SOLUTIONS;
244  static const int MAX_PENALTY;
246  static const float BOND_LENGTH_WEIGHTING;
247  static const bool APPLY_FIRST_SOLUTION;
248  };
249 
251  {
255  static const String A_STAR;
256 
267  static const String ILP;
268 
294  static const String FPT;
295 
296  static const String K_GREEDY;
297  static const String BRANCH_AND_BOUND;
298  };
299 
301 
305 
308 
309  // constructor with parameter filename //TODO
310  //AssignBondOrderProcessor(const String& file_name);
311 
315 
319 
321  virtual bool start();
322 
328  void clear();
329 
343  virtual Processor::Result operator ()(AtomContainer& ac);
344 
346  virtual bool finish();
347 
349 
353 
363  {
364  if (i >= solutions_.size())
365  {
366  Log.error() << "AssignBondOrderProcessor: No solution with index " << i << std::endl;
367  return 0;
368  }
369  int num_hydrogens = 0;
370 
371  HashMap<Atom*, int>::Iterator it = solutions_[i].number_of_virtual_hydrogens.begin();
372  for (; it != solutions_[i].number_of_virtual_hydrogens.end(); it++)
373  num_hydrogens += it->second;
374  return num_hydrogens;
375  }
376 
386  Size getNumberOfComputedSolutions() {return solutions_.size();}
387 
388 
392 
395  AtomContainer const* getAtomContainer() const {return ac_;}
396 
407 
416  {
417  if (i >= solutions_.size())
418  {
419  Log.error() << "AssignBondOrderProcessor: No solution with index " << i << std::endl;
420 
422  }
423  else
424  {
425  return getTotalCharge_(solutions_[i]);
426  }
427  }
428 
435  {
436  if (i >= solutions_.size())
437  {
438  Log.error() << "AssignBondOrderProcessor: No solution with index " << i << std::endl;
439 
441  }
442  else
443  return getTotalPenalty_(solutions_[i]);
444  }
445 
446  /* Returns the number of node expansions before solution i was found.
447  *
448  * param i index of the solution, whose number of node expansions should be returned.
449  * return int - number of node expansions before solution i was found.
450  */
452  {
453  if (i >= solutions_.size())
454  {
455  Log.error() << "AssignBondOrderProcessor: No solution with index " << i << std::endl;
456 
457  return -1;
458  }
459  else
460  return getNumberOfNodeExpansions_(solutions_[i]);
461  }
462 
463  /* Returns the number of node expansions before solution i was found.
464  *
465  * param i index of the solution, whose queue size should be returned.
466  * return int - queue size when solution i was found.
467  */
469  {
470  if (i >= solutions_.size())
471  {
472  Log.error() << "AssignBondOrderProcessor: No solution with index " << i << std::endl;
473 
474  return -1;
475  }
476  else
477  return getQueueSize_(solutions_[i]);
478  }
479 
492  bool apply(Position i);
493 
500 
508  bool computeNextSolution(bool apply_solution = true);
509 
513 
516  bool hasValidOptions(){return readOptions_();}
517 
526 
530  Options options;
532 
534 
535  protected:
536 
542  bool readOptions_();
543 
544 
551 
561 
568  int getPenaltyClass_(Atom* atom);
569 
570 
587 
600 
603  //TODO: move to solution!
604  bool apply_(BondOrderAssignment& solution);
605 
609 
610  /* Returns the queue's size at the moment the given solution was found.
611  *
612  * param sol solution, whose queue size should be returned.
613  * return int - queue size when the given solution was found.
614  */
615  int getQueueSize_(const BondOrderAssignment& sol){return sol.getQueueSize();}
616 
624  {
625  if (sol.valid)
626  {
627  return sol.total_charge;
628  }
629  else
630  {
631  return 0;
632  }
633  }
634 
642  {
643  return sol.coarsePenalty();
644  }
645 
646  /* Returns the number of node expansions before the given solution was found.
647  *
648  * param sol solution, whose number of node expansions should be returned.
649  * return int - number of node expansions before solution i was found.
650  */
652 
654  bool valid_;
655 
658 
659  // Map for storing the bonds fixed orders
660  // if a bond is free, the map returns 0
661  std::map<Bond*, short> bond_fixed_;
662 
663  // all free bonds in the atom container
664  std::vector<Bond*> free_bonds_;
665 
666  // Map for storing the bonds associated index (all bonds)
668 
669  // Vector for mapping from variable indices onto bonds (all bonds)
670  std::vector<Bond*> index_to_bond_;
671 
672 
673 
674  // ***************** datastructures for virtual hydrogen bonds ******************
675  //
676  // NOTE: a single virtual bond represents ALL possible hydrogen
677  // bonds for a given atom
678  //
679  // the atoms with upto n possible additional hydrogens
681  //
682  // the max number of virtual hydrogens per virtual bond index
684  //
685  // the number of virtual bonds
687  //
688  // the virtual bond index assigned to this atom!
691  //
692  //
693  // a virtual dummy bond
695 
696  // ******************* general datastructures *********************
697 
698  // the number of bonds given (free + fixed!)
700 
701  // num of free bonds without virtual bonds!
703 
704  // store for all atom-indices the atoms fixed valences
705  std::vector<Position> fixed_val_;
706 
707  // storing the solutions
708  vector<BondOrderAssignment> solutions_;
709 
710  // the original conformation before we computed anything
711  // this is a vector because we can have multiple molecules...
712  vector<BondOrderAssignment> starting_configuration_;
713 
714  // the inverse of the atom type penalty normalization factor
716 
717  // the inverse of the bond length penalty normalization factor
719 
720  // denotes the index of the last applied solution
721  // -1 if there was no valid solution applied
723 
724  // the AtomContainer, the processor is operating on
726 
727  // max bond order to consider
729 
730  // balance parameter between atom type and bond length penalty
731  float alpha_;
732 
733  // the max number of solutions to compute
735 
736  // the max penalty score
738 
739  // flag to indicate, whether also non-optimal solutions should be computed
741 
742  // flag for adding missing hydrogens
744 
745  // flag for computing also the bond connectivity
747 
748  // flag for using fine penalties derived from 3d information
750 
751  // //////// general stuff /////////
752 
753 
754  // The penalty administration datastructures.
755  // filled by readAtomPenalties_
756  // organized in imaginarey blocks of length
757  // block_to_length_[i], starting from
758  // block_to_start_idx_[i] associating
759  // block_to_start_valence_[i] to the start_idx
760  vector<int> penalties_;
761  vector<Position> block_to_start_idx_;
762  vector<Size> block_to_length_;
764  // stores the defining element and the SMART-string of each block
765  vector<std::pair<String, String> > block_definition_;
766 
767 
768  // Stores which atom belongs to which penalty block.
769  // The first vector element of each atom block denotes the penalty block
770  // assigned to the atom without any additional VIRTUAL Hydrogens,
771  // the second element with one additional Hydrogen and so on.
772  vector< vector<int> > atom_to_block_;
773 
774  // Stores the possible bond lengths penalties per order.
776 
778 
781 
782  // The strategies this class can use
784  };
785 
786 } // namespace BALL
787 
788 
789 #endif // BALL_STRUCTURE_ASSIGNBONDORDERPROCESSOR_H
BALL::BondOrderAssignment
A solution to the bond order assignment problem.
Definition: bondOrderAssignment.h:32
BALL::AssignBondOrderProcessor::Option::OVERWRITE_SELECTED_BONDS
static const char * OVERWRITE_SELECTED_BONDS
Definition: assignBondOrderProcessor.h:140
BALL::AssignBondOrderProcessor::precomputeBondLengthPenalties_
bool precomputeBondLengthPenalties_()
BALL::AssignBondOrderProcessor::fixed_val_
std::vector< Position > fixed_val_
Definition: assignBondOrderProcessor.h:705
BALL_EXPORT
#define BALL_EXPORT
Definition: COMMON/global.h:50
BALL::AssignBondOrderProcessor::AssignBondOrderProcessor
AssignBondOrderProcessor()
Default Constructor.
BALL::AssignBondOrderProcessor::Default::USE_FINE_PENALTY
static const bool USE_FINE_PENALTY
Definition: assignBondOrderProcessor.h:238
BALL::AssignBondOrderProcessor::getTotalPenalty_
float getTotalPenalty_(const BondOrderAssignment &sol)
Definition: assignBondOrderProcessor.h:641
BALL::AssignBondOrderProcessor::Default::OVERWRITE_SELECTED_BONDS
static const bool OVERWRITE_SELECTED_BONDS
Definition: assignBondOrderProcessor.h:234
BALL::AssignBondOrderProcessor::max_penalty_
int max_penalty_
Definition: assignBondOrderProcessor.h:737
BALL::AssignBondOrderProcessor::virtual_bond_index_to_number_of_virtual_hydrogens_
std::vector< int > virtual_bond_index_to_number_of_virtual_hydrogens_
Definition: assignBondOrderProcessor.h:683
BALL::AssignBondOrderProcessor::ac_
AtomContainer * ac_
Definition: assignBondOrderProcessor.h:725
BALL::AssignBondOrderProcessor::evaluatePenalty
float evaluatePenalty(AtomContainer *ac)
BALL::AssignBondOrderProcessor::free_bonds_
std::vector< Bond * > free_bonds_
Definition: assignBondOrderProcessor.h:664
BALL::AssignBondOrderProcessor::clear
void clear()
BALL::AssignBondOrderProcessor::index_to_bond_
std::vector< Bond * > index_to_bond_
Definition: assignBondOrderProcessor.h:670
BALL::ILPBondOrderStrategy
Definition: ILPBondOrderStrategy.h:25
BALL::Options
Definition: options.h:48
BALL::AssignBondOrderProcessor::computeVirtualHydrogens_
float computeVirtualHydrogens_(Atom *atom)
BALL::AssignBondOrderProcessor::finish
virtual bool finish()
Processor method which is called after the operator()-call.
BALL::Bond
Definition: bond.h:57
hashMap.h
bondOrderAssignment.h
BALL::HashMap
HashMap class based on the STL map (containing serveral convenience functions)
Definition: hashMap.h:74
BALL::AtomContainer
Definition: atomContainer.h:32
BALL::System
Definition: KERNEL/system.h:40
timer.h
bond.h
BALL::AssignBondOrderProcessor::block_definition_
vector< std::pair< String, String > > block_definition_
Definition: assignBondOrderProcessor.h:765
BALL::AssignBondOrderProcessor::num_of_virtual_bonds_
Size num_of_virtual_bonds_
Definition: assignBondOrderProcessor.h:686
BALL::Log
BALL_EXPORT LogStream Log
BALL::AssignBondOrderProcessor::getPenaltyClass_
int getPenaltyClass_(Atom *atom)
BALL::AssignBondOrderProcessor::readAtomPenalties_
bool readAtomPenalties_()
BALL::AssignBondOrderProcessor::Option
Option names.
Definition: assignBondOrderProcessor.h:113
BALL::AssignBondOrderProcessor::strategies_
StringHashMap< boost::shared_ptr< BondOrderAssignmentStrategy > > strategies_
Definition: assignBondOrderProcessor.h:783
BALL::AssignBondOrderProcessor::start
virtual bool start()
Processor method which is called before the operator()-call.
BALL::LogStream::error
LogStream & error(int n=0)
BALL::AssignBondOrderProcessor::Option::OVERWRITE_TRIPLE_BOND_ORDERS
static const char * OVERWRITE_TRIPLE_BOND_ORDERS
Definition: assignBondOrderProcessor.h:129
BALL::AssignBondOrderProcessor::resetBondOrders
void resetBondOrders()
BALL::AssignBondOrderProcessor::Default::ADD_HYDROGENS
static const bool ADD_HYDROGENS
Definition: assignBondOrderProcessor.h:235
BALL::Atom
Definition: atom.h:90
BALL::AssignBondOrderProcessor::getNumberOfAddedHydrogens
Size getNumberOfAddedHydrogens(Position i)
Definition: assignBondOrderProcessor.h:362
BALL::AssignBondOrderProcessor::bond_fixed_
std::map< Bond *, short > bond_fixed_
Definition: assignBondOrderProcessor.h:661
BALL::AssignBondOrderProcessor::Default::MAX_BOND_ORDER
static const int MAX_BOND_ORDER
Definition: assignBondOrderProcessor.h:242
BALL::AssignBondOrderProcessor::Default::APPLY_FIRST_SOLUTION
static const bool APPLY_FIRST_SOLUTION
Definition: assignBondOrderProcessor.h:247
BALL::AssignBondOrderProcessor::solutions_
vector< BondOrderAssignment > solutions_
Definition: assignBondOrderProcessor.h:708
BALL::AssignBondOrderProcessor::total_num_of_bonds_
Position total_num_of_bonds_
Definition: assignBondOrderProcessor.h:699
BALL::AssignBondOrderProcessor::evaluation_mode_
bool evaluation_mode_
Processor is in an evaluation mode. Default is false.
Definition: assignBondOrderProcessor.h:657
BALL::AssignBondOrderProcessor::Algorithm::ILP
static const String ILP
Definition: assignBondOrderProcessor.h:267
BALL::BondOrderAssignment::total_charge
float total_charge
Definition: bondOrderAssignment.h:68
BALL::AssignBondOrderProcessor::compute_also_connectivity_
bool compute_also_connectivity_
Definition: assignBondOrderProcessor.h:746
BALL::AssignBondOrderProcessor::virtual_bond_
Bond * virtual_bond_
Definition: assignBondOrderProcessor.h:694
BALL::PartialBondOrderAssignment
A full or partial solution to the AStar-based bond order assignment problem.
Definition: partialBondOrderAssignment.h:34
BALL::AssignBondOrderProcessor::storeOriginalConfiguration_
void storeOriginalConfiguration_()
BALL::AssignBondOrderProcessor::Option::ADD_HYDROGENS
static const char * ADD_HYDROGENS
Definition: assignBondOrderProcessor.h:146
BALL::AssignBondOrderProcessor::alpha_
float alpha_
Definition: assignBondOrderProcessor.h:731
BALL::AssignBondOrderProcessor::Algorithm::K_GREEDY
static const String K_GREEDY
Definition: assignBondOrderProcessor.h:296
BALL::AssignBondOrderProcessor::Algorithm
Definition: assignBondOrderProcessor.h:251
BALL::String
Definition: string.h:57
BALL::AssignBondOrderProcessor::Option::MAX_PENALTY
static const char * MAX_PENALTY
Definition: assignBondOrderProcessor.h:200
BALL::AssignBondOrderProcessor
Assignment of bond orders from topology information.
Definition: assignBondOrderProcessor.h:90
bondOrderAssignmentStrategy.h
BALL::AssignBondOrderProcessor::Default::CONNECTIVITY_CUTOFF
static const float CONNECTIVITY_CUTOFF
Definition: assignBondOrderProcessor.h:237
BALL::AssignBondOrderProcessor::atom_to_block_
vector< vector< int > > atom_to_block_
Definition: assignBondOrderProcessor.h:772
BALL::AssignBondOrderProcessor::Default::OVERWRITE_TRIPLE_BOND_ORDERS
static const bool OVERWRITE_TRIPLE_BOND_ORDERS
Definition: assignBondOrderProcessor.h:233
BALL::AssignBondOrderProcessor::Option::OVERWRITE_DOUBLE_BOND_ORDERS
static const char * OVERWRITE_DOUBLE_BOND_ORDERS
Definition: assignBondOrderProcessor.h:123
BALL::AssignBondOrderProcessor::preassignPenaltyClasses_
bool preassignPenaltyClasses_()
BALL
Definition: constants.h:13
BALL::AssignBondOrderProcessor::Default::COMPUTE_ALSO_CONNECTIVITY
static const bool COMPUTE_ALSO_CONNECTIVITY
Definition: assignBondOrderProcessor.h:236
BALL::AssignBondOrderProcessor::Default::MAX_PENALTY
static const int MAX_PENALTY
Definition: assignBondOrderProcessor.h:244
BALL::AssignBondOrderProcessor::getQueueSize_
int getQueueSize_(const BondOrderAssignment &sol)
Definition: assignBondOrderProcessor.h:615
BALL::BondOrderAssignmentStrategy
Base class for bond order assignment algorithms.
Definition: bondOrderAssignmentStrategy.h:27
BALL::AssignBondOrderProcessor::getTotalPenalty
float getTotalPenalty(Position i=0)
Definition: assignBondOrderProcessor.h:434
BALL::AssignBondOrderProcessor::block_to_length_
vector< Size > block_to_length_
Definition: assignBondOrderProcessor.h:762
BALL::AssignBondOrderProcessor::Default::OVERWRITE_DOUBLE_BOND_ORDERS
static const bool OVERWRITE_DOUBLE_BOND_ORDERS
Definition: assignBondOrderProcessor.h:232
BALL::AssignBondOrderProcessor::getNumberOfComputedSolutions
Size getNumberOfComputedSolutions()
Definition: assignBondOrderProcessor.h:386
BALL::AssignBondOrderProcessor::getTotalCharge
float getTotalCharge(Position i)
Definition: assignBondOrderProcessor.h:415
options.h
BALL::AssignBondOrderProcessor::virtual_bond_index_to_atom_
vector< Atom * > virtual_bond_index_to_atom_
Definition: assignBondOrderProcessor.h:689
BALL::AssignBondOrderProcessor::AssignBondOrderProcessor
AssignBondOrderProcessor(const AssignBondOrderProcessor &abop)
BALL::AssignBondOrderProcessor::Option::OVERWRITE_SINGLE_BOND_ORDERS
static const char * OVERWRITE_SINGLE_BOND_ORDERS
Definition: assignBondOrderProcessor.h:117
BALL::AssignBondOrderProcessor::Option::CONNECTIVITY_CUTOFF
static const char * CONNECTIVITY_CUTOFF
Definition: assignBondOrderProcessor.h:158
BALL::AssignBondOrderProcessor::timer_
Timer timer_
Definition: assignBondOrderProcessor.h:777
BALL::AssignBondOrderProcessor::Option::ALGORITHM
static const char * ALGORITHM
Definition: assignBondOrderProcessor.h:170
BALL::AssignBondOrderProcessor::Option::MAX_NUMBER_OF_SOLUTIONS
static const char * MAX_NUMBER_OF_SOLUTIONS
Definition: assignBondOrderProcessor.h:188
BALL::KGreedyBondOrderStrategy
Definition: KGreedyBondOrderStrategy.h:29
BALL::AssignBondOrderProcessor::block_to_start_idx_
vector< Position > block_to_start_idx_
Definition: assignBondOrderProcessor.h:761
BALL::AStarBondOrderStrategy
Definition: AStarBondOrderStrategy.h:32
BALL::AssignBondOrderProcessor::number_of_virtual_hydrogens_
HashMap< Atom *, int > number_of_virtual_hydrogens_
Definition: assignBondOrderProcessor.h:680
BALL::AssignBondOrderProcessor::starting_configuration_
vector< BondOrderAssignment > starting_configuration_
Definition: assignBondOrderProcessor.h:712
BALL::StringHashMap
Definition: stringHashMap.h:42
BALL::BondOrderAssignment::getQueueSize
int getQueueSize() const
Definition: bondOrderAssignment.h:52
BALL::AssignBondOrderProcessor::apply
bool apply(Position i)
BALL_SIZE_TYPE
BALL::AssignBondOrderProcessor::bond_lengths_penalties_
HashMap< Bond *, vector< float > > bond_lengths_penalties_
Definition: assignBondOrderProcessor.h:775
BALL::AssignBondOrderProcessor::Default::BOND_LENGTH_WEIGHTING
static const float BOND_LENGTH_WEIGHTING
Definition: assignBondOrderProcessor.h:246
BALL::AssignBondOrderProcessor::Option::BOND_LENGTH_WEIGHTING
static const char * BOND_LENGTH_WEIGHTING
Definition: assignBondOrderProcessor.h:218
BALL::AssignBondOrderProcessor::Default::OVERWRITE_SINGLE_BOND_ORDERS
static const bool OVERWRITE_SINGLE_BOND_ORDERS
Definition: assignBondOrderProcessor.h:231
BALL::UnaryProcessor
Definition: processor.h:60
BALL::AssignBondOrderProcessor::Default::ALGORITHM
static const String ALGORITHM
Definition: assignBondOrderProcessor.h:240
BALL::AssignBondOrderProcessor::Option::APPLY_FIRST_SOLUTION
static const char * APPLY_FIRST_SOLUTION
Definition: assignBondOrderProcessor.h:224
BALL::AssignBondOrderProcessor::getTotalCharge_
float getTotalCharge_(const BondOrderAssignment &sol)
Definition: assignBondOrderProcessor.h:623
BALL::AssignBondOrderProcessor::setDefaultOptions
void setDefaultOptions()
BALL::AssignBondOrderProcessor::getNumberOfNodeExpansions
int getNumberOfNodeExpansions(Position i)
Definition: assignBondOrderProcessor.h:451
BALL::AssignBondOrderProcessor::penalties_
vector< int > penalties_
Definition: assignBondOrderProcessor.h:760
BALL::AssignBondOrderProcessor::getQueueSize
int getQueueSize(Position i)
Definition: assignBondOrderProcessor.h:468
BALL::AssignBondOrderProcessor::Option::KEKULIZE_RINGS
static const char * KEKULIZE_RINGS
Definition: assignBondOrderProcessor.h:166
BALL::AssignBondOrderProcessor::Option::INIFile
static const char * INIFile
Definition: assignBondOrderProcessor.h:174
hashSet.h
BALL::AssignBondOrderProcessor::apply_
bool apply_(BondOrderAssignment &solution)
BALL::AssignBondOrderProcessor::Default::KEKULIZE_RINGS
static const bool KEKULIZE_RINGS
Definition: assignBondOrderProcessor.h:239
processor.h
BALL::AssignBondOrderProcessor::block_to_start_valence_
vector< int > block_to_start_valence_
Definition: assignBondOrderProcessor.h:763
BALL::AssignBondOrderProcessor::use_fine_penalty_
bool use_fine_penalty_
Definition: assignBondOrderProcessor.h:749
exception.h
BALL::AssignBondOrderProcessor::Algorithm::FPT
static const String FPT
Definition: assignBondOrderProcessor.h:294
BALL::AssignBondOrderProcessor::computeNextSolution
bool computeNextSolution(bool apply_solution=true)
BALL::AssignBondOrderProcessor::getSolution
const System & getSolution(Position i)
BALL::HashMap::Iterator
Base::iterator Iterator
Definition: hashMap.h:97
BALL::AssignBondOrderProcessor::Option::COMPUTE_ALSO_CONNECTIVITY
static const char * COMPUTE_ALSO_CONNECTIVITY
Definition: assignBondOrderProcessor.h:152
BALL::AssignBondOrderProcessor::Option::COMPUTE_ALSO_NON_OPTIMAL_SOLUTIONS
static const char * COMPUTE_ALSO_NON_OPTIMAL_SOLUTIONS
Definition: assignBondOrderProcessor.h:211
BALL::AssignBondOrderProcessor::Default::INIFile
static const String INIFile
Definition: assignBondOrderProcessor.h:241
BALL::AssignBondOrderProcessor::last_applied_solution_
int last_applied_solution_
Definition: assignBondOrderProcessor.h:722
BALL::AssignBondOrderProcessor::num_of_free_bonds_
int num_of_free_bonds_
Definition: assignBondOrderProcessor.h:702
BALL::AssignBondOrderProcessor::~AssignBondOrderProcessor
virtual ~AssignBondOrderProcessor()
Destructor.
BALL::AssignBondOrderProcessor::getNumberOfNodeExpansions_
int getNumberOfNodeExpansions_(const BondOrderAssignment &sol)
Definition: assignBondOrderProcessor.h:651
partialBondOrderAssignment.h
BALL::AssignBondOrderProcessor::readOptions_
bool readOptions_()
BALL::AssignBondOrderProcessor::atom_to_virtual_bond_index_
HashMap< Atom *, int > atom_to_virtual_bond_index_
Definition: assignBondOrderProcessor.h:690
BALL::AssignBondOrderProcessor::max_bond_order_
int max_bond_order_
Definition: assignBondOrderProcessor.h:728
atomContainer.h
BALL::BondOrderAssignment::valid
bool valid
Definition: bondOrderAssignment.h:55
BALL::Timer
Definition: timer.h:31
BALL::Maths::max
T max(const T &a, const T &b)
Definition: MATHS/common.h:75
BALL::AssignBondOrderProcessor::add_missing_hydrogens_
bool add_missing_hydrogens_
Definition: assignBondOrderProcessor.h:743
BALL::AssignBondOrderProcessor::bond_to_index_
HashMap< Bond *, Index > bond_to_index_
Definition: assignBondOrderProcessor.h:667
BALL::Processor::Result
int Result
Definition: processor.h:36
BALL::AssignBondOrderProcessor::Algorithm::BRANCH_AND_BOUND
static const String BRANCH_AND_BOUND
Definition: assignBondOrderProcessor.h:297
BALL::AssignBondOrderProcessor::Default::MAX_NUMBER_OF_SOLUTIONS
static const int MAX_NUMBER_OF_SOLUTIONS
Definition: assignBondOrderProcessor.h:243
BALL::AssignBondOrderProcessor::valid_
bool valid_
Processor is in a useable valid state.
Definition: assignBondOrderProcessor.h:654
BALL::BondOrderAssignment::getNumberOfNodeExpansions
int getNumberOfNodeExpansions() const
Definition: bondOrderAssignment.h:49
BALL::FPTBondOrderStrategy
Definition: FPTBondOrderStrategy.h:123
BALL::AssignBondOrderProcessor::Default
Default values for options.
Definition: assignBondOrderProcessor.h:230
BALL::AssignBondOrderProcessor::getAtomContainer
AtomContainer const * getAtomContainer() const
Definition: assignBondOrderProcessor.h:395
BALL::BranchAndBoundBondOrderStrategy
Definition: branchAndBoundBondOrderStrategy.h:30
BALL::AssignBondOrderProcessor::getAtomContainer
AtomContainer * getAtomContainer()
Definition: assignBondOrderProcessor.h:391
BALL::AssignBondOrderProcessor::hasValidOptions
bool hasValidOptions()
Definition: assignBondOrderProcessor.h:516
BALL::AssignBondOrderProcessor::atom_type_normalization_factor_
float atom_type_normalization_factor_
Definition: assignBondOrderProcessor.h:715
BALL::AssignBondOrderProcessor::Default::COMPUTE_ALSO_NON_OPTIMAL_SOLUTIONS
static const bool COMPUTE_ALSO_NON_OPTIMAL_SOLUTIONS
Definition: assignBondOrderProcessor.h:245
BALL::AssignBondOrderProcessor::Algorithm::A_STAR
static const String A_STAR
Definition: assignBondOrderProcessor.h:255
BALL::AssignBondOrderProcessor::Option::USE_FINE_PENALTY
static const char * USE_FINE_PENALTY
Definition: assignBondOrderProcessor.h:162
BALL::PartialBondOrderAssignment::coarsePenalty
float coarsePenalty(float atom_type_penalty, float bond_length_penalty) const
BALL::AssignBondOrderProcessor::max_number_of_solutions_
int max_number_of_solutions_
Definition: assignBondOrderProcessor.h:734
BALL::AssignBondOrderProcessor::Option::MAX_BOND_ORDER
static const char * MAX_BOND_ORDER
Definition: assignBondOrderProcessor.h:178
BALL::AssignBondOrderProcessor::bond_length_normalization_factor_
float bond_length_normalization_factor_
Definition: assignBondOrderProcessor.h:718
BALL::AssignBondOrderProcessor::compute_also_non_optimal_solutions_
bool compute_also_non_optimal_solutions_
Definition: assignBondOrderProcessor.h:740