BALL 1.5.0
atomTyper.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_ATOMTYPER_H
6#define BALL_STRUCTURE_ATOMTYPER_H
7
8#ifndef BALL_DATATYPE_HASHSET_H
10#endif
11
12#ifndef BALL_DATATYPE_STRINGHASHMAP_H
14#endif
15
16#include <vector>
17
18namespace BALL
19{
20 using std::vector;
21
22 class Molecule;
23 class System;
24 class Atom;
25
41 {
42 public:
43
45
46
48
51
53 virtual ~AtomTyper() {};
54
56 bool setup(const String& filename);
57
59 virtual void assignTo(System& s);
60
62 void setAromaticRings(const vector<HashSet<Atom*> >& rings) { aromatic_rings_ = rings;}
63
65 void setRings(const vector<HashSet<Atom*> >& rings) { rings_ = rings;}
66
67 // just for debugging: computational times for the individual SMARTS expressions
69
70 protected:
71
73 void assignTo(Molecule& mol);
74
78 virtual void assignSpecificValues_(Atom&) {};
79
83 virtual bool specificSetup_() { return true;}
84
85 vector<String> names_;
86 vector<String> rules_;
87 vector<Index> types_;
88 // entries in the file for specificSetup_() :
89 vector<vector<String> > fields_;
90 // number for fields per line in the config file
92 vector<HashSet<Atom*> > rings_;
93 vector<HashSet<Atom*> > aromatic_rings_;
96 };
97
98} // namespace BALL
99
100#endif // BALL_STRUCTURE_ATOMTYPER_H
#define BALL_CREATE(name)
Definition: create.h:62
Definition: constants.h:13
char Atom[5]
Definition: PDBdefs.h:257
vector< HashSet< Atom * > > aromatic_rings_
Definition: atomTyper.h:93
vector< Index > types_
Definition: atomTyper.h:87
vector< HashSet< Atom * > > rings_
Definition: atomTyper.h:92
void setRings(const vector< HashSet< Atom * > > &rings)
Definition: atomTyper.h:65
vector< vector< String > > fields_
Definition: atomTyper.h:89
StringHashMap< vector< Position > > element_to_rules_
Definition: atomTyper.h:94
vector< String > rules_
Definition: atomTyper.h:86
bool setup(const String &filename)
Setup with the given line based file with SMARTS expressions.
virtual void assignTo(System &s)
virtual bool specificSetup_()
Definition: atomTyper.h:83
static StringHashMap< float > rule_times
Definition: atomTyper.h:68
void assignTo(Molecule &mol)
Size number_expected_fields_
Definition: atomTyper.h:91
virtual void assignSpecificValues_(Atom &)
Definition: atomTyper.h:78
vector< String > names_
Definition: atomTyper.h:85
void setAromaticRings(const vector< HashSet< Atom * > > &rings)
Definition: atomTyper.h:62
HashSet< Atom * > atoms_
Definition: atomTyper.h:95
#define BALL_EXPORT
Definition: COMMON/global.h:50