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