Changeset bae7bc for src


Ignore:
Timestamp:
Apr 15, 2013, 10:28:25 AM (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:
503acc1
Parents:
4f44ae
git-author:
Frederik Heber <heber@…> (03/04/13 14:14:10)
git-committer:
Frederik Heber <heber@…> (04/15/13 10:28:25)
Message:

Outsourced parsing of fragment files into ParseFragmentJobsAction from FragmentationAutomationAction.

Location:
src
Files:
3 added
11 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/FragmentationAction/FragmentationAction.cpp

    r4f44ae rbae7bc  
    7575  LOG(0, "STATUS: Fragmenting molecular system with current connection matrix maximum bond distance "
    7676      << params.distance.get() << " up to "
    77       << params.order.get() << " order. Fragment files begin with "
    78       << params.prefix.get() << " and are stored as: "
    79       << params.types.get() << "." << std::endl);
     77      << params.order.get() << " order. ");
     78  if (params.types.get().size() != 0)
     79    LOG(0, "STATUS: Fragment files begin with "
     80        << params.prefix.get() << " and are stored as: "
     81        << params.types.get() << "." << std::endl);
    8082
    8183  // check for selected atoms
  • src/Actions/FragmentationAction/FragmentationAutomationAction.cpp

    r4f44ae rbae7bc  
    6060#include "Fragmentation/Automation/FragmentationResults.hpp"
    6161#include "Fragmentation/Automation/MPQCFragmentController.hpp"
    62 #include "Fragmentation/Automation/parseKeySetFile.hpp"
    6362#include "Fragmentation/Automation/VMGDebugGridFragmentController.hpp"
    6463#include "Fragmentation/Automation/VMGFragmentController.hpp"
     
    224223 *
    225224 * @param fragmentData MPQCData resulting from the jobs, associated to job id
    226  * @param KeySetFilename filename with keysets to associate forces correctly
     225 * @param MatrixNrLookup map with enumerated jobids
     226 * @param KeySet KeySets of all (non-hydrogen) atoms
     227 * @param ForceKeySet KeySets of all atoms except those added by saturation
    227228 * @param NoAtoms total number of atoms
    228  * @param full_sample summed up charge from fragments on return
    229229 */
    230230bool printReceivedMPQCResults(
    231231    const std::map<JobId_t, MPQCData> &fragmentData,
    232     const std::string &KeySetFilename,
     232    const std::map< JobId_t, size_t > MatrixNrLookup,
     233    KeySetsContainer KeySet,
     234    const KeySetsContainer &ForceKeySet,
    233235    size_t NoAtoms)
    234236{
    235   // create a vector of all job ids
    236   std::vector<JobId_t> jobids;
    237   std::transform(fragmentData.begin(),fragmentData.end(),
    238       std::back_inserter(jobids),
    239       boost::bind( &std::map<JobId_t,MPQCData>::value_type::first, boost::lambda::_1 )
    240   );
    241 
    242   // create lookup from job nr to fragment number
    243   size_t FragmentCounter = 0;
    244   const std::map< JobId_t, size_t > MatrixNrLookup=
    245       createMatrixNrLookup(jobids, FragmentCounter);
     237  size_t FragmentCounter = MatrixNrLookup.size();
    246238
    247239  // place results into maps
     
    253245  if (!Energy.InitialiseIndices()) return false;
    254246
    255   if (!Force.ParseIndices(KeySetFilename.c_str())) return false;
    256 
    257   // initialise keysets
    258   KeySetsContainer KeySet;
    259   parseKeySetFile(KeySet, KeySetFilename, FragmentCounter, NonHydrogenKeySets);
    260   KeySetsContainer ForceKeySet;
    261   parseKeySetFile(ForceKeySet, KeySetFilename, FragmentCounter, HydrogenKeySets);
     247  if (!Force.ParseIndices(ForceKeySet)) return false;
    262248
    263249  // combine all found data
     
    295281
    296282  return true;
     283}
     284
     285/** Print MPQCData from received results.
     286 *
     287 * @param fragmentData MPQCData resulting from the jobs, associated to job id
     288 * @param KeySetFilename filename with keysets to associate forces correctly
     289 * @param NoAtoms total number of atoms
     290 */
     291bool printReceivedMPQCResults(
     292    const std::map<JobId_t, MPQCData> &fragmentData,
     293    const std::string &KeySetFilename,
     294    size_t NoAtoms)
     295{
     296  // create a vector of all job ids
     297  std::vector<JobId_t> jobids;
     298  std::transform(fragmentData.begin(),fragmentData.end(),
     299      std::back_inserter(jobids),
     300      boost::bind( &std::map<JobId_t,MPQCData>::value_type::first, boost::lambda::_1 )
     301  );
     302
     303  // create lookup from job nr to fragment number
     304  size_t FragmentCounter = 0;
     305  const std::map< JobId_t, size_t > MatrixNrLookup =
     306      createMatrixNrLookup(jobids, FragmentCounter);
     307
     308  // initialise keysets
     309  KeySetsContainer KeySet;
     310  parseKeySetFile(KeySet, KeySetFilename, FragmentCounter, NonHydrogenKeySets);
     311  KeySetsContainer ForceKeySet;
     312  parseKeySetFile(ForceKeySet, KeySetFilename, FragmentCounter, HydrogenKeySets);
     313
     314  return printReceivedMPQCResults(
     315      fragmentData,
     316      MatrixNrLookup,
     317      KeySet,
     318      ForceKeySet,
     319      NoAtoms);
     320}
     321
     322/** Print MPQCData from received results.
     323 *
     324 * @param fragmentData MPQCData resulting from the jobs, associated to job id
     325 * @param KeySet KeySets of all (non-hydrogen) atoms
     326 * @param ForceKeySet KeySets of all atoms except those added by saturation
     327 * @param NoAtoms total number of atoms
     328 */
     329bool printReceivedMPQCResults(
     330    const std::map<JobId_t, MPQCData> &fragmentData,
     331    const KeySetsContainer &KeySet,
     332    const KeySetsContainer &ForceKeySet,
     333    size_t NoAtoms)
     334{
     335  // create a vector of all job ids
     336  std::vector<JobId_t> jobids;
     337  std::transform(fragmentData.begin(),fragmentData.end(),
     338      std::back_inserter(jobids),
     339      boost::bind( &std::map<JobId_t,MPQCData>::value_type::first, boost::lambda::_1 )
     340  );
     341
     342  // create lookup from job nr to fragment number
     343  size_t FragmentCounter = 0;
     344  const std::map< JobId_t, size_t > MatrixNrLookup =
     345      createMatrixNrLookup(jobids, FragmentCounter);
     346
     347  return printReceivedMPQCResults(
     348      fragmentData,
     349      MatrixNrLookup,
     350      KeySet,
     351      ForceKeySet,
     352      NoAtoms);
    297353}
    298354
     
    382438bool appendToHomologyFile(
    383439    const boost::filesystem::path &homology_file,
    384     const FragmentationResults &results,
    385     const std::string &KeySetFilename)
     440    const FragmentationResults &results)
    386441{
    387442  /// read homology container (if present)
     
    479534  // TODO: Have io_service run in second thread and merge with current again eventually
    480535
    481   // check some things prior to work
    482   enum OutputType_t {
    483     ToFiles,
    484     ToJobs,
    485     ToNone
    486   };
    487   enum OutputType_t outputtype = ToNone;
    488   if (params.jobfiles.get().size() != 0) {
    489     // we got no job files, hence we use FragmentJobQueue
    490     if (params.path.get().size() == 0) {
    491       ELOG(1, "Missing path to fragment files.");
    492       return Action::failure;
    493     }
    494     outputtype = ToFiles;
    495 
    496     // parse in fragment-jobs if given
    497     if(!FragmentJobQueue::getInstance().addJobsFromFiles(
    498         params.jobfiles.get(),
    499         params.level.get()))
    500       return Action::failure;
    501   } else {
    502     if (params.path.get().size() != 0) {
    503       ELOG(2, "Path to fragment given although we use FragmentJobQueue.");
    504     }
    505     outputtype = ToJobs;
    506   }
    507 
    508536  size_t Exitflag = 0;
    509537  std::map<JobId_t, MPQCData> fragmentData;
     
    537565  FragmentationChargeDensity summedChargeDensity(
    538566      fragmentData,
    539       params.path.get());
     567      FragmentJobQueue::getInstance().getKeySets());
    540568  const std::vector<SamplingGrid> full_sample = summedChargeDensity.getFullSampledGrid();
    541 
    542569  LOG(1, "INFO: There are " << fragmentData.size() << " short-range and "
    543570      << full_sample.size() << " level-wise long-range jobs.");
     
    587614      fragmentData,
    588615      longrangeData,
    589       params.path.get());
     616      FragmentJobQueue::getInstance().getKeySets(),
     617      FragmentJobQueue::getInstance().getFullKeySets());
    590618  results(
    591619      fragmentData,
     
    593621      fullsolutionData,
    594622      full_sample);
    595   {
    596     LOG(1, "INFO: Parsing fragment files from " << params.path.get() << ".");
    597     printReceivedFullResults(results);
    598   }
     623  printReceivedFullResults(results);
    599624
    600625  // append all keysets to homology file
     
    603628    if (homology_file.string() != "") {
    604629      LOG(1, "INFO: Appending HomologyGraphs to file " << homology_file.string() << ".");
    605       if (!appendToHomologyFile(homology_file, results, params.path.get()))
     630      if (!appendToHomologyFile(homology_file, results))
    606631        Exitflag = 1;
    607632    }
     
    630655    printReceivedMPQCResults(
    631656        fragmentData,
    632         params.path.get(),
    633         getNoAtomsFromAdjacencyFile(params.path.get()));
     657        FragmentJobQueue::getInstance().getKeySets(),
     658        FragmentJobQueue::getInstance().getFullKeySets(),
     659        World::getInstance().getAllAtoms().size()));
    634660  }
    635661#endif
     662
     663  // now clear all present jobs as we are done
     664  FragmentJobQueue::getInstance().clear();
    636665
    637666  return (Exitflag == 0) ? Action::success : Action::failure;
  • src/Actions/FragmentationAction/FragmentationAutomationAction.def

    r4f44ae rbae7bc  
    1414#include "Parameters/Validators/Ops_Validator.hpp"
    1515#include "Parameters/Validators/RangeValidator.hpp"
    16 #include "Parameters/Validators/STLVectorValidator.hpp"
    17 #include "Parameters/Validators/Specific/ParserFileValidator.hpp"
    18 #include "Parameters/Validators/Specific/FilePresentValidator.hpp"
    1916
    2017// i.e. there is an integer with variable name Z that can be found in
    2118// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    2219// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    23 #define paramtypes (std::vector< boost::filesystem::path >)(std::string)(std::string)(std::string)(boost::filesystem::path)(unsigned int)(unsigned int)(unsigned int)(bool)(boost::filesystem::path)
    24 #define paramtokens ("fragment-jobs")("fragment-path")("server-address")("server-port")("fragment-executable")("grid-level")("near-field-cells")("interpolation-degree")("DoLongrange")("homology-file")
    25 #define paramdescriptions ("vector of fragment files")("prefix of each fragment file")("hostname of server")("controller port of server")("executable to launch on clients")("resolution of multigrid")("number of cells used in smearing out core charge")("interpolation degree for getting the nuclei potential from the grid")("whether to calculate long-range contributions")("path to file containing homology containerto append to")
    26 #define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT("127.0.0.1"))(NOPARAM_DEFAULT)(PARAM_DEFAULT("mpqc"))(PARAM_DEFAULT(5))(PARAM_DEFAULT(3))(PARAM_DEFAULT(3))(PARAM_DEFAULT("0"))(PARAM_DEFAULT(""))
    27 #define paramreferences (jobfiles)(path)(host)(port)(executable)(level)(near_field_cells)(interpolation_degree)(DoLongrange)(homology_file)
     20#define paramtypes (std::string)(std::string)(boost::filesystem::path)(unsigned int)(unsigned int)(unsigned int)(bool)(boost::filesystem::path)
     21#define paramtokens ("server-address")("server-port")("fragment-executable")("grid-level")("near-field-cells")("interpolation-degree")("DoLongrange")("homology-file")
     22#define paramdescriptions ("hostname of server")("controller port of server")("executable to launch on clients")("resolution of multigrid")("number of cells used in smearing out core charge")("interpolation degree for getting the nuclei potential from the grid")("whether to calculate long-range contributions")("path to file containing homology containerto append to")
     23#define paramdefaults (PARAM_DEFAULT("127.0.0.1"))(NOPARAM_DEFAULT)(PARAM_DEFAULT("mpqc"))(PARAM_DEFAULT(5))(PARAM_DEFAULT(3))(PARAM_DEFAULT(3))(PARAM_DEFAULT("0"))(PARAM_DEFAULT(""))
     24#define paramreferences (host)(port)(executable)(level)(near_field_cells)(interpolation_degree)(DoLongrange)(homology_file)
    2825#define paramvalids \
    29 (STLVectorValidator< std::vector< boost::filesystem::path > >(ParserFileValidator() && FilePresentValidator())) \
    30 (DummyValidator< std::string >()) \
    3126(DummyValidator< std::string >()) \
    3227(DummyValidator< std::string >()) \
  • src/Actions/GlobalListOfActions.hpp

    r4f44ae rbae7bc  
    137137#define GLOBALLISTOFACTIONS \
    138138    BOOST_PP_SEQ_PUSH_BACK( \
    139         GLOBALLISTOFACTIONS_initial, \
    140         FragmentationFragmentationAutomation \
    141       )
     139        BOOST_PP_SEQ_PUSH_BACK( \
     140            GLOBALLISTOFACTIONS_initial, \
     141            FragmentationFragmentationAutomation \
     142        ), \
     143        FragmentationParseFragmentJobs \
     144    )
    142145#else
    143146#define GLOBALLISTOFACTIONS \
  • src/Actions/Makefile.am

    r4f44ae rbae7bc  
    222222if CONDJOBMARKET
    223223FRAGMENTATIONACTIONSOURCE += \
    224   Actions/FragmentationAction/FragmentationAutomationAction.cpp
     224  Actions/FragmentationAction/FragmentationAutomationAction.cpp \
     225  Actions/FragmentationAction/ParseFragmentJobsAction.cpp
    225226FRAGMENTATIONACTIONHEADER += \
    226   Actions/FragmentationAction/FragmentationAutomationAction.hpp
     227  Actions/FragmentationAction/FragmentationAutomationAction.hpp \
     228  Actions/FragmentationAction/ParseFragmentJobsAction.hpp
    227229FRAGMENTATIONACTIONDEFS += \
    228   Actions/FragmentationAction/FragmentationAutomationAction.def
     230  Actions/FragmentationAction/FragmentationAutomationAction.def \
     231  Actions/FragmentationAction/ParseFragmentJobsAction.def
    229232endif
    230233
  • src/Fragmentation/Automation/FragmentJobQueue.cpp

    r4f44ae rbae7bc  
    4545
    4646#include "Box.hpp"
     47#include "Fragmentation/Automation/parseKeySetFile.hpp"
    4748#include "Helpers/defs.hpp"
    4849#include "Jobs/MPQCJob.hpp"
     
    8990}
    9091
     92bool FragmentJobQueue::addKeySetsFromFiles(
     93    const boost::filesystem::path &path,
     94    const size_t FragmentCounter,
     95    const enum KeySetFileType keysettype
     96    )
     97{
     98  const size_t NoJobs = KeySets.KeySets.size();
     99  parseKeySetFile(KeySets, path.string(), FragmentCounter, NonHydrogenKeySets);
     100  ASSERT( (KeySets.KeySets.size()-NoJobs) == FragmentCounter,
     101      "FragmentJobQueue::addKeySetsFromFiles() - mismatching number of new fragments "
     102      +toString(KeySets.KeySets.size()-NoJobs)+" and number of Keyset "
     103      +toString(FragmentCounter)+".");
     104  return (KeySets.KeySets.size() > NoJobs);
     105}
     106
     107bool FragmentJobQueue::addFullKeySetsFromFiles(
     108    const boost::filesystem::path &path,
     109    const size_t FragmentCounter,
     110    const enum KeySetFileType keysettype
     111    )
     112{
     113  const size_t NoJobs = FullKeySets.KeySets.size();
     114  parseKeySetFile(FullKeySets, path.string(), FragmentCounter, NonHydrogenKeySets);
     115  ASSERT( (FullKeySets.KeySets.size()-NoJobs) == FragmentCounter,
     116      "FragmentJobQueue::addKeySetsFromFiles() - mismatching number of fragments "
     117      +toString(FullKeySets.KeySets.size()-NoJobs)+" and number of FullKeyset "
     118      +toString(FragmentCounter)+".");
     119  return (FullKeySets.KeySets.size() > NoJobs);
     120}
     121
    91122void FragmentJobQueue::clear()
    92123{
  • src/Fragmentation/Automation/FragmentJobQueue.hpp

    r4f44ae rbae7bc  
    2121
    2222#include "Fragmentation/KeySetsContainer.hpp"
     23#include "Fragmentation/Automation/parseKeySetFile.hpp"
    2324#include "Jobs/MPQCJob.hpp"
    2425
     
    7778      const unsigned int level);
    7879
     80  /** Adds keysets after fragments have been added by file.
     81   *
     82   */
     83  bool addKeySetsFromFiles(
     84      const boost::filesystem::path &path,
     85      const size_t FragmentCounter,
     86      const enum KeySetFileType keysettype
     87      );
     88
     89  /** Adds keysets after fragments have been added by file.
     90   *
     91   */
     92  bool addFullKeySetsFromFiles(
     93      const boost::filesystem::path &path,
     94      const size_t FragmentCounter,
     95      const enum KeySetFileType keysettype
     96      );
     97
    7998  /** Getter for the container of all KeySets to the jobs.
    8099   *
  • src/Fragmentation/Automation/FragmentationChargeDensity.cpp

    r4f44ae rbae7bc  
    5757FragmentationChargeDensity::FragmentationChargeDensity(
    5858    const std::map<JobId_t,MPQCData> &fragmentData,
    59     const std::string &KeySetFilename)
     59    const KeySetsContainer &KeySet)
    6060{
    6161  // create a vector of all job ids
     
    7070  const std::map< JobId_t, size_t > MatrixNrLookup =
    7171      createMatrixNrLookup(jobids, FragmentCounter);
    72 
    73   // initialise keysets
    74   KeySetsContainer KeySet;
    75   parseKeySetFile(KeySet, KeySetFilename, FragmentCounter, NonHydrogenKeySets);
    7672
    7773  /// prepare for OrthogonalSummation
     
    9187}
    9288
     89
    9390std::vector<SamplingGrid> FragmentationChargeDensity::getFullSampledGrid()
    9491{
  • src/Fragmentation/Automation/FragmentationChargeDensity.hpp

    r4f44ae rbae7bc  
    1616
    1717#include <map>
    18 #include <string>
    1918#include <vector>
    2019
     
    2726#include "Jobs/Grid/SamplingGrid.hpp"
    2827
     28class KeySetsContainer;
     29
    2930/** This structure is a container for the summed up charge density per level.
    3031 *
     
    3536   *
    3637   * @param fragmentData MPQCData resulting from the jobs, each associated to a job
    37    * @param KeySetFilename filename with keysets to associate forces correctly
     38   * @param KeySet KeySets of all (non-hydrogen) atoms
    3839   */
    3940  FragmentationChargeDensity(
    4041      const std::map<JobId_t,MPQCData> &fragmentData,
    41       const std::string &KeySetFilename);
     42      const KeySetsContainer& KeySet);
    4243
    4344  std::vector<SamplingGrid> getFullSampledGrid();
     
    5455  //!> results per IndexSet of summed up fragment positions and charges
    5556  std::map<IndexSet::ptr, std::pair<MPQCDataFragmentMap_t, MPQCDataFragmentMap_t> > Result_perIndexSet_Fragment;
     57
     58private:
     59  /** Helper function to call OrthogonalSummation.
     60   *
     61   * \param fragmentData map of calculated jobs
     62   * \param KeySet container of all keysets
     63   * \param MatrixNrLookup map with enumerated job ids
     64   */
     65  void sumUp(
     66      const std::map<JobId_t,MPQCData> &fragmentData,
     67      const KeySetsContainer &KeySet,
     68      const std::map< JobId_t, size_t > &MatrixNrLookup);
     69
    5670};
    5771
  • src/Fragmentation/Automation/FragmentationResults.cpp

    r4f44ae rbae7bc  
    5858#include "Helpers/defs.hpp"
    5959
    60 
    6160FragmentationResults::FragmentationResults(
    6261    const std::map<JobId_t,MPQCData> &fragmentData,
    6362    std::map<JobId_t,VMGData> &longrangeData,
    64     const std::string &KeySetFilename)
     63    const KeySetsContainer& _KeySet,
     64    const KeySetsContainer& _ForceKeySet) :
     65    KeySet(_KeySet),
     66    ForceKeySet(_ForceKeySet)
    6567{
    6668  // create lookup from job nr to fragment number
     
    7476  VMGMatrixNrLookup =
    7577      createMatrixNrLookup(vmgjobids, VMGFragmentCounter);
    76 
    77   // initialise keysets
    78   parseKeySetFile(KeySet, KeySetFilename, MPQCFragmentCounter, NonHydrogenKeySets);
    79   parseKeySetFile(ForceKeySet, KeySetFilename, MPQCFragmentCounter, HydrogenKeySets);
    80 
    81   /// prepare for OrthogonalSummation
    8278
    8379  // convert KeySetContainer to IndexSetContainer
  • src/Fragmentation/Automation/FragmentationResults.hpp

    r4f44ae rbae7bc  
    1616
    1717#include <map>
    18 #include <string>
    1918#include <vector>
    2019
     
    4241struct FragmentationResults
    4342{
    44   /** Constructor for class FragmentationResults.
    45    *
    46    * Performs the summation and fills all result vectors.
     43  /** Constructor for class FragmentationResults, based on KeySets.
    4744   *
    4845   * @param fragmentData results from short-range fragment calculations
    4946   * @param longrangeData results from long-range fragment calculations
    50    * @param fullsolutionData results from long-range full calculations
    51    * @param KeySetFilename path to fragment files
    52    * @param NoAtoms number of atoms of full system
    53    * @param full_sample summed up grid charge
     47   * @param _KeySet KeySets of all (non-hydrogen) atoms
     48   * @param _ForceKeySet KeySets of all atoms except those added by saturation
    5449   */
    5550  FragmentationResults(
    5651      const std::map<JobId_t,MPQCData> &fragmentData,
    5752      std::map<JobId_t,VMGData> &longrangeData,
    58       const std::string &KeySetFilename);
     53      const KeySetsContainer& _KeySet,
     54      const KeySetsContainer& _ForceKeySet);
    5955
     56  /** Performs the summation and fills all result vectors.
     57   *
     58   * @param fragmentData results from short-range fragment calculations
     59   * @param longrangeData results from long-range fragment calculations
     60   * @param fullsolutionData long-range solution
     61   * @param full_sample sampled density
     62   */
    6063  void operator()(
    6164      const std::map<JobId_t,MPQCData> &fragmentData,
Note: See TracChangeset for help on using the changeset viewer.