Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/joiner.cpp

    ra67d19 re138de  
    77
    88//============================ INCLUDES ===========================
    9 
    10 #include <cstring>
    119
    1210#include "datacreator.hpp"
     
    4745  bool NoHessian = false;
    4846
    49   DoLog(0) && (Log() << Verbose(0) << "Joiner" << endl);
    50   DoLog(0) && (Log() << Verbose(0) << "======" << endl);
     47  Log() << Verbose(0) << "Joiner" << endl;
     48  Log() << Verbose(0) << "======" << endl;
    5149
    5250  // Get the command line options
    5351  if (argc < 3) {
    54     DoLog(0) && (Log() << Verbose(0) << "Usage: " << argv[0] << " <inputdir> <prefix> [elementsdb]" << endl);
    55     DoLog(0) && (Log() << Verbose(0) << "<inputdir>\ttherein the output of a molecuilder fragmentation is expected, each fragment with a subdir containing an energy.all and a forces.all file." << endl);
    56     DoLog(0) && (Log() << Verbose(0) << "<prefix>\tprefix of energy and forces file." << endl);
    57     DoLog(0) && (Log() << Verbose(0) << "[elementsdb]\tpath to elements database, needed for shieldings." << endl);
     52    Log() << Verbose(0) << "Usage: " << argv[0] << " <inputdir> <prefix> [elementsdb]" << endl;
     53    Log() << Verbose(0) << "<inputdir>\ttherein the output of a molecuilder fragmentation is expected, each fragment with a subdir containing an energy.all and a forces.all file." << endl;
     54    Log() << Verbose(0) << "<prefix>\tprefix of energy and forces file." << endl;
     55    Log() << Verbose(0) << "[elementsdb]\tpath to elements database, needed for shieldings." << endl;
    5856    return 1;
    5957  } else {
     
    7775  if (!Hcorrection.ParseFragmentMatrix(argv[1], "", HCORRECTIONSUFFIX, 0,0)) {
    7876    NoHCorrection = true;
    79     DoLog(0) && (Log() << Verbose(0) << "No HCorrection matrices found, skipping these." << endl);
     77    Log() << Verbose(0) << "No HCorrection matrices found, skipping these." << endl;
    8078  }
    8179  if (!Force.ParseFragmentMatrix(argv[1], dir, ForcesSuffix, 0,0)) return 1;
    8280  if (!Hessian.ParseFragmentMatrix(argv[1], dir, HessianSuffix, 0,0)) {
    8381    NoHessian = true;
    84     DoLog(0) && (Log() << Verbose(0) << "No hessian matrices found, skipping these." << endl);
     82    Log() << Verbose(0) << "No hessian matrices found, skipping these." << endl;
    8583  }
    8684  if (periode != NULL) { // also look for PAS values
     
    146144  for (int BondOrder=0;BondOrder<KeySet.Order;BondOrder++) {
    147145    // --------- sum up energy --------------------
    148     DoLog(0) && (Log() << Verbose(0) << "Summing energy of order " << BondOrder+1 << " ..." << endl);
     146    Log() << Verbose(0) << "Summing energy of order " << BondOrder+1 << " ..." << endl;
    149147    if (!EnergyFragments.SumSubManyBodyTerms(Energy, KeySet, BondOrder)) return 1;
    150148    if (!NoHCorrection) {
     
    155153      if (!Energy.SumSubEnergy(EnergyFragments, NULL, KeySet, BondOrder, 1.)) return 1;
    156154    // --------- sum up Forces --------------------
    157     DoLog(0) && (Log() << Verbose(0) << "Summing forces of order " << BondOrder+1 << " ..." << endl);
     155    Log() << Verbose(0) << "Summing forces of order " << BondOrder+1 << " ..." << endl;
    158156    if (!ForceFragments.SumSubManyBodyTerms(Force, KeySet, BondOrder)) return 1;
    159157    if (!Force.SumSubForces(ForceFragments, KeySet, BondOrder, 1.)) return 1;
    160158    // --------- sum up Hessian --------------------
    161159    if (!NoHessian) {
    162       DoLog(0) && (Log() << Verbose(0) << "Summing Hessian of order " << BondOrder+1 << " ..." << endl);
     160      Log() << Verbose(0) << "Summing Hessian of order " << BondOrder+1 << " ..." << endl;
    163161      if (!HessianFragments.SumSubManyBodyTerms(Hessian, KeySet, BondOrder)) return 1;
    164162      if (!Hessian.SumSubHessians(HessianFragments, KeySet, BondOrder, 1.)) return 1;
    165163    }
    166164    if (periode != NULL) { // also look for PAS values
    167       DoLog(0) && (Log() << Verbose(0) << "Summing shieldings and susceptibilities of order " << BondOrder+1 << " ..." << endl);
     165      Log() << Verbose(0) << "Summing shieldings and susceptibilities of order " << BondOrder+1 << " ..." << endl;
    168166      if (!ShieldingFragments.SumSubManyBodyTerms(Shielding, KeySet, BondOrder)) return 1;
    169167      if (!Shielding.SumSubForces(ShieldingFragments, KeySet, BondOrder, 1.)) return 1;
     
    179177    prefix.str(" ");
    180178    prefix << dir << OrderSuffix << (BondOrder+1);
    181     DoLog(0) && (Log() << Verbose(0) << "Writing files " << argv[1] << prefix.str() << ". ..." << endl);
     179    Log() << Verbose(0) << "Writing files " << argv[1] << prefix.str() << ". ..." << endl;
    182180    // energy
    183181    if (!Energy.WriteLastMatrix(argv[1], (prefix.str()).c_str(), EnergySuffix)) return 1;
     
    244242  delete(periode);
    245243  Free(&dir);
    246   DoLog(0) && (Log() << Verbose(0) << "done." << endl);
     244  Log() << Verbose(0) << "done." << endl;
    247245  return 0;
    248246};
Note: See TracChangeset for help on using the changeset viewer.