Changeset f7c19e for src/parser.cpp
- Timestamp:
- Oct 6, 2011, 9:09:56 AM (13 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- 81c980b
- Parents:
- dc8827
- git-author:
- Frederik Heber <heber@…> (08/09/11 16:39:43)
- git-committer:
- Frederik Heber <heber@…> (10/06/11 09:09:56)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/parser.cpp
rdc8827 rf7c19e 45 45 46 46 input.open(filename, ios::in); 47 if (input == NULL) {47 if (input.fail()) { 48 48 if (!test) 49 49 DoLog(0) && (Log() << Verbose(0) << endl << "FilePresent: Unable to open " << filename << ", is the directory correct?" << endl); … … 204 204 char filename[1023]; 205 205 206 //Log() << Verbose(1) << "Opening " << name << " ... " << input << endl; 207 if (input.bad()) { 206 if (input.fail()) { 208 207 DoeLog(1) && (eLog()<< Verbose(1) << endl << "MatrixContainer::ParseMatrix: Unable to parse istream." << endl); 209 208 //performCriticalExit(); … … 327 326 file << name << FRAGMENTPREFIX << KEYSETFILE; 328 327 input.open(file.str().c_str(), ios::in); 329 if (input == NULL) {328 if (input.bad()) { 330 329 DoLog(0) && (Log() << Verbose(0) << endl << "MatrixContainer::ParseFragmentMatrix: Unable to open " << file.str() << ", is the directory correct?" << endl); 331 330 return false; … … 360 359 file << name << FRAGMENTPREFIX << FragmentNumber << prefix << suffix; 361 360 std::ifstream input(file.str().c_str()); 361 DoLog(0) &&( Log() << Verbose(0) << "Opening " << file.str() << " ... " << endl); 362 362 if (!ParseMatrix(input, skiplines, skipcolumns, i)) { 363 363 input.close(); … … 704 704 input.open(line.str().c_str(), ios::in); 705 705 //Log() << Verbose(0) << "Opening " << line.str() << " ... " << input << endl; 706 if (input == NULL) {706 if (input.fail()) { 707 707 DoLog(0) && (Log() << Verbose(0) << endl << "ForceMatrix::ParseIndices: Unable to open " << line.str() << ", is the directory correct?" << endl); 708 708 return false; … … 783 783 file << name << FRAGMENTPREFIX << KEYSETFILE; 784 784 input.open(file.str().c_str(), ios::in); 785 if (input == NULL) {785 if (input.fail()) { 786 786 DoLog(0) && (Log() << Verbose(0) << endl << "ForceMatrix::ParseFragmentMatrix: Unable to open " << file.str() << ", is the directory correct?" << endl); 787 787 return false; … … 844 844 input.open(line.str().c_str(), ios::in); 845 845 //Log() << Verbose(0) << "Opening " << line.str() << " ... " << input << endl; 846 if (input == NULL) {846 if (input.fail()) { 847 847 DoLog(0) && (Log() << Verbose(0) << endl << "HessianMatrix::ParseIndices: Unable to open " << line.str() << ", is the directory correct?" << endl); 848 848 return false; … … 1015 1015 file << name << FRAGMENTPREFIX << KEYSETFILE; 1016 1016 input.open(file.str().c_str(), ios::in); 1017 if (input == NULL) {1017 if (input.fail()) { 1018 1018 DoLog(0) && (Log() << Verbose(0) << endl << "HessianMatrix::ParseFragmentMatrix: Unable to open " << file.str() << ", is the directory correct?" << endl); 1019 1019 return false; … … 1101 1101 file << name << FRAGMENTPREFIX << KEYSETFILE; 1102 1102 input.open(file.str().c_str(), ios::in); 1103 if (input == NULL) {1103 if (input.fail()) { 1104 1104 DoLog(0) && (Log() << Verbose(0) << endl << "KeySetsContainer::ParseKeySets: Unable to open " << file.str() << ", is the directory correct?" << endl); 1105 1105 return false;
Note:
See TracChangeset
for help on using the changeset viewer.