--- trunk/src/brains/SimInfo.hpp 2005/12/02 15:38:03 770 +++ trunk/src/brains/SimInfo.hpp 2006/05/17 21:51:42 963 @@ -75,13 +75,12 @@ namespace oopse{ class SelectionManager; /** * @class SimInfo SimInfo.hpp "brains/SimInfo.hpp" - * @brief As one of the heavy weight class of OOPSE, SimInfo - * One of the major changes in SimInfo class is the data struct. It only maintains a list of molecules. - * And the Molecule class will maintain all of the concrete objects (atoms, bond, bend, torsions, rigid bodies, - * cutoff groups, constrains). - * Another major change is the index. No matter single version or parallel version, atoms and - * rigid bodies have both global index and local index. Local index is not important to molecule as well as - * cutoff group. + * @brief One of the heavy weight classes of OOPSE, SimInfo maintains a list of molecules. + * The Molecule class maintains all of the concrete objects + * (atoms, bond, bend, torsions, rigid bodies, cutoff groups, constrains). + * In both the single and parallel versions, atoms and + * rigid bodies have both global and local indices. The local index is + * not relevant to molecules or cutoff groups. */ class SimInfo { public: @@ -207,7 +206,7 @@ namespace oopse{ /** Returns the number of degrees of freedom */ int getNdf() { - return ndf_; + return ndf_ - getFdf(); } /** Returns the number of raw degrees of freedom */ @@ -218,8 +217,15 @@ namespace oopse{ /** Returns the number of translational degrees of freedom */ int getNdfTrans() { return ndfTrans_; + } + + /** sets the current number of frozen degrees of freedom */ + void setFdf(int fdf) { + fdf_local = fdf; } + int getFdf(); + //getNZconstraint and setNZconstraint ruin the coherent of SimInfo class, need refactorying /** Returns the total number of z-constraint molecules in the system */ @@ -299,15 +305,15 @@ namespace oopse{ return i != molecules_.end() ? i->second : NULL; } - double getRcut() { + RealType getRcut() { return rcut_; } - double getRsw() { + RealType getRsw() { return rsw_; } - double getList() { + RealType getList() { return rlist_; } @@ -423,7 +429,7 @@ namespace oopse{ friend std::ostream& operator <<(std::ostream& o, SimInfo& info); - void getCutoff(double& rcut, double& rsw); + void getCutoff(RealType& rcut, RealType& rsw); private: @@ -463,6 +469,8 @@ namespace oopse{ //degress of freedom int ndf_; /**< number of degress of freedom (excludes constraints), ndf_ is local */ + int fdf_local; /**< number of frozen degrees of freedom */ + int fdf_; /**< number of frozen degrees of freedom */ int ndfRaw_; /**< number of degress of freedom (includes constraints), ndfRaw_ is local */ int ndfTrans_; /**< number of translation degress of freedom, ndfTrans_ is local */ int nZconstraint_; /** number of z-constraint molecules, nZconstraint_ is global */ @@ -520,9 +528,9 @@ namespace oopse{ std::string statFileName_; std::string restFileName_; - double rcut_; /**< cutoff radius*/ - double rsw_; /**< radius of switching function*/ - double rlist_; /**< neighbor list radius */ + RealType rcut_; /**< cutoff radius*/ + RealType rsw_; /**< radius of switching function*/ + RealType rlist_; /**< neighbor list radius */ bool fortranInitialized_; /**< flag indicate whether fortran side is initialized */