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

Comparing branches/new_design/OOPSE-2.0/src/brains/SimModel.hpp (file contents):
Revision 1695, Thu Oct 28 22:34:02 2004 UTC vs.
Revision 1696 by tim, Tue Nov 2 15:23:46 2004 UTC

# Line 22 | Line 22
22   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23   *
24   */
25
26 /**
27  * @file SimModel.hpp
28  * @author tlin
29  * @date 10/24/2004
30  * @time 22:17am
31  * @version 1.0
32  */
25  
26 + /**
27 + * @file SimModel.hpp
28 + * @author    tlin
29 + * @date  11/02/2004
30 + * @version 1.0
31 + */
32 +
33   #ifndef BRAINS_SIMMODEL_HPP
34   #define BRAINS_SIMMODEL_HPP
35 + #include <vector>
36 + #include <iostream>
37  
38 < namespace oopse {
38 > #include "primitives/Molecule.hpp"
39 > #include "utils/PropertyMap.hpp"
40  
41 + namespace oopse{
42 +
43 + /**
44 + * @class SimModel SimModel.hpp "brains/SimModel.hpp"
45 + * @brief
46 + */
47   class SimModel {
48      public:
49 +        SimModel();
50 +        virtual ~SimModel();
51  
52 +        /**
53 +         * Adds a molecule
54 +         * @return return true if adding successfully, return false if the molecule is already in SimModel
55 +         * @param mol molecule to be added
56 +         */
57 +        bool addMolecule(Molecule* mol);
58 +
59 +        /**
60 +         * Removes a molecule from SimModel
61 +         * @return true if removing successfully, return false if molecule is not in this SimModel
62 +         */
63 +        bool removeMolecule(Molecule* mol);
64 +
65 +        /**
66 +         * Returns the number of molecules.
67 +         * @return the number of molecules in this SimModel
68 +         */
69 +        int getNMolecules() {
70 +            return molecules_.size();
71 +        }
72 +
73 +        /** Returns the total number of atoms in this SimModel */
74 +        unsigned int getNAtoms() {
75 +            return nAtom_;
76 +        }
77 +
78 +        /** Returns the total number of bonds in this SimModel */        
79 +        unsigned int getNBonds(){
80 +            return nBond_;
81 +        }
82 +
83 +        /** Returns the total number of bends in this SimModel */        
84 +        unsigned int getNBends() {
85 +            return nBend_;
86 +        }
87 +
88 +        /** Returns the total number of torsions in this SimModel */        
89 +        unsigned int getNTorsions() {
90 +            return nTorsion_;
91 +        }
92 +
93 +        /** Returns the total number of rigid bodies in this SimModel */        
94 +        unsigned int getNRigidBodies() {
95 +            return nRigidBodies_;
96 +        }
97 +
98 +        /** Returns the total number of integrable objects in this SimModel */
99 +        unsigned int getNIntegrableObjects() {
100 +            return nIntegrableObjects_;
101 +        }
102 +
103 +        /** Returns the total number of cutoff groups in this SimModel */
104 +        unsigned int getNCutoffGroups() {
105 +            return nCutoffGroups_;
106 +        }
107 +
108 +        /** Returns the total number of constraints in this SimModel */
109 +        unsigned int getNConstraints() {
110 +            return nConstraints_;
111 +        }
112 +        
113 +        /**
114 +         * Returns the first molecule in this SimModel and intialize the iterator.
115 +         * @return the first molecule, return NULL if there is not molecule in this SimModel
116 +         * @param i the iterator of molecule array (user shouldn't change it)
117 +         */
118 +        Molecule* beginMolecule(std::vector<Molecule*>::iterator& i);
119 +
120 +        /**
121 +          * Returns the next avaliable Molecule based on the iterator.
122 +          * @return the next avaliable molecule, return NULL if reaching the end of the array
123 +          * @param i the iterator of molecule array
124 +          */
125 +        Molecule* nextMolecule(std::vector<Molecule*>::iterator& i);
126 +
127 +        /** Returns the number of degrees of freedom */
128 +        int getNDF();
129 +
130 +        /** Returns the number of raw degrees of freedom */
131 +        int getNDFRaw();
132 +
133 +        /** Returns the number of translational degrees of freedom */
134 +        int getNDFtranslational();
135 +
136 +        /** Returns the snapshot manager. */
137 +        SnapshotManager* getSnapshotManager() {
138 +            return sman_;
139 +        }
140 +
141 +        /** Sets the snapshot manager. */
142 +        void setSnapshotManager(SnapshotManager* sman) {
143 +            sman_ = sman;
144 +        }
145 +        
146      private:
147 <        PropertyMap properties_;
148 <        SnapshotManager* snapshotMan_;
149 <        vector<Molecule*> molecules_;
150 < };
147 >        
148 >        int nAtom_;
149 >        int nBond_;
150 >        int nBend_;
151 >        int nTorsion_;
152 >        int nRigidBody_;
153 >        int nCutoffGroup_;
154 >        int nConstraints_;
155  
156 +        std::vector<Molecule*> molecules_; /**< Molecule array */
157 +        PropertyMap properties_;                  /** Generic Property */
158 +        SnapshotManager* sman_;               /** SnapshotManager */
159  
160 + };
161 +
162   } //namespace oopse
163   #endif //BRAINS_SIMMODEL_HPP
51  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines