| 73 | 
  | 
  class SnapshotManager; | 
| 74 | 
  | 
  class Molecule; | 
| 75 | 
  | 
  class SelectionManager; | 
| 76 | 
+ | 
  class StuntDouble; | 
| 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; | 
| 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_; | 
| 276 | 
  | 
    /** Returns system angular momentum */ | 
| 277 | 
  | 
    Vector3d getAngularMomentum(); | 
| 278 | 
  | 
 | 
| 279 | 
+ | 
    /** Returns volume of system as estimated by an ellipsoid defined by the radii of gyration*/ | 
| 280 | 
+ | 
    void getGyrationalVolume(RealType &vol); | 
| 281 | 
+ | 
    /** Overloaded version of gyrational volume that also returns det(I) so dV/dr can be calculated*/ | 
| 282 | 
+ | 
    void getGyrationalVolume(RealType &vol, RealType &detI); | 
| 283 | 
  | 
    /** main driver function to interact with fortran during the initialization and molecule migration */ | 
| 284 | 
  | 
    void update(); | 
| 285 | 
  | 
 | 
| 329 | 
  | 
    std::string getFinalConfigFileName() { | 
| 330 | 
  | 
      return finalConfigFileName_; | 
| 331 | 
  | 
    } | 
| 332 | 
< | 
         | 
| 332 | 
> | 
 | 
| 333 | 
  | 
    void setFinalConfigFileName(const std::string& fileName) { | 
| 334 | 
  | 
      finalConfigFileName_ = fileName; | 
| 335 | 
  | 
    } | 
| 336 | 
  | 
 | 
| 337 | 
+ | 
    std::string getRawMetaData() { | 
| 338 | 
+ | 
      return rawMetaData_; | 
| 339 | 
+ | 
    } | 
| 340 | 
+ | 
    void setRawMetaData(const std::string& rawMetaData) { | 
| 341 | 
+ | 
      rawMetaData_ = rawMetaData; | 
| 342 | 
+ | 
    } | 
| 343 | 
+ | 
         | 
| 344 | 
  | 
    std::string getDumpFileName() { | 
| 345 | 
  | 
      return dumpFileName_; | 
| 346 | 
  | 
    } | 
| 388 | 
  | 
      return fortranInitialized_; | 
| 389 | 
  | 
    } | 
| 390 | 
  | 
         | 
| 391 | 
+ | 
    bool getCalcBoxDipole() { | 
| 392 | 
+ | 
      return calcBoxDipole_; | 
| 393 | 
+ | 
    } | 
| 394 | 
+ | 
 | 
| 395 | 
+ | 
    bool getUseAtomicVirial() { | 
| 396 | 
+ | 
      return useAtomicVirial_; | 
| 397 | 
+ | 
    } | 
| 398 | 
+ | 
 | 
| 399 | 
  | 
    //below functions are just forward functions | 
| 400 | 
  | 
    //To compose or to inherit is always a hot debate. In general, is-a relation need subclassing, in the | 
| 401 | 
  | 
    //the other hand, has-a relation need composing. | 
| 475 | 
  | 
    /** Figure out which polynomial type to use for the switching function */ | 
| 476 | 
  | 
    void setupSwitchingFunction(); | 
| 477 | 
  | 
 | 
| 478 | 
+ | 
    /** Determine if we need to accumulate the simulation box dipole */ | 
| 479 | 
+ | 
    void setupAccumulateBoxDipole(); | 
| 480 | 
+ | 
 | 
| 481 | 
  | 
    /** Calculates the number of degress of freedom in the whole system */ | 
| 482 | 
  | 
    void calcNdf(); | 
| 483 | 
  | 
    void calcNdfRaw(); | 
| 527 | 
  | 
    std::vector<MoleculeStamp*> moleculeStamps_;      /**< molecule stamps array */         | 
| 528 | 
  | 
         | 
| 529 | 
  | 
    //number of local objects | 
| 530 | 
< | 
    int nAtoms_;                        /**< number of atoms in local processor */ | 
| 531 | 
< | 
    int nBonds_;                        /**< number of bonds in local processor */ | 
| 532 | 
< | 
    int nBends_;                        /**< number of bends in local processor */ | 
| 533 | 
< | 
    int nTorsions_;                    /**< number of torsions in local processor */ | 
| 534 | 
< | 
    int nRigidBodies_;              /**< number of rigid bodies in local processor */ | 
| 535 | 
< | 
    int nIntegrableObjects_;    /**< number of integrable objects in local processor */ | 
| 536 | 
< | 
    int nCutoffGroups_;             /**< number of cutoff groups in local processor */ | 
| 537 | 
< | 
    int nConstraints_;              /**< number of constraints in local processors */ | 
| 530 | 
> | 
    int nAtoms_;              /**< number of atoms in local processor */ | 
| 531 | 
> | 
    int nBonds_;              /**< number of bonds in local processor */ | 
| 532 | 
> | 
    int nBends_;              /**< number of bends in local processor */ | 
| 533 | 
> | 
    int nTorsions_;           /**< number of torsions in local processor */ | 
| 534 | 
> | 
    int nInversions_;         /**< number of inversions 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 */ | 
| 539 | 
  | 
 | 
| 540 | 
  | 
    simtype fInfo_; /**< A dual struct shared by c++/fortran which indicates the atom types in simulation*/ | 
| 541 | 
  | 
    Exclude exclude_;       | 
| 550 | 
  | 
     */         | 
| 551 | 
  | 
    LocalIndexManager localIndexMan_; | 
| 552 | 
  | 
 | 
| 553 | 
+ | 
    // unparsed MetaData block for storing in Dump and EOR files: | 
| 554 | 
+ | 
    std::string rawMetaData_; | 
| 555 | 
+ | 
 | 
| 556 | 
  | 
    //file names | 
| 557 | 
  | 
    std::string finalConfigFileName_; | 
| 558 | 
  | 
    std::string dumpFileName_; | 
| 563 | 
  | 
    RealType rsw_;        /**< radius of switching function*/ | 
| 564 | 
  | 
    RealType rlist_;      /**< neighbor list radius */ | 
| 565 | 
  | 
 | 
| 566 | 
< | 
    bool fortranInitialized_; /**< flag indicate whether fortran side is initialized */ | 
| 566 | 
> | 
    bool ljsp_; /**< use shifted potential for LJ*/ | 
| 567 | 
> | 
    bool ljsf_; /**< use shifted force for LJ*/ | 
| 568 | 
  | 
 | 
| 569 | 
< | 
#ifdef IS_MPI | 
| 569 | 
> | 
    bool fortranInitialized_; /**< flag indicate whether fortran side  | 
| 570 | 
> | 
                                 is initialized */ | 
| 571 | 
> | 
     | 
| 572 | 
> | 
    bool calcBoxDipole_; /**< flag to indicate whether or not we calculate  | 
| 573 | 
> | 
                            the simulation box dipole moment */ | 
| 574 | 
> | 
     | 
| 575 | 
> | 
    bool useAtomicVirial_; /**< flag to indicate whether or not we use  | 
| 576 | 
> | 
                              Atomic Virials to calculate the pressure */ | 
| 577 | 
> | 
 | 
| 578 | 
> | 
    public: | 
| 579 | 
> | 
     /** | 
| 580 | 
> | 
      * return an integral objects by its global index. In MPI version, if the StuntDouble with specified | 
| 581 | 
> | 
      * global index does not belong to local processor, a NULL will be return. | 
| 582 | 
> | 
      */ | 
| 583 | 
> | 
      StuntDouble* getIOIndexToIntegrableObject(int index); | 
| 584 | 
> | 
      void setIOIndexToIntegrableObject(const std::vector<StuntDouble*>& v); | 
| 585 | 
> | 
    private: | 
| 586 | 
> | 
      std::vector<StuntDouble*> IOIndexToIntegrableObject; | 
| 587 | 
> | 
  //public: | 
| 588 | 
> | 
    //void setStuntDoubleFromGlobalIndex(std::vector<StuntDouble*> v); | 
| 589 | 
> | 
    /** | 
| 590 | 
> | 
     * return a StuntDouble by its global index. In MPI version, if the StuntDouble with specified | 
| 591 | 
> | 
     * global index does not belong to local processor, a NULL will be return. | 
| 592 | 
> | 
     */ | 
| 593 | 
> | 
    //StuntDouble* getStuntDoubleFromGlobalIndex(int index); | 
| 594 | 
> | 
  //private: | 
| 595 | 
> | 
    //std::vector<StuntDouble*> sdByGlobalIndex_; | 
| 596 | 
> | 
     | 
| 597 | 
  | 
    //in Parallel version, we need MolToProc | 
| 598 | 
  | 
  public: | 
| 599 | 
  | 
                 | 
| 620 | 
  | 
    void setupFortranParallel(); | 
| 621 | 
  | 
         | 
| 622 | 
  | 
    /**  | 
| 623 | 
< | 
     * The size of molToProcMap_ is equal to total number of molecules in the system. | 
| 624 | 
< | 
     *  It maps a molecule to the processor on which it resides. it is filled by SimCreator once and only | 
| 625 | 
< | 
     * once. | 
| 623 | 
> | 
     * The size of molToProcMap_ is equal to total number of molecules | 
| 624 | 
> | 
     * in the system.  It maps a molecule to the processor on which it | 
| 625 | 
> | 
     * resides. it is filled by SimCreator once and only once. | 
| 626 | 
  | 
     */         | 
| 627 | 
  | 
    std::vector<int> molToProcMap_;  | 
| 628 | 
  | 
 | 
| 570 | 
– | 
#endif | 
| 629 | 
  | 
 | 
| 630 | 
  | 
  }; | 
| 631 | 
  | 
 |