partialChargeProcessor.h

Go to the documentation of this file.
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);
00062 
00066     virtual Processor::Result operator () (AtomContainer& ac);
00068 
00069     private:
00070 
00071     /*_ @name Accessors
00072     */
00073 
00074     std::pair<std::vector<float>, std::vector<float> > readIonizationEnergies_();
00075 
00076     
00078     /*_ Helper function to get the ionization energy for an element
00079     */
00080     float getIonizationEnergy_(Element::AtomicNumber atomic_number, Size charge);
00081 
00082 
00083     void readElectronAffinities_(std::vector<float>& electron_affinities);
00084 
00085     /*_ Helper funtion to get the electron affinity of an element
00086     */
00087     float getElectronAffinity_(Element::AtomicNumber atomic_number, Size charge);
00088 
00089     /*_ Helper function to get the PEOE a,b and c factor
00090     */
00091     void getabcFactors_(Atom* atom, float& a, float& b, float& c);
00093 
00094     HashSet<Element::AtomicNumber> warned_elements_;
00095   };
00096 } // namespace BALL
00097 
00098 #endif // BALL_QSAR_RINGFINDER_H