Changeset d20335


Ignore:
Timestamp:
Sep 9, 2016, 5:23:11 PM (8 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_StructOpt_integration_tests, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, 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_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, GeometryObjects, Gui_displays_atomic_force_velocity, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, Ubuntu_1604_changes, stable
Children:
f83e26
Parents:
73a5f7
git-author:
Frederik Heber <heber@…> (09/04/16 15:23:52)
git-committer:
Frederik Heber <heber@…> (09/09/16 17:23:11)
Message:

Removed parsing and saving of fragment results in analyse-fragment-results and fragmentation-automation.

  • TESTFIX: regression test analyse-fragment-results now needs to call parse-fragment-results before analysis.
Files:
6 edited

Legend:

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

    r73a5f7 rd20335  
    598598  bool status=true;
    599599
    600   /// if file is given, parse from file into ResultsContainer
     600  /// get data and keysets from ResultsContainer
    601601  FragmentationResultContainer& container = FragmentationResultContainer::getInstance();
    602   if (!params.resultsfile.get().empty()) {
    603     boost::filesystem::path resultsfile = params.resultsfile.get();
    604     if (boost::filesystem::exists(resultsfile)) {
    605       LOG(1, "INFO: Parsing results from " << resultsfile.string() << ".");
    606       std::ifstream returnstream(resultsfile.string().c_str());
    607       if (returnstream.good()) {
    608         boost::archive::text_iarchive ia(returnstream);
    609         ia >> container;
    610       }
    611     } else {
    612       ELOG(1, "Given file" << resultsfile.string() << " does not exist.");
    613       STATUS("AnalyseFragmentResultsAction failed: missing results file.");
    614       return Action::failure;
    615     }
    616   }
    617 
    618   /// get data and keysets from ResultsContainer
    619602  const std::map<JobId_t, MPQCData> &shortrangedata = container.getShortRangeResults();
    620603  const KeySetsContainer &keysets = container.getKeySets();
  • src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.def

    r73a5f7 rd20335  
    1515// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    1616// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    17 #define paramtypes (boost::filesystem::path)(bool)(std::string)(bool)
    18 #define paramtokens ("fragment-resultfile")("store-grids")("fragment-prefix")("UseImplicitCharges")
    19 #define paramdescriptions ("parse fragment results from the given file")("whether to store sampled grids in homology files")("prefix of each fragment file")("whether to model any non-selected atoms by partial charges implicitly")
    20 #define paramdefaults (NOPARAM_DEFAULT)(PARAM_DEFAULT("0"))(PARAM_DEFAULT("BondFragment"))(PARAM_DEFAULT("0"))
    21 #define paramreferences (resultsfile)(DoStoreGrids)(prefix)(UseImplicitCharges)
     17#define paramtypes (bool)(std::string)(bool)
     18#define paramtokens ("store-grids")("fragment-prefix")("UseImplicitCharges")
     19#define paramdescriptions ("whether to store sampled grids in homology files")("prefix of each fragment file")("whether to model any non-selected atoms by partial charges implicitly")
     20#define paramdefaults (PARAM_DEFAULT("0"))(PARAM_DEFAULT("BondFragment"))(PARAM_DEFAULT("0"))
     21#define paramreferences (DoStoreGrids)(prefix)(UseImplicitCharges)
    2222#define paramvalids \
    23 (DummyValidator< boost::filesystem::path >()) \
    2423(DummyValidator< bool >()) \
    2524(DummyValidator< std::string >()) \
  • src/Actions/FragmentationAction/FragmentationAutomationAction.cpp

    r73a5f7 rd20335  
    421421  FragmentJobQueue::getInstance().clear();
    422422
    423   // if file is given, advise results container to store to file
    424   if (!params.resultsfile.get().empty()) {
    425     boost::filesystem::path resultsfile = params.resultsfile.get();
    426     std::ofstream returnstream(resultsfile.string().c_str());
    427     if (returnstream.good()) {
    428       boost::archive::text_oarchive oa(returnstream);
    429       oa << container;
    430     }
    431     Exitflag += (int)(!returnstream.good());
    432     returnstream.close();
    433   }
    434 
    435423  if (Exitflag != 0)
    436424    STATUS("Controller has returned failure.");
  • src/Actions/FragmentationAction/FragmentationAutomationAction.def

    r73a5f7 rd20335  
    1818// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    1919// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    20 #define paramtypes (std::string)(std::string)(boost::filesystem::path)(unsigned int)(unsigned int)(unsigned int)(bool)(boost::filesystem::path)(bool)(bool)(bool)(bool)
    21 #define paramtokens ("server-address")("server-port")("fragment-executable")("grid-level")("near-field-cells")("interpolation-degree")("DoLongrange")("fragment-resultfile")("DoValenceOnly")("DoPrintDebug")("DoSmearElectronicCharges")("UseImplicitCharges")
    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")("additionally write fragment results to the given file")("whether the sampling uses only the valence electron and nuclei charge")("whether to print grids for debug visualization")("whether to smear out electronic charge distributions with bsplines or not")("whether to model any non-selected atoms by partial charges implicitly")
    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(""))(PARAM_DEFAULT("0"))(PARAM_DEFAULT("0"))(PARAM_DEFAULT("0"))(PARAM_DEFAULT("0"))
    24 #define paramreferences (host)(port)(executable)(level)(near_field_cells)(interpolation_degree)(DoLongrange)(resultsfile)(DoValenceOnly)(DoPrintDebug)(DoSmearCharges)(UseImplicitCharges)
     20#define paramtypes (std::string)(std::string)(boost::filesystem::path)(unsigned int)(unsigned int)(unsigned int)(bool)(bool)(bool)(bool)(bool)
     21#define paramtokens ("server-address")("server-port")("fragment-executable")("grid-level")("near-field-cells")("interpolation-degree")("DoLongrange")("DoValenceOnly")("DoPrintDebug")("DoSmearElectronicCharges")("UseImplicitCharges")
     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")("whether the sampling uses only the valence electron and nuclei charge")("whether to print grids for debug visualization")("whether to smear out electronic charge distributions with bsplines or not")("whether to model any non-selected atoms by partial charges implicitly")
     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("0"))(PARAM_DEFAULT("0"))(PARAM_DEFAULT("0"))(PARAM_DEFAULT("0"))
     24#define paramreferences (host)(port)(executable)(level)(near_field_cells)(interpolation_degree)(DoLongrange)(DoValenceOnly)(DoPrintDebug)(DoSmearCharges)(UseImplicitCharges)
    2525#define paramvalids \
    2626(DummyValidator< std::string >()) \
     
    3131(RangeValidator< unsigned int >(1, 10)) \
    3232(DummyValidator< bool >()) \
    33 (DummyValidator< boost::filesystem::path >()) \
    3433(DummyValidator< bool >()) \
    3534(DummyValidator< bool >()) \
  • tests/Python/AllActions/options.dat

    r73a5f7 rd20335  
    8787fragment-path   "test/"
    8888fragment-prefix "BondFragment"
    89 fragment-resultfile     "results.dat"
    9089grid-level      "5"
    9190help    "help"
  • tests/regression/Fragmentation/AnalyseFragmentationResults/testsuite-fragmentation-analyse-fragment-results.at

    r73a5f7 rd20335  
    2323
    2424AT_SETUP([Fragmentation - Analyse short-range fragmentation results])
    25 AT_KEYWORDS([fragmentation analyse-fragment-results])
     25AT_KEYWORDS([fragmentation parse-fragment-results analyse-fragment-results])
    2626
    2727file=BondFragmentShortRangeResults.dat
    2828AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/$file $file], 0)
    2929AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    30 AT_CHECK([../../molecuilder --analyse-fragment-results --fragment-resultfile $file], 0, [ignore], [ignore])
     30AT_CHECK([../../molecuilder --parse-fragment-results $file --analyse-fragment-results], 0, [ignore], [ignore])
    3131AT_CHECK([output=BondFragment_Energy.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/ShortRange/$output], 0, [ignore], [ignore])
    3232AT_CHECK([output=BondFragment_Forces.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/ShortRange/$output], 0, [ignore], [ignore])
     
    3939
    4040AT_SETUP([Fragmentation - Analyse short-range fragmentation results with forces])
    41 AT_KEYWORDS([fragmentation analyse-fragment-results forces])
     41AT_KEYWORDS([fragmentation parse-fragment-results analyse-fragment-results forces])
    4242
    4343file=BondFragmentShortRangeResults.dat
    4444AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/$file $file], 0)
    4545AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    46 AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/alkane-3.pdb -o tremolo --set-tremolo-atomdata "Id type x=3 u=3 F=3" --reset 1 --analyse-fragment-results --fragment-resultfile $file], 0, [ignore], [ignore])
     46AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/alkane-3.pdb -o tremolo --set-tremolo-atomdata "Id type x=3 u=3 F=3" --reset 1 --parse-fragment-results $file --analyse-fragment-results], 0, [ignore], [ignore])
    4747AT_CHECK([diff alkane-3.data ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/alkane-3.data], 0, [ignore], [ignore])
    4848
     
    5151#
    5252# BondFragmentLongRangeResults.dat is created like this:
    53 # ./molecuilder -i pre/alkane-3.pdb --change-box 20,0,20,0,0,20 --set-parser-parameters mpqc --parser-parameters "theory=CLHF;basis=6-31G;" --set-boundary-conditions Ignore Ignore Ignore --update-molecules --select-all-atoms --fragment-molecule BondFragment --DoSaturate 1 --ExcludeHydrogen 1 --distance 2. --order 6 --fragment-automation --DoLongrange 1 --DoValenceOnly 0 --grid-level 4 --near-field-cells 3 --server-address 127.0.0.1 --server-port 1026 --fragment-resultfile BondFragmentLongRangeResults.dat
     53# ./molecuilder -i pre/alkane-3.pdb --change-box 20,0,20,0,0,20 --set-parser-parameters mpqc --parser-parameters "theory=CLHF;basis=6-31G;" --set-boundary-conditions Ignore Ignore Ignore --update-molecules --select-all-atoms --fragment-molecule BondFragment --DoSaturate 1 --ExcludeHydrogen 1 --distance 2. --order 6 --fragment-automation --DoLongrange 1 --DoValenceOnly 0 --grid-level 4 --near-field-cells 3 --server-address 127.0.0.1 --server-port 1026 --save-fragment-results BondFragmentLongRangeResults.dat
    5454
    5555AT_SETUP([Fragmentation - Analyse long-range fragmentation results with OBC])
    56 AT_KEYWORDS([fragmentation analyse-fragment-results])
     56AT_KEYWORDS([fragmentation parse-fragment-results analyse-fragment-results])
    5757
    5858file=BondFragmentLongRangeResults_OBC.dat
    5959AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/$file $file], 0)
    6060AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    61 AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/alkane-3.pdb -o tremolo --set-tremolo-atomdata "Id type x=3 u=3 F=3" --reset 1 --analyse-fragment-results --fragment-resultfile $file], 0, [ignore], [stderr])
     61AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/alkane-3.pdb -o tremolo --set-tremolo-atomdata "Id type x=3 u=3 F=3" --reset 1 --parse-fragment-results $file --analyse-fragment-results], 0, [ignore], [stderr])
    6262#AT_CHECK([diff alkane-3.data ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/alkane-3.data], 0, [ignore], [ignore])
    6363AT_CHECK([output=BondFragment_Energy.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/OBC/$output], 0, [ignore], [ignore])
     
    7474
    7575AT_SETUP([Fragmentation - Analyse long-range fragmentation results with OBC and forces])
    76 AT_KEYWORDS([fragmentation analyse-fragment-results forces longrange])
     76AT_KEYWORDS([fragmentation parse-fragment-results analyse-fragment-results forces longrange])
    7777
    7878file=BondFragmentLongRangeResults_OBC.dat
    7979AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/$file $file], 0)
    8080AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    81 AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/alkane-3.pdb -o tremolo --set-tremolo-atomdata "Id type x=3 u=3 F=3" --reset 1 --analyse-fragment-results --fragment-resultfile $file], 0, [ignore], [stderr])
     81AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/alkane-3.pdb -o tremolo --set-tremolo-atomdata "Id type x=3 u=3 F=3" --reset 1 --parse-fragment-results $file --analyse-fragment-results], 0, [ignore], [stderr])
    8282AT_CHECK([grep "File contains long-range information but long-range analysis capability not compiled in" stderr], 0, [ignore], [ignore], [
    8383        AT_CHECK([diff alkane-3.data ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/OBC/alkane-3.data], 0, [ignore], [ignore])
     
    8888#
    8989# BondFragmentLongRangeResults.dat is created like this:
    90 # ./molecuilder -i pre/alkane-3.pdb --change-box 20,0,20,0,0,20 --set-parser-parameters mpqc --parser-parameters "theory=CLHF;basis=6-31G;" --set-boundary-conditions Wrap Wrap Wrap --update-molecules --select-all-atoms --fragment-molecule BondFragment --DoSaturate 1 --ExcludeHydrogen 1 --distance 2. --order 6 --fragment-automation --DoLongrange 1 --DoValenceOnly 0 --grid-level 4 --near-field-cells 3 --server-address 127.0.0.1 --server-port 1026 --fragment-resultfile BondFragmentLongRangeResults.dat
     90# ./molecuilder -i pre/alkane-3.pdb --change-box 20,0,20,0,0,20 --set-parser-parameters mpqc --parser-parameters "theory=CLHF;basis=6-31G;" --set-boundary-conditions Wrap Wrap Wrap --update-molecules --select-all-atoms --fragment-molecule BondFragment --DoSaturate 1 --ExcludeHydrogen 1 --distance 2. --order 6 --fragment-automation --DoLongrange 1 --DoValenceOnly 0 --grid-level 4 --near-field-cells 3 --server-address 127.0.0.1 --server-port 1026 --save-fragment-results BondFragmentLongRangeResults.dat
    9191
    9292AT_SETUP([Fragmentation - Analyse long-range fragmentation results with PBC])
    93 AT_KEYWORDS([fragmentation analyse-fragment-results])
     93AT_KEYWORDS([fragmentation parse-fragment-results analyse-fragment-results])
    9494
    9595file=BondFragmentLongRangeResults_PBC.dat
    9696AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/$file $file], 0)
    9797AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    98 AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/alkane-3.pdb -o tremolo --set-tremolo-atomdata "Id type x=3 u=3 F=3" --reset 1 --analyse-fragment-results --fragment-resultfile $file], 0, [ignore], [stderr])
     98AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/alkane-3.pdb -o tremolo --set-tremolo-atomdata "Id type x=3 u=3 F=3" --reset 1 --parse-fragment-results $file --analyse-fragment-results], 0, [ignore], [stderr])
    9999#AT_CHECK([diff alkane-3.data ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/alkane-3.data], 0, [ignore], [ignore])
    100100AT_CHECK([output=BondFragment_Energy.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/PBC/$output], 0, [ignore], [ignore])
     
    111111
    112112AT_SETUP([Fragmentation - Analyse long-range fragmentation results with PBC and forces])
    113 AT_KEYWORDS([fragmentation analyse-fragment-results forces longrange])
     113AT_KEYWORDS([fragmentation parse-fragment-results analyse-fragment-results forces longrange])
    114114
    115115file=BondFragmentLongRangeResults_PBC.dat
    116116AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/$file $file], 0)
    117117AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
    118 AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/alkane-3.pdb -o tremolo --set-tremolo-atomdata "Id type x=3 u=3 F=3" --reset 1 --analyse-fragment-results --fragment-resultfile $file], 0, [ignore], [stderr])
     118AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/alkane-3.pdb -o tremolo --set-tremolo-atomdata "Id type x=3 u=3 F=3" --reset 1 --parse-fragment-results $file --analyse-fragment-results], 0, [ignore], [stderr])
    119119AT_CHECK([grep "File contains long-range information but long-range analysis capability not compiled in" stderr], 0, [ignore], [ignore], [
    120120        AT_CHECK([diff alkane-3.data ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/PBC/alkane-3.data], 0, [ignore], [ignore])
Note: See TracChangeset for help on using the changeset viewer.