Changes in / [b48ba6:c7b1e7]


Ignore:
Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/molecule.hpp

    rb48ba6 rc7b1e7  
    268268  int FragmentMolecule(int Order, config *configuration);
    269269  bool CheckOrderAtSite(bool *AtomMask, Graph *GlobalKeySetList, int Order, int *MinimumRingSize, char *path = NULL);
    270   bool StoreBondsToFile(char *path);
    271   bool StoreAdjacencyToFile(char *path);
     270  bool StoreBondsToFile(char *path, char *filename);
     271  bool StoreAdjacencyToFile(char *path, char *filename);
    272272  bool CheckAdjacencyFileAgainstMolecule(char *path, atom **ListOfAtoms);
    273273  bool ParseOrderAtSiteFromFile(char *path);
  • src/molecule_fragmentation.cpp

    rb48ba6 rc7b1e7  
    704704
    705705    // store Adjacency file
    706     StoreAdjacencyToFile(configuration->configpath);
     706    char *filename = Malloc<char> (MAXSTRINGSIZE, "molecule::FragmentMolecule - *filename");
     707    strcpy(filename, FRAGMENTPREFIX);
     708    strcat(filename, ADJACENCYFILE);
     709    StoreAdjacencyToFile(configuration->configpath, filename);
     710    Free(&filename);
    707711
    708712    // store Hydrogen saturation correction file
  • src/molecule_graph.cpp

    rb48ba6 rc7b1e7  
    982982/** Storing the bond structure of a molecule to file.
    983983 * Simply stores Atom::nr and then the Atom::nr of all bond partners per line.
    984  * \param *out output stream for debugging
    985984 * \param *path path to file
     985 * \param *filename name of file
    986986 * \return true - file written successfully, false - writing failed
    987987 */
    988 bool molecule::StoreAdjacencyToFile(char *path)
     988bool molecule::StoreAdjacencyToFile(char *path, char *filename)
    989989{
    990990  ofstream AdjacencyFile;
     
    992992  bool status = true;
    993993
    994   line << path << "/" << FRAGMENTPREFIX << ADJACENCYFILE;
     994  if (path != NULL)
     995    line << path << "/" << filename;
     996  else
     997    line << filename;
    995998  AdjacencyFile.open(line.str().c_str(), ios::out);
    996999  Log() << Verbose(1) << "Saving adjacency list ... ";
     
    10111014/** Storing the bond structure of a molecule to file.
    10121015 * Simply stores Atom::nr and then the Atom::nr of all bond partners, one per line.
    1013  * \param *out output stream for debugging
    10141016 * \param *path path to file
     1017 * \param *filename name of file
    10151018 * \return true - file written successfully, false - writing failed
    10161019 */
    1017 bool molecule::StoreBondsToFile(char *path)
     1020bool molecule::StoreBondsToFile(char *path, char *filename)
    10181021{
    10191022  ofstream BondFile;
     
    10211024  bool status = true;
    10221025
    1023   line << path << "/" << FRAGMENTPREFIX << ADJACENCYFILE;
     1026  if (path != NULL)
     1027    line << path << "/" << filename;
     1028  else
     1029    line << filename;
    10241030  BondFile.open(line.str().c_str(), ios::out);
    10251031  Log() << Verbose(1) << "Saving adjacency list ... ";
Note: See TracChangeset for help on using the changeset viewer.