Ignore:
Timestamp:
Mar 2, 2011, 9:53:09 PM (15 years ago)
Author:
Frederik Heber <heber@…>
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, Candidate_v1.7.0, Candidate_v1.7.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:
7d8aa0
Parents:
2fa1dc
git-author:
Frederik Heber <heber@…> (03/01/11 14:16:44)
git-committer:
Frederik Heber <heber@…> (03/02/11 21:53:09)
Message:

Removed bond::nr.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/moleculelist.cpp

    r2fa1dc refe516  
    512512      strcpy(PathBackup, path);
    513513    else {
    514       DoeLog(0) && (eLog()<< Verbose(0) << "OutputConfigForListOfFragments: NULL default path obtained from config!" << endl);
     514      ELOG(0, "OutputConfigForListOfFragments: NULL default path obtained from config!");
    515515      performCriticalExit();
    516516    }
     
    521521    }
    522522
    523     // output xyz file
    524     FragmentNumber = FixedDigitNumber(ListOfMolecules.size(), FragmentCounter++);
    525     FragmentName = prefix + FragmentNumber + ".conf.xyz";
    526     outputFragment.open(FragmentName.c_str(), ios::out);
    527     DoLog(2) && (Log() << Verbose(2) << "Saving bond fragment No. " << FragmentNumber << "/" << FragmentCounter - 1 << " as XYZ ...");
    528     if ((intermediateResult = (*ListRunner)->OutputXYZ(&outputFragment)))
    529       DoLog(0) && (Log() << Verbose(0) << " done." << endl);
    530     else
    531       DoLog(0) && (Log() << Verbose(0) << " failed." << endl);
    532     result = result && intermediateResult;
    533     outputFragment.close();
    534     outputFragment.clear();
    535 
    536     // list atoms in fragment for debugging
    537     DoLog(2) && (Log() << Verbose(2) << "Contained atoms: ");
    538     for (molecule::const_iterator iter = (*ListRunner)->begin(); iter != (*ListRunner)->end(); ++iter) {
    539       DoLog(0) && (Log() << Verbose(0) << (*iter)->getName() << " ");
    540     }
    541     DoLog(0) && (Log() << Verbose(0) << endl);
     523    {
     524      // list atoms in fragment for debugging
     525      std::stringstream output;
     526      output << "Contained atoms: ";
     527      for (molecule::const_iterator iter = (*ListRunner)->begin(); iter != (*ListRunner)->end(); ++iter) {
     528        output << (*iter)->getName() << " ";
     529      }
     530      LOG(2, output.str());
     531    }
     532
     533    {
     534      // output xyz file
     535      FragmentNumber = FixedDigitNumber(ListOfMolecules.size(), FragmentCounter++);
     536      FragmentName = prefix + FragmentNumber + ".conf.xyz";
     537      outputFragment.open(FragmentName.c_str(), ios::out);
     538      std::stringstream output;
     539      output << "Saving bond fragment No. " << FragmentNumber << "/" << FragmentCounter - 1 << " as XYZ ... ";
     540      if ((intermediateResult = (*ListRunner)->OutputXYZ(&outputFragment)))
     541        output << " done.";
     542      else
     543        output << " failed.";
     544      LOG(3, output.str());
     545      result = result && intermediateResult;
     546      outputFragment.close();
     547      outputFragment.clear();
     548    }
    542549
    543550    // center on edge
     
    554561    (*ListRunner)->Translate(&BoxDimension);
    555562
    556     // also calculate necessary orbitals
    557     //(*ListRunner)->CalculateOrbitals(*World::getInstance().getConfig);
    558 
    559563    // change path in config
    560564    FragmentName = PathBackup;
     
    565569    World::getInstance().getConfig()->SetDefaultPath(FragmentName.c_str());
    566570
    567     // and save as config
    568     FragmentName = prefix + FragmentNumber + ".conf";
    569     DoLog(2) && (Log() << Verbose(2) << "Saving bond fragment No. " << FragmentNumber << "/" << FragmentCounter - 1 << " as config ...");
    570     if ((intermediateResult = World::getInstance().getConfig()->Save(FragmentName.c_str(), (*ListRunner)->elemente, (*ListRunner))))
    571       DoLog(0) && (Log() << Verbose(0) << " done." << endl);
    572     else
    573       DoLog(0) && (Log() << Verbose(0) << " failed." << endl);
    574     result = result && intermediateResult;
     571    {
     572      // and save as config
     573      FragmentName = prefix + FragmentNumber + ".conf";
     574      std::stringstream output;
     575      output << "Saving bond fragment No. " << FragmentNumber << "/" << FragmentCounter - 1 << " as config ... ";
     576      if ((intermediateResult = World::getInstance().getConfig()->Save(FragmentName.c_str(), (*ListRunner)->elemente, (*ListRunner))))
     577        output << " done.";
     578      else
     579        output << " failed.";
     580      LOG(3, output.str());
     581      result = result && intermediateResult;
     582    }
    575583
    576584    // restore old config
    577585    World::getInstance().getConfig()->SetDefaultPath(PathBackup);
    578586
    579     // and save as mpqc input file
    580     FragmentName = prefix + FragmentNumber + ".conf";
    581     DoLog(2) && (Log() << Verbose(2) << "Saving bond fragment No. " << FragmentNumber << "/" << FragmentCounter - 1 << " as mpqc input ...");
    582     if ((intermediateResult = World::getInstance().getConfig()->SaveMPQC(FragmentName.c_str(), (*ListRunner))))
    583       DoLog(2) && (Log() << Verbose(2) << " done." << endl);
    584     else
    585       DoLog(0) && (Log() << Verbose(0) << " failed." << endl);
     587    {
     588      // and save as mpqc input file
     589      stringstream output;
     590      FragmentName = prefix + FragmentNumber + ".conf";
     591      output << "Saving bond fragment No. " << FragmentNumber << "/" << FragmentCounter - 1 << " as mpqc input ... ";
     592      if ((intermediateResult = World::getInstance().getConfig()->SaveMPQC(FragmentName.c_str(), (*ListRunner))))
     593        output << " done.";
     594      else
     595        output << " failed.";
     596      LOG(3, output.str());
     597    }
    586598
    587599    result = result && intermediateResult;
     
    590602    delete[](FragmentNumber);
    591603  }
    592   DoLog(0) && (Log() << Verbose(0) << " done." << endl);
     604  LOG(0, "STATUS: done.");
    593605
    594606  // printing final number
    595   DoLog(2) && (Log() << Verbose(2) << "Final number of fragments: " << FragmentCounter << "." << endl);
     607  LOG(2, "INFO: Final number of fragments: " << FragmentCounter << ".");
    596608
    597609  // printing final number
    598   DoLog(0) && (Log() << Verbose(0) << "For " << count << " fragments periodic correction would have been necessary." << endl);
     610  LOG(2, "INFO: For " << count << " fragments periodic correction would have been necessary.");
    599611
    600612  // restore cell_size
Note: See TracChangeset for help on using the changeset viewer.