Changeset 989bf6
- Timestamp:
- Jul 9, 2009, 11:01:08 AM (16 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:
- e72001
- Parents:
- 1c6081
- git-author:
- Frederik Heber <heber@…> (07/09/09 10:59:00)
- git-committer:
- Frederik Heber <heber@…> (07/09/09 11:01:08)
- Location:
- src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/builder.cpp
r1c6081 r989bf6 1208 1208 * \return exit code (0 - successful, all else - something's wrong) 1209 1209 */ 1210 static int ParseCommandLineOptions(int argc, char **argv, MoleculeListClass *&molecules, periodentafel *&periode, config& configuration, char *&ConfigFileName , char *&PathToDatabases)1210 static int ParseCommandLineOptions(int argc, char **argv, MoleculeListClass *&molecules, periodentafel *&periode, config& configuration, char *&ConfigFileName) 1211 1211 { 1212 1212 Vector x,y,z,n; // coordinates for absolute point in cell volume … … 1223 1223 clock_t start,end; 1224 1224 int argptr; 1225 PathToDatabases = LocalPath;1225 strncpy(configuration.databasepath, LocalPath, MAXSTRINGSIZE-1); 1226 1226 1227 1227 // simply create a new molecule, wherein the config file is loaded and the manipulation takes place … … 1285 1285 } else { 1286 1286 cout << "Using " << argv[argptr] << " as elements database." << endl; 1287 PathToDatabases = argv[argptr];1287 strncpy (configuration.databasepath, argv[argptr], MAXSTRINGSIZE-1); 1288 1288 argptr+=1; 1289 1289 } … … 1302 1302 1303 1303 // 2. Parse the element database 1304 if (periode->LoadPeriodentafel( PathToDatabases)) {1304 if (periode->LoadPeriodentafel(configuration.databasepath)) { 1305 1305 cout << Verbose(0) << "Element list loaded successfully." << endl; 1306 1306 //periode->Output((ofstream *)&cout); … … 1771 1771 } 1772 1772 } else { // no arguments, hence scan the elements db 1773 if (periode->LoadPeriodentafel( PathToDatabases))1773 if (periode->LoadPeriodentafel(configuration.databasepath)) 1774 1774 cout << Verbose(0) << "Element list loaded successfully." << endl; 1775 1775 else … … 1794 1794 string line; 1795 1795 char *ConfigFileName = NULL; 1796 char *ElementsFileName = NULL;1797 1796 int j, count; 1798 1797 1799 1798 // =========================== PARSE COMMAND LINE OPTIONS ==================================== 1800 j = ParseCommandLineOptions(argc, argv, molecules, periode, configuration, ConfigFileName , ElementsFileName);1799 j = ParseCommandLineOptions(argc, argv, molecules, periode, configuration, ConfigFileName); 1801 1800 if (j == 1) return 0; // just for -v and -h options 1802 1801 if (j) return j; // something went wrong … … 1889 1888 1890 1889 // save element data base 1891 if (periode->StorePeriodentafel( ElementsFileName)) //ElementsFileName1890 if (periode->StorePeriodentafel(configuration.databasepath)) //ElementsFileName 1892 1891 cout << Verbose(0) << "Saving of elements.db successful." << endl; 1893 1892 else -
src/config.cpp
r1c6081 r989bf6 14 14 { 15 15 mainname = (char *) MallocString(sizeof(char)*MAXSTRINGSIZE,"config constructor: mainname"); 16 defaultpath = (char *) MallocString(sizeof(char)*MAXSTRINGSIZE,"config constructor: mainname"); 17 pseudopotpath = (char *) MallocString(sizeof(char)*MAXSTRINGSIZE,"config constructor: mainname"); 18 configpath = (char *) MallocString(sizeof(char)*MAXSTRINGSIZE,"config constructor: mainname"); 19 configname = (char *) MallocString(sizeof(char)*MAXSTRINGSIZE,"config constructor: mainname"); 16 defaultpath = (char *) MallocString(sizeof(char)*MAXSTRINGSIZE,"config constructor: defaultpath"); 17 pseudopotpath = (char *) MallocString(sizeof(char)*MAXSTRINGSIZE,"config constructor: pseudopotpath"); 18 databasepath = (char *) MallocString(sizeof(char)*MAXSTRINGSIZE,"config constructor: databasepath"); 19 configpath = (char *) MallocString(sizeof(char)*MAXSTRINGSIZE,"config constructor: configpath"); 20 configname = (char *) MallocString(sizeof(char)*MAXSTRINGSIZE,"config constructor: configname"); 20 21 strcpy(mainname,"pcp"); 21 22 strcpy(defaultpath,"not specified"); … … 93 94 Free((void **)&defaultpath, "config::~config: *defaultpath"); 94 95 Free((void **)&pseudopotpath, "config::~config: *pseudopotpath"); 96 Free((void **)&databasepath, "config::~config: *databasepath"); 95 97 Free((void **)&configpath, "config::~config: *configpath"); 96 98 Free((void **)&configname, "config::~config: *configname"); -
src/molecules.hpp
r1c6081 r989bf6 410 410 string basis; 411 411 412 private: 412 char *databasepath; 413 414 private: 413 415 char *mainname; 414 416 char *defaultpath; -
src/periodentafel.cpp
r1c6081 r989bf6 92 92 * \return pointer to element 93 93 */ 94 element * periodentafel::FindElement(c har *shorthand) const94 element * periodentafel::FindElement(const char *shorthand) const 95 95 { 96 96 element *walker = periodentafel::start; … … 162 162 * \param *path to to standard file names 163 163 */ 164 bool periodentafel::LoadPeriodentafel(c har *path)164 bool periodentafel::LoadPeriodentafel(const char *path) 165 165 { 166 166 ifstream infile; … … 301 301 /** Stores element list to file. 302 302 */ 303 bool periodentafel::StorePeriodentafel(c har *path) const303 bool periodentafel::StorePeriodentafel(const char *path) const 304 304 { 305 305 bool result = true; -
src/periodentafel.hpp
r1c6081 r989bf6 66 66 bool CleanupPeriodtable(); 67 67 element * FindElement(int Z); 68 element * FindElement(c har *shorthand) const;68 element * FindElement(const char *shorthand) const; 69 69 element * AskElement(); 70 70 bool Output(ofstream *output) const; 71 71 bool Checkout(ofstream *output, const int *checkliste) const; 72 bool LoadPeriodentafel(c har *path = NULL);73 bool StorePeriodentafel(c har *path = NULL) const;72 bool LoadPeriodentafel(const char *path); 73 bool StorePeriodentafel(const char *path) const; 74 74 75 75 private:
Note:
See TracChangeset
for help on using the changeset viewer.