00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 // $Id: johnsonBoveyShiftProcessor.h,v 1.18 2005/12/23 17:01:56 amoll Exp $ 00005 // 00006 00007 #ifndef BALL_COMMON_H 00008 # include <BALL/common.h> 00009 #endif 00010 00011 #ifndef BALL_KERNEL_EXPRESSION_H 00012 # include <BALL/KERNEL/expression.h> 00013 #endif 00014 00015 #ifndef BALL_NMR_SHIFTMODULE_H 00016 # include <BALL/NMR/shiftModule.h> 00017 #endif 00018 00019 #ifndef BALL_DATATYPE_STRINGHASHMAP_H 00020 # include <BALL/DATATYPE/stringHashMap.h> 00021 #endif 00022 00023 #ifndef BALL_FORMAT_PARAMETERS_H 00024 # include <BALL/FORMAT/parameters.h> 00025 #endif 00026 00027 #ifndef BALL_FORMAT_PARAMETERSECTION_H 00028 # include <BALL/FORMAT/parameterSection.h> 00029 #endif 00030 00031 #include <list> 00032 00033 namespace BALL 00034 { 00038 class BALL_EXPORT JohnsonBoveyShiftProcessor 00039 : public ShiftModule 00040 { 00041 public: 00042 00043 BALL_CREATE(JohnsonBoveyShiftProcessor) 00044 00045 00048 00050 struct BALL_EXPORT Ring 00051 { 00052 double radius; 00053 double intensity; 00054 Size electrons; 00055 std::vector<String> atom_names; 00056 00057 bool operator == (const Ring& ring) const; 00058 bool operator != (const Ring& ring) const { return !(*this == ring);} 00059 } ; 00060 00062 00066 00070 static const char* PROPERTY__RING_CURRENT_SHIFT; 00072 00073 00077 00080 JohnsonBoveyShiftProcessor(); 00081 00084 virtual ~JohnsonBoveyShiftProcessor(); 00085 00087 00090 00093 virtual bool start(); 00094 00097 virtual bool finish(); 00098 00101 virtual Processor::Result operator () (Composite& composite); 00102 00104 00107 00110 virtual void init(); 00111 00113 00114 protected: 00115 00116 std::list<Atom*> proton_list_; 00117 std::list<Atom*> atom_list_; 00118 std::list<Residue*> aromat_list_; 00119 StringHashMap<Ring> rings_; 00120 StringHashMap<Position> residues_with_rings_; 00121 std::vector<Expression> expressions_; 00122 00123 double carlsonEllipticalIntegral1_(double, double, double); // Carlson elliptical Integral of 1st kind 00124 double carlsonEllipticalIntegral2_(double, double, double); // Carlson elliptical Integral of 2nd kind 00125 double legendreEllipticalIntegral1_(double, double); // Legendre elliptical Integral of 1st kind 00126 double legendreEllipticalIntegral2_(double, double); // Legendre elliptical Integral of 2nd kind 00127 }; 00128 00129 } // namespace BALL