Changeset d7d29c for src


Ignore:
Timestamp:
May 26, 2008, 1:25:38 PM (17 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:
37b5bb
Parents:
a2c084
Message:

renamed ElementsFileName to PathToDatabases, -e now gives path to databases instead of elements db file

We rather now give the path and not elements db file as all the databases generally reside in the same dir.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/builder.cpp

    ra2c084 rd7d29c  
    706706 * \param configuration config file structure
    707707 * \param *ConfigFileName pointer to config file name in **argv
    708  * \param *ElementsFileName pointer to elements db file name in **argv
     708 * \param *PathToDatabases pointer to db's path in **argv
    709709 * \return exit code (0 - successful, all else - something's wrong)
    710710 */
    711 static int ParseCommandLineOptions(int argc, char **argv, molecule *&mol, periodentafel *&periode, config& configuration, char *&ConfigFileName, char *&ElementsFileName)
     711static int ParseCommandLineOptions(int argc, char **argv, molecule *&mol, periodentafel *&periode, config& configuration, char *&ConfigFileName, char *&PathToDatabases)
    712712{
    713713  element *finder;
     
    723723  clock_t start,end;
    724724  int argptr;
     725  PathToDatabases = LocalPath;
    725726 
    726727  if (argc > 1) { // config file specified as option
     
    741742            cout << "\t-b x1 x2 x3\tCenter atoms in domain with given edge lengths of (x1,x2,x3)." << endl;
    742743            cout << "\t-c x1 x2 x3\tCenter atoms in domain with a minimum distance to boundary of (x1,x2,x3)." << endl;
    743             cout << "\t-e <file>\tSets the element database to be parsed from this file (default: elements.db in same dir as " << argv[0] << ")." << endl;
     744            cout << "\t-e <file>\tSets the databases path to be parsed (default: ./)." << endl;
    744745            cout << "\t-f <dist> <order>\tFragments the molecule in BOSSANOVA manner and stores config files in same dir as config." << endl;
    745746            cout << "\t-h/-H/-?\tGive this help screen." << endl;
     
    764765          case 'e':
    765766            cout << "Using " << argv[argptr] << " as elements database." << endl;
    766             ElementsFileName = argv[argptr];
     767            PathToDatabases = argv[argptr];
    767768            argptr+=1;
    768769            break;
     
    776777   
    777778    // 2. Parse the element database
    778     if (periode->LoadPeriodentafel(ElementsFileName))
     779    if (periode->LoadPeriodentafel(PathToDatabases)) {
    779780      cout << Verbose(0) << "Element list loaded successfully." << endl;
    780     else
     781      periode->Output((ofstream *)&cout);
     782    } else
    781783      cout << Verbose(0) << "Element list loading failed." << endl;
    782784   
     
    955957      delete(mol);
    956958      delete(periode);
    957       return (0);
     959      return (1);
    958960    }
    959961  } else {  // no arguments, hence scan the elements db
    960     if (periode->LoadPeriodentafel(ElementsFileName))
     962    if (periode->LoadPeriodentafel(PathToDatabases))
    961963      cout << Verbose(0) << "Element list loaded successfully." << endl;
    962964    else
     
    997999  // =========================== PARSE COMMAND LINE OPTIONS ====================================
    9981000  j = ParseCommandLineOptions(argc, argv, mol, periode, configuration, ConfigFileName, ElementsFileName);
     1001  if (j == 1) return 0; // just for -v and -h options
    9991002  if (j) return j;  // something went wrong
     1003  periode->Output((ofstream *)&cout);
    10001004 
    10011005  // General stuff
Note: See TracChangeset for help on using the changeset viewer.