Changeset 4885953
- Timestamp:
- Apr 29, 2008, 7:45:23 AM (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:
- 1fa5b7
- Parents:
- 04980c
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/builder.cpp
r04980c r4885953 700 700 if (ConfigFileName != NULL) { 701 701 output.open(ConfigFileName, ios::trunc); 702 } else {702 } else if (strlen(configuration->configname) != 0) { 703 703 output.open(configuration->configname, ios::trunc); 704 } 704 } else { 705 output.open(DEFAULTCONFIG, ios::trunc); 706 } 705 707 if (configuration->Save(&output, periode, mol)) 706 708 cout << Verbose(0) << "Saving of config file successful." << endl; … … 779 781 case '?': 780 782 cout << "MoleCuilder suite" << endl << "==================" << endl << endl; 781 cout << "Usage: " << argv[0] << "[ -{acepsthH?vfrp}] [further arguments] [config file]" << endl;783 cout << "Usage: " << argv[0] << "[config file] [-{acepsthH?vfrp}] [further arguments]" << endl; 782 784 cout << "or simply " << argv[0] << " without arguments for interactive session." << endl; 783 785 cout << "\t-a Z x1 x2 x3\tAdd new atom of element Z at coordinates (x1,x2,x3)." << endl; … … 814 816 } else 815 817 argptr++; 816 } while (argptr < (argc-1)); 818 } while (argptr < argc); 819 817 820 // 2. Parse the element database 818 821 if (periode->LoadPeriodentafel(ElementsFileName)) … … 820 823 else 821 824 cout << Verbose(0) << "Element list loading failed." << endl; 825 822 826 // 3. Find config file name and parse if possible 823 if (argv[ argc-1][0] != '-') {827 if (argv[1][0] != '-') { 824 828 cout << Verbose(0) << "Config file given." << endl; 825 test.open(argv[ argc-1], ios::in);829 test.open(argv[1], ios::in); 826 830 if (test == NULL) { 827 831 //return (1); 828 output.open(argv[ argc-1], ios::out);832 output.open(argv[1], ios::out); 829 833 if (output == NULL) { 830 cout << Verbose(1) << "Specified config file " << argv[ argc-1] << " not found." << endl;834 cout << Verbose(1) << "Specified config file " << argv[1] << " not found." << endl; 831 835 config_present = absent; 832 836 } else { 833 837 cout << "Empty configuration file." << endl; 834 ConfigFileName = argv[ argc-1];838 ConfigFileName = argv[1]; 835 839 config_present = empty; 836 840 output.close(); … … 838 842 } else { 839 843 test.close(); 840 ConfigFileName = argv[ argc-1];844 ConfigFileName = argv[1]; 841 845 cout << Verbose(1) << "Specified config file found, parsing ..."; 842 846 switch (configuration.TestSyntax(ConfigFileName, periode, mol)) { … … 858 862 } else 859 863 config_present = absent; 864 860 865 // 4. parse again through options, now for those depending on elements db and config presence 861 866 argptr = 1; … … 951 956 int i,j; 952 957 flag = 1; 953 if (argc > argptr+3) { 958 cout << "Fragmenting molecule with bond distance " << argv[argptr] << " angstroem, order of " << argv[argptr+1] << " and type " << argv[argptr+2] << "." << endl; 959 if (argc >= argptr+3) { 954 960 cout << Verbose(0) << "Creating connection matrix..." << endl; 955 961 start = clock(); … … 1001 1007 cout << Verbose(0) << "Clocks for this operation: " << (end-start) << ", time: " << ((double)(end-start)/CLOCKS_PER_SEC) << "s." << endl; 1002 1008 argptr+=2; 1009 } else { 1010 cerr << "Not enough arguments for fragmentation: -f <max. bond distance> <bond order> <type>" << endl; 1003 1011 } 1004 1012 break; … … 1007 1015 break; 1008 1016 } 1009 } else {1010 cout << "Cannot apply command line parameter as no valid config file was found." << endl;1011 return 1;1012 1017 } 1013 1018 } 1014 1019 } else argptr++; 1015 } while (argptr < (argc-1));1020 } while (argptr < argc); 1016 1021 if (flag == 1) { // 1 means save and exit 1017 1022 SaveConfig(ConfigFileName, &configuration, periode, mol); … … 1025 1030 else 1026 1031 cout << Verbose(0) << "Element list loading failed." << endl; 1027 config_present = absent;1028 1032 configuration.RetrieveConfigPathAndName("main_pcp_linux"); 1029 1033 } -
src/defs.hpp
r04980c r4885953 38 38 39 39 // various standard filenames 40 #define DEFAULTCONFIG "main_pcp_linux" 40 41 #define KEYSETFILE "KeySets.dat" 41 42 #define ADJACENCYFILE "Adjacency.dat"
Note:
See TracChangeset
for help on using the changeset viewer.