Changeset d982bb for molecuilder
- Timestamp:
- Apr 28, 2008, 11:36:11 AM (17 years ago)
- Children:
- 8efbfc
- Parents:
- 34d37c
- Location:
- molecuilder/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/defs.hpp
r34d37c rd982bb 37 37 enum value_type { string_type, double_type, int_type, row_int, row_double, grid, lower_trigrid, upper_trigrid}; 38 38 39 // various standard filenames 40 #define KEYSETFILE "KeySets.dat" 41 #define ADJACENCYFILE "Adjacency.dat" 42 #define TEFACTORSFILE "TE-Factors.dat" 43 #define FORCESFILE "Forces-Factors.dat" 44 #define FRAGMENTPREFIX "BondFragment" 45 #define STANDARDCONFIG "unknown.conf" 46 #define STANDARDELEMENTSDB "elements.db" 47 #define STANDARDVALENCEDB "valence.db" 48 #define STANDARDORBITALDB "orbitals.db" 49 #define STANDARDHBONDDISTANCEDB "Hbonddistance.db" 50 #define STANDARDHBONDANGLEDB "Hbondangle.db" 51 39 52 40 53 #endif /*DEFS_HPP_*/ -
molecuilder/src/moleculelist.cpp
r34d37c rd982bb 385 385 strcpy(PathBackup, configuration->GetDefaultPath()); 386 386 // open file for the total energy factor 387 sprintf(TEFilename, "%s/%s%s", PathBackup, prefix, "TE-Factors.dat");387 sprintf(TEFilename, "%s/%s%s", PathBackup, prefix, TEFACTORSFILE); 388 388 output.open(TEFilename, ios::out); 389 389 // output TEList (later to file AtomicTEList.dat) … … 402 402 403 403 // open file for the force factors 404 sprintf(TEFilename, "%s/%s%s", PathBackup, prefix, "Forces-Factors.dat");404 sprintf(TEFilename, "%s/%s%s", PathBackup, prefix, FORCESFILE); 405 405 output.open(TEFilename, ios::out); 406 406 //cout << Verbose(1) << "Final AtomicForcesList: "; -
molecuilder/src/molecules.cpp
r34d37c rd982bb 1895 1895 cout << Verbose(1) << "Parsing the KeySet file ... "; 1896 1896 // open file and read 1897 sprintf(filename, "%s/%s%s", path, "BondFragment", "KeySets.dat");1897 sprintf(filename, "%s/%s%s", path, FRAGMENTPREFIX, KEYSETFILE); 1898 1898 KeySetFile.open(filename); 1899 1899 if (KeySetFile != NULL) { … … 1944 1944 bool status = true; 1945 1945 1946 sprintf(filename, "%s/%s%s", path, "BondFragment", "Adjacency.dat");1946 sprintf(filename, "%s/%s%s", path, FRAGMENTPREFIX, ADJACENCYFILE); 1947 1947 AdjacencyFile.open(filename); 1948 1948 cout << Verbose(1) << "Saving adjacency list ... "; … … 1979 1979 bool status = true; 1980 1980 1981 sprintf(filename, "%s/%s%s", path, "BondFragment", "Adjacency.dat");1981 sprintf(filename, "%s/%s%s", path, FRAGMENTPREFIX, ADJACENCYFILE); 1982 1982 File.open(filename); 1983 1983 *out << Verbose(1) << "Looking at bond structure stored in adjacency file and comparing to present one ..."; -
molecuilder/src/parser.cpp
r34d37c rd982bb 43 43 stringstream line; 44 44 45 line << argv[1] << F actorsFile;45 line << argv[1] << FRAGMENTPREFIX << TEFACTORSFILE; 46 46 return FilePresent(line.str().c_str()); 47 47 }; … … 106 106 // count the number of matrices 107 107 MatrixCounter = -1; // we count one too much 108 line << name << F actorsFile;108 line << name << FRAGMENTPREFIX << TEFACTORSFILE; 109 109 input.open(line.str().c_str(), ios::in); 110 110 if (input == NULL) { … … 127 127 FragmentNumber = FixedDigitNumber(MatrixCounter, i); 128 128 if (i != MatrixCounter) 129 line << name << F ragmentPrefix<< FragmentNumber << "/" << prefix << suffix;129 line << name << FRAGMENTPREFIX << FragmentNumber << "/" << prefix << suffix; 130 130 else 131 131 line << name << prefix << suffix; … … 329 329 stringstream line; 330 330 FragmentNumber = FixedDigitNumber(MatrixCounter, i); 331 line << name << F ragmentPrefix<< FragmentNumber << "/" << prefix;331 line << name << FRAGMENTPREFIX << FragmentNumber << "/" << prefix; 332 332 Free((void **)&FragmentNumber, "*FragmentNumber"); 333 333 output.open(line.str().c_str(), ios::out); … … 424 424 cout << "Parsing force indices." << endl; 425 425 Indices = (int **) Malloc(sizeof(int *)*(MatrixCounter+1), "ForceMatrix::ParseIndices: **Indices"); 426 line << name << F orcesFile;426 line << name << FRAGMENTPREFIX << FORCESFILE; 427 427 input.open(line.str().c_str(), ios::in); 428 428 //cout << "Opening " << line.str() << " ... " << input << endl; … … 439 439 Indices[i] = (int *) Malloc(sizeof(int)*RowCounter[i], "ForceMatrix::ParseIndices: *Indices[]"); 440 440 FragmentNumber = FixedDigitNumber(MatrixCounter, i); 441 cout << F ragmentPrefix<< FragmentNumber << "[" << RowCounter[i] << "]:";441 cout << FRAGMENTPREFIX << FragmentNumber << "[" << RowCounter[i] << "]:"; 442 442 Free((void **)&FragmentNumber, "ForceMatrix::ParseIndices: *FragmentNumber"); 443 443 for(int j=0;(j<RowCounter[i]) && (!line.eof());j++) { … … 521 521 cout << "Parsing key sets." << endl; 522 522 KeySets = (int **) Malloc(sizeof(int *)*FragmentCounter, "KeySetsContainer::ParseKeySets: **KeySets"); 523 line << name << KeySetsFile;523 line << name << FRAGMENTPREFIX << KEYSETFILE; 524 524 input.open(line.str().c_str(), ios::in); 525 525 if (input == NULL) { … … 535 535 KeySets[i] = (int *) Malloc(sizeof(int)*AtomCounter[i], "KeySetsContainer::ParseKeySets: *KeySets[]"); 536 536 FragmentNumber = FixedDigitNumber(FragmentCounter, i); 537 cout << F ragmentPrefix<< FragmentNumber << "[" << AtomCounter[i] << "]:";537 cout << FRAGMENTPREFIX << FragmentNumber << "[" << AtomCounter[i] << "]:"; 538 538 Free((void **)&FragmentNumber, "KeySetsContainer::ParseKeySets: *FragmentNumber"); 539 539 input.getline(filename, 1023); -
molecuilder/src/parser.hpp
r34d37c rd982bb 18 18 // ======================================= DEFINES ========================================== 19 19 20 #define FactorsFile "BondFragmentTE-Factors.dat"21 #define ForcesFile "BondFragmentForces-Factors.dat"22 #define KeySetsFile "BondFragmentKeySets.dat"23 #define FragmentPrefix "BondFragment"24 20 #define EnergySuffix ".energy.all" 25 21 #define ForcesSuffix ".forces.all" -
molecuilder/src/periodentafel.cpp
r34d37c rd982bb 171 171 // fill elements DB 172 172 if (filename == NULL) 173 infile.open( "elements.db");173 infile.open(STANDARDELEMENTSDB); 174 174 else 175 175 infile.open(filename); … … 210 210 211 211 // fill valence DB per element 212 infile.open( "valence.db");212 infile.open(STANDARDVALENCEDB); 213 213 if (infile != NULL) { 214 214 while (!infile.eof()) { … … 225 225 226 226 // fill valence DB per element 227 infile.open( "orbitals.db");227 infile.open(STANDARDORBITALDB); 228 228 if (infile != NULL) { 229 229 while (!infile.eof()) { … … 240 240 241 241 // fill H-BondDistance DB per element 242 infile.open( "Hbonddistance.db");242 infile.open(STANDARDHBONDDISTANCEDB); 243 243 if (infile != NULL) { 244 244 while (!infile.eof()) { … … 258 258 259 259 // fill H-BondAngle DB per element 260 infile.open( "Hbondangle.db");260 infile.open(STANDARDHBONDANGLEDB); 261 261 if (infile != NULL) { 262 262 while (!infile.eof()) {
Note:
See TracChangeset
for help on using the changeset viewer.