Changes in src/molecule_graph.cpp [482373:1f1b23]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/molecule_graph.cpp
r482373 r1f1b23 992 992 Log() << Verbose(1) << "Saving adjacency list ... "; 993 993 if (AdjacencyFile != NULL) { 994 AdjacencyFile << "m\tn" << endl; 994 995 ActOnAllAtoms(&atom::OutputAdjacency, &AdjacencyFile); 995 996 AdjacencyFile.close(); 997 Log() << Verbose(1) << "done." << endl; 998 } else { 999 Log() << Verbose(1) << "failed to open file " << line.str() << "." << endl; 1000 status = false; 1001 } 1002 1003 return status; 1004 } 1005 ; 1006 1007 /** Storing the bond structure of a molecule to file. 1008 * Simply stores Atom::nr and then the Atom::nr of all bond partners, one per line. 1009 * \param *out output stream for debugging 1010 * \param *path path to file 1011 * \return true - file written successfully, false - writing failed 1012 */ 1013 bool molecule::StoreBondsToFile(char *path) 1014 { 1015 ofstream BondFile; 1016 stringstream line; 1017 bool status = true; 1018 1019 line << path << "/" << FRAGMENTPREFIX << ADJACENCYFILE; 1020 BondFile.open(line.str().c_str(), ios::out); 1021 Log() << Verbose(1) << "Saving adjacency list ... "; 1022 if (BondFile != NULL) { 1023 BondFile << "m\tn" << endl; 1024 ActOnAllAtoms(&atom::OutputBonds, &BondFile); 1025 BondFile.close(); 996 1026 Log() << Verbose(1) << "done." << endl; 997 1027 } else {
Note:
See TracChangeset
for help on using the changeset viewer.