Changeset 54b953
- Timestamp:
- Jun 11, 2010, 12:20:08 PM (15 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:
- 77de81
- Parents:
- f0a3ec
- git-author:
- Frederik Heber <heber@…> (06/11/10 10:39:39)
- git-committer:
- Frederik Heber <heber@…> (06/11/10 12:20:08)
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/AtomAction/ChangeElementAction.cpp
rf0a3ec r54b953 36 36 std::vector<element *> elements; 37 37 38 dialog->query Element(NAME, &elements, MapOfActions::getInstance().getDescription(NAME));39 dialog->query Atom("atom-by-id", &first, MapOfActions::getInstance().getDescription("atom-by-id"));38 dialog->queryAtom(NAME, &first, MapOfActions::getInstance().getDescription(NAME)); 39 dialog->queryElement("element", &elements, MapOfActions::getInstance().getDescription("element")); 40 40 41 41 if(dialog->display()) { 42 42 delete dialog; 43 43 ASSERT(elements.size() == 1, "Unequal to one element specified when changing an atom's element"); 44 ASSERT(first != NULL, "No valid atom specified"); 44 45 DoLog(1) && (Log() << Verbose(1) << "Changing atom " << *first << " to element " << elements.at(0) << "." << endl); 45 46 if (elements.at(0) != NULL) { -
src/Actions/MapOfActions.cpp
rf0a3ec r54b953 103 103 DescriptionMap["version"] = "show version"; 104 104 // keys for values 105 DescriptionMap["atom-by-id"] = "index of an atom"; 105 106 DescriptionMap["bin-output-file"] = "name of the bin output file"; 106 107 DescriptionMap["bin-end"] = "start of the last bin"; … … 170 171 TypeMap["center-in-box"] = Box; 171 172 TypeMap["change-box"] = Box; 172 TypeMap["change-element"] = Element;173 TypeMap["change-element"] = Atom; 173 174 TypeMap["change-molname"] = String; 174 175 TypeMap["convex-envelope"] = Molecule; … … 203 204 204 205 // value types for the values 206 TypeMap["atom-by-id"] = Atom; 205 207 TypeMap["bin-output-file"] = String; 206 208 TypeMap["bin-end"] = Double; … … 225 227 DefaultValue["bin-width"] = "0.5"; 226 228 DefaultValue["fastparsing"] = "0"; 229 DefaultValue["atom-by-id"] = "-1"; 227 230 DefaultValue["molecule-by-id"] = "-1"; 228 231 DefaultValue["periodic"] = "0"; … … 239 242 generic.insert("change-box"); 240 243 // generic.insert("change-molname"); 241 //generic.insert("change-element");244 generic.insert("change-element"); 242 245 // generic.insert("convex-envelope"); 243 246 generic.insert("default-molname"); … … 282 285 283 286 // hidden arguments 287 generic.insert("atom-by-id"); 284 288 generic.insert("bin-end"); 285 289 generic.insert("bin-output-file"); -
src/builder.cpp
rf0a3ec r54b953 1804 1804 case 'E': 1805 1805 if (ExitFlag == 0) ExitFlag = 1; 1806 if ((argptr+ 1 >= argc) || (!IsValidNumber(argv[argptr])) || (argv[argptr+1][0] == '-')) {1806 if ((argptr+2 >= argc) || (!IsValidNumber(argv[argptr]))) { 1807 1807 ExitFlag = 255; 1808 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for changing element: -E <atom nr.> <element>" << endl);1808 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for changing element: -E <atom nr.> --element <Z>" << endl); 1809 1809 performCriticalExit(); 1810 1810 } else { 1811 mol->getAtomCount(); 1812 SaveFlag = true; 1813 DoLog(1) && (Log() << Verbose(1) << "Changing atom " << argv[argptr] << " to element " << argv[argptr+1] << "." << endl); 1814 first = mol->FindAtom(atoi(argv[argptr])); 1815 first->type = periode->FindElement(atoi(argv[argptr+1])); 1816 argptr+=2; 1811 ArgcList.insert(argptr-1); 1812 ArgcList.insert(argptr); 1813 ArgcList.insert(argptr+1); 1814 ArgcList.insert(argptr+2); 1815 argptr+=3; 1817 1816 } 1818 1817 break; -
tests/regression/testsuite-simple_configuration.at
rf0a3ec r54b953 35 35 AT_KEYWORDS([configuration]) 36 36 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/4/pre/test.conf test.conf], 0) 37 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -E 0 6], 0, [ignore], [ignore])37 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -E 0 --element 6], 0, [ignore], [ignore]) 38 38 AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/4/post/$file], 0, [ignore], [ignore]) 39 39 AT_CLEANUP
Note:
See TracChangeset
for help on using the changeset viewer.