| 1 |
#ifndef BALL_STRUCTURE_BONDORDERS_PARTIALBONDORDERASSIGNMENT_H |
| 2 |
#define BALL_STRUCTURE_BONDORDERS_PARTIALBONDORDERASSIGNMENT_H |
| 3 |
|
| 4 |
#ifndef BALL_COMMON_GLOBAL_H |
| 5 |
# include <BALL/COMMON/global.h> |
| 6 |
#endif |
| 7 |
|
| 8 |
#ifndef BALL_KERNEL_ATOM_H |
| 9 |
# include <BALL/KERNEL/atom.h> |
| 10 |
#endif |
| 11 |
|
| 12 |
#ifndef BALL_KERNEL_BOND_H |
| 13 |
# include <BALL/KERNEL/bond.h> |
| 14 |
#endif |
| 15 |
|
| 16 |
#include <boost/shared_ptr.hpp> |
| 17 |
#include <vector> |
| 18 |
|
| 19 |
namespace BALL |
| 20 |
{ |
| 21 |
class AssignBondOrderProcessor; |
| 22 |
class BondOrderAssignment; |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
class BALL_EXPORT PartialBondOrderAssignment |
| 34 |
{ |
| 35 |
public: |
| 36 |
|
| 37 |
enum HEURISTIC_INDEX |
| 38 |
{ |
| 39 |
SIMPLE, |
| 40 |
MEDIUM, |
| 41 |
TIGHT |
| 42 |
}; |
| 43 |
|
| 44 |
|
| 45 |
PartialBondOrderAssignment(AssignBondOrderProcessor* parent); |
| 46 |
|
| 47 |
|
| 48 |
~PartialBondOrderAssignment(); |
| 49 |
|
| 50 |
boost::shared_ptr<BondOrderAssignment> convertToFullAssignment(); |
| 51 |
|
| 52 |
|
| 53 |
void clear(); |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
bool operator < (const PartialBondOrderAssignment& b) const; |
| 58 |
|
| 59 |
|
| 60 |
float coarsePenalty(float atom_type_penalty, float bond_length_penalty) const; |
| 61 |
|
| 62 |
|
| 63 |
float coarsePenalty() const; |
| 64 |
|
| 65 |
|
| 66 |
float finePenalty() const {return estimated_bond_length_penalty;} |
| 67 |
|
| 68 |
|
| 69 |
float getAtomTypePenalty(bool include_heuristic_term = true, HEURISTIC_INDEX heuristic_index = SIMPLE); |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
bool estimatePenalty_(bool include_heuristic_term = true, HEURISTIC_INDEX heuristic_index = SIMPLE); |
| 79 |
|
| 80 |
|
| 81 |
float estimateAtomTypePenalty_(Atom* atom, |
| 82 |
Index atom_index, |
| 83 |
int fixed_valence, |
| 84 |
int fixed_virtual_order, |
| 85 |
int num_free_bonds, |
| 86 |
HEURISTIC_INDEX heuristic_index); |
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
float estimateBondLengthPenalty_(Index atom_index, |
| 91 |
const vector<Bond*>& free_bonds, |
| 92 |
int fixed_virtual_order, |
| 93 |
int fixed_valence, |
| 94 |
int num_free_bonds); |
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
float estimated_atom_type_penalty; |
| 99 |
|
| 100 |
float estimated_bond_length_penalty; |
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
vector<short> bond_orders; |
| 106 |
|
| 107 |
|
| 108 |
Position last_bond; |
| 109 |
|
| 110 |
AssignBondOrderProcessor* abop; |
| 111 |
}; |
| 112 |
} |
| 113 |
|
| 114 |
#endif |