- Timestamp:
- May 26, 2008, 1:25:38 PM (17 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:
- 37b5bb
- Parents:
- a2c084
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/builder.cpp
ra2c084 rd7d29c 706 706 * \param configuration config file structure 707 707 * \param *ConfigFileName pointer to config file name in **argv 708 * \param * ElementsFileName pointer to elements db file namein **argv708 * \param *PathToDatabases pointer to db's path in **argv 709 709 * \return exit code (0 - successful, all else - something's wrong) 710 710 */ 711 static int ParseCommandLineOptions(int argc, char **argv, molecule *&mol, periodentafel *&periode, config& configuration, char *&ConfigFileName, char *& ElementsFileName)711 static int ParseCommandLineOptions(int argc, char **argv, molecule *&mol, periodentafel *&periode, config& configuration, char *&ConfigFileName, char *&PathToDatabases) 712 712 { 713 713 element *finder; … … 723 723 clock_t start,end; 724 724 int argptr; 725 PathToDatabases = LocalPath; 725 726 726 727 if (argc > 1) { // config file specified as option … … 741 742 cout << "\t-b x1 x2 x3\tCenter atoms in domain with given edge lengths of (x1,x2,x3)." << endl; 742 743 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; 744 745 cout << "\t-f <dist> <order>\tFragments the molecule in BOSSANOVA manner and stores config files in same dir as config." << endl; 745 746 cout << "\t-h/-H/-?\tGive this help screen." << endl; … … 764 765 case 'e': 765 766 cout << "Using " << argv[argptr] << " as elements database." << endl; 766 ElementsFileName= argv[argptr];767 PathToDatabases = argv[argptr]; 767 768 argptr+=1; 768 769 break; … … 776 777 777 778 // 2. Parse the element database 778 if (periode->LoadPeriodentafel( ElementsFileName))779 if (periode->LoadPeriodentafel(PathToDatabases)) { 779 780 cout << Verbose(0) << "Element list loaded successfully." << endl; 780 else 781 periode->Output((ofstream *)&cout); 782 } else 781 783 cout << Verbose(0) << "Element list loading failed." << endl; 782 784 … … 955 957 delete(mol); 956 958 delete(periode); 957 return ( 0);959 return (1); 958 960 } 959 961 } else { // no arguments, hence scan the elements db 960 if (periode->LoadPeriodentafel( ElementsFileName))962 if (periode->LoadPeriodentafel(PathToDatabases)) 961 963 cout << Verbose(0) << "Element list loaded successfully." << endl; 962 964 else … … 997 999 // =========================== PARSE COMMAND LINE OPTIONS ==================================== 998 1000 j = ParseCommandLineOptions(argc, argv, mol, periode, configuration, ConfigFileName, ElementsFileName); 1001 if (j == 1) return 0; // just for -v and -h options 999 1002 if (j) return j; // something went wrong 1003 periode->Output((ofstream *)&cout); 1000 1004 1001 1005 // General stuff
Note:
See TracChangeset
for help on using the changeset viewer.