Ignore:
Timestamp:
Oct 7, 2009, 1:11:28 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
0cd3b2
Parents:
8ffe32
git-author:
Frederik Heber <heber@…> (10/07/09 12:14:15)
git-committer:
Frederik Heber <heber@…> (10/07/09 13:11:28)
Message:

In molecule::OutputTrajectories() ActOnAllAtoms() with new function atom::OutputTrajectory() is used.

For this to work, I had to change the Trajectory struct that was so far included in molecule.hpp to be incorporated directly into the class atom.
NOTE: This incorporation is incomplete and a ticket (#34) has been filed to remind of this issue.
However, the trajectory is better suited to reside in atom anyway and was probably just put in molecule due to memory prejudices against STL vector<>.
Functions in molecule.cpp, config.cpp, molecule_geometry.cpp and molecule_dynamics.cpp were adapted (changed from Trajectories[atom *] to atom *->Trajectory).
And the atom pointer in the Trajectory structure was removed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/molecule.hpp

    r8ffe32 r567b7f  
    6565{
    6666  bool operator() (const KeySet SubgraphA, const KeySet SubgraphB) const;
    67 };
    68 
    69 struct Trajectory
    70 {
    71   vector<Vector> R;  //!< position vector
    72   vector<Vector> U;  //!< velocity vector
    73   vector<Vector> F;  //!< last force vector
    74   atom *ptr;         //!< pointer to atom whose trajectory we contain
    7567};
    7668
     
    10193    bond *last;         //!< end of bond list
    10294    bond ***ListOfBondsPerAtom; //!< pointer list for each atom and each bond it has
    103     map<atom *, struct Trajectory> Trajectories; //!< contains old trajectory points
    10495    int MDSteps;        //!< The number of MD steps in Trajectories
    10596    int *NumberOfBondsPerAtom;  //!< Number of Bonds each atom has
Note: See TracChangeset for help on using the changeset viewer.