Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/config.cpp

    ra67d19 r49e1ae  
    1919#include "molecule.hpp"
    2020#include "periodentafel.hpp"
    21 #include "World.hpp"
    2221
    2322/******************************** Functions for class ConfigFileBuffer **********************/
     
    7473  file= new ifstream(filename);
    7574  if (file == NULL) {
    76     DoeLog(1) && (eLog()<< Verbose(1) << "config file " << filename << " missing!" << endl);
     75    eLog() << Verbose(1) << "config file " << filename << " missing!" << endl;
    7776    return;
    7877  }
     
    8584  file->clear();
    8685  file->seekg(file_position, ios::beg);
    87   DoLog(1) && (Log() << Verbose(1) << NoLines-1 << " lines were recognized." << endl);
     86  Log() << Verbose(1) << NoLines-1 << " lines were recognized." << endl;
    8887
    8988  // allocate buffer's 1st dimension
    9089  if (buffer != NULL) {
    91     DoeLog(1) && (eLog()<< Verbose(1) << "FileBuffer->buffer is not NULL!" << endl);
     90    eLog() << Verbose(1) << "FileBuffer->buffer is not NULL!" << endl;
    9291    return;
    9392  } else
     
    105104    lines++;
    106105  } while((!file->eof()) && (lines < NoLines));
    107   DoLog(1) && (Log() << Verbose(1) << lines-1 << " lines were read into the buffer." << endl);
     106  Log() << Verbose(1) << lines-1 << " lines were read into the buffer." << endl;
    108107
    109108  // close and exit
     
    144143  map<const char *, int, IonTypeCompare> IonTypeLineMap;
    145144  if (LineMapping == NULL) {
    146     DoeLog(0) && (eLog()<< Verbose(0) << "map pointer is NULL: " << LineMapping << endl);
     145    eLog() << Verbose(0) << "map pointer is NULL: " << LineMapping << endl;
    147146    performCriticalExit();
    148147    return;
     
    160159      LineMapping[CurrentLine+(nr++)] = runner->second;
    161160    else {
    162       DoeLog(0) && (eLog()<< Verbose(0) << "config::MapIonTypesInBuffer - NoAtoms is wrong: We are past the end of the file!" << endl);
     161      eLog() << Verbose(0) << "config::MapIonTypesInBuffer - NoAtoms is wrong: We are past the end of the file!" << endl;
    163162      performCriticalExit();
    164163    }
     
    250249        Thermostat = None;
    251250      } else {
    252         DoLog(1) && (Log() << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl);
     251        Log() << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl;
    253252        Thermostat = None;
    254253      }
     
    258257        ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, int_type, &ScaleTempStep, 1, critical); // read scaling frequency
    259258      } else {
    260         DoLog(1) && (Log() << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl);
     259        Log() << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl;
    261260        Thermostat = None;
    262261      }
     
    266265        ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, int_type, &ScaleTempStep, 1, critical); // read collision rate
    267266      } else {
    268         DoLog(1) && (Log() << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl);
     267        Log() << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl;
    269268        Thermostat = None;
    270269      }
     
    274273        ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, double_type, &TempFrequency, 1, critical); // read gamma
    275274        if (ParseForParameter(verbose,fb,"Thermostat", 0, 3, 1, double_type, &alpha, 1, optional)) {
    276           DoLog(2) && (Log() << Verbose(2) << "Extended Stochastic Thermostat detected with interpolation coefficient " << alpha << "." << endl);
     275          Log() << Verbose(2) << "Extended Stochastic Thermostat detected with interpolation coefficient " << alpha << "." << endl;
    277276        } else {
    278277          alpha = 1.;
    279278        }
    280279      } else {
    281         DoLog(1) && (Log() << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl);
     280        Log() << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl;
    282281        Thermostat = None;
    283282      }
     
    287286        ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, double_type, &TempFrequency, 1, critical); // read \tau_T
    288287      } else {
    289         DoLog(1) && (Log() << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl);
     288        Log() << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl;
    290289        Thermostat = None;
    291290      }
     
    296295        alpha = 0.;
    297296      } else {
    298         DoLog(1) && (Log() << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl);
     297        Log() << Verbose(1) << "Warning: " << ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl;
    299298        Thermostat = None;
    300299      }
    301300    } else {
    302       DoLog(1) && (Log() << Verbose(1) << " Warning: thermostat name was not understood!" << endl);
     301      Log() << Verbose(1) << " Warning: thermostat name was not understood!" << endl;
    303302      Thermostat = None;
    304303    }
    305304  } else {
    306305    if ((MaxOuterStep > 0) && (TargetTemp != 0))
    307       DoLog(2) && (Log() << Verbose(2) <<  "No thermostat chosen despite finite temperature MD, falling back to None." << endl);
     306      Log() << Verbose(2) <<  "No thermostat chosen despite finite temperature MD, falling back to None." << endl;
    308307    Thermostat = None;
    309308  }
     
    321320
    322321  do {
    323     DoLog(0) && (Log() << Verbose(0) << "===========EDIT CONFIGURATION============================" << endl);
    324     DoLog(0) && (Log() << Verbose(0) << " A - mainname (prefix for all runtime files)" << endl);
    325     DoLog(0) && (Log() << Verbose(0) << " B - Default path (for runtime files)" << endl);
    326     DoLog(0) && (Log() << Verbose(0) << " C - Path of pseudopotential files" << endl);
    327     DoLog(0) && (Log() << Verbose(0) << " D - Number of coefficient sharing processes" << endl);
    328     DoLog(0) && (Log() << Verbose(0) << " E - Number of wave function sharing processes" << endl);
    329     DoLog(0) && (Log() << Verbose(0) << " F - 0: Don't output density for OpenDX, 1: do" << endl);
    330     DoLog(0) && (Log() << Verbose(0) << " G - 0: Don't output physical data, 1: do" << endl);
    331     DoLog(0) && (Log() << Verbose(0) << " H - 0: Don't output densities of each unperturbed orbital for OpenDX, 1: do" << endl);
    332     DoLog(0) && (Log() << Verbose(0) << " I - 0: Don't output current density for OpenDX, 1: do" << endl);
    333     DoLog(0) && (Log() << Verbose(0) << " J - 0: Don't do the full current calculation, 1: do" << endl);
    334     DoLog(0) && (Log() << Verbose(0) << " K - 0: Don't do perturbation calculation to obtain susceptibility and shielding, 1: do" << endl);
    335     DoLog(0) && (Log() << Verbose(0) << " L - 0: Wannier centres as calculated, 1: common centre for all, 2: unite centres according to spread, 3: cell centre, 4: shifted to nearest grid point" << endl);
    336     DoLog(0) && (Log() << Verbose(0) << " M - Absolute begin of unphysical sawtooth transfer for position operator within cell" << endl);
    337     DoLog(0) && (Log() << Verbose(0) << " N - (0,1,2) x,y,z-plane to do two-dimensional current vector cut" << endl);
    338     DoLog(0) && (Log() << Verbose(0) << " O - Absolute position along vector cut axis for cut plane" << endl);
    339     DoLog(0) && (Log() << Verbose(0) << " P - Additional Gram-Schmidt-Orthonormalization to stabilize numerics" << endl);
    340     DoLog(0) && (Log() << Verbose(0) << " Q - Initial integer value of random number generator" << endl);
    341     DoLog(0) && (Log() << Verbose(0) << " R - for perturbation 0, for structure optimization defines upper limit of iterations" << endl);
    342     DoLog(0) && (Log() << Verbose(0) << " T - Output visual after ...th step" << endl);
    343     DoLog(0) && (Log() << Verbose(0) << " U - Output source densities of wave functions after ...th step" << endl);
    344     DoLog(0) && (Log() << Verbose(0) << " X - minimization iterations per wave function, if unsure leave at default value 0" << endl);
    345     DoLog(0) && (Log() << Verbose(0) << " Y - tolerance value for total spread in iterative Jacobi diagonalization" << endl);
    346     DoLog(0) && (Log() << Verbose(0) << " Z - Maximum number of minimization iterations" << endl);
    347     DoLog(0) && (Log() << Verbose(0) << " a - Relative change in total energy to stop min. iteration" << endl);
    348     DoLog(0) && (Log() << Verbose(0) << " b - Relative change in kinetic energy to stop min. iteration" << endl);
    349     DoLog(0) && (Log() << Verbose(0) << " c - Check stop conditions every ..th step during min. iteration" << endl);
    350     DoLog(0) && (Log() << Verbose(0) << " e - Maximum number of minimization iterations during initial level" << endl);
    351     DoLog(0) && (Log() << Verbose(0) << " f - Relative change in total energy to stop min. iteration during initial level" << endl);
    352     DoLog(0) && (Log() << Verbose(0) << " g - Relative change in kinetic energy to stop min. iteration during initial level" << endl);
    353     DoLog(0) && (Log() << Verbose(0) << " h - Check stop conditions every ..th step during min. iteration during initial level" << endl);
     322    Log() << Verbose(0) << "===========EDIT CONFIGURATION============================" << endl;
     323    Log() << Verbose(0) << " A - mainname (prefix for all runtime files)" << endl;
     324    Log() << Verbose(0) << " B - Default path (for runtime files)" << endl;
     325    Log() << Verbose(0) << " C - Path of pseudopotential files" << endl;
     326    Log() << Verbose(0) << " D - Number of coefficient sharing processes" << endl;
     327    Log() << Verbose(0) << " E - Number of wave function sharing processes" << endl;
     328    Log() << Verbose(0) << " F - 0: Don't output density for OpenDX, 1: do" << endl;
     329    Log() << Verbose(0) << " G - 0: Don't output physical data, 1: do" << endl;
     330    Log() << Verbose(0) << " H - 0: Don't output densities of each unperturbed orbital for OpenDX, 1: do" << endl;
     331    Log() << Verbose(0) << " I - 0: Don't output current density for OpenDX, 1: do" << endl;
     332    Log() << Verbose(0) << " J - 0: Don't do the full current calculation, 1: do" << endl;
     333    Log() << Verbose(0) << " K - 0: Don't do perturbation calculation to obtain susceptibility and shielding, 1: do" << endl;
     334    Log() << Verbose(0) << " L - 0: Wannier centres as calculated, 1: common centre for all, 2: unite centres according to spread, 3: cell centre, 4: shifted to nearest grid point" << endl;
     335    Log() << Verbose(0) << " M - Absolute begin of unphysical sawtooth transfer for position operator within cell" << endl;
     336    Log() << Verbose(0) << " N - (0,1,2) x,y,z-plane to do two-dimensional current vector cut" << endl;
     337    Log() << Verbose(0) << " O - Absolute position along vector cut axis for cut plane" << endl;
     338    Log() << Verbose(0) << " P - Additional Gram-Schmidt-Orthonormalization to stabilize numerics" << endl;
     339    Log() << Verbose(0) << " Q - Initial integer value of random number generator" << endl;
     340    Log() << Verbose(0) << " R - for perturbation 0, for structure optimization defines upper limit of iterations" << endl;
     341    Log() << Verbose(0) << " T - Output visual after ...th step" << endl;
     342    Log() << Verbose(0) << " U - Output source densities of wave functions after ...th step" << endl;
     343    Log() << Verbose(0) << " X - minimization iterations per wave function, if unsure leave at default value 0" << endl;
     344    Log() << Verbose(0) << " Y - tolerance value for total spread in iterative Jacobi diagonalization" << endl;
     345    Log() << Verbose(0) << " Z - Maximum number of minimization iterations" << endl;
     346    Log() << Verbose(0) << " a - Relative change in total energy to stop min. iteration" << endl;
     347    Log() << Verbose(0) << " b - Relative change in kinetic energy to stop min. iteration" << endl;
     348    Log() << Verbose(0) << " c - Check stop conditions every ..th step during min. iteration" << endl;
     349    Log() << Verbose(0) << " e - Maximum number of minimization iterations during initial level" << endl;
     350    Log() << Verbose(0) << " f - Relative change in total energy to stop min. iteration during initial level" << endl;
     351    Log() << Verbose(0) << " g - Relative change in kinetic energy to stop min. iteration during initial level" << endl;
     352    Log() << Verbose(0) << " h - Check stop conditions every ..th step during min. iteration during initial level" << endl;
    354353//    Log() << Verbose(0) << " j - six lower diagonal entries of matrix, defining the unit cell" << endl;
    355     DoLog(0) && (Log() << Verbose(0) << " k - Energy cutoff of plane wave basis in Hartree" << endl);
    356     DoLog(0) && (Log() << Verbose(0) << " l - Maximum number of levels in multi-level-ansatz" << endl);
    357     DoLog(0) && (Log() << Verbose(0) << " m - Factor by which grid nodes increase between standard and upper level" << endl);
    358     DoLog(0) && (Log() << Verbose(0) << " n - 0: Don't use RiemannTensor, 1: Do" << endl);
    359     DoLog(0) && (Log() << Verbose(0) << " o - Factor by which grid nodes increase between Riemann and standard(?) level" << endl);
    360     DoLog(0) && (Log() << Verbose(0) << " p - Number of Riemann levels" << endl);
    361     DoLog(0) && (Log() << Verbose(0) << " r - 0: Don't Use RiemannTensor, 1: Do" << endl);
    362     DoLog(0) && (Log() << Verbose(0) << " s - 0: Doubly occupied orbitals, 1: Up-/Down-Orbitals" << endl);
    363     DoLog(0) && (Log() << Verbose(0) << " t - Number of orbitals (depends pn SpinType)" << endl);
    364     DoLog(0) && (Log() << Verbose(0) << " u - Number of SpinUp orbitals (depends on SpinType)" << endl);
    365     DoLog(0) && (Log() << Verbose(0) << " v - Number of SpinDown orbitals (depends on SpinType)" << endl);
    366     DoLog(0) && (Log() << Verbose(0) << " w - Number of additional, unoccupied orbitals" << endl);
    367     DoLog(0) && (Log() << Verbose(0) << " x - radial cutoff for ewald summation in Bohrradii" << endl);
    368     DoLog(0) && (Log() << Verbose(0) << " y - 0: Don't do structure optimization beforehand, 1: Do" << endl);
    369     DoLog(0) && (Log() << Verbose(0) << " z - 0: Units are in Bohr radii, 1: units are in Aengstrom" << endl);
    370     DoLog(0) && (Log() << Verbose(0) << " i - 0: Coordinates given in file are absolute, 1: ... are relative to unit cell" << endl);
    371     DoLog(0) && (Log() << Verbose(0) << "=========================================================" << endl);
    372     DoLog(0) && (Log() << Verbose(0) << "INPUT: ");
     354    Log() << Verbose(0) << " k - Energy cutoff of plane wave basis in Hartree" << endl;
     355    Log() << Verbose(0) << " l - Maximum number of levels in multi-level-ansatz" << endl;
     356    Log() << Verbose(0) << " m - Factor by which grid nodes increase between standard and upper level" << endl;
     357    Log() << Verbose(0) << " n - 0: Don't use RiemannTensor, 1: Do" << endl;
     358    Log() << Verbose(0) << " o - Factor by which grid nodes increase between Riemann and standard(?) level" << endl;
     359    Log() << Verbose(0) << " p - Number of Riemann levels" << endl;
     360    Log() << Verbose(0) << " r - 0: Don't Use RiemannTensor, 1: Do" << endl;
     361    Log() << Verbose(0) << " s - 0: Doubly occupied orbitals, 1: Up-/Down-Orbitals" << endl;
     362    Log() << Verbose(0) << " t - Number of orbitals (depends pn SpinType)" << endl;
     363    Log() << Verbose(0) << " u - Number of SpinUp orbitals (depends on SpinType)" << endl;
     364    Log() << Verbose(0) << " v - Number of SpinDown orbitals (depends on SpinType)" << endl;
     365    Log() << Verbose(0) << " w - Number of additional, unoccupied orbitals" << endl;
     366    Log() << Verbose(0) << " x - radial cutoff for ewald summation in Bohrradii" << endl;
     367    Log() << Verbose(0) << " y - 0: Don't do structure optimization beforehand, 1: Do" << endl;
     368    Log() << Verbose(0) << " z - 0: Units are in Bohr radii, 1: units are in Aengstrom" << endl;
     369    Log() << Verbose(0) << " i - 0: Coordinates given in file are absolute, 1: ... are relative to unit cell" << endl;
     370    Log() << Verbose(0) << "=========================================================" << endl;
     371    Log() << Verbose(0) << "INPUT: ";
    373372    cin >> choice;
    374373
    375374    switch (choice) {
    376375        case 'A': // mainname
    377           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::mainname << "\t new: ");
     376          Log() << Verbose(0) << "Old: " << config::mainname << "\t new: ";
    378377          cin >> config::mainname;
    379378          break;
    380379        case 'B': // defaultpath
    381           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::defaultpath << "\t new: ");
     380          Log() << Verbose(0) << "Old: " << config::defaultpath << "\t new: ";
    382381          cin >> config::defaultpath;
    383382          break;
    384383        case 'C': // pseudopotpath
    385           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::pseudopotpath << "\t new: ");
     384          Log() << Verbose(0) << "Old: " << config::pseudopotpath << "\t new: ";
    386385          cin >> config::pseudopotpath;
    387386          break;
    388387
    389388        case 'D': // ProcPEGamma
    390           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::ProcPEGamma << "\t new: ");
     389          Log() << Verbose(0) << "Old: " << config::ProcPEGamma << "\t new: ";
    391390          cin >> config::ProcPEGamma;
    392391          break;
    393392        case 'E': // ProcPEPsi
    394           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::ProcPEPsi << "\t new: ");
     393          Log() << Verbose(0) << "Old: " << config::ProcPEPsi << "\t new: ";
    395394          cin >> config::ProcPEPsi;
    396395          break;
    397396        case 'F': // DoOutVis
    398           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::DoOutVis << "\t new: ");
     397          Log() << Verbose(0) << "Old: " << config::DoOutVis << "\t new: ";
    399398          cin >> config::DoOutVis;
    400399          break;
    401400        case 'G': // DoOutMes
    402           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::DoOutMes << "\t new: ");
     401          Log() << Verbose(0) << "Old: " << config::DoOutMes << "\t new: ";
    403402          cin >> config::DoOutMes;
    404403          break;
    405404        case 'H': // DoOutOrbitals
    406           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::DoOutOrbitals << "\t new: ");
     405          Log() << Verbose(0) << "Old: " << config::DoOutOrbitals << "\t new: ";
    407406          cin >> config::DoOutOrbitals;
    408407          break;
    409408        case 'I': // DoOutCurrent
    410           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::DoOutCurrent << "\t new: ");
     409          Log() << Verbose(0) << "Old: " << config::DoOutCurrent << "\t new: ";
    411410          cin >> config::DoOutCurrent;
    412411          break;
    413412        case 'J': // DoFullCurrent
    414           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::DoFullCurrent << "\t new: ");
     413          Log() << Verbose(0) << "Old: " << config::DoFullCurrent << "\t new: ";
    415414          cin >> config::DoFullCurrent;
    416415          break;
    417416        case 'K': // DoPerturbation
    418           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::DoPerturbation << "\t new: ");
     417          Log() << Verbose(0) << "Old: " << config::DoPerturbation << "\t new: ";
    419418          cin >> config::DoPerturbation;
    420419          break;
    421420        case 'L': // CommonWannier
    422           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::CommonWannier << "\t new: ");
     421          Log() << Verbose(0) << "Old: " << config::CommonWannier << "\t new: ";
    423422          cin >> config::CommonWannier;
    424423          break;
    425424        case 'M': // SawtoothStart
    426           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::SawtoothStart << "\t new: ");
     425          Log() << Verbose(0) << "Old: " << config::SawtoothStart << "\t new: ";
    427426          cin >> config::SawtoothStart;
    428427          break;
    429428        case 'N': // VectorPlane
    430           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::VectorPlane << "\t new: ");
     429          Log() << Verbose(0) << "Old: " << config::VectorPlane << "\t new: ";
    431430          cin >> config::VectorPlane;
    432431          break;
    433432        case 'O': // VectorCut
    434           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::VectorCut << "\t new: ");
     433          Log() << Verbose(0) << "Old: " << config::VectorCut << "\t new: ";
    435434          cin >> config::VectorCut;
    436435          break;
    437436        case 'P': // UseAddGramSch
    438           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::UseAddGramSch << "\t new: ");
     437          Log() << Verbose(0) << "Old: " << config::UseAddGramSch << "\t new: ";
    439438          cin >> config::UseAddGramSch;
    440439          break;
    441440        case 'Q': // Seed
    442           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::Seed << "\t new: ");
     441          Log() << Verbose(0) << "Old: " << config::Seed << "\t new: ";
    443442          cin >> config::Seed;
    444443          break;
    445444
    446445        case 'R': // MaxOuterStep
    447           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::MaxOuterStep << "\t new: ");
     446          Log() << Verbose(0) << "Old: " << config::MaxOuterStep << "\t new: ";
    448447          cin >> config::MaxOuterStep;
    449448          break;
    450449        case 'T': // OutVisStep
    451           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::OutVisStep << "\t new: ");
     450          Log() << Verbose(0) << "Old: " << config::OutVisStep << "\t new: ";
    452451          cin >> config::OutVisStep;
    453452          break;
    454453        case 'U': // OutSrcStep
    455           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::OutSrcStep << "\t new: ");
     454          Log() << Verbose(0) << "Old: " << config::OutSrcStep << "\t new: ";
    456455          cin >> config::OutSrcStep;
    457456          break;
    458457        case 'X': // MaxPsiStep
    459           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::MaxPsiStep << "\t new: ");
     458          Log() << Verbose(0) << "Old: " << config::MaxPsiStep << "\t new: ";
    460459          cin >> config::MaxPsiStep;
    461460          break;
    462461        case 'Y': // EpsWannier
    463           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::EpsWannier << "\t new: ");
     462          Log() << Verbose(0) << "Old: " << config::EpsWannier << "\t new: ";
    464463          cin >> config::EpsWannier;
    465464          break;
    466465
    467466        case 'Z': // MaxMinStep
    468           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::MaxMinStep << "\t new: ");
     467          Log() << Verbose(0) << "Old: " << config::MaxMinStep << "\t new: ";
    469468          cin >> config::MaxMinStep;
    470469          break;
    471470        case 'a': // RelEpsTotalEnergy
    472           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::RelEpsTotalEnergy << "\t new: ");
     471          Log() << Verbose(0) << "Old: " << config::RelEpsTotalEnergy << "\t new: ";
    473472          cin >> config::RelEpsTotalEnergy;
    474473          break;
    475474        case 'b': // RelEpsKineticEnergy
    476           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::RelEpsKineticEnergy << "\t new: ");
     475          Log() << Verbose(0) << "Old: " << config::RelEpsKineticEnergy << "\t new: ";
    477476          cin >> config::RelEpsKineticEnergy;
    478477          break;
    479478        case 'c': // MaxMinStopStep
    480           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::MaxMinStopStep << "\t new: ");
     479          Log() << Verbose(0) << "Old: " << config::MaxMinStopStep << "\t new: ";
    481480          cin >> config::MaxMinStopStep;
    482481          break;
    483482        case 'e': // MaxInitMinStep
    484           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::MaxInitMinStep << "\t new: ");
     483          Log() << Verbose(0) << "Old: " << config::MaxInitMinStep << "\t new: ";
    485484          cin >> config::MaxInitMinStep;
    486485          break;
    487486        case 'f': // InitRelEpsTotalEnergy
    488           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::InitRelEpsTotalEnergy << "\t new: ");
     487          Log() << Verbose(0) << "Old: " << config::InitRelEpsTotalEnergy << "\t new: ";
    489488          cin >> config::InitRelEpsTotalEnergy;
    490489          break;
    491490        case 'g': // InitRelEpsKineticEnergy
    492           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::InitRelEpsKineticEnergy << "\t new: ");
     491          Log() << Verbose(0) << "Old: " << config::InitRelEpsKineticEnergy << "\t new: ";
    493492          cin >> config::InitRelEpsKineticEnergy;
    494493          break;
    495494        case 'h': // InitMaxMinStopStep
    496           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::InitMaxMinStopStep << "\t new: ");
     495          Log() << Verbose(0) << "Old: " << config::InitMaxMinStopStep << "\t new: ";
    497496          cin >> config::InitMaxMinStopStep;
    498497          break;
     
    500499//        case 'j': // BoxLength
    501500//          Log() << Verbose(0) << "enter lower triadiagonalo form of basis matrix" << endl << endl;
    502 //          double * const cell_size = World::get()->cell_size;
    503501//          for (int i=0;i<6;i++) {
    504502//            Log() << Verbose(0) << "Cell size" << i << ": ";
    505 //            cin >> cell_size[i];
     503//            cin >> mol->cell_size[i];
    506504//          }
    507505//          break;
    508506
    509507        case 'k': // ECut
    510           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::ECut << "\t new: ");
     508          Log() << Verbose(0) << "Old: " << config::ECut << "\t new: ";
    511509          cin >> config::ECut;
    512510          break;
    513511        case 'l': // MaxLevel
    514           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::MaxLevel << "\t new: ");
     512          Log() << Verbose(0) << "Old: " << config::MaxLevel << "\t new: ";
    515513          cin >> config::MaxLevel;
    516514          break;
    517515        case 'm': // RiemannTensor
    518           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::RiemannTensor << "\t new: ");
     516          Log() << Verbose(0) << "Old: " << config::RiemannTensor << "\t new: ";
    519517          cin >> config::RiemannTensor;
    520518          break;
    521519        case 'n': // LevRFactor
    522           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::LevRFactor << "\t new: ");
     520          Log() << Verbose(0) << "Old: " << config::LevRFactor << "\t new: ";
    523521          cin >> config::LevRFactor;
    524522          break;
    525523        case 'o': // RiemannLevel
    526           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::RiemannLevel << "\t new: ");
     524          Log() << Verbose(0) << "Old: " << config::RiemannLevel << "\t new: ";
    527525          cin >> config::RiemannLevel;
    528526          break;
    529527        case 'p': // Lev0Factor
    530           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::Lev0Factor << "\t new: ");
     528          Log() << Verbose(0) << "Old: " << config::Lev0Factor << "\t new: ";
    531529          cin >> config::Lev0Factor;
    532530          break;
    533531        case 'r': // RTActualUse
    534           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::RTActualUse << "\t new: ");
     532          Log() << Verbose(0) << "Old: " << config::RTActualUse << "\t new: ";
    535533          cin >> config::RTActualUse;
    536534          break;
    537535        case 's': // PsiType
    538           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::PsiType << "\t new: ");
     536          Log() << Verbose(0) << "Old: " << config::PsiType << "\t new: ";
    539537          cin >> config::PsiType;
    540538          break;
    541539        case 't': // MaxPsiDouble
    542           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::MaxPsiDouble << "\t new: ");
     540          Log() << Verbose(0) << "Old: " << config::MaxPsiDouble << "\t new: ";
    543541          cin >> config::MaxPsiDouble;
    544542          break;
    545543        case 'u': // PsiMaxNoUp
    546           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::PsiMaxNoUp << "\t new: ");
     544          Log() << Verbose(0) << "Old: " << config::PsiMaxNoUp << "\t new: ";
    547545          cin >> config::PsiMaxNoUp;
    548546          break;
    549547        case 'v': // PsiMaxNoDown
    550           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::PsiMaxNoDown << "\t new: ");
     548          Log() << Verbose(0) << "Old: " << config::PsiMaxNoDown << "\t new: ";
    551549          cin >> config::PsiMaxNoDown;
    552550          break;
    553551        case 'w': // AddPsis
    554           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::AddPsis << "\t new: ");
     552          Log() << Verbose(0) << "Old: " << config::AddPsis << "\t new: ";
    555553          cin >> config::AddPsis;
    556554          break;
    557555
    558556        case 'x': // RCut
    559           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::RCut << "\t new: ");
     557          Log() << Verbose(0) << "Old: " << config::RCut << "\t new: ";
    560558          cin >> config::RCut;
    561559          break;
    562560        case 'y': // StructOpt
    563           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::StructOpt << "\t new: ");
     561          Log() << Verbose(0) << "Old: " << config::StructOpt << "\t new: ";
    564562          cin >> config::StructOpt;
    565563          break;
    566564        case 'z': // IsAngstroem
    567           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::IsAngstroem << "\t new: ");
     565          Log() << Verbose(0) << "Old: " << config::IsAngstroem << "\t new: ";
    568566          cin >> config::IsAngstroem;
    569567          break;
    570568        case 'i': // RelativeCoord
    571           DoLog(0) && (Log() << Verbose(0) << "Old: " << config::RelativeCoord << "\t new: ");
     569          Log() << Verbose(0) << "Old: " << config::RelativeCoord << "\t new: ";
    572570          cin >> config::RelativeCoord;
    573571          break;
     
    648646  }
    649647  strcpy(configname, ptr);
    650   DoLog(0) && (Log() << Verbose(0) << "Found configpath: " << configpath << ", dir slash was found at " << last << ", config name is " << configname << "." << endl);
     648  Log() << Verbose(0) << "Found configpath: " << configpath << ", dir slash was found at " << last << ", config name is " << configname << "." << endl;
    651649  delete[](buffer);
    652650};
     
    659657{
    660658  if (FileBuffer != NULL) {
    661     DoeLog(2) && (eLog()<< Verbose(2) << "deleting present FileBuffer in PrepareFileBuffer()." << endl);
     659    eLog() << Verbose(2) << "deleting present FileBuffer in PrepareFileBuffer()." << endl;
    662660    delete(FileBuffer);
    663661  }
     
    685683
    686684  if (mol == NULL) {
    687     DoeLog(0) && (eLog()<< Verbose(0) << "Molecule is not allocated in LoadMolecule(), exit.");
     685    eLog() << Verbose(0) << "Molecule is not allocated in LoadMolecule(), exit.";
    688686    performCriticalExit();
    689687  }
     
    691689  ParseForParameter(verbose,FileBuffer,"MaxTypes", 0, 1, 1, int_type, &(MaxTypes), 1, critical);
    692690  if (MaxTypes == 0) {
    693     DoeLog(1) && (eLog()<< Verbose(1) << "There are no atoms according to MaxTypes in this config file." << endl);
    694     //performCriticalExit();
     691    eLog() << Verbose(0) << "There are no atoms according to MaxTypes in this config file." << endl;
     692    performCriticalExit();
    695693  } else {
    696694    // prescan number of ions per type
    697     DoLog(0) && (Log() << Verbose(0) << "Prescanning ions per type: " << endl);
     695    Log() << Verbose(0) << "Prescanning ions per type: " << endl;
    698696    int NoAtoms = 0;
    699697    for (int i=0; i < MaxTypes; i++) {
     
    702700      ParseForParameter(verbose,FileBuffer, name, 0, 2, 1, int_type, &Z, 1, critical);
    703701      elementhash[i] = periode->FindElement(Z);
    704       DoLog(1) && (Log() << Verbose(1) << i << ". Z = " << elementhash[i]->Z << " with " << No[i] << " ions." << endl);
     702      Log() << Verbose(1) << i << ". Z = " << elementhash[i]->Z << " with " << No[i] << " ions." << endl;
    705703      NoAtoms += No[i];
    706704    }
     
    710708    sprintf(name,"Ion_Type%i",MaxTypes);
    711709    if (!ParseForParameter(verbose,FileBuffer, (const char*)name, 1, 1, 1, int_type, &value[0], 1, critical)) {
    712       DoeLog(0) && (eLog()<< Verbose(0) << "There are no atoms in the config file!" << endl);
     710      eLog() << Verbose(0) << "There are no atoms in the config file!" << endl;
    713711      performCriticalExit();
    714712      return;
     
    728726      bool status = true;
    729727      while (status) {
    730         DoLog(0) && (Log() << Verbose(0) << "Currently parsing MD step " << repetition << "." << endl);
     728        Log() << Verbose(0) << "Currently parsing MD step " << repetition << "." << endl;
    731729        for (int i=0; i < MaxTypes; i++) {
    732730          sprintf(name,"Ion_Type%i",i+1);
     
    794792      }
    795793      repetition--;
    796       DoLog(0) && (Log() << Verbose(0) << "Found " << repetition << " trajectory steps." << endl);
     794      Log() << Verbose(0) << "Found " << repetition << " trajectory steps." << endl;
    797795      if (repetition <= 1)  // if onyl one step, desactivate use of trajectories
    798796        mol->MDSteps = 0;
     
    806804              ParseForParameter(verbose,FileBuffer, "Ion_Type1_1", 0, 3, 1, double_type, &value[2], repetition, (repetition == 0) ? critical : optional))
    807805        repetition++;
    808       DoLog(0) && (Log() << Verbose(0) << "I found " << repetition << " times the keyword Ion_Type1_1." << endl);
     806      Log() << Verbose(0) << "I found " << repetition << " times the keyword Ion_Type1_1." << endl;
    809807      // parse in molecule coordinates
    810808      for (int i=0; i < MaxTypes; i++) {
     
    855853  ifstream *file = new ifstream(filename);
    856854  if (file == NULL) {
    857     DoeLog(1) && (eLog()<< Verbose(1) << "config file " << filename << " missing!" << endl);
     855    eLog() << Verbose(1) << "config file " << filename << " missing!" << endl;
    858856    return;
    859857  }
     
    967965  // Unit cell and magnetic field
    968966  ParseForParameter(verbose,FileBuffer, "BoxLength", 0, 3, 3, lower_trigrid, BoxLength, 1, critical); /* Lattice->RealBasis */
    969   double * const cell_size = World::get()->cell_size;
    970   cell_size[0] = BoxLength[0];
    971   cell_size[1] = BoxLength[3];
    972   cell_size[2] = BoxLength[4];
    973   cell_size[3] = BoxLength[6];
    974   cell_size[4] = BoxLength[7];
    975   cell_size[5] = BoxLength[8];
     967  mol->cell_size[0] = BoxLength[0];
     968  mol->cell_size[1] = BoxLength[3];
     969  mol->cell_size[2] = BoxLength[4];
     970  mol->cell_size[3] = BoxLength[6];
     971  mol->cell_size[4] = BoxLength[7];
     972  mol->cell_size[5] = BoxLength[8];
    976973  //if (1) fprintf(stderr,"\n");
    977974
     
    10631060    BG = new BondGraph(IsAngstroem);
    10641061    if (BG->LoadBondLengthTable(BondGraphFileName)) {
    1065       DoLog(0) && (Log() << Verbose(0) << "Bond length table loaded successfully." << endl);
     1062      Log() << Verbose(0) << "Bond length table loaded successfully." << endl;
    10661063    } else {
    1067       DoeLog(1) && (eLog()<< Verbose(1) << "Bond length table loading failed." << endl);
     1064      eLog() << Verbose(1) << "Bond length table loading failed." << endl;
    10681065    }
    10691066  }
     
    10941091  ifstream *file = new ifstream(filename);
    10951092  if (file == NULL) {
    1096     DoeLog(1) && (eLog()<< Verbose(1) << "config file " << filename << " missing!" << endl);
     1093    eLog() << Verbose(1) << "config file " << filename << " missing!" << endl;
    10971094    return;
    10981095  }
     
    11721169
    11731170  ParseForParameter(verbose,file, "BoxLength", 0, 3, 3, lower_trigrid, BoxLength, 1, critical); /* Lattice->RealBasis */
    1174   double * const cell_size = World::get()->cell_size;
    1175   cell_size[0] = BoxLength[0];
    1176   cell_size[1] = BoxLength[3];
    1177   cell_size[2] = BoxLength[4];
    1178   cell_size[3] = BoxLength[6];
    1179   cell_size[4] = BoxLength[7];
    1180   cell_size[5] = BoxLength[8];
     1171  mol->cell_size[0] = BoxLength[0];
     1172  mol->cell_size[1] = BoxLength[3];
     1173  mol->cell_size[2] = BoxLength[4];
     1174  mol->cell_size[3] = BoxLength[6];
     1175  mol->cell_size[4] = BoxLength[7];
     1176  mol->cell_size[5] = BoxLength[8];
    11811177  if (1) fprintf(stderr,"\n");
    11821178  config::DoPerturbation = 0;
     
    12541250  BG = new BondGraph(IsAngstroem);
    12551251  if (BG->LoadBondLengthTable(BondGraphFileName)) {
    1256     DoLog(0) && (Log() << Verbose(0) << "Bond length table loaded successfully." << endl);
     1252    Log() << Verbose(0) << "Bond length table loaded successfully." << endl;
    12571253  } else {
    1258     DoLog(0) && (Log() << Verbose(0) << "Bond length table loading failed." << endl);
     1254    Log() << Verbose(0) << "Bond length table loading failed." << endl;
    12591255  }
    12601256
     
    12631259  for (i=MAX_ELEMENTS;i--;)
    12641260    elementhash[i] = NULL;
    1265   DoLog(0) && (Log() << Verbose(0) << "Parsing Ions ..." << endl);
     1261  Log() << Verbose(0) << "Parsing Ions ..." << endl;
    12661262  No=0;
    12671263  found = 0;
    12681264  while (getline(*file,zeile,'\n')) {
    12691265    if (zeile.find("Ions_Data") == 0) {
    1270       DoLog(1) && (Log() << Verbose(1) << "found Ions_Data...begin parsing" << endl);
     1266      Log() << Verbose(1) << "found Ions_Data...begin parsing" << endl;
    12711267      found ++;
    12721268    }
     
    12821278      input >> b;     // element mass
    12831279      elementhash[No] = periode->FindElement(Z);
    1284       DoLog(1) && (Log() << Verbose(1) << "AtomNo: " << AtomNo << "\tZ: " << Z << "\ta:" << a << "\tl:"  << l << "\b:" << b << "\tElement:" << elementhash[No] << "\t:" << endl);
     1280      Log() << Verbose(1) << "AtomNo: " << AtomNo << "\tZ: " << Z << "\ta:" << a << "\tl:"  << l << "\b:" << b << "\tElement:" << elementhash[No] << "\t:" << endl;
    12851281      for(i=0;i<AtomNo;i++) {
    12861282        if (!getline(*file,zeile,'\n')) {// parse on and on
    1287           DoLog(2) && (Log() << Verbose(2) << "Error: Too few items in ionic list of element" << elementhash[No] << "." << endl << "Exiting." << endl);
     1283          Log() << Verbose(2) << "Error: Too few items in ionic list of element" << elementhash[No] << "." << endl << "Exiting." << endl;
    12881284          // return 1;
    12891285        } else {
     
    13161312  // bring MaxTypes up to date
    13171313  mol->CountElements();
    1318   const double * const cell_size = World::get()->cell_size;
    13191314  ofstream * const output = new ofstream(filename, ios::out);
    13201315  if (output != NULL) {
     
    13871382    *output << endl;
    13881383    *output << "BoxLength\t\t\t# (Length of a unit cell)" << endl;
    1389     *output << cell_size[0] << "\t" << endl;
    1390     *output << cell_size[1] << "\t" << cell_size[2] << "\t" << endl;
    1391     *output << cell_size[3] << "\t" << cell_size[4] << "\t" << cell_size[5] << "\t" << endl;
     1384    *output << mol->cell_size[0] << "\t" << endl;
     1385    *output << mol->cell_size[1] << "\t" << mol->cell_size[2] << "\t" << endl;
     1386    *output << mol->cell_size[3] << "\t" << mol->cell_size[4] << "\t" << mol->cell_size[5] << "\t" << endl;
    13921387    // FIXME
    13931388    *output << endl;
     
    14331428    return result;
    14341429  } else {
    1435     DoeLog(1) && (eLog()<< Verbose(1) << "Cannot open output file:" << filename << endl);
     1430    eLog() << Verbose(1) << "Cannot open output file:" << filename << endl;
    14361431    return false;
    14371432  }
     
    14551450    output = new ofstream(fname->str().c_str(), ios::out);
    14561451    if (output == NULL) {
    1457       DoeLog(1) && (eLog()<< Verbose(1) << "Cannot open mpqc output file:" << fname << endl);
     1452      eLog() << Verbose(1) << "Cannot open mpqc output file:" << fname << endl;
    14581453      delete(fname);
    14591454      return false;
     
    14981493    output = new ofstream(fname->str().c_str(), ios::out);
    14991494    if (output == NULL) {
    1500       DoeLog(1) && (eLog()<< Verbose(1) << "Cannot open mpqc hessian output file:" << fname << endl);
     1495      eLog() << Verbose(1) << "Cannot open mpqc hessian output file:" << fname << endl;
    15011496      delete(fname);
    15021497      return false;
     
    15541549  f = fopen(name, "w" );
    15551550  if (f == NULL) {
    1556     DoeLog(1) && (eLog()<< Verbose(1) << "Cannot open pdb output file:" << name << endl);
     1551    eLog() << Verbose(1) << "Cannot open pdb output file:" << name << endl;
    15571552    return false;
    15581553  }
     
    16091604  f = fopen(name, "w" );
    16101605  if (f == NULL) {
    1611     DoeLog(1) && (eLog()<< Verbose(1) << "Cannot open pdb output file:" << name << endl);
     1606    eLog() << Verbose(1) << "Cannot open pdb output file:" << name << endl;
    16121607    Free(&elementNo);
    16131608    return false;
     
    16461641/** Stores all atoms in a TREMOLO data input file.
    16471642 * Note that this format cannot be parsed again.
    1648  * Note that TREMOLO does not like Id starting at 0, but at 1. Atoms with Id 0 are discarded!
    16491643 * \param *filename name of file (without ".in" suffix!)
    16501644 * \param *mol pointer to molecule
     
    16591653  output = new ofstream(fname->str().c_str(), ios::out);
    16601654  if (output == NULL) {
    1661     DoeLog(1) && (eLog()<< Verbose(1) << "Cannot open tremolo output file:" << fname << endl);
     1655    eLog() << Verbose(1) << "Cannot open tremolo output file:" << fname << endl;
    16621656    delete(fname);
    16631657    return false;
     
    17011695/** Stores all atoms from all molecules in a TREMOLO data input file.
    17021696 * Note that this format cannot be parsed again.
    1703  * Note that TREMOLO does not like Id starting at 0, but at 1. Atoms with Id 0 are discarded!
    17041697 * \param *filename name of file (without ".in" suffix!)
    17051698 * \param *MolList pointer to MoleculeListClass containing all atoms
     
    17141707  output = new ofstream(fname->str().c_str(), ios::out);
    17151708  if (output == NULL) {
    1716     DoeLog(1) && (eLog()<< Verbose(1) << "Cannot open tremolo output file:" << fname << endl);
     1709    eLog() << Verbose(1) << "Cannot open tremolo output file:" << fname << endl;
    17171710    delete(fname);
    17181711    return false;
     
    17541747      while (Walker->next != (*MolWalker)->end) {
    17551748        Walker = Walker->next;
    1756         *output << AtomNo+1 << "\t";
     1749        *output << AtomNo << "\t";
    17571750        *output << Walker->Name << "\t";
    17581751        *output << (*MolWalker)->name << "\t";
    1759         *output << MolCounter+1 << "\t";
     1752        *output << MolCounter << "\t";
    17601753        *output << Walker->node->x[0] << "\t" << Walker->node->x[1] << "\t" << Walker->node->x[2] << "\t";
    17611754        *output << (double)Walker->type->Valence << "\t";
    17621755        *output << Walker->type->symbol << "\t";
    17631756        for (BondList::iterator runner = Walker->ListOfBonds.begin(); runner != Walker->ListOfBonds.end(); runner++)
    1764           *output << LocalNotoGlobalNoMap[MolCounter][ (*runner)->GetOtherAtom(Walker)->nr ]+1 << "\t";
     1757          *output << LocalNotoGlobalNoMap[MolCounter][ (*runner)->GetOtherAtom(Walker)->nr ] << "\t";
    17651758        for(int i=Walker->ListOfBonds.size(); i < MaxNeighbours; i++)
    17661759          *output << "-\t";
Note: See TracChangeset for help on using the changeset viewer.