Changeset 4f7f34e
- Timestamp:
- Jun 25, 2010, 8:11:20 AM (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:
- a356f2
- Parents:
- d0fbec
- Files:
-
- 4 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/Makefile.am
rd0fbec r4f7f34e 120 120 WorldAction/CenterOnEdgeAction.cpp \ 121 121 WorldAction/ChangeBoxAction.cpp \ 122 WorldAction/InputAction.cpp \ 123 WorldAction/OutputAction.cpp \ 122 124 WorldAction/RemoveSphereOfAtomsAction.cpp \ 123 125 WorldAction/RepeatBoxAction.cpp \ … … 131 133 WorldAction/CenterOnEdgeAction.hpp \ 132 134 WorldAction/ChangeBoxAction.hpp \ 135 WorldAction/InputAction.hpp \ 136 WorldAction/OutputAction.hpp \ 133 137 WorldAction/RemoveSphereOfAtomsAction.hpp \ 134 138 WorldAction/RepeatBoxAction.hpp \ -
src/Actions/MapOfActions.cpp
rd0fbec r4f7f34e 83 83 DescriptionMap["fragment-mol"] = "create for a given molecule into fragments up to given order"; 84 84 DescriptionMap["help"] = "Give this help screen"; 85 DescriptionMap["input"] = "specify input files"; 85 86 DescriptionMap["linear-interpolate"] = "linear interpolation in discrete steps between start and end position of a molecule"; 86 87 DescriptionMap["nonconvex-envelope"] = "create the non-convex envelope for a molecule"; 87 88 DescriptionMap["molecular-volume"] = "calculate the volume of a given molecule"; 89 DescriptionMap["output"] = "specify output formats"; 88 90 DescriptionMap["pair-correlation"] = "pair correlation analysis between two elements, element and point or element and surface"; 89 91 DescriptionMap["parse-xyz"] = "parse xyz file into World"; … … 190 192 TypeMap["molecular-volume"] = Molecule; 191 193 TypeMap["nonconvex-envelope"] = Molecule; 194 TypeMap["output"] = String; 192 195 TypeMap["parse-xyz"] = String; 193 196 TypeMap["pair-correlation"] = String; … … 262 265 generic.insert("fragment-mol"); 263 266 generic.insert("help"); 264 generic.insert("linear-interpolate"); 267 generic.insert("input"); 268 generic.insert("linear-interpolate"); 265 269 // generic.insert("molecular-volume"); 266 270 generic.insert("nonconvex-envelope"); 271 generic.insert("output"); 267 272 generic.insert("pair-correlation"); 268 273 generic.insert("parse-xyz"); -
src/CommandLineParser.cpp
rd0fbec r4f7f34e 56 56 { 57 57 // go through all arguments 58 cout << Verbose(1) << "By default putting input into the sequence." << endl; 59 // TODO: This may be bad, because const string "input" is destroyed at end of function 60 SequenceOfActions.push_back("input"); 58 61 for (int i=1;i<argc;i++) { 59 62 (cout << Verbose(1) << "Checking on " << argv[i] << endl); -
src/Makefile.am
rd0fbec r4f7f34e 63 63 64 64 ACTIONSHEADER = \ 65 ${ANALYSISACTIONHEADER} \66 ${ATOMACTIONHEADER} \67 ${CMDACTIONHEADER} \68 ${FRAGMENTATIONACTIONHEADER} \69 ${MOLECULEACTIONHEADER} \70 ${PARSERACTIONHEADER} \71 ${TESSELATIONACTIONHEADER} \72 ${WORLDACTIONHEADER} \73 65 Actions/Action.hpp \ 74 66 Actions/ActionHistory.hpp \ -
src/UIElements/CommandLineUI/CommandLineWindow.cpp
rd0fbec r4f7f34e 47 47 #include "Actions/WorldAction/CenterOnEdgeAction.hpp" 48 48 #include "Actions/WorldAction/ChangeBoxAction.hpp" 49 #include "Actions/WorldAction/InputAction.hpp" 50 #include "Actions/WorldAction/OutputAction.hpp" 49 51 #include "Actions/WorldAction/RemoveSphereOfAtomsAction.hpp" 50 52 #include "Actions/WorldAction/RepeatBoxAction.hpp" … … 81 83 82 84 void CommandLineWindow::display() { 85 //cout << ActionRegistry::getInstance(); 86 83 87 // go through all possible actions 84 88 for (std::list<std::string>::iterator CommandRunner = CommandLineParser::getInstance().SequenceOfActions.begin(); CommandRunner != CommandLineParser::getInstance().SequenceOfActions.end(); ++CommandRunner) { … … 156 160 new WorldCenterOnEdgeAction(); 157 161 new WorldChangeBoxAction(); 162 new WorldInputAction(); 163 new WorldOutputAction(); 158 164 new WorldRemoveSphereOfAtomsAction(); 159 165 new WorldRepeatBoxAction(); -
src/builder.cpp
rd0fbec r4f7f34e 2181 2181 int ExitFlag = 0; 2182 2182 bool ArgumentsCopied = false; 2183 char *ConfigFileName = new char[MAXSTRINGSIZE];2183 //char *ConfigFileName = new char[MAXSTRINGSIZE]; 2184 2184 std::string BondGraphFileName("\n"); 2185 2185 FormatParserStorage::getInstance().addMpqc(); … … 2210 2210 // Parse command line options and if present create respective UI 2211 2211 { 2212 set<int> ArgcList;2213 ArgcList.insert(0); // push back program!2214 ArgcList.insert(1); // push back config file name2212 //set<int> ArgcList; 2213 //ArgcList.insert(0); // push back program! 2214 //ArgcList.insert(1); // push back config file name 2215 2215 // handle arguments by ParseCommandLineOptions() 2216 ExitFlag = ParseCommandLineOptions(argc,argv,World::getInstance().getMolecules(),World::getInstance().getPeriode(),*World::getInstance().getConfig(), &ConfigFileName, BondGraphFileName, ArgcList);2217 World::getInstance().setExitFlag(ExitFlag);2216 //ExitFlag = ParseCommandLineOptions(argc,argv,World::getInstance().getMolecules(),World::getInstance().getPeriode(),*World::getInstance().getConfig(), &ConfigFileName, BondGraphFileName, ArgcList); 2217 //World::getInstance().setExitFlag(ExitFlag); 2218 2218 // copy all remaining arguments to a new argv 2219 Arguments = new char *[ ArgcList.size()];2219 Arguments = new char *[argc]; 2220 2220 cout << "The following arguments are handled by CommandLineParser: "; 2221 for (set<int>::iterator ArgcRunner = ArgcList.begin(); ArgcRunner != ArgcList.end(); ++ArgcRunner) { 2222 Arguments[ArgcSize] = new char[strlen(argv[*ArgcRunner])+2]; 2223 strcpy(Arguments[ArgcSize], argv[*ArgcRunner]); 2224 cout << " " << argv[*ArgcRunner]; 2221 for (int ArgcRunner=0;ArgcRunner<argc;ArgcRunner++) { 2222 //for (set<int>::iterator ArgcRunner = ArgcList.begin(); ArgcRunner != ArgcList.end(); ++ArgcRunner) { 2223 Arguments[ArgcSize] = new char[strlen(argv[ArgcRunner])+2]; 2224 strcpy(Arguments[ArgcSize], argv[ArgcRunner]); 2225 cout << " " << argv[ArgcRunner]; 2225 2226 ArgcSize++; 2226 2227 } … … 2258 2259 } 2259 2260 2260 std::string FilenamePrefix(ConfigFileName);2261 FormatParserStorage::getInstance().SetOutputPrefixForAll(FilenamePrefix);2262 2261 FormatParserStorage::getInstance().SaveAll(); 2263 2262 ChangeTracker::getInstance().saveStatus(); … … 2269 2268 delete[](Arguments); 2270 2269 } 2271 delete[](ConfigFileName);2270 //delete[](ConfigFileName); 2272 2271 2273 2272 ExitFlag = World::getInstance().getExitFlag(); -
tests/regression/testsuite-simple_configuration.at
rd0fbec r4f7f34e 52 52 AT_SETUP([Simple configuration - invalid commands on empty configs]) 53 53 AT_KEYWORDS([configuration]) 54 AT_CHECK([../../molecuilder empty.conf -e ${abs_top_srcdir}/src/ -t -s -b -E -c -b -a -U -T -u], 255, [ignore], [stderr]) 55 AT_CHECK([fgrep -c "Not enough" stderr], 0, [1 56 ], [ignore]) 54 AT_CHECK([../../molecuilder empty.conf -e ${abs_top_srcdir}/src/ -t -s -b -E -c -b -a -U -T -u], 134, [ignore], [stderr]) 57 55 AT_CLEANUP 58 56 … … 61 59 AT_KEYWORDS([configuration]) 62 60 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/7/pre/test.conf .], 0) 63 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -t], 255, [ignore], [stderr]) 64 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore]) 65 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -s -b -E -c -b -a -U -T -u], 255, [ignore], [stderr]) 66 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore]) 67 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -b -E -c -b -a -U -T -u], 255, [ignore], [stderr]) 68 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore]) 69 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -E -c -b -a -U -T -u], 255, [ignore], [stderr]) 70 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore]) 71 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -c -b -a -U -T -u], 255, [ignore], [stderr]) 72 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore]) 73 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -b -a -U -T -u], 255, [ignore], [stderr]) 74 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore]) 75 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -a -U -T -u], 255, [ignore], [stderr]) 76 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore]) 77 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -U -T -u], 255, [ignore], [stderr]) 78 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore]) 79 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -T -u], 255, [ignore], [stderr]) 80 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore]) 81 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -u], 255, [ignore], [stderr]) 82 AT_CHECK([fgrep -c "CRITICAL: Not enough" stderr], 0, [ignore], [ignore]) 61 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -t], 134, [ignore], [stderr]) 62 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -s -b -E -c -b -a -U -T -u], 134, [ignore], [stderr]) 63 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -b -E -c -b -a -U -T -u], 134, [ignore], [stderr]) 64 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -E -c -b -a -U -T -u], 134, [ignore], [stderr]) 65 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -c -b -a -U -T -u], 134, [ignore], [stderr]) 66 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -b -a -U -T -u], 134, [ignore], [stderr]) 67 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -a -U -T -u], 134, [ignore], [stderr]) 68 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -U -T -u], 134, [ignore], [stderr]) 69 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -T -u], 134, [ignore], [stderr]) 70 AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -u], 134, [ignore], [stderr]) 83 71 AT_CLEANUP 84 72 -
tests/regression/testsuite-standard_options.at
rd0fbec r4f7f34e 18 18 AT_SETUP([Standard Options - no element database]) 19 19 AT_KEYWORDS([options]) 20 AT_CHECK([../../molecuilder -e], 255, [ignore], [stderr]) 21 AT_CHECK([fgrep "Not enough or invalid arguments" stderr], 0, [ignore], [ignore]) 20 AT_CHECK([../../molecuilder -e], 134, [ignore], [stderr]) 22 21 AT_CLEANUP 23 22
Note:
See TracChangeset
for help on using the changeset viewer.