Ignore:
Timestamp:
Oct 7, 2009, 1:16:13 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
972706
Parents:
567b7f
Message:

in molecule::OutputTrajectoriesXYZ() ActOnAllAtoms used by new function atom::OutputTrajectoryXYZ().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/molecule.cpp

    r567b7f r0cd3b2  
    757757          ElementNo[i] = current++;
    758758      }
    759       ActOnAllAtoms( &atom::OutputTrajectory, out, ElementNo, AtomNo, step ); // (bool (atom::*)(int *, int *, ofstream *, const char *))
     759      ActOnAllAtoms( &atom::OutputTrajectory, out, ElementNo, AtomNo, step );
    760760    }
    761761    return true;
     
    799799bool molecule::OutputTrajectoriesXYZ(ofstream *out)
    800800{
    801   atom *walker = NULL;
    802801  int No = 0;
    803802  time_t now;
    804803
    805   now = time((time_t *)NULL);   // Get the system time and put it into 'now' as 'calender time'
    806   walker = start;
    807   while (walker->next != end) { // go through every atom and count
    808     walker = walker->next;
    809     No++;
    810   }
    811804  if (out != NULL) {
     805    now = time((time_t *)NULL);   // Get the system time and put it into 'now' as 'calender time'
    812806    for (int step=0;step<MDSteps;step++) {
    813       *out << No << "\n\tCreated by molecuilder, step " << step << ", on " << ctime(&now);
    814       walker = start;
    815       while (walker->next != end) { // go through every atom of this element
    816         walker = walker->next;
    817         *out << walker->type->symbol << "\t" << walker->Trajectory.R.at(step).x[0] << "\t" << walker->Trajectory.R.at(step).x[1] << "\t" << walker->Trajectory.R.at(step).x[2] << endl;
    818       }
     807      *out << AtomCount << "\n\tCreated by molecuilder, step " << step << ", on " << ctime(&now);
     808      ActOnAllAtoms( &atom::OutputTrajectoryXYZ, out, step );
    819809    }
    820810    return true;
Note: See TracChangeset for help on using the changeset viewer.