Changeset e71325 for src


Ignore:
Timestamp:
Dec 14, 2012, 5:39:41 PM (12 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, 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:
d1ba0d
Parents:
17c03f
git-author:
Frederik Heber <heber@…> (09/28/12 08:52:15)
git-committer:
Frederik Heber <heber@…> (12/14/12 17:39:41)
Message:

FIX: All functions in Fragmentation and related now use const string reference for path/prefix.

  • they need nothing more anyway.
Location:
src/Fragmentation
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/Fragmentation/AdaptivityMap.cpp

    r17c03f re71325  
    100100 * \param &path path to ENERGYPERFRAGMENT file (may be NULL if Order is non-negative)
    101101 */
    102 void AdaptivityMap::ScanAdaptiveFileIntoMap(std::string &path)
     102void AdaptivityMap::ScanAdaptiveFileIntoMap(const std::string &path)
    103103{
    104104  int No = 0, FragOrder = 0;
  • src/Fragmentation/AdaptivityMap.hpp

    r17c03f re71325  
    3131
    3232  void InsertIntoAdaptiveCriteriaList(int FragOrder, int No, double Value);
    33   void ScanAdaptiveFileIntoMap(std::string &path);
     33  void ScanAdaptiveFileIntoMap(const std::string &path);
    3434  void ReMapAdaptiveCriteriaListToValue(molecule *mol);
    3535  int CountLinesinFile(std::ifstream &InputFile) const;
  • src/Fragmentation/Fragmentation.cpp

    r17c03f re71325  
    9797 * \return 1 - continue, 2 - stop (no fragmentation occured)
    9898 */
    99 int Fragmentation::FragmentMolecule(const std::vector<atomId_t> &atomids, int Order, std::string prefix, DepthFirstSearchAnalysis &DFS)
     99int Fragmentation::FragmentMolecule(
     100    const std::vector<atomId_t> &atomids,
     101    int Order,
     102    const std::string &prefix,
     103    DepthFirstSearchAnalysis &DFS)
    100104{
    101105  std::fstream File;
     
    334338 * \return true - needs further fragmentation, false - does not need fragmentation
    335339 */
    336 bool Fragmentation::CheckOrderAtSite(AtomMask_t &AtomMask, const Graph &GlobalKeySetList, int Order, std::string path, bool LoopDoneAlready)
     340bool Fragmentation::CheckOrderAtSite(AtomMask_t &AtomMask, const Graph &GlobalKeySetList, int Order, const std::string &path, bool LoopDoneAlready)
    337341{
    338342  bool status = false;
     
    391395 * \return true - file writable, false - not writable
    392396 */
    393 bool Fragmentation::StoreOrderAtSiteFile(std::string &path)
     397bool Fragmentation::StoreOrderAtSiteFile(const std::string &path)
    394398{
    395399  string line;
     
    418422 * \sa ParseKeySetFile() and CheckAdjacencyFileAgainstMolecule() as this is meant to be used in conjunction with the two
    419423 */
    420 bool Fragmentation::ParseOrderAtSiteFromFile(const std::vector<atomId_t> &atomids, std::string &path)
     424bool Fragmentation::ParseOrderAtSiteFromFile(const std::vector<atomId_t> &atomids, const std::string &path)
    421425{
    422426  Info FunctionInfo(__func__);
  • src/Fragmentation/Fragmentation.hpp

    r17c03f re71325  
    3737  ~Fragmentation();
    3838
    39   int FragmentMolecule(const std::vector<atomId_t> &atomids, int Order, std::string prefix, DepthFirstSearchAnalysis &DFS);
     39  int FragmentMolecule(const std::vector<atomId_t> &atomids, int Order, const std::string &prefix, DepthFirstSearchAnalysis &DFS);
    4040
    4141  const Graph& getGraph() const {
     
    4949
    5050  // order at site
    51   bool CheckOrderAtSite(AtomMask_t &AtomMask, const Graph &GlobalKeySetList, int Order, std::string path, bool LoopDoneAlready);
    52   bool StoreOrderAtSiteFile(std::string &path);
    53   bool ParseOrderAtSiteFromFile(const std::vector<atomId_t> &atomids, std::string &path);
     51  bool CheckOrderAtSite(AtomMask_t &AtomMask, const Graph &GlobalKeySetList, int Order, const std::string &path, bool LoopDoneAlready);
     52  bool StoreOrderAtSiteFile(const std::string &path);
     53  bool ParseOrderAtSiteFromFile(const std::vector<atomId_t> &atomids, const std::string &path);
    5454
    5555  // storing fragments
  • src/Fragmentation/Graph.cpp

    r17c03f re71325  
    8888 * \return true - parsing successfully, false - failure on parsing (FragmentList will be NULL)
    8989 */
    90 bool Graph::ParseKeySetFile(std::string &path)
     90bool Graph::ParseKeySetFile(const std::string &path)
    9191{
    9292  bool status = true;
     
    132132 * \return true - file written successfully, false - writing failed
    133133 */
    134 bool Graph::StoreKeySetFile(std::string &path) const
     134bool Graph::StoreKeySetFile(const std::string &path) const
    135135{
    136136  bool status =  true;
  • src/Fragmentation/Graph.hpp

    r17c03f re71325  
    3232  void InsertGraph(const Graph &graph, int &counter);
    3333
    34   bool ParseKeySetFile(std::string &path);
    35   bool StoreKeySetFile(std::string &path) const;
     34  bool ParseKeySetFile(const std::string &path);
     35  bool StoreKeySetFile(const std::string &path) const;
    3636  bool ParseTEFactorsFile(char *path);
    3737  bool StoreTEFactorsFile(char *path) const;
Note: See TracChangeset for help on using the changeset viewer.