00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 // 00005 00006 #ifndef BALL_QSAR_PARTIALCHARGEPROCESSOR_H 00007 #define BALL_QSAR_PARTIALCHARGEPROCESSOR_H 00008 00009 #include <BALL/KERNEL/PTE.h> 00010 #include <BALL/DATATYPE/hashSet.h> 00011 00012 #include <vector> 00013 #include <utility> 00014 00015 namespace BALL 00016 { 00017 class AtomContainer; 00018 class Atom; 00019 00023 class BALL_EXPORT PartialChargeProcessor 00024 : public UnaryProcessor<AtomContainer> 00025 { 00026 public: 00027 00028 BALL_CREATE(PartialChargeProcessor) 00029 00030 00035 PartialChargeProcessor(); 00036 00039 PartialChargeProcessor(const PartialChargeProcessor& pc); 00040 00043 virtual ~PartialChargeProcessor(); 00045 00051 PartialChargeProcessor& operator = (const PartialChargeProcessor& pc); 00053 00060 void calculatePEOE(AtomContainer& ac); 00061 00063 void setDataFolder(const char* folder); 00065 00069 virtual Processor::Result operator () (AtomContainer& ac); 00071 00072 private: 00073 00074 /*_ @name Accessors 00075 */ 00076 00077 std::pair<std::vector<float>, std::vector<float> > readIonizationEnergies_(); 00078 00079 00081 /*_ Helper function to get the ionization energy for an element 00082 */ 00083 float getIonizationEnergy_(Element::AtomicNumber atomic_number, Size charge); 00084 00085 00086 void readElectronAffinities_(std::vector<float>& electron_affinities); 00087 00088 /*_ Helper funtion to get the electron affinity of an element 00089 */ 00090 float getElectronAffinity_(Element::AtomicNumber atomic_number, Size charge); 00091 00092 /*_ Helper function to get the PEOE a,b and c factor 00093 */ 00094 void getabcFactors_(Atom* atom, float& a, float& b, float& c); 00096 00097 HashSet<Element::AtomicNumber> warned_elements_; 00098 00099 String data_folder_; 00100 }; 00101 } // namespace BALL 00102 00103 #endif // BALL_QSAR_RINGFINDER_H