Changeset dd8cf8 for src


Ignore:
Timestamp:
Sep 2, 2008, 12:06:14 PM (16 years ago)
Author:
Frederik Heber <heber@…>
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:
7e27e7
Parents:
7e07cf
Message:

FIX: ExitFlag not defaults to 0, and set specifically to 1 in the subcases

In ParseCommandLineOptions() the ExitFlag was always set to 1, even if only the elements databases were given on the command line. This lead to exit of program, when none was desired.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/builder.cpp

    r7e07cf rdd8cf8  
    741741  atom *first;
    742742  bool SaveFlag = false;
    743   int ExitFlag = 1;
     743  int ExitFlag = 0;
    744744  int j;
    745745  double volume = 0.;
     
    869869          switch(argv[argptr-1][1]) {
    870870            case 'p':
     871              ExitFlag = 1;
    871872              SaveFlag = true;
    872873              cout << Verbose(1) << "Parsing xyz file for new atoms." << endl;
     
    885886          switch(argv[argptr-1][1]) {
    886887            case 'D':
     888              ExitFlag = 1;
    887889              {
    888890                cout << Verbose(1) << "Depth-First-Search Analysis." << endl;
     
    904906              break;
    905907            case 'P':
     908              ExitFlag = 1;
    906909              SaveFlag = true;
    907910              cout << Verbose(1) << "Parsing forces file and Verlet integrating." << endl;
     
    913916              break;
    914917            case 't':
     918              ExitFlag = 1;
    915919              SaveFlag = true;
    916920              cout << Verbose(1) << "Translating all ions to new origin." << endl;
     
    921925              break;
    922926            case 'a':
     927              ExitFlag = 1;
    923928              SaveFlag = true;
    924929              cout << Verbose(1) << "Adding new atom with element " << argv[argptr] << " at (" << argv[argptr+1] << "," << argv[argptr+2] << "," << argv[argptr+3] << "), ";
     
    936941              break;
    937942            case 's':
     943              ExitFlag = 1;
    938944              SaveFlag = true;
    939945              j = -1;
     
    957963              break;
    958964            case 'b':
     965              ExitFlag = 1;
    959966              SaveFlag = true;
    960967              j = -1;
     
    972979              break;
    973980            case 'c':
     981              ExitFlag = 1;
    974982              SaveFlag = true;
    975983              j = -1;
     
    989997              break;
    990998            case 'O':
     999              ExitFlag = 1;
    9911000              SaveFlag = true;
    9921001              cout << Verbose(1) << "Centering atoms in origin." << endl;
     
    9951004              break;
    9961005            case 'r':
     1006              ExitFlag = 1;
    9971007              SaveFlag = true;
    9981008              cout << Verbose(1) << "Converting config file from supposed old to new syntax." << endl;
     
    10001010            case 'F':
    10011011            case 'f':
     1012              ExitFlag = 1;
    10021013              cout << "Fragmenting molecule with bond distance " << argv[argptr] << " angstroem, order of " << argv[argptr+1] << "." << endl;
    10031014              if (argc >= argptr+2) {
     
    10171028              break;
    10181029            case 'm':
     1030              ExitFlag = 1;
    10191031              j = atoi(argv[argptr++]);
    10201032              if ((j<0) || (j>1)) {
     
    10301042              break;
    10311043            case 'o':
     1044              ExitFlag = 1;
    10321045              SaveFlag = true;
    10331046              cout << Verbose(0) << "Evaluating volume of the convex envelope.";
     
    10351048              break;
    10361049            case 'U':
     1050              ExitFlag = 1;
    10371051              volume = atof(argv[argptr++]);
    10381052              cout << Verbose(0) << "Using " << volume << " angstrom^3 as the volume instead of convex envelope one's." << endl; 
    10391053            case 'u':
     1054              ExitFlag = 1;
    10401055              {
    10411056                double density;
     
    10571072              break;
    10581073            case 'd':
     1074              ExitFlag = 1;
    10591075              SaveFlag = true;
    10601076              for (int axis = 1; axis <= NDIM; axis++) {
Note: See TracChangeset for help on using the changeset viewer.