Changeset 245826 for molecuilder/src/config.cpp
- Timestamp:
- Oct 30, 2009, 4:09:29 PM (16 years ago)
- Children:
- df0520
- Parents:
- b84ab4
- File:
-
- 1 edited
-
molecuilder/src/config.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/config.cpp
rb84ab4 r245826 831 831 /** Initializes config file structure by loading elements from a give file. 832 832 * \param *file input file stream being the opened config file 833 * \param BondGraphFileName file name of the bond length table file, if string is left blank, no table is parsed. 833 834 * \param *periode pointer to a periodentafel class with all elements 834 835 * \param *mol pointer to molecule containing all atoms of the molecule 835 836 */ 836 void config::Load(const char * const filename, const periodentafel * const periode, molecule * const &mol)837 void config::Load(const char * const filename, const string &BondGraphFileName, const periodentafel * const periode, molecule * const &mol) 837 838 { 838 839 ifstream *file = new ifstream(filename); … … 860 861 /* Namen einlesen */ 861 862 863 // 1. parse in options 862 864 ParseForParameter(verbose,FileBuffer, "mainname", 0, 1, 1, string_type, (config::mainname), 1, critical); 863 865 ParseForParameter(verbose,FileBuffer, "defaultpath", 0, 1, 1, string_type, (config::defaultpath), 1, critical); … … 1040 1042 config::StructOpt = 0; 1041 1043 1044 // 2. parse the bond graph file if given 1045 BG = new BondGraph(IsAngstroem); 1046 if (BG->LoadBondLengthTable((ofstream *)&cout, BondGraphFileName)) { 1047 cout << Verbose(0) << "Bond length table loaded successfully." << endl; 1048 } else { 1049 cout << Verbose(0) << "Bond length table loading failed." << endl; 1050 } 1051 1052 // 3. parse the molecule in 1042 1053 LoadMolecule(mol, FileBuffer, periode, FastParsing); 1054 1055 // 4. dissect the molecule into connected subgraphs 1056 BG->ConstructBondGraph((ofstream *)&cout, mol); 1043 1057 1044 1058 delete(FileBuffer); … … 1047 1061 /** Initializes config file structure by loading elements from a give file with old pcp syntax. 1048 1062 * \param *file input file stream being the opened config file with old pcp syntax 1063 * \param BondGraphFileName file name of the bond length table file, if string is left blank, no table is parsed. 1049 1064 * \param *periode pointer to a periodentafel class with all elements 1050 1065 * \param *mol pointer to molecule containing all atoms of the molecule 1051 1066 */ 1052 void config::LoadOld(const char * const filename, const periodentafel * const periode, molecule * const &mol)1067 void config::LoadOld(const char * const filename, const string &BondGraphFileName, const periodentafel * const periode, molecule * const &mol) 1053 1068 { 1054 1069 ifstream *file = new ifstream(filename); … … 1207 1222 config::StructOpt = 0; 1208 1223 1224 1225 // 2. parse the bond graph file if given 1226 BG = new BondGraph(IsAngstroem); 1227 if (BG->LoadBondLengthTable((ofstream *)&cout, BondGraphFileName)) { 1228 cout << Verbose(0) << "Bond length table loaded successfully." << endl; 1229 } else { 1230 cout << Verbose(0) << "Bond length table loading failed." << endl; 1231 } 1232 1209 1233 // Routine from builder.cpp 1210 1211 1234 1212 1235 for (i=MAX_ELEMENTS;i--;)
Note:
See TracChangeset
for help on using the changeset viewer.
