00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 // $Id: energyProcessor.h,v 1.17 2005/12/23 17:01:43 amoll Exp $ 00005 // 00006 00007 #ifndef BALL_ENERGY_ENERGYPROCESSOR_H 00008 #define BALL_ENERGY_ENERGYPROCESSOR_H 00009 00010 #ifndef BALL_COMMON_H 00011 # include <BALL/common.h> 00012 #endif 00013 00014 #ifndef BALL_KERNEL_ATOMCONTAINER_H 00015 # include <BALL/KERNEL/atomContainer.h> 00016 #endif 00017 00018 #ifndef BALL_CONCEPT_PROCESSOR_H 00019 # include <BALL/CONCEPT/processor.h> 00020 #endif 00021 00022 namespace BALL 00023 { 00030 class BALL_EXPORT EnergyProcessor 00031 : public UnaryProcessor<AtomContainer> 00032 { 00033 00034 public: 00035 00036 BALL_CREATE(EnergyProcessor) 00037 00038 00041 00044 EnergyProcessor(); 00045 00048 EnergyProcessor(const EnergyProcessor& proc); 00049 00052 virtual ~EnergyProcessor(); 00053 00055 00058 00061 const EnergyProcessor& operator = (const EnergyProcessor& proc); 00062 00065 virtual void clear(); 00066 00068 00071 00074 virtual bool start(); 00075 00078 virtual Processor::Result operator () (AtomContainer& fragment); 00079 00081 00084 00087 double getEnergy() const; 00088 00090 00093 00096 bool isValid() const; 00097 00100 bool operator == (const EnergyProcessor& proc) const; 00101 00103 00104 protected: 00105 00106 /*_ this is the Fragment for which the computation is to be done */ 00107 const AtomContainer* fragment_; 00108 00109 /*_ the calculated energy */ 00110 double energy_; 00111 00112 /*_ the valid flag */ 00113 bool valid_; 00114 00115 }; 00116 } 00117 00118 #endif // BALL_ENERGY_ENERGYPROCESSOR_H