Loading...
Searching...
No Matches
MMFF94Processors.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: MMFF94Processors.h,v 1.1.8.1 2007/03/25 21:25:18 oliver Exp $
//
#ifndef BALL_MOLMEC_MMFF94_PROCESSORS_H
#define BALL_MOLMEC_MMFF94_PROCESSORS_H
#ifndef BALL_MOLMEC_MMFF94_MMFF94PARAMETERS_H
# include <BALL/MOLMEC/MMFF94/MMFF94Parameters.h>
#endif
#ifndef BALL_DATATYPE_HASHSET_H
# include <BALL/DATATYPE/hashSet.h>
#endif
#ifndef BALL_DATATYPE_STRINGHASHMAP_H
# include <BALL/DATATYPE/stringHashMap.h>
#endif
#ifndef BALL_KERNEL_BOND_H
# include <BALL/KERNEL/bond.h>
#endif
#ifndef BALL_STRUCTURE_ATOMTYPER_H
# include <BALL/STRUCTURE/atomTyper.h>
#endif
#include <vector>
namespace BALL
{
using std::vector;
class MMFF94ESParameters;
class Molecule;
class System;
class BALL_EXPORT MMFF94AtomTyper
: public AtomTyper
{
public:
struct AromaticType
{
String new_type;
Position atomic_number;
bool cation;
bool anion;
};
BALL_CREATE(MMFF94AtomTyper)
MMFF94AtomTyper();
MMFF94AtomTyper(const MMFF94AtomTyper& t);
virtual ~MMFF94AtomTyper() {};
virtual void assignTo(System& s);
virtual bool setupHydrogenTypes(Parameters& p, const String& section);
virtual bool setupSymbolsToTypes(Parameters& p, const String& section);
virtual bool setupAromaticTypes(Parameters& p, const String& section);
void collectHeteroAtomTypes(const MMFF94AtomTypes& atom_types);
protected:
bool assignAromaticType_5_(Atom& atom, Position L5, bool anion, bool cation);
StringHashMap<String> partner_type_to_htype_;
StringHashMap<Position> id_to_type_;
HashMap<String, AromaticType> aromatic_types_5_map_;
HashSet<String> cation_atoms_;
MMFF94AtomTypes* atom_types_;
HashSet<Position> hetero_atom_types_;
};
class BALL_EXPORT MMFF94ChargeProcessor
: public UnaryProcessor<Atom>
{
public:
BALL_CREATE(MMFF94ChargeProcessor)
MMFF94ChargeProcessor();
MMFF94ChargeProcessor(const MMFF94ChargeProcessor& cp);
virtual ~MMFF94ChargeProcessor() {};
const MMFF94ChargeProcessor& operator = (const MMFF94ChargeProcessor& cp)
;
virtual void clear()
;
virtual bool start();
virtual bool finish();
virtual Processor::Result operator () (Atom& atom);
void assignFormalCharge(Atom& atom);
const HashSet<Atom*>& getUnassignedAtoms() { return unassigned_atoms_;}
void setESParameters(const MMFF94ESParameters& es) { es_parameters_ = &es; }
void setup(const String& filename);
void setAromaticRings(const vector<HashSet<Atom*> >& rings) { aromatic_rings_ = rings;}
protected:
void assignPartialCharges_();
vector<Atom*> atoms_;
HashSet<Atom*> unassigned_atoms_;
const MMFF94ESParameters* es_parameters_;
HashMap<String, float> types_to_charges_;
HashSet<String> rule_types_;
vector<HashSet<Atom*> > aromatic_rings_;
};
} // namespace BALL
#endif // BALL_MOLMEC_MMFF94_PROCESSORS_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
MMFF94Parameters.h
atomTyper.h
bond.h
BALL::AtomTyper::AtomTyper
AtomTyper()
BALL::Atom
Definition atom.h:90
BALL::HashMap
HashMap class based on the STL map (containing serveral convenience functions).
Definition hashMap.h:74
BALL::HashSet
Definition hashSet.h:46
BALL::MMFF94AtomTyper::id_to_type_
StringHashMap< Position > id_to_type_
Definition MMFF94Processors.h:85
BALL::MMFF94AtomTyper::hetero_atom_types_
HashSet< Position > hetero_atom_types_
Definition MMFF94Processors.h:89
BALL::MMFF94AtomTyper::setupSymbolsToTypes
virtual bool setupSymbolsToTypes(Parameters &p, const String &section)
Read the matching from ID to numerical type from MFFSYMB.PAR.
BALL::MMFF94AtomTyper::assignAromaticType_5_
bool assignAromaticType_5_(Atom &atom, Position L5, bool anion, bool cation)
BALL::MMFF94AtomTyper::aromatic_types_5_map_
HashMap< String, AromaticType > aromatic_types_5_map_
Definition MMFF94Processors.h:86
BALL::MMFF94AtomTyper::atom_types_
MMFF94AtomTypes * atom_types_
Definition MMFF94Processors.h:88
BALL::MMFF94AtomTyper::cation_atoms_
HashSet< String > cation_atoms_
Definition MMFF94Processors.h:87
BALL::MMFF94AtomTyper::MMFF94AtomTyper
MMFF94AtomTyper()
BALL::MMFF94AtomTyper::setupHydrogenTypes
virtual bool setupHydrogenTypes(Parameters &p, const String &section)
Read the hydrogen matching from MMFFHDEF.PAR.
BALL::MMFF94AtomTyper::collectHeteroAtomTypes
void collectHeteroAtomTypes(const MMFF94AtomTypes &atom_types)
BALL::MMFF94AtomTyper::assignTo
virtual void assignTo(System &s)
BALL::MMFF94AtomTyper::partner_type_to_htype_
StringHashMap< String > partner_type_to_htype_
Definition MMFF94Processors.h:84
BALL::MMFF94AtomTyper::setupAromaticTypes
virtual bool setupAromaticTypes(Parameters &p, const String &section)
Read the matching from general ID to ID in aromatic rings.
BALL::MMFF94AtomTypes
Definition MMFF94Parameters.h:159
BALL::MMFF94ChargeProcessor::setAromaticRings
void setAromaticRings(const vector< HashSet< Atom * > > &rings)
Definition MMFF94Processors.h:142
BALL::MMFF94ChargeProcessor::unassigned_atoms_
HashSet< Atom * > unassigned_atoms_
Definition MMFF94Processors.h:149
BALL::MMFF94ChargeProcessor::aromatic_rings_
vector< HashSet< Atom * > > aromatic_rings_
Definition MMFF94Processors.h:153
BALL::MMFF94ChargeProcessor::es_parameters_
const MMFF94ESParameters * es_parameters_
Definition MMFF94Processors.h:150
BALL::MMFF94ChargeProcessor::assignPartialCharges_
void assignPartialCharges_()
BALL::MMFF94ChargeProcessor::setup
void setup(const String &filename)
BALL::MMFF94ChargeProcessor::finish
virtual bool finish()
BALL::MMFF94ChargeProcessor::atoms_
vector< Atom * > atoms_
Definition MMFF94Processors.h:148
BALL::MMFF94ChargeProcessor::getUnassignedAtoms
const HashSet< Atom * > & getUnassignedAtoms()
Definition MMFF94Processors.h:133
BALL::MMFF94ChargeProcessor::rule_types_
HashSet< String > rule_types_
Definition MMFF94Processors.h:152
BALL::MMFF94ChargeProcessor::setESParameters
void setESParameters(const MMFF94ESParameters &es)
Definition MMFF94Processors.h:136
BALL::MMFF94ChargeProcessor::start
virtual bool start()
BALL::MMFF94ChargeProcessor::assignFormalCharge
void assignFormalCharge(Atom &atom)
BALL::MMFF94ChargeProcessor::clear
virtual void clear()
BALL::MMFF94ChargeProcessor::types_to_charges_
HashMap< String, float > types_to_charges_
Definition MMFF94Processors.h:151
BALL::MMFF94ChargeProcessor::MMFF94ChargeProcessor
MMFF94ChargeProcessor()
BALL::MMFF94ESParameters
Definition MMFF94Parameters.h:527
BALL::Molecule
Definition molecule.h:31
BALL::Parameters
Definition parameters.h:25
BALL::Processor::Result
int Result
Definition processor.h:36
BALL::StringHashMap
Definition stringHashMap.h:42
BALL::String
Definition string.h:57
BALL::System
Definition KERNEL/system.h:40
BALL::UnaryProcessor< Atom >::UnaryProcessor
UnaryProcessor()
Definition processor.h:69
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
hashSet.h
BALL
Definition constants.h:13
BALL::Position
BALL_SIZE_TYPE Position
Definition COMMON/global.h:140
stringHashMap.h
BALL::MMFF94AtomTyper::AromaticType
Definition MMFF94Processors.h:47
BALL::MMFF94AtomTyper::AromaticType::new_type
String new_type
Definition MMFF94Processors.h:48
BALL::MMFF94AtomTyper::AromaticType::cation
bool cation
Definition MMFF94Processors.h:50
BALL::MMFF94AtomTyper::AromaticType::anion
bool anion
Definition MMFF94Processors.h:51
BALL::MMFF94AtomTyper::AromaticType::atomic_number
Position atomic_number
Definition MMFF94Processors.h:49