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

Comparing branches/development/src/brains/SimInfo.hpp (file contents):
Revision 1528 by gezelter, Fri Dec 17 20:11:05 2010 UTC vs.
Revision 1549 by gezelter, Wed Apr 27 18:38:15 2011 UTC

# Line 62 | Line 62
62   #include "UseTheForce/ForceField.hpp"
63   #include "utils/PropertyMap.hpp"
64   #include "utils/LocalIndexManager.hpp"
65 + #include "nonbonded/SwitchingFunction.hpp"
66  
67   //another nonsense macro declaration
68   #define __OPENMD_C
# Line 69 | Line 70 | namespace OpenMD{
70  
71   using namespace std;
72   namespace OpenMD{
72
73  enum CutoffMethod {
74    HARD,
75    SWITCHING_FUNCTION,
76    SHIFTED_POTENTIAL,
77    SHIFTED_FORCE
78  };
79
73    //forward decalration
74    class SnapshotManager;
75    class Molecule;
# Line 306 | Line 299 | namespace OpenMD{
299      /** Overloaded version of gyrational volume that also returns
300          det(I) so dV/dr can be calculated*/
301      void getGyrationalVolume(RealType &vol, RealType &detI);
302 <    /** main driver function to interact with fortran during the
310 <        initialization and molecule migration */
302 >
303      void update();
304 +    /**
305 +     * Setup Fortran Simulation
306 +     */
307 +    void setupFortran();
308  
309 +
310      /** Returns the local index manager */
311      LocalIndexManager* getLocalIndexManager() {
312        return &localIndexMan_;
# Line 345 | Line 342 | namespace OpenMD{
342        return globalMolMembership_[id];
343      }
344  
345 <    RealType getCutoffRadius() {
346 <      return cutoffRadius_;
347 <    }
348 <
349 <    RealType getSwitchingRadius() {
350 <      return switchingRadius_;
354 <    }
345 >    /**
346 >     * returns a vector which maps the local atom index on this
347 >     * processor to the global atom index.  With only one processor,
348 >     * these should be identical.
349 >     */
350 >    vector<int> getGlobalAtomIndices();
351  
352 <    RealType getListRadius() {
353 <      return listRadius_;
354 <    }
352 >    /**
353 >     * returns a vector which maps the local cutoff group index on
354 >     * this processor to the global cutoff group index.  With only one
355 >     * processor, these should be identical.
356 >     */
357 >    vector<int> getGlobalGroupIndices();
358          
359      string getFinalConfigFileName() {
360        return finalConfigFileName_;
# Line 476 | Line 475 | namespace OpenMD{
475       */
476      void removeInteractionPairs(Molecule* mol);
477  
479
480    /** Returns the unique atom types of local processor in an array */
481    set<AtomType*> getUniqueAtomTypes();
482
478      /** Returns the set of atom types present in this simulation */
479      set<AtomType*> getSimulatedAtomTypes();
480          
# Line 489 | Line 484 | namespace OpenMD{
484          
485    private:
486  
487 <    /** fill up the simtype struct*/
488 <    void setupSimType();
494 <
495 <    /**
496 <     * Setup Fortran Simulation
497 <     * @see #setupFortranParallel
498 <     */
499 <    void setupFortranSim();
487 >    /** fill up the simtype struct and other simulation-related variables */
488 >    void setupSimVariables();
489  
501    /** Figure out the cutoff radius */
502    void setupCutoffRadius();
503    /** Figure out the cutoff method */
504    void setupCutoffMethod();
505    /** Figure out the switching radius */
506    void setupSwitchingRadius();
507    /** Figure out the neighbor list skin thickness */
508    void setupSkinThickness();
509    /** Figure out which polynomial type to use for the switching function */
510    void setupSwitchingFunction();
490  
491      /** Determine if we need to accumulate the simulation box dipole */
492      void setupAccumulateBoxDipole();
# Line 563 | Line 542 | namespace OpenMD{
542      bool requiresSkipCorrection_; /**< does this simulation require a skip-correction? */
543      bool requiresSelfCorrection_; /**< does this simulation require a self-correction? */
544  
545 +  public:
546 +    bool usesElectrostaticAtoms() { return usesElectrostaticAtoms_; }
547 +    bool usesDirectionalAtoms() { return usesDirectionalAtoms_; }
548 +    bool usesMetallicAtoms() { return usesMetallicAtoms_; }
549 +    bool usesAtomicVirial() { return usesAtomicVirial_; }
550 +    bool requiresPrepair() { return requiresPrepair_; }
551 +    bool requiresSkipCorrection() { return requiresSkipCorrection_;}
552 +    bool requiresSelfCorrection() { return requiresSelfCorrection_;}
553 +
554 +  private:
555      /// Data structures holding primary simulation objects
556      map<int, Molecule*>  molecules_;  /**< map holding pointers to LOCAL molecules */
557      simtype fInfo_;                   /**< A dual struct shared by C++
# Line 570 | Line 559 | namespace OpenMD{
559                                           information about what types
560                                           of calculation are
561                                           required */
562 <    
562 >
563      /// Stamps are templates for objects that are then used to create
564      /// groups of objects.  For example, a molecule stamp contains
565      /// information on how to build that molecule (i.e. the topology,
# Line 586 | Line 575 | namespace OpenMD{
575       * the simulation.  It should be nGlobalAtoms_ in size.
576       */
577      vector<int> globalGroupMembership_;
578 +  public:
579 +    vector<int> getGlobalGroupMembership() { return globalGroupMembership_; }
580 +  private:
581  
582      /**
583       * A vector that maps between the global index of an atom and the
# Line 593 | Line 585 | namespace OpenMD{
585       * by SimCreator once and only once, since it is never changed
586       * during the simulation. It shoudl be nGlobalAtoms_ in size.
587       */
588 <    vector<int> globalMolMembership_;        
588 >    vector<int> globalMolMembership_;
589 >
590 >    /**
591 >     * A vector that maps between the local index of an atom and the
592 >     * index of the AtomType.
593 >     */
594 >    vector<int> identArray_;
595 >  public:
596 >    vector<int> getIdentArray() { return identArray_; }
597 >  private:
598                
599      /// lists to handle atoms needing special treatment in the non-bonded interactions
600      PairList excludedInteractions_;  /**< atoms excluded from interacting with each other */
# Line 623 | Line 624 | namespace OpenMD{
624      string statFileName_;
625      string restFileName_;
626          
626    RealType cutoffRadius_;         /**< cutoff radius for non-bonded interactions */
627    RealType switchingRadius_;      /**< inner radius of switching function */
628    RealType listRadius_;           /**< Verlet neighbor list radius */
629    RealType skinThickness_;        /**< Verlet neighbor list skin thickness */    
630    CutoffMethod cutoffMethod_;     /**< Cutoff Method for most non-bonded interactions */
627  
628      bool fortranInitialized_; /** flag to indicate whether the fortran side is initialized */
629      
# Line 670 | Line 666 | namespace OpenMD{
666      }
667          
668    private:
673
674    void setupFortranParallel();
669          
670      /**
671       * The size of molToProcMap_ is equal to total number of molecules

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines