BALL  1.5.0
MMFF94Processors.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: MMFF94Processors.h,v 1.1.8.1 2007/03/25 21:25:18 oliver Exp $
5 //
6 
7 #ifndef BALL_MOLMEC_MMFF94_PROCESSORS_H
8 #define BALL_MOLMEC_MMFF94_PROCESSORS_H
9 
10 #ifndef BALL_MOLMEC_MMFF94_MMFF94PARAMETERS_H
12 #endif
13 
14 #ifndef BALL_DATATYPE_HASHSET_H
15 # include <BALL/DATATYPE/hashSet.h>
16 #endif
17 
18 #ifndef BALL_DATATYPE_STRINGHASHMAP_H
20 #endif
21 
22 #ifndef BALL_KERNEL_BOND_H
23 # include <BALL/KERNEL/bond.h>
24 #endif
25 
26 #ifndef BALL_STRUCTURE_ATOMTYPER_H
28 #endif
29 
30 #include <vector>
31 
32 namespace BALL
33 {
34  using std::vector;
35 
36  class MMFF94ESParameters;
37  class Molecule;
38  class System;
39 
42  : public AtomTyper
43  {
44  public:
45 
46  struct AromaticType
47  {
50  bool cation;
51  bool anion;
52  };
53 
55 
56 
58 
61 
63  virtual ~MMFF94AtomTyper() {};
64 
66  virtual void assignTo(System& s);
67 
69  virtual bool setupHydrogenTypes(Parameters& p, const String& section);
70 
72  virtual bool setupSymbolsToTypes(Parameters& p, const String& section);
73 
75  virtual bool setupAromaticTypes(Parameters& p, const String& section);
76 
78  void collectHeteroAtomTypes(const MMFF94AtomTypes& atom_types);
79 
80  protected:
81 
82  bool assignAromaticType_5_(Atom& atom, Position L5, bool anion, bool cation);
83 
90  };
91 
92 
97  : public UnaryProcessor<Atom>
98  {
99  public:
100 
102 
103 
105 
108 
111 
113  const MMFF94ChargeProcessor& operator = (const MMFF94ChargeProcessor& cp)
114  ;
115 
117  virtual void clear()
118  ;
119 
121  virtual bool start();
122 
124  virtual bool finish();
125 
127  virtual Processor::Result operator () (Atom& atom);
128 
130  void assignFormalCharge(Atom& atom);
131 
133  const HashSet<Atom*>& getUnassignedAtoms() { return unassigned_atoms_;}
134 
136  void setESParameters(const MMFF94ESParameters& es) { es_parameters_ = &es; }
137 
139  void setup(const String& filename);
140 
142  void setAromaticRings(const vector<HashSet<Atom*> >& rings) { aromatic_rings_ = rings;}
143 
144  protected:
145 
146  void assignPartialCharges_();
147 
148  vector<Atom*> atoms_;
153  vector<HashSet<Atom*> > aromatic_rings_;
154  };
155 
156 } // namespace BALL
157 
158 #endif // BALL_MOLMEC_MMFF94_PROCESSORS_H
BALL::MMFF94AtomTyper::AromaticType::cation
bool cation
Definition: MMFF94Processors.h:50
BALL::MMFF94ChargeProcessor::setESParameters
void setESParameters(const MMFF94ESParameters &es)
Definition: MMFF94Processors.h:136
BALL_EXPORT
#define BALL_EXPORT
Definition: COMMON/global.h:50
BALL::MMFF94AtomTyper::aromatic_types_5_map_
HashMap< String, AromaticType > aromatic_types_5_map_
Definition: MMFF94Processors.h:86
BALL::MMFF94ChargeProcessor::setAromaticRings
void setAromaticRings(const vector< HashSet< Atom * > > &rings)
Definition: MMFF94Processors.h:142
BALL::MMFF94AtomTyper::partner_type_to_htype_
StringHashMap< String > partner_type_to_htype_
Definition: MMFF94Processors.h:84
BALL::MMFF94ChargeProcessor::rule_types_
HashSet< String > rule_types_
Definition: MMFF94Processors.h:152
BALL::HashSet< String >
MMFF94Parameters.h
BALL::MMFF94ESParameters
Definition: MMFF94Parameters.h:525
bond.h
BALL::MMFF94ChargeProcessor::unassigned_atoms_
HashSet< Atom * > unassigned_atoms_
Definition: MMFF94Processors.h:149
BALL::MMFF94ChargeProcessor::getUnassignedAtoms
const HashSet< Atom * > & getUnassignedAtoms()
Definition: MMFF94Processors.h:133
BALL::MMFF94AtomTyper::AromaticType::new_type
String new_type
Definition: MMFF94Processors.h:48
BALL::MMFF94AtomTyper::id_to_type_
StringHashMap< Position > id_to_type_
Definition: MMFF94Processors.h:85
BALL::HashMap
HashMap class based on the STL map (containing serveral convenience functions)
Definition: hashMap.h:73
BALL::MMFF94AtomTyper::cation_atoms_
HashSet< String > cation_atoms_
Definition: MMFF94Processors.h:87
BALL::StringHashMap< String >
BALL::MMFF94AtomTyper::AromaticType
Definition: MMFF94Processors.h:46
BALL_SIZE_TYPE
BALL::System
Definition: KERNEL/system.h:38
stringHashMap.h
BALL::MMFF94ChargeProcessor::types_to_charges_
HashMap< String, float > types_to_charges_
Definition: MMFF94Processors.h:151
BALL::Atom
Definition: atom.h:87
BALL
Definition: constants.h:12
BALL::MMFF94AtomTyper::atom_types_
MMFF94AtomTypes * atom_types_
Definition: MMFF94Processors.h:88
BALL::AtomTyper
Definition: atomTyper.h:40
BALL::String
Definition: string.h:56
BALL::MMFF94ChargeProcessor
Definition: MMFF94Processors.h:96
BALL::MMFF94ChargeProcessor::atoms_
vector< Atom * > atoms_
Definition: MMFF94Processors.h:148
BALL::MMFF94ChargeProcessor::aromatic_rings_
vector< HashSet< Atom * > > aromatic_rings_
Definition: MMFF94Processors.h:153
hashSet.h
BALL::MMFF94AtomTyper::~MMFF94AtomTyper
virtual ~MMFF94AtomTyper()
Definition: MMFF94Processors.h:63
BALL::Parameters
Definition: parameters.h:24
BALL::UnaryProcessor
Definition: processor.h:58
BALL::MMFF94AtomTyper::hetero_atom_types_
HashSet< Position > hetero_atom_types_
Definition: MMFF94Processors.h:89
BALL::MMFF94ChargeProcessor::es_parameters_
const MMFF94ESParameters * es_parameters_
Definition: MMFF94Processors.h:150
BALL::MMFF94AtomTyper::AromaticType::atomic_number
Position atomic_number
Definition: MMFF94Processors.h:49
atomTyper.h
BALL::Processor::Result
int Result
Definition: processor.h:36
BALL_CREATE
#define BALL_CREATE(name)
Definition: create.h:62
BALL::MMFF94AtomTyper
Definition: MMFF94Processors.h:41
BALL::MMFF94AtomTyper::AromaticType::anion
bool anion
Definition: MMFF94Processors.h:51
BALL::MMFF94ChargeProcessor::~MMFF94ChargeProcessor
virtual ~MMFF94ChargeProcessor()
Definition: MMFF94Processors.h:110
BALL::MMFF94AtomTypes
Definition: MMFF94Parameters.h:157