Changeset d7bb964
- Timestamp:
- May 18, 2016, 10:03:03 PM (9 years ago)
- 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)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/PotentialAction/ParseParticleParametersAction.cpp
rd96482 rd7bb964 47 47 #include "CodePatterns/Log.hpp" 48 48 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" 53 50 54 51 using namespace MoleCuilder; … … 64 61 std::ifstream returnstream(params.particle_file.get().string().c_str()); 65 62 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)) 78 64 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 else83 STATUS("Illegal key parsing information for particle with unknown key.");84 return Action::failure;85 }86 65 } else { 87 66 STATUS("Failed to parse from "+params.particle_file.get().string()+"."); -
tests/regression/Potential/SaveParseParticleParameters/pre/harmonic.particles
rd96482 rd7bb964 1 particles { 1 2 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 20 20 AT_SETUP([Potential - save and parse particle file]) 21 21 AT_KEYWORDS([potential parse-particle-parameters save-particle-parameters]) 22 AT_XFAIL_IF([/bin/true])23 22 24 23 file=harmonic.particles
Note:
See TracChangeset
for help on using the changeset viewer.