Changes in src/joiner.cpp [a67d19:e138de]
- File:
-
- 1 edited
-
src/joiner.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/joiner.cpp
ra67d19 re138de 7 7 8 8 //============================ INCLUDES =========================== 9 10 #include <cstring>11 9 12 10 #include "datacreator.hpp" … … 47 45 bool NoHessian = false; 48 46 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; 51 49 52 50 // Get the command line options 53 51 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; 58 56 return 1; 59 57 } else { … … 77 75 if (!Hcorrection.ParseFragmentMatrix(argv[1], "", HCORRECTIONSUFFIX, 0,0)) { 78 76 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; 80 78 } 81 79 if (!Force.ParseFragmentMatrix(argv[1], dir, ForcesSuffix, 0,0)) return 1; 82 80 if (!Hessian.ParseFragmentMatrix(argv[1], dir, HessianSuffix, 0,0)) { 83 81 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; 85 83 } 86 84 if (periode != NULL) { // also look for PAS values … … 146 144 for (int BondOrder=0;BondOrder<KeySet.Order;BondOrder++) { 147 145 // --------- 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; 149 147 if (!EnergyFragments.SumSubManyBodyTerms(Energy, KeySet, BondOrder)) return 1; 150 148 if (!NoHCorrection) { … … 155 153 if (!Energy.SumSubEnergy(EnergyFragments, NULL, KeySet, BondOrder, 1.)) return 1; 156 154 // --------- 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; 158 156 if (!ForceFragments.SumSubManyBodyTerms(Force, KeySet, BondOrder)) return 1; 159 157 if (!Force.SumSubForces(ForceFragments, KeySet, BondOrder, 1.)) return 1; 160 158 // --------- sum up Hessian -------------------- 161 159 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; 163 161 if (!HessianFragments.SumSubManyBodyTerms(Hessian, KeySet, BondOrder)) return 1; 164 162 if (!Hessian.SumSubHessians(HessianFragments, KeySet, BondOrder, 1.)) return 1; 165 163 } 166 164 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; 168 166 if (!ShieldingFragments.SumSubManyBodyTerms(Shielding, KeySet, BondOrder)) return 1; 169 167 if (!Shielding.SumSubForces(ShieldingFragments, KeySet, BondOrder, 1.)) return 1; … … 179 177 prefix.str(" "); 180 178 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; 182 180 // energy 183 181 if (!Energy.WriteLastMatrix(argv[1], (prefix.str()).c_str(), EnergySuffix)) return 1; … … 244 242 delete(periode); 245 243 Free(&dir); 246 DoLog(0) && (Log() << Verbose(0) << "done." << endl);244 Log() << Verbose(0) << "done." << endl; 247 245 return 0; 248 246 };
Note:
See TracChangeset
for help on using the changeset viewer.
