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 1553 by gezelter, Fri Apr 29 17:25:12 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  
66 //another nonsense macro declaration
67 #define __OPENMD_C
68 #include "brains/fSimulation.h"
69
67   using namespace std;
68   namespace OpenMD{
69 <
73 <  enum CutoffMethod {
74 <    HARD,
75 <    SWITCHING_FUNCTION,
76 <    SHIFTED_POTENTIAL,
77 <    SHIFTED_FORCE
78 <  };
79 <
80 <  //forward decalration
69 >  //forward declaration
70    class SnapshotManager;
71    class Molecule;
72    class SelectionManager;
# Line 306 | Line 295 | namespace OpenMD{
295      /** Overloaded version of gyrational volume that also returns
296          det(I) so dV/dr can be calculated*/
297      void getGyrationalVolume(RealType &vol, RealType &detI);
298 <    /** main driver function to interact with fortran during the
310 <        initialization and molecule migration */
298 >
299      void update();
300 +    /**
301 +     * Setup Fortran Simulation
302 +     */
303 +    void setupFortran();
304  
305 +
306      /** Returns the local index manager */
307      LocalIndexManager* getLocalIndexManager() {
308        return &localIndexMan_;
# Line 345 | Line 338 | namespace OpenMD{
338        return globalMolMembership_[id];
339      }
340  
341 <    RealType getCutoffRadius() {
342 <      return cutoffRadius_;
343 <    }
341 >    /**
342 >     * returns a vector which maps the local atom index on this
343 >     * processor to the global atom index.  With only one processor,
344 >     * these should be identical.
345 >     */
346 >    vector<int> getGlobalAtomIndices();
347  
348 <    RealType getSwitchingRadius() {
349 <      return switchingRadius_;
350 <    }
351 <
352 <    RealType getListRadius() {
353 <      return listRadius_;
358 <    }
348 >    /**
349 >     * returns a vector which maps the local cutoff group index on
350 >     * this processor to the global cutoff group index.  With only one
351 >     * processor, these should be identical.
352 >     */
353 >    vector<int> getGlobalGroupIndices();
354          
355      string getFinalConfigFileName() {
356        return finalConfigFileName_;
# Line 476 | Line 471 | namespace OpenMD{
471       */
472      void removeInteractionPairs(Molecule* mol);
473  
479
480    /** Returns the unique atom types of local processor in an array */
481    set<AtomType*> getUniqueAtomTypes();
482
474      /** Returns the set of atom types present in this simulation */
475      set<AtomType*> getSimulatedAtomTypes();
476          
# Line 489 | Line 480 | namespace OpenMD{
480          
481    private:
482  
483 <    /** fill up the simtype struct*/
484 <    void setupSimType();
494 <
495 <    /**
496 <     * Setup Fortran Simulation
497 <     * @see #setupFortranParallel
498 <     */
499 <    void setupFortranSim();
483 >    /** fill up the simtype struct and other simulation-related variables */
484 >    void setupSimVariables();
485  
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();
486  
487      /** Determine if we need to accumulate the simulation box dipole */
488      void setupAccumulateBoxDipole();
# Line 563 | Line 538 | namespace OpenMD{
538      bool requiresSkipCorrection_; /**< does this simulation require a skip-correction? */
539      bool requiresSelfCorrection_; /**< does this simulation require a self-correction? */
540  
541 +  public:
542 +    bool usesElectrostaticAtoms() { return usesElectrostaticAtoms_; }
543 +    bool usesDirectionalAtoms() { return usesDirectionalAtoms_; }
544 +    bool usesMetallicAtoms() { return usesMetallicAtoms_; }
545 +    bool usesAtomicVirial() { return usesAtomicVirial_; }
546 +    bool requiresPrepair() { return requiresPrepair_; }
547 +    bool requiresSkipCorrection() { return requiresSkipCorrection_;}
548 +    bool requiresSelfCorrection() { return requiresSelfCorrection_;}
549 +
550 +  private:
551      /// Data structures holding primary simulation objects
552      map<int, Molecule*>  molecules_;  /**< map holding pointers to LOCAL molecules */
553 <    simtype fInfo_;                   /**< A dual struct shared by C++
569 <                                         and Fortran to pass
570 <                                         information about what types
571 <                                         of calculation are
572 <                                         required */
573 <    
553 >
554      /// Stamps are templates for objects that are then used to create
555      /// groups of objects.  For example, a molecule stamp contains
556      /// information on how to build that molecule (i.e. the topology,
# Line 586 | Line 566 | namespace OpenMD{
566       * the simulation.  It should be nGlobalAtoms_ in size.
567       */
568      vector<int> globalGroupMembership_;
569 +  public:
570 +    vector<int> getGlobalGroupMembership() { return globalGroupMembership_; }
571 +  private:
572  
573      /**
574       * A vector that maps between the global index of an atom and the
# Line 593 | Line 576 | namespace OpenMD{
576       * by SimCreator once and only once, since it is never changed
577       * during the simulation. It shoudl be nGlobalAtoms_ in size.
578       */
579 <    vector<int> globalMolMembership_;        
579 >    vector<int> globalMolMembership_;
580 >
581 >    /**
582 >     * A vector that maps between the local index of an atom and the
583 >     * index of the AtomType.
584 >     */
585 >    vector<int> identArray_;
586 >  public:
587 >    vector<int> getIdentArray() { return identArray_; }
588 >  private:
589                
590      /// lists to handle atoms needing special treatment in the non-bonded interactions
591      PairList excludedInteractions_;  /**< atoms excluded from interacting with each other */
# Line 623 | Line 615 | namespace OpenMD{
615      string statFileName_;
616      string restFileName_;
617          
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 */
618  
619      bool fortranInitialized_; /** flag to indicate whether the fortran side is initialized */
620      
# Line 670 | Line 657 | namespace OpenMD{
657      }
658          
659    private:
673
674    void setupFortranParallel();
660          
661      /**
662       * The size of molToProcMap_ is equal to total number of molecules

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines