| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
#ifndef BALL_MOLMEC_PARAMETER_TEMPLATES_H |
| 8 |
#define BALL_MOLMEC_PARAMETER_TEMPLATES_H |
| 9 |
|
| 10 |
#ifndef BALL_FORMAT_PARAMETERSECTION_H |
| 11 |
# include <BALL/FORMAT/parameterSection.h> |
| 12 |
#endif |
| 13 |
|
| 14 |
#ifndef BALL_KERNEL_SYSTEM_H |
| 15 |
# include <BALL/KERNEL/system.h> |
| 16 |
#endif |
| 17 |
|
| 18 |
#ifndef BALL_DATATYPE_HASHSET_H |
| 19 |
# include <BALL/DATATYPE/hashset.h> |
| 20 |
#endif |
| 21 |
|
| 22 |
#include <BALL/KERNEL/atom.h> |
| 23 |
|
| 24 |
namespace BALL |
| 25 |
{ |
| 26 |
class Atom; |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
class BALL_EXPORT Templates |
| 32 |
: public ParameterSection |
| 33 |
{ |
| 34 |
public: |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
Templates(); |
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
Templates(const Templates& templates, bool deep = true); |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
virtual ~Templates() ; |
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
virtual void clear() ; |
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
virtual bool extractSection(Parameters& parameters, const String& section_name); |
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
float getCharge(const String& name) const; |
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
String getTypeName(const String& name) const; |
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
bool has(const String& name) const; |
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
void assign(System& system, bool overwrite_existing_typenames = true, |
| 84 |
bool overwrite_non_zero_charges = true) const; |
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
void assignCharges(System& system, bool overwrite_non_zero_charges = true) const; |
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
void assignTypeNames(System& system, bool overwrite_existing_typenames = true) const; |
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
Templates& operator = (const Templates& templates); |
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
void setMaximumUnassignedAtoms(Size nr); |
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
Size getMaximumUnassignedAtoms() const; |
| 115 |
|
| 116 |
|
| 117 |
Size getNumberOfUnassignedAtoms() const; |
| 118 |
|
| 119 |
|
| 120 |
HashSet<const Atom*>& getUnassignedAtoms(); |
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
protected: |
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
StringHashMap<float> charges_; |
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
StringHashMap<String> type_names_; |
| 133 |
|
| 134 |
|
| 135 |
HashSet<const Atom*> unassigned_atoms_; |
| 136 |
|
| 137 |
|
| 138 |
Size max_number_unassigned_atoms_; |
| 139 |
}; |
| 140 |
} |
| 141 |
|
| 142 |
#endif |