Changeset 1f2e46 for molecuilder/src/joiner.cpp
- Timestamp:
- Apr 22, 2010, 2:00:03 PM (16 years ago)
- Children:
- 423c7b
- Parents:
- c43766
- File:
-
- 1 edited
-
molecuilder/src/joiner.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/joiner.cpp
rc43766 r1f2e46 47 47 bool NoHessian = false; 48 48 49 Log() << Verbose(0) << "Joiner" << endl;50 Log() << Verbose(0) << "======" << endl;49 DoLog(0) && (Log() << Verbose(0) << "Joiner" << endl); 50 DoLog(0) && (Log() << Verbose(0) << "======" << endl); 51 51 52 52 // Get the command line options 53 53 if (argc < 3) { 54 Log() << Verbose(0) << "Usage: " << argv[0] << " <inputdir> <prefix> [elementsdb]" << endl;55 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 Log() << Verbose(0) << "<prefix>\tprefix of energy and forces file." << endl;57 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); 58 58 return 1; 59 59 } else { … … 77 77 if (!Hcorrection.ParseFragmentMatrix(argv[1], "", HCORRECTIONSUFFIX, 0,0)) { 78 78 NoHCorrection = true; 79 Log() << Verbose(0) << "No HCorrection matrices found, skipping these." << endl;79 DoLog(0) && (Log() << Verbose(0) << "No HCorrection matrices found, skipping these." << endl); 80 80 } 81 81 if (!Force.ParseFragmentMatrix(argv[1], dir, ForcesSuffix, 0,0)) return 1; 82 82 if (!Hessian.ParseFragmentMatrix(argv[1], dir, HessianSuffix, 0,0)) { 83 83 NoHessian = true; 84 Log() << Verbose(0) << "No hessian matrices found, skipping these." << endl;84 DoLog(0) && (Log() << Verbose(0) << "No hessian matrices found, skipping these." << endl); 85 85 } 86 86 if (periode != NULL) { // also look for PAS values … … 146 146 for (int BondOrder=0;BondOrder<KeySet.Order;BondOrder++) { 147 147 // --------- sum up energy -------------------- 148 Log() << Verbose(0) << "Summing energy of order " << BondOrder+1 << " ..." << endl;148 DoLog(0) && (Log() << Verbose(0) << "Summing energy of order " << BondOrder+1 << " ..." << endl); 149 149 if (!EnergyFragments.SumSubManyBodyTerms(Energy, KeySet, BondOrder)) return 1; 150 150 if (!NoHCorrection) { … … 155 155 if (!Energy.SumSubEnergy(EnergyFragments, NULL, KeySet, BondOrder, 1.)) return 1; 156 156 // --------- sum up Forces -------------------- 157 Log() << Verbose(0) << "Summing forces of order " << BondOrder+1 << " ..." << endl;157 DoLog(0) && (Log() << Verbose(0) << "Summing forces of order " << BondOrder+1 << " ..." << endl); 158 158 if (!ForceFragments.SumSubManyBodyTerms(Force, KeySet, BondOrder)) return 1; 159 159 if (!Force.SumSubForces(ForceFragments, KeySet, BondOrder, 1.)) return 1; 160 160 // --------- sum up Hessian -------------------- 161 161 if (!NoHessian) { 162 Log() << Verbose(0) << "Summing Hessian of order " << BondOrder+1 << " ..." << endl;162 DoLog(0) && (Log() << Verbose(0) << "Summing Hessian of order " << BondOrder+1 << " ..." << endl); 163 163 if (!HessianFragments.SumSubManyBodyTerms(Hessian, KeySet, BondOrder)) return 1; 164 164 if (!Hessian.SumSubHessians(HessianFragments, KeySet, BondOrder, 1.)) return 1; 165 165 } 166 166 if (periode != NULL) { // also look for PAS values 167 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); 168 168 if (!ShieldingFragments.SumSubManyBodyTerms(Shielding, KeySet, BondOrder)) return 1; 169 169 if (!Shielding.SumSubForces(ShieldingFragments, KeySet, BondOrder, 1.)) return 1; … … 179 179 prefix.str(" "); 180 180 prefix << dir << OrderSuffix << (BondOrder+1); 181 Log() << Verbose(0) << "Writing files " << argv[1] << prefix.str() << ". ..." << endl;181 DoLog(0) && (Log() << Verbose(0) << "Writing files " << argv[1] << prefix.str() << ". ..." << endl); 182 182 // energy 183 183 if (!Energy.WriteLastMatrix(argv[1], (prefix.str()).c_str(), EnergySuffix)) return 1; … … 244 244 delete(periode); 245 245 Free(&dir); 246 Log() << Verbose(0) << "done." << endl;246 DoLog(0) && (Log() << Verbose(0) << "done." << endl); 247 247 return 0; 248 248 };
Note:
See TracChangeset
for help on using the changeset viewer.
