Changeset d7bb964


Ignore:
Timestamp:
May 18, 2016, 10:03:03 PM (9 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, 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_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, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, 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, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
87662aa
Parents:
d96482
git-author:
Frederik Heber <heber@…> (03/10/16 11:58:35)
git-committer:
Frederik Heber <heber@…> (05/18/16 22:03:03)
Message:

ParseParticleParametersAction now uses TremoloPotentialFileParser.

  • TESTFIX: regression test SaveParseParticleParameters needs to contains particles in section. Modified harmonic.particles to have particle recored inside "particles" section. Removed XFAIL from this test.
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/PotentialAction/ParseParticleParametersAction.cpp

    rd96482 rd7bb964  
    4747#include "CodePatterns/Log.hpp"
    4848
    49 #include "Potentials/Exceptions.hpp"
    50 #include "Potentials/Particles/ParticleFactory.hpp"
    51 #include "Potentials/Particles/ParticleRegistry.hpp"
    52 #include "Potentials/RegistryDeserializer.hpp"
     49#include "Potentials/TremoloPotentialFileParser.hpp"
    5350
    5451using namespace MoleCuilder;
     
    6461    std::ifstream returnstream(params.particle_file.get().string().c_str());
    6562    if (returnstream.good()) {
    66       try {
    67         RegistryDeserializer<Particle> deserialize(
    68             returnstream,
    69             ParticleFactory::getInstance(),
    70             ParticleRegistry::getInstance(),
    71             std::string("particle"));
    72         deserialize();
    73       } catch (SerializerMissingValueException &e) {
    74         if (const std::string *key = boost::get_error_info<SerializerKey>(e))
    75           STATUS("Missing value when parsing information for particle "+*key+".");
    76         else
    77           STATUS("Missing value parsing information for particle with unknown key.");
     63      if (!TremoloPotentialFileParser::parseParticles(returnstream))
    7864        return Action::failure;
    79       } catch (SerializerIllegalKeyException &e) {
    80         if (const std::string *key = boost::get_error_info<SerializerKey>(e))
    81           STATUS("Illegal key parsing information for particle "+*key+".");
    82         else
    83           STATUS("Illegal key parsing information for particle with unknown key.");
    84         return Action::failure;
    85       }
    8665    } else {
    8766      STATUS("Failed to parse from "+params.particle_file.get().string()+".");
  • tests/regression/Potential/SaveParseParticleParameters/pre/harmonic.particles

    rd96482 rd7bb964  
     1particles {
    12        particle:       particle_type=1,        element_name=H, sigma=0,        epsilon=0,      sigma14=0,      epsilon14=0,    mass=1, free=3, charge=1;
     3}
  • tests/regression/Potential/SaveParseParticleParameters/testsuite-potential-save-parse-particle-parameters.at

    rd96482 rd7bb964  
    2020AT_SETUP([Potential - save and parse particle file])
    2121AT_KEYWORDS([potential parse-particle-parameters save-particle-parameters])
    22 AT_XFAIL_IF([/bin/true])
    2322
    2423file=harmonic.particles
Note: See TracChangeset for help on using the changeset viewer.