Changeset 23409a for molecuilder
- Timestamp:
- Apr 28, 2008, 7:16:42 AM (17 years ago)
- Children:
- bd8439
- Parents:
- 1f7265
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/moleculelist.cpp
r1f7265 r23409a 313 313 char *FragmentNumber; 314 314 int FragmentCounter = 0; 315 ofstream TEFile; 316 ofstream ForcesFile; 317 ofstream KeySetFile; 315 ofstream output; 318 316 element *runner = NULL; 319 317 … … 388 386 // open file for the total energy factor 389 387 sprintf(TEFilename, "%s/%s%s", PathBackup, prefix, "TE-Factors.dat"); 390 TEFile.open(TEFilename, ios::out);388 output.open(TEFilename, ios::out); 391 389 // output TEList (later to file AtomicTEList.dat) 392 390 cout << Verbose(2) << "Saving " << prefix << " energy factors ..."; 393 391 //cout << Verbose(1) << "Final ATEList: "; 394 //less TEFile<< prefix << "TE\t";392 //less output << prefix << "TE\t"; 395 393 for(int i=0;i<NumberOfMolecules;i++) { 396 394 //cout << TEList[i] << "\t"; 397 395 //if (TEList[i] != 0) 398 TEFile<< TEList[i] << "\t";396 output << TEList[i] << "\t"; 399 397 } 400 398 //cout << endl; 401 TEFile<< endl;402 TEFile.close();399 output << endl; 400 output.close(); 403 401 cout << " done." << endl; 404 402 405 403 // open file for the force factors 406 404 sprintf(TEFilename, "%s/%s%s", PathBackup, prefix, "Forces-Factors.dat"); 407 ForcesFile.open(TEFilename, ios::out);405 output.open(TEFilename, ios::out); 408 406 //cout << Verbose(1) << "Final AtomicForcesList: "; 409 407 cout << Verbose(2) << "Saving " << prefix << " force factors ..."; 410 // ForcesFile<< prefix << "Forces" << endl;408 //output << prefix << "Forces" << endl; 411 409 for(int j=0;j<NumberOfMolecules;j++) { 412 410 //if (TEList[j] != 0) { … … 421 419 if ((Walker->GetTrueFather() != NULL) && (Walker->GetTrueFather() != Walker)) {// if there is a real father, prints its index 422 420 cerr << "Walker is " << *Walker << " with true father " << *( Walker->GetTrueFather()) << ", its number " << Walker->GetTrueFather()->nr << " and index " << SortIndex[Walker->GetTrueFather()->nr] << "." << endl; 423 ForcesFile<< SortIndex[Walker->GetTrueFather()->nr] << "\t";421 output << SortIndex[Walker->GetTrueFather()->nr] << "\t"; 424 422 } else // otherwise a -1 to indicate an added saturation hydrogen 425 ForcesFile<< "-1\t";423 output << "-1\t"; 426 424 } 427 425 } … … 429 427 } 430 428 //cout << endl << endl; 431 ForcesFile<< endl;432 } 433 ForcesFile.close();429 output << endl; 430 } 431 output.close(); 434 432 cout << " done." << endl; 435 433 436 434 // open KeySet file 437 435 sprintf(TEFilename, "%s/%s%s", PathBackup, prefix, "KeySets.dat"); 438 KeySetFile.open(TEFilename, ios::out);436 output.open(TEFilename, ios::out); 439 437 cout << Verbose(2) << "Saving " << prefix << " key sets of each subgraph ..."; 440 438 for(int j=0;j<NumberOfMolecules;j++) { … … 448 446 if ((Walker->GetTrueFather() != NULL)) // if there is a real father, prints its index 449 447 #endif 450 KeySetFile<< Walker->GetTrueFather()->nr << "\t";448 output << Walker->GetTrueFather()->nr << "\t"; 451 449 #ifdef ADDHYDROGEN 452 450 else // otherwise a -1 to indicate an added saturation hydrogen 453 KeySetFile<< "-1\t";451 output << "-1\t"; 454 452 #endif 455 453 } 456 454 //cout << endl << endl; 457 KeySetFile<< endl;458 } 459 KeySetFile.close();455 output << endl; 456 } 457 output.close(); 460 458 cout << " done." << endl; 461 459
Note:
See TracChangeset
for help on using the changeset viewer.