ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-2.0/src/brains/SimInfo.hpp
(Generate patch)

Comparing branches/new_design/OOPSE-2.0/src/brains/SimInfo.hpp (file contents):
Revision 1725 by tim, Wed Nov 10 22:01:06 2004 UTC vs.
Revision 1726 by tim, Wed Nov 10 22:50:03 2004 UTC

# Line 51 | Line 51 | class SimInfo {
51   */
52   class SimInfo {
53      public:
54 <        typedef std::vector<Molecule*>::iterator MoleculeIterator;
54 >        typedef MoleculeIterator MoleculeIterator;
55          SimInfo();
56          virtual ~SimInfo();
57  
# Line 160 | Line 160 | class SimInfo {
160           * @return the first molecule, return NULL if there is not molecule in this SimInfo
161           * @param i the iterator of molecule array (user shouldn't change it)
162           */
163 <        Molecule* beginMolecule(std::vector<Molecule*>::iterator& i);
163 >        Molecule* beginMolecule(MoleculeIterator& i);
164  
165          /**
166            * Returns the next avaliable Molecule based on the iterator.
167            * @return the next avaliable molecule, return NULL if reaching the end of the array
168            * @param i the iterator of molecule array
169            */
170 <        Molecule* nextMolecule(std::vector<Molecule*>::iterator& i);
170 >        Molecule* nextMolecule(MoleculeIterator& i);
171  
172          /** Returns the number of degrees of freedom */
173          int getNdf() {
# Line 270 | Line 270 | class SimInfo {
270           */
271          Molecule* getMoleculeByGlobalIndex(int index) {
272              std::map<int, Molecule*> i;
273 <            i = globalIndexToMol_.find(index);
273 >            i = molecules_.find(index);
274  
275 <            return i != globalIndexToMol_.end() ? i->second : NULL;
275 >            return i != molecules_.end() ? i->second : NULL;
276          }
277  
278
278          friend std::ostream& operator <<(ostream& o, SimInfo& info);
279          
280      private:
# Line 310 | Line 309 | class SimInfo {
309          Exclude exclude_;
310          ForceField* forceField_;
311          
312 <        std::vector<Molecule*> molecules_; /**< Molecule array */
312 >       std::map<int, Molecule*>  molecules_; /**< Molecule array */
313          PropertyMap properties_;                  /**< Generic Property */
314          SnapshotManager* sman_;               /**< SnapshotManager */
315  
# Line 322 | Line 321 | class SimInfo {
321  
322          //
323          std::vector<int> molToProcMap_;
325        std::map<int, Molecule*> globalIndexToMol_;
324          std::vector<int> molStampIds_;                                /**< stamp id array of all molecules in the system */
325          std::vector<MoleculeStamp*> moleculeStamps_; /**< molecule stamps array */      
326  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines