Changeset 0cd3b2 for molecuilder/src/molecule.cpp
- Timestamp:
- Oct 7, 2009, 1:16:13 PM (16 years ago)
- Children:
- 972706
- Parents:
- 567b7f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/molecule.cpp
r567b7f r0cd3b2 757 757 ElementNo[i] = current++; 758 758 } 759 ActOnAllAtoms( &atom::OutputTrajectory, out, ElementNo, AtomNo, step ); // (bool (atom::*)(int *, int *, ofstream *, const char *))759 ActOnAllAtoms( &atom::OutputTrajectory, out, ElementNo, AtomNo, step ); 760 760 } 761 761 return true; … … 799 799 bool molecule::OutputTrajectoriesXYZ(ofstream *out) 800 800 { 801 atom *walker = NULL;802 801 int No = 0; 803 802 time_t now; 804 803 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 count808 walker = walker->next;809 No++;810 }811 804 if (out != NULL) { 805 now = time((time_t *)NULL); // Get the system time and put it into 'now' as 'calender time' 812 806 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 ); 819 809 } 820 810 return true;
Note:
See TracChangeset
for help on using the changeset viewer.