Loading...
Searching...
No Matches
hybridisationProcessor.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_STRUCTURE_HYBRIDISATIONPROCESSOR_H
#define BALL_STRUCTURE_HYBRIDISATIONPROCESSOR_H
#ifndef BALL_CONCEPT_PROCESSOR_H
#include <BALL/CONCEPT/processor.h>
#endif
#ifndef BALL_KERNEL_ATOMCONTAINER_H
#include <BALL/KERNEL/atomContainer.h>
#endif
#ifndef BALL_DATATYPE_HASHMAP_H
#include <BALL/DATATYPE/hashMap.h>
#endif
#ifndef BALL_KERNEL_BOND_H
#include <BALL/KERNEL/bond.h>
#endif
#ifndef BALL_DATATYPE_OPTIONS_H
#include <BALL/DATATYPE/options.h>
#endif
#ifndef BALL_DATATYPE_STRINGHASHMAP_H
#include <BALL/DATATYPE/stringHashMap.h>
#endif
#include <map>
namespace BALL
{
class BALL_EXPORT HybridisationProcessor
: public UnaryProcessor<AtomContainer>
{
public:
struct BALL_EXPORT Option
{
static const char* ATOM_TYPE_SMARTS_FILENAME;
static const char* ATOM_TYPE_FF_FILENAME;
static const String METHOD;
};
struct BALL_EXPORT Default
{
static const char* ATOM_TYPE_SMARTS_FILENAME;
static const char* ATOM_TYPE_FF_FILENAME;
static const String METHOD;
};
struct BALL_EXPORT Method
{
static const String SMART_MATCHING;
static const String STRUCTURE_BASED;
static const String FF_BASED;
};
BALL_CREATE(HybridisationProcessor);
HybridisationProcessor();
HybridisationProcessor(const HybridisationProcessor& hp);
HybridisationProcessor(const String& smarts_file_name, const String& ff_file_name);
virtual ~HybridisationProcessor();
virtual bool start();
virtual Processor::Result operator () (AtomContainer& ac);
Size getNumberOfHybridisationStatesSet();
void setAtomTypeSmarts(const String& file_name);
vector< std::pair<String, Size> > getHybridisationMap() { return atom_type_smarts_;};
HybridisationProcessor& operator = (const HybridisationProcessor& hp);
Options options;
void setDefaultOptions();
protected:
struct Elements_
{
String type;
unsigned char hyb;
};
struct AtomNames_
{
String a1;
String a2;
String a3;
};
bool readAtomTypeSmartsFromFile_(const String& file_name = "");
Size num_hybridisation_states_;
vector< std::pair<String, Size> > atom_type_smarts_;
StringHashMap<StringHashMap<StringHashMap<std::multimap<float, AtomNames_> > > > bond_angles_;
bool readAndInitBondAnglesFromFile_(const String& file_name = "");
StringHashMap<Elements_> elements_;
bool valid_;
double AverageBondAngle_(Atom* a);
};
} // namespace BALL
#endif // BALL_STRUCTURE_HYBRIDISATIONPROCESSOR_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
atomContainer.h
bond.h
BALL::AtomContainer
Definition atomContainer.h:32
BALL::Atom
Definition atom.h:90
BALL::HybridisationProcessor::options
Options options
options
Definition hybridisationProcessor.h:164
BALL::HybridisationProcessor::setDefaultOptions
void setDefaultOptions()
BALL::HybridisationProcessor::elements_
StringHashMap< Elements_ > elements_
Definition hybridisationProcessor.h:216
BALL::HybridisationProcessor::setAtomTypeSmarts
void setAtomTypeSmarts(const String &file_name)
BALL::HybridisationProcessor::atom_type_smarts_
vector< std::pair< String, Size > > atom_type_smarts_
structure where atom type smarts and the corresponding hybridisation states are stored in
Definition hybridisationProcessor.h:204
BALL::HybridisationProcessor::readAtomTypeSmartsFromFile_
bool readAtomTypeSmartsFromFile_(const String &file_name="")
BALL::HybridisationProcessor::bond_angles_
StringHashMap< StringHashMap< StringHashMap< std::multimap< float, AtomNames_ > > > > bond_angles_
Definition hybridisationProcessor.h:209
BALL::HybridisationProcessor::num_hybridisation_states_
Size num_hybridisation_states_
number of bonds, which are created during the processor call
Definition hybridisationProcessor.h:201
BALL::HybridisationProcessor::start
virtual bool start()
processor method which is called before the operator () call
BALL::HybridisationProcessor::AverageBondAngle_
double AverageBondAngle_(Atom *a)
computes the averaged bond angle for the given Atom
BALL::HybridisationProcessor::HybridisationProcessor
HybridisationProcessor()
default constructor
BALL::HybridisationProcessor::BALL_CREATE
BALL_CREATE(HybridisationProcessor)
BALL::HybridisationProcessor::HybridisationProcessor
HybridisationProcessor(const HybridisationProcessor &hp)
copy construcor
BALL::HybridisationProcessor::getHybridisationMap
vector< std::pair< String, Size > > getHybridisationMap()
Return the atom_types–hybridisation Hashmap.
Definition hybridisationProcessor.h:150
BALL::HybridisationProcessor::getNumberOfHybridisationStatesSet
Size getNumberOfHybridisationStatesSet()
Return the number of hybridisation states set during the last application.
BALL::HybridisationProcessor::readAndInitBondAnglesFromFile_
bool readAndInitBondAnglesFromFile_(const String &file_name="")
BALL::HybridisationProcessor::HybridisationProcessor
HybridisationProcessor(const String &smarts_file_name, const String &ff_file_name)
BALL::HybridisationProcessor::valid_
bool valid_
the Processors state
Definition hybridisationProcessor.h:220
BALL::HybridisationProcessor::~HybridisationProcessor
virtual ~HybridisationProcessor()
destructor
BALL::Options
Definition options.h:48
BALL::Processor::Result
int Result
Definition processor.h:36
BALL::StringHashMap
Definition stringHashMap.h:42
BALL::String
Definition string.h:57
BALL::UnaryProcessor< AtomContainer >::UnaryProcessor
UnaryProcessor()
Definition processor.h:69
hashMap.h
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
options.h
processor.h
stringHashMap.h
BALL::HybridisationProcessor::AtomNames_
Definition hybridisationProcessor.h:186
BALL::HybridisationProcessor::AtomNames_::a1
String a1
First atom.
Definition hybridisationProcessor.h:188
BALL::HybridisationProcessor::AtomNames_::a2
String a2
Second atom.
Definition hybridisationProcessor.h:190
BALL::HybridisationProcessor::AtomNames_::a3
String a3
Third atom.
Definition hybridisationProcessor.h:192
BALL::HybridisationProcessor::Default
Default values for options.
Definition hybridisationProcessor.h:79
BALL::HybridisationProcessor::Default::ATOM_TYPE_FF_FILENAME
static const char * ATOM_TYPE_FF_FILENAME
Definition hybridisationProcessor.h:86
BALL::HybridisationProcessor::Default::ATOM_TYPE_SMARTS_FILENAME
static const char * ATOM_TYPE_SMARTS_FILENAME
default file name for the atom type smarts
Definition hybridisationProcessor.h:81
BALL::HybridisationProcessor::Default::METHOD
static const String METHOD
Definition hybridisationProcessor.h:91
BALL::HybridisationProcessor::Elements_
Definition hybridisationProcessor.h:176
BALL::HybridisationProcessor::Elements_::hyb
unsigned char hyb
Hybridization state.
Definition hybridisationProcessor.h:180
BALL::HybridisationProcessor::Elements_::type
String type
The type.
Definition hybridisationProcessor.h:178
BALL::HybridisationProcessor::Method
Definition hybridisationProcessor.h:95
BALL::HybridisationProcessor::Method::STRUCTURE_BASED
static const String STRUCTURE_BASED
Definition hybridisationProcessor.h:97
BALL::HybridisationProcessor::Method::FF_BASED
static const String FF_BASED
Definition hybridisationProcessor.h:98
BALL::HybridisationProcessor::Method::SMART_MATCHING
static const String SMART_MATCHING
Definition hybridisationProcessor.h:96
BALL::HybridisationProcessor::Option
Option names.
Definition hybridisationProcessor.h:53
BALL::HybridisationProcessor::Option::METHOD
static const String METHOD
Definition hybridisationProcessor.h:73
BALL::HybridisationProcessor::Option::ATOM_TYPE_FF_FILENAME
static const char * ATOM_TYPE_FF_FILENAME
Definition hybridisationProcessor.h:62
BALL::HybridisationProcessor::Option::ATOM_TYPE_SMARTS_FILENAME
static const char * ATOM_TYPE_SMARTS_FILENAME
Definition hybridisationProcessor.h:57