00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 // $Id: EFShiftProcessor.h,v 1.23.10.5 2007-04-12 13:53:52 anne Exp $ 00005 // 00006 00007 #ifndef BALL_NMR_EFSHIFTPROCESSOR_H 00008 #define BALL_NMR_EFSHIFTPROCESSOR_H 00009 00010 #ifndef BALL_NMR_SHIFT_MODULE_H 00011 # include<BALL/NMR/shiftModule.h> 00012 #endif 00013 00014 #ifndef BALL_KERNEL_EXPRESSION_H 00015 # include<BALL/KERNEL/expression.h> 00016 #endif 00017 00018 namespace BALL 00019 { 00020 class Atom; 00021 00025 class BALL_EXPORT EFShiftProcessor 00026 : public ShiftModule 00027 { 00028 public: 00029 00030 BALL_CREATE(EFShiftProcessor) 00031 00032 00035 00039 static const char* PROPERTY__EF_SHIFT; 00040 00042 00045 00048 EFShiftProcessor() 00049 ; 00050 00053 EFShiftProcessor(const EFShiftProcessor& processor) 00054 ; 00055 00058 virtual ~EFShiftProcessor() 00059 ; 00060 00062 00065 00090 virtual void init() 00091 ; 00092 00094 00097 00103 virtual bool start() 00104 ; 00105 00106 00115 virtual Processor::Result operator () (Composite& composite) 00116 ; 00117 00136 virtual bool finish() 00137 ; 00138 00140 00141 protected: 00142 00143 /*_ The list of all target bonds collected by {\tt operator ()}. 00144 * The first element of the pair is the origin of the bond, the second the destination. 00145 * The shift _always_ applies to the first element of the pair. 00146 */ 00147 std::vector<std::pair<Atom*, Atom*> > bond_list_; 00148 00149 /*_ The index of the expression that matched to result in the corresponding element in bond_list_ 00150 */ 00151 std::vector<Index> expression_number_; 00152 00153 /*_ The list of charged atoms (effectors). 00154 */ 00155 std::list<Atom*> effector_list_; 00156 00157 /*_ The expressions describing the first atom of a bond. 00158 */ 00159 std::vector<Expression> first_atom_expressions_; 00160 00161 /*_ The expressions describing the first atom of a bond. 00162 */ 00163 std::vector<Expression> second_atom_expressions_; 00164 00165 /*_ The parameter $\varepsilon_1$. 00166 */ 00167 std::vector<float> epsilon1_; 00168 00169 /*_ The parameter $\varepsilon_2$. 00170 */ 00171 std::vector<float> epsilon2_; 00172 00173 /*_ The charge assignment map. 00174 */ 00175 StringHashMap<float> charge_map_; 00176 00177 /*_ A flag indicating whether effectors in the same residues are to be considered. 00178 Set this flag by specifying the option {\tt exclude_residue_field = true} in 00179 the ElectricFieldShift section of the parameter file. 00180 Default is false. 00181 */ 00182 bool exclude_residue_field_; 00183 00184 /*_ A flag indicating whether effectors in adjacent residues are to be considered. 00185 Set this flag by specifying the option {\tt exclude_adjacent_residue_field = true} in 00186 the ElectricFieldShift section of the parameter file. 00187 Default is false. 00188 */ 00189 bool exclude_adjacent_residue_field_; 00190 00191 /*_ A flag indicating whether carbonyl effectors are to be considered for amid targets. 00192 Set this flag by specifying the option {\tt carbonyl_influences_amide_field = false} in 00193 the ElectricFieldShift section of the parameter file. 00194 Default is false. 00195 */ 00196 bool carbonyl_influences_amide_field_; 00197 00198 00199 /*_ A flag indicating whether solvent atoms do act as effectors. 00200 Set this flag by specifying the option {\tt exclude exclude_solvent_field = true} in 00201 the ElectricFieldShift section of the parameter file. 00202 Default is false. 00203 */ 00204 bool exclude_solvent_field_; 00205 00206 00207 00208 /*_ A cut off value for the electric field effect. 00209 Any effector that is further away than this cut off is ignored. 00210 The distance is read from the option {\tt cut_off} in the 00211 section <TT> ElectricFieldEffect </TT> from the parameter file. 00212 This member contains the squared value(!) of the distance. 00213 */ 00214 float cut_off2_; 00215 00216 00217 /*_ A factor for switching the charge unit between esu and elementary charges. 00218 The unit is read from the option {\tt unit} of the section 00219 <TT> Charges </TT> from the parameter file. 00220 For numeric aspects, in the init() function the esu unit is divided by 00221 the charge_factor_, such that the molecules charges (which are given 00222 by PDB.org in elementary units) can easily be multiplied with. 00223 When computing the shift, the charge_factor is again multiplied with. 00224 Default is 1.0 00225 */ 00226 00227 float charge_factor_; 00228 00229 private: 00230 00231 /*_ Some debugging functions printing parameter/effector/target information 00232 * to the Log-stream. 00233 */ 00234 void printParameters_() throw(); 00235 void printEffectors_() throw(); 00236 void printTargets_() throw(); 00237 00238 /*_ A function to perform some ShiftX-y postprocessing: 00239 add for all CA-atoms 0.2 times the EF-shift-value of the bound HA-atoms 00240 */ 00241 void postprocessing_() throw(); 00242 00243 }; 00244 00245 } // namespace BALL 00246 00247 #endif // BALL_NMR_EFSHIFTPROCESSOR_H