Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/joiner.cpp

    re138de ra67d19  
    77
    88//============================ INCLUDES ===========================
     9
     10#include <cstring>
    911
    1012#include "datacreator.hpp"
     
    4547  bool NoHessian = false;
    4648
    47   Log() << Verbose(0) << "Joiner" << endl;
    48   Log() << Verbose(0) << "======" << endl;
     49  DoLog(0) && (Log() << Verbose(0) << "Joiner" << endl);
     50  DoLog(0) && (Log() << Verbose(0) << "======" << endl);
    4951
    5052  // Get the command line options
    5153  if (argc < 3) {
    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;
     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);
    5658    return 1;
    5759  } else {
     
    7577  if (!Hcorrection.ParseFragmentMatrix(argv[1], "", HCORRECTIONSUFFIX, 0,0)) {
    7678    NoHCorrection = true;
    77     Log() << Verbose(0) << "No HCorrection matrices found, skipping these." << endl;
     79    DoLog(0) && (Log() << Verbose(0) << "No HCorrection matrices found, skipping these." << endl);
    7880  }
    7981  if (!Force.ParseFragmentMatrix(argv[1], dir, ForcesSuffix, 0,0)) return 1;
    8082  if (!Hessian.ParseFragmentMatrix(argv[1], dir, HessianSuffix, 0,0)) {
    8183    NoHessian = true;
    82     Log() << Verbose(0) << "No hessian matrices found, skipping these." << endl;
     84    DoLog(0) && (Log() << Verbose(0) << "No hessian matrices found, skipping these." << endl);
    8385  }
    8486  if (periode != NULL) { // also look for PAS values
     
    144146  for (int BondOrder=0;BondOrder<KeySet.Order;BondOrder++) {
    145147    // --------- sum up energy --------------------
    146     Log() << Verbose(0) << "Summing energy of order " << BondOrder+1 << " ..." << endl;
     148    DoLog(0) && (Log() << Verbose(0) << "Summing energy of order " << BondOrder+1 << " ..." << endl);
    147149    if (!EnergyFragments.SumSubManyBodyTerms(Energy, KeySet, BondOrder)) return 1;
    148150    if (!NoHCorrection) {
     
    153155      if (!Energy.SumSubEnergy(EnergyFragments, NULL, KeySet, BondOrder, 1.)) return 1;
    154156    // --------- sum up Forces --------------------
    155     Log() << Verbose(0) << "Summing forces of order " << BondOrder+1 << " ..." << endl;
     157    DoLog(0) && (Log() << Verbose(0) << "Summing forces of order " << BondOrder+1 << " ..." << endl);
    156158    if (!ForceFragments.SumSubManyBodyTerms(Force, KeySet, BondOrder)) return 1;
    157159    if (!Force.SumSubForces(ForceFragments, KeySet, BondOrder, 1.)) return 1;
    158160    // --------- sum up Hessian --------------------
    159161    if (!NoHessian) {
    160       Log() << Verbose(0) << "Summing Hessian of order " << BondOrder+1 << " ..." << endl;
     162      DoLog(0) && (Log() << Verbose(0) << "Summing Hessian of order " << BondOrder+1 << " ..." << endl);
    161163      if (!HessianFragments.SumSubManyBodyTerms(Hessian, KeySet, BondOrder)) return 1;
    162164      if (!Hessian.SumSubHessians(HessianFragments, KeySet, BondOrder, 1.)) return 1;
    163165    }
    164166    if (periode != NULL) { // also look for PAS values
    165       Log() << Verbose(0) << "Summing shieldings and susceptibilities of order " << BondOrder+1 << " ..." << endl;
     167      DoLog(0) && (Log() << Verbose(0) << "Summing shieldings and susceptibilities of order " << BondOrder+1 << " ..." << endl);
    166168      if (!ShieldingFragments.SumSubManyBodyTerms(Shielding, KeySet, BondOrder)) return 1;
    167169      if (!Shielding.SumSubForces(ShieldingFragments, KeySet, BondOrder, 1.)) return 1;
     
    177179    prefix.str(" ");
    178180    prefix << dir << OrderSuffix << (BondOrder+1);
    179     Log() << Verbose(0) << "Writing files " << argv[1] << prefix.str() << ". ..." << endl;
     181    DoLog(0) && (Log() << Verbose(0) << "Writing files " << argv[1] << prefix.str() << ". ..." << endl);
    180182    // energy
    181183    if (!Energy.WriteLastMatrix(argv[1], (prefix.str()).c_str(), EnergySuffix)) return 1;
     
    242244  delete(periode);
    243245  Free(&dir);
    244   Log() << Verbose(0) << "done." << endl;
     246  DoLog(0) && (Log() << Verbose(0) << "done." << endl);
    245247  return 0;
    246248};
Note: See TracChangeset for help on using the changeset viewer.