ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/brains/SimInfo.hpp
(Generate patch)

Comparing trunk/src/brains/SimInfo.hpp (file contents):
Revision 1129 by chrisfen, Fri Apr 20 18:15:48 2007 UTC vs.
Revision 1287 by gezelter, Wed Sep 10 18:11:32 2008 UTC

# Line 54 | Line 54
54   #include <utility>
55   #include <vector>
56  
57 < #include "brains/Exclude.hpp"
57 > #include "brains/PairList.hpp"
58   #include "io/Globals.hpp"
59   #include "math/Vector3.hpp"
60   #include "math/SquareMatrix3.hpp"
# Line 77 | Line 77 | namespace oopse{
77    /**
78     * @class SimInfo SimInfo.hpp "brains/SimInfo.hpp"
79     * @brief One of the heavy weight classes of OOPSE, SimInfo maintains a list of molecules.
80 <   * The Molecule class maintains all of the concrete objects
81 <   * (atoms, bond, bend, torsions, rigid bodies, cutoff groups, constrains).
82 <   * In both the  single and parallel versions,  atoms and
83 <   * rigid bodies have both global and local indices.  The local index is
84 <   * not relevant to molecules or cutoff groups.
85 <   */
80 >    * The Molecule class maintains all of the concrete objects
81 >    * (atoms, bond, bend, torsions, inversions, rigid bodies, cutoff groups,
82 >    * constraints). In both the single and parallel versions, atoms and
83 >    * rigid bodies have both global and local indices.  The local index is
84 >    * not relevant to molecules or cutoff groups.
85 >    */
86    class SimInfo {
87    public:
88      typedef std::map<int, Molecule*>::iterator  MoleculeIterator;
# Line 171 | Line 171 | namespace oopse{
171        return nTorsions_;
172      }
173  
174 +    /** Returns the number of local torsions */        
175 +    unsigned int getNInversions() {
176 +      return nInversions_;
177 +    }
178      /** Returns the number of local rigid bodies */        
179      unsigned int getNRigidBodies() {
180        return nRigidBodies_;
# Line 366 | Line 370 | namespace oopse{
370       * @see #SimCreator::setGlobalIndex
371       */  
372      void setGlobalGroupMembership(const std::vector<int>& globalGroupMembership) {
373 <      assert(globalGroupMembership.size() == nGlobalAtoms_);
373 >      assert(globalGroupMembership.size() == static_cast<size_t>(nGlobalAtoms_));
374        globalGroupMembership_ = globalGroupMembership;
375      }
376  
# Line 375 | Line 379 | namespace oopse{
379       * @see #SimCreator::setGlobalIndex
380       */        
381      void setGlobalMolMembership(const std::vector<int>& globalMolMembership) {
382 <      assert(globalMolMembership.size() == nGlobalAtoms_);
382 >      assert(globalMolMembership.size() == static_cast<size_t>(nGlobalAtoms_));
383        globalMolMembership_ = globalMolMembership;
384      }
385  
# Line 433 | Line 437 | namespace oopse{
437      GenericData* getPropertyByName(const std::string& propName);
438  
439      /**
440 <     * add all exclude pairs of a molecule into exclude list.
440 >     * add all special interaction pairs (including excluded
441 >     * interactions) in a molecule into the appropriate lists.
442       */
443 <    void addExcludePairs(Molecule* mol);
443 >    void addInteractionPairs(Molecule* mol);
444  
445      /**
446 <     * remove all exclude pairs which belong to a molecule from exclude list
446 >     * remove all special interaction pairs which belong to a molecule
447 >     * from the appropriate lists.
448       */
449 +    void removeInteractionPairs(Molecule* mol);
450  
444    void removeExcludePairs(Molecule* mol);
451  
446
452      /** Returns the unique atom types of local processor in an array */
453      std::set<AtomType*> getUniqueAtomTypes();
454          
# Line 523 | Line 528 | namespace oopse{
528      std::vector<MoleculeStamp*> moleculeStamps_;      /**< molecule stamps array */        
529          
530      //number of local objects
531 <    int nAtoms_;                        /**< number of atoms in local processor */
532 <    int nBonds_;                        /**< number of bonds in local processor */
533 <    int nBends_;                        /**< number of bends in local processor */
534 <    int nTorsions_;                    /**< number of torsions in local processor */
535 <    int nRigidBodies_;              /**< number of rigid bodies in local processor */
536 <    int nIntegrableObjects_;    /**< number of integrable objects in local processor */
537 <    int nCutoffGroups_;             /**< number of cutoff groups in local processor */
538 <    int nConstraints_;              /**< number of constraints in local processors */
531 >    int nAtoms_;              /**< number of atoms in local processor */
532 >    int nBonds_;              /**< number of bonds in local processor */
533 >    int nBends_;              /**< number of bends in local processor */
534 >    int nTorsions_;           /**< number of torsions in local processor */
535 >    int nInversions_;         /**< number of inversions in local processor */
536 >    int nRigidBodies_;        /**< number of rigid bodies in local processor */
537 >    int nIntegrableObjects_;  /**< number of integrable objects in local processor */
538 >    int nCutoffGroups_;       /**< number of cutoff groups in local processor */
539 >    int nConstraints_;        /**< number of constraints in local processors */
540  
541      simtype fInfo_; /**< A dual struct shared by c++/fortran which indicates the atom types in simulation*/
542 <    Exclude exclude_;      
542 >    PairList excludedInteractions_;      
543 >    PairList oneTwoInteractions_;      
544 >    PairList oneThreeInteractions_;      
545 >    PairList oneFourInteractions_;      
546      PropertyMap properties_;                  /**< Generic Property */
547      SnapshotManager* sman_;               /**< SnapshotManager */
548  
# Line 589 | Line 598 | namespace oopse{
598    //private:
599      //std::vector<StuntDouble*> sdByGlobalIndex_;
600      
592 #ifdef IS_MPI
601      //in Parallel version, we need MolToProc
602    public:
603                  
# Line 610 | Line 618 | namespace oopse{
618      void setMolToProcMap(const std::vector<int>& molToProcMap) {
619        molToProcMap_ = molToProcMap;
620      }
613
614    
621          
622    private:
623  
624      void setupFortranParallel();
625          
626      /**
627 <     * The size of molToProcMap_ is equal to total number of molecules in the system.
628 <     *  It maps a molecule to the processor on which it resides. it is filled by SimCreator once and only
629 <     * once.
627 >     * The size of molToProcMap_ is equal to total number of molecules
628 >     * in the system.  It maps a molecule to the processor on which it
629 >     * resides. it is filled by SimCreator once and only once.
630       */        
631      std::vector<int> molToProcMap_;
632  
627 #endif
633  
634    };
635  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines