Changeset 39b639
- Timestamp:
- Jul 25, 2010, 6:14:09 PM (14 years ago)
- 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:
- 33b750
- Parents:
- 8bc733
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/MapOfActions.cpp
r8bc733 r39b639 352 352 TypeEnumMap[&typeid(std::vector<std::string>)] = ListOfStrings; 353 353 TypeEnumMap[&typeid(VectorValue)] = Vector; 354 TypeEnumMap[&typeid(std::vector<VectorValue>)] = ListOfVectors; 354 355 TypeEnumMap[&typeid(BoxValue)] = Box; 355 356 TypeEnumMap[&typeid(molecule)] = Molecule; … … 554 555 throw MissingValueException(__FILE__, __LINE__); 555 556 std::istringstream stream(CurrentValue[name]); 556 CurrentValue.erase(name);557 557 stream >> tmp; 558 558 M.set(0,0,tmp); … … 570 570 stream >> tmp; 571 571 M.set(2,2,tmp); 572 _T = M; 573 CurrentValue.erase(name); 572 574 } else 573 575 throw IllegalTypeException(__FILE__,__LINE__); … … 676 678 { 677 679 const Matrix &M = _T.getM(); 678 if (typeid( Box ) == *TypeMap[name]) {680 if (typeid( BoxValue ) == *TypeMap[name]) { 679 681 std::ostringstream stream; 680 682 stream << M.at(0,0) << " "; … … 691 693 void MapOfActions::setCurrentValue(const char * name, class Vector &_T) 692 694 { 693 if (typeid( Vector ) == *TypeMap[name]){695 if (typeid( VectorValue ) == *TypeMap[name]){ 694 696 std::ostringstream stream; 695 697 stream << _T[0] << " "; … … 816 818 (getKeyAndShortForm(*OptionRunner).c_str(), 817 819 CurrentValue.find(*OptionRunner) != CurrentValue.end() ? 818 po::value< bool >()->default_value( atoi(CurrentValue[*OptionRunner].c_str())) :820 po::value< bool >()->default_value(lexical_cast<int>(CurrentValue[*OptionRunner].c_str())) : 819 821 po::value< bool >(), 820 822 getDescription(*OptionRunner).c_str()) … … 824 826 ListRunner->second->add_options() 825 827 (getKeyAndShortForm(*OptionRunner).c_str(), 826 po::value<BoxValue>() ->multitoken(),828 po::value<BoxValue>(), 827 829 getDescription(*OptionRunner).c_str()) 828 830 ; … … 832 834 (getKeyAndShortForm(*OptionRunner).c_str(), 833 835 CurrentValue.find(*OptionRunner) != CurrentValue.end() ? 834 po::value< int >()->default_value( atoi(CurrentValue[*OptionRunner].c_str())) :836 po::value< int >()->default_value(lexical_cast<int>(CurrentValue[*OptionRunner].c_str())) : 835 837 po::value< int >(), 836 838 getDescription(*OptionRunner).c_str()) … … 848 850 (getKeyAndShortForm(*OptionRunner).c_str(), 849 851 CurrentValue.find(*OptionRunner) != CurrentValue.end() ? 850 po::value< double >()->default_value( atof(CurrentValue[*OptionRunner].c_str())) :852 po::value< double >()->default_value(lexical_cast<double>(CurrentValue[*OptionRunner].c_str())) : 851 853 po::value< double >(), 852 854 getDescription(*OptionRunner).c_str()) … … 894 896 (getKeyAndShortForm(*OptionRunner).c_str(), 895 897 CurrentValue.find(*OptionRunner) != CurrentValue.end() ? 896 po::value< int >()->default_value( atoi(CurrentValue[*OptionRunner].c_str())) :898 po::value< int >()->default_value(lexical_cast<int>(CurrentValue[*OptionRunner].c_str())) : 897 899 po::value< int >(), 898 900 getDescription(*OptionRunner).c_str()) … … 910 912 (getKeyAndShortForm(*OptionRunner).c_str(), 911 913 CurrentValue.find(*OptionRunner) != CurrentValue.end() ? 912 po::value< int >()->default_value( atoi(CurrentValue[*OptionRunner].c_str())) :914 po::value< int >()->default_value(lexical_cast<int>(CurrentValue[*OptionRunner].c_str())) : 913 915 po::value< int >(), 914 916 getDescription(*OptionRunner).c_str()) … … 925 927 ListRunner->second->add_options() 926 928 (getKeyAndShortForm(*OptionRunner).c_str(), 927 po::value< vector<int>>(),929 po::value< int >(), 928 930 getDescription(*OptionRunner).c_str()) 929 931 ;
Note:
See TracChangeset
for help on using the changeset viewer.