Changeset d34341 for molecuilder/src/config.cpp
- Timestamp:
- Jan 27, 2010, 2:36:09 PM (16 years ago)
- Children:
- dbd19f
- Parents:
- 41182a (diff), 478683 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
molecuilder/src/config.cpp (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/config.cpp
r41182a rd34341 6 6 7 7 #include <stdio.h> 8 #include <cstring> 8 9 9 10 #include "atom.hpp" … … 27 28 char number1[8]; 28 29 char number2[8]; 29 c har *dummy1, *dummy2;30 const char *dummy1, *dummy2; 30 31 //Log() << Verbose(0) << s1 << " " << s2 << endl; 31 32 dummy1 = strchr(s1, '_')+sizeof(char)*5; // go just after "Ion_Type" … … 1789 1790 mol->SetNameFromFilename(ConfigFileName); 1790 1791 1791 if (!strcmp(config uration->configpath, configuration->GetDefaultPath())) {1792 if (!strcmp(configpath, GetDefaultPath())) { 1792 1793 eLog() << Verbose(2) << "config is found under different path then stated in config file::defaultpath!" << endl; 1793 1794 } … … 1800 1801 strcpy(filename,"main_pcp_linux"); 1801 1802 Log() << Verbose(0) << "Saving as pdb input "; 1802 if ( configuration->SavePDB(filename, molecules))1803 if (SavePDB(filename, molecules)) 1803 1804 Log() << Verbose(0) << "done." << endl; 1804 1805 else … … 1811 1812 strcpy(filename,"main_pcp_linux"); 1812 1813 Log() << Verbose(0) << "Saving as tremolo data input "; 1813 if ( configuration->SaveTREMOLO(filename, molecules))1814 if (SaveTREMOLO(filename, molecules)) 1814 1815 Log() << Verbose(0) << "done." << endl; 1815 1816 else … … 1836 1837 Log() << Verbose(0) << "Storing configuration ... " << endl; 1837 1838 // get correct valence orbitals 1838 mol->CalculateOrbitals(* configuration);1839 configuration->InitMaxMinStopStep = configuration->MaxMinStopStep = configuration->MaxPsiDouble;1839 mol->CalculateOrbitals(*this); 1840 InitMaxMinStopStep = MaxMinStopStep = MaxPsiDouble; 1840 1841 if (ConfigFileName != NULL) { // test the file name 1841 1842 strcpy(filename, ConfigFileName); 1842 1843 output.open(filename, ios::trunc); 1843 } else if (strlen(config uration->configname) != 0) {1844 strcpy(filename, config uration->configname);1845 output.open(config uration->configname, ios::trunc);1844 } else if (strlen(configname) != 0) { 1845 strcpy(filename, configname); 1846 output.open(configname, ios::trunc); 1846 1847 } else { 1847 1848 strcpy(filename, DEFAULTCONFIG); … … 1851 1852 output.clear(); 1852 1853 Log() << Verbose(0) << "Saving of config file "; 1853 if ( configuration->Save(filename, periode, mol))1854 if (Save(filename, periode, mol)) 1854 1855 Log() << Verbose(0) << "successful." << endl; 1855 1856 else … … 1888 1889 strcpy(filename,"main_pcp_linux"); 1889 1890 Log() << Verbose(0) << "Saving as mpqc input "; 1890 if ( configuration->SaveMPQC(filename, mol))1891 if (SaveMPQC(filename, mol)) 1891 1892 Log() << Verbose(0) << "done." << endl; 1892 1893 else 1893 1894 Log() << Verbose(0) << "failed." << endl; 1894 1895 1895 if (!strcmp(config uration->configpath, configuration->GetDefaultPath())) {1896 if (!strcmp(configpath, GetDefaultPath())) { 1896 1897 eLog() << Verbose(2) << "config is found under different path then stated in config file::defaultpath!" << endl; 1897 1898 } … … 2247 2248 } 2248 2249 line++; 2249 } while ( dummy1 != NULL && (dummy1[0] == '#') || (dummy1[0] == '\n'));2250 } while ((dummy1 != NULL) && ((dummy1[0] == '#') || (dummy1[0] == '\n'))); 2250 2251 dummy = dummy1; 2251 2252 } else { // simple int, strings or doubles start in the same line
Note:
See TracChangeset
for help on using the changeset viewer.
