Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/molecule_graph.cpp

    r482373 r1f1b23  
    992992  Log() << Verbose(1) << "Saving adjacency list ... ";
    993993  if (AdjacencyFile != NULL) {
     994    AdjacencyFile << "m\tn" << endl;
    994995    ActOnAllAtoms(&atom::OutputAdjacency, &AdjacencyFile);
    995996    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 */
     1013bool 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();
    9961026    Log() << Verbose(1) << "done." << endl;
    9971027  } else {
Note: See TracChangeset for help on using the changeset viewer.