00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef QC_GENERAL_DATA_H_
00021 #define QC_GENERAL_DATA_H_
00022
00023
00024 #include <string>
00025 #include <iostream>
00026 #include <map>
00027
00028 #include "QCCommon.hpp"
00029
00030
00035
00036
00037
00038
00039 class QCGeneralData
00040 {
00041
00042 friend class QCReader;
00043
00045 public:
00046
00050 QCGeneralData (void);
00054 ~QCGeneralData (void);
00058 void setIsDCComputation (void) {
00059 if (mainAlgorithm.second >= QC_DC_SCF && mainAlgorithm.second <= QC_DC_OPTIMAL_DAMPING){
00060 _DCcomputational = true ;}
00061 }
00062 bool isDCComputation (void) const {
00063 return _DCcomputational ; }
00064 bool & isDCComputation (void) {
00065 return _DCcomputational ; }
00069 QCModelType
00070 getModelType (void) const { return modelType.second; }
00071
00075 std::string
00076 getModelTypeStr (void) const { return modelType.first; }
00077
00078
00082 QCParameterType
00083 getParameterType (void) const { return parameterType.second; }
00084
00088 std::string
00089 getParameterTypeStr (void) const { return parameterType.first; }
00093 QCComputation
00094 getComputationType (void) const { return computationType.second; }
00098 void setComputationType(const std::string & type)
00099 { computationType.first= type ; updateEnum (computationType, QCCommon::computations) ; }
00103 std::string
00104 getComputationTypeStr (void) const { return computationType.first; }
00105
00109 QCMainAlgorithm
00110 getMainAlgorithm (void) const { return mainAlgorithm.second; }
00111
00115 std::string
00116 getMainAlgorithmStr (void) const { return mainAlgorithm.first; }
00117
00118
00122 QCDiagoAlgorithm
00123 getDiagoAlgorithm (void) const { return diagoAlgorithm.second; }
00124
00128 std::string
00129 getDiagoAlgorithmStr (void) const { return diagoAlgorithm.first; }
00130
00131
00135 QCFloat
00136 getShiftingLevelParameter (void) const { return shiftingLevelParameter.second; }
00137
00138
00142 QCIntgAcquisitionMethod
00143 getIntgAcquisitionMethod (void) const { return intgAcquisitionMethod.second; }
00144
00148 std::string
00149 getIntgAcquisitionMethodStr (void) const { return intgAcquisitionMethod.first; }
00150
00151
00155 QCFloat
00156 getEnergyThreshold (void) const { return energyThreshold.second; }
00157
00158
00162 int
00163 getEnergyNbMaxIter (void) const { return energyNbMaxIter.second; }
00164
00165
00169 QCDerivationType
00170 getDerivationType (void) const { return derivationType.second; }
00171
00175 std::string
00176 getDerivationTypeStr (void) const { return derivationType.first; }
00177
00178
00182 QCDerivShiftBhvr
00183 getDerivShiftBhvr (void) const { return derivShiftBhvr.second; }
00184
00188 std::string
00189 getDerivShiftBhvrStr (void) const { return derivShiftBhvr.first; }
00190
00191
00195 QCFloat
00196 getDeltaQ (void) const { return deltaQ.second; }
00197
00198
00202 int getNbPartitions (void) const
00203 { return nbPartitions.second; }
00204
00205 void setNumberOfPartitions (const int N) ;
00206
00210 QCFloat
00211 getBuffDiameter (void) const { return buffDiameter.second; }
00212
00213
00217 QCFloat getCutRadius (void) const { return cutRadius.second; }
00218
00219
00223 void setRadius (const QCFloat R1, const QCFloat R2) ;
00227 bool isReadPartitionFromFile (void) const { return readPartitionFile.second; }
00228 bool & isReadPartitionFromFile (void) { return readPartitionFile.second; }
00229
00230 void setReadPartitionFileON()
00231 { readPartitionFile.first="YES";readPartitionFile.second=true ; }
00232 void setReadPartitionFileOFF()
00233 { readPartitionFile.first="NO";readPartitionFile.second=false; }
00234
00244 QCPartitionType
00245 getPartitionType (void) const { return partitionType.second; }
00246
00247
00248
00252 std::string
00253 getPartitionTypeStr (void) const { return partitionType.first; }
00254
00255
00259 void setPartitionType (const std::string & type)
00260 { partitionType.first= type ; updateEnum (partitionType, QCCommon::partitionTypes) ; }
00264 QCPartitionerType
00265 getPartitionerType (void) const { return partitionerType.second; }
00269 std::string
00270 getPartitionerTypeStr (void) const { return partitionerType.first; }
00271
00272
00276 QCInitDensityMatrix
00277 getInitDensityMatrix (void) const { return initDensityMatrix.second; }
00278
00279 std::string
00280 getInitDensityMatrixStr (void) const { return initDensityMatrix.first; }
00281
00282
00283
00284
00286 protected:
00287
00288
00290 private:
00291
00295 map<std::string, std::string *>& getMap (void) { return refs; };
00296
00297
00301 void reportStrValues (void);
00302
00303
00304
00305
00306
00308 public:
00309 protected:
00310 private:
00314 pair<std::string, QCModelType> modelType;
00318 pair<std::string, QCParameterType> parameterType;
00322 pair<std::string, QCComputation> computationType;
00326 pair<std::string, QCMainAlgorithm> mainAlgorithm;
00330 pair<std::string, QCDiagoAlgorithm> diagoAlgorithm;
00334 pair<std::string, QCFloat> shiftingLevelParameter;
00338 pair<std::string, QCIntgAcquisitionMethod> intgAcquisitionMethod;
00342 pair<std::string,QCInitDensityMatrix> initDensityMatrix;
00343
00344
00345
00346
00347
00348
00352 pair<std::string, QCFloat> energyThreshold;
00356 pair<std::string, int> energyNbMaxIter;
00357
00358
00359
00360
00361
00362
00370
00371
00372
00376 pair<std::string, QCDerivationType> derivationType;
00380 pair<std::string, QCDerivShiftBhvr> derivShiftBhvr;
00381
00382
00383
00384
00385
00389 pair<std::string, QCFloat> deltaQ;
00390
00391
00392
00393
00394
00398 pair<std::string, int> nbPartitions;
00402 pair<std::string, QCFloat> buffDiameter;
00406 pair<std::string, QCFloat> cutRadius;
00410 pair<std::string, bool> readPartitionFile;
00414 pair<std::string, QCPartitionType> partitionType;
00418 pair<std::string, QCPartitionerType> partitionerType;
00419
00420 bool _DCcomputational ;
00421
00425 map<std::string, std::string *> refs;
00426
00427 };
00428
00429
00433 extern ostream&
00434 operator << (ostream& out, const QCGeneralData& data);
00435
00436 #endif // QC_GENERAL_DATA_H_