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 1665 by gezelter, Tue Nov 22 20:38:56 2011 UTC

# Line 36 | Line 36
36   * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).            
37   * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).          
38   * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).          
39 < * [4]  Vardeman & Gezelter, in progress (2009).                        
39 > * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40 > * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
42  
43   /**
# Line 62 | Line 63
63   #include "UseTheForce/ForceField.hpp"
64   #include "utils/PropertyMap.hpp"
65   #include "utils/LocalIndexManager.hpp"
66 + #include "nonbonded/SwitchingFunction.hpp"
67  
66 //another nonsense macro declaration
67 #define __OPENMD_C
68 #include "brains/fSimulation.h"
69
68   using namespace std;
69   namespace OpenMD{
70 <
73 <  enum CutoffMethod {
74 <    HARD,
75 <    SWITCHING_FUNCTION,
76 <    SHIFTED_POTENTIAL,
77 <    SHIFTED_FORCE
78 <  };
79 <
80 <  //forward decalration
70 >  //forward declaration
71    class SnapshotManager;
72    class Molecule;
73    class SelectionManager;
# Line 177 | Line 167 | namespace OpenMD{
167        return nAtoms_;
168      }
169  
170 +    /** Returns the number of effective cutoff groups on local processor */
171 +    unsigned int getNLocalCutoffGroups();
172 +
173      /** Returns the number of local bonds */        
174      unsigned int getNBonds(){
175        return nBonds_;
# 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 +     * Do final bookkeeping before Force managers need their data.
306 +     */
307 +    void prepareTopology();
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 <    }
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 getSwitchingRadius() {
353 <      return switchingRadius_;
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  
356    RealType getListRadius() {
357      return listRadius_;
358    }
359          
360      string getFinalConfigFileName() {
361        return finalConfigFileName_;
# Line 415 | Line 415 | namespace OpenMD{
415      }
416  
417  
418 <    bool isFortranInitialized() {
419 <      return fortranInitialized_;
418 >    bool isTopologyDone() {
419 >      return topologyDone_;
420      }
421          
422      bool getCalcBoxDipole() {
# Line 476 | Line 476 | namespace OpenMD{
476       */
477      void removeInteractionPairs(Molecule* mol);
478  
479
480    /** Returns the unique atom types of local processor in an array */
481    set<AtomType*> getUniqueAtomTypes();
482
479      /** Returns the set of atom types present in this simulation */
480      set<AtomType*> getSimulatedAtomTypes();
481          
# Line 489 | Line 485 | namespace OpenMD{
485          
486    private:
487  
488 <    /** fill up the simtype struct*/
489 <    void setupSimType();
488 >    /** fill up the simtype struct and other simulation-related variables */
489 >    void setupSimVariables();
490  
495    /**
496     * Setup Fortran Simulation
497     * @see #setupFortranParallel
498     */
499    void setupFortranSim();
500
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();
491  
492      /** Determine if we need to accumulate the simulation box dipole */
493      void setupAccumulateBoxDipole();
# Line 563 | Line 543 | namespace OpenMD{
543      bool requiresSkipCorrection_; /**< does this simulation require a skip-correction? */
544      bool requiresSelfCorrection_; /**< does this simulation require a self-correction? */
545  
546 +  public:
547 +    bool usesElectrostaticAtoms() { return usesElectrostaticAtoms_; }
548 +    bool usesDirectionalAtoms() { return usesDirectionalAtoms_; }
549 +    bool usesMetallicAtoms() { return usesMetallicAtoms_; }
550 +    bool usesAtomicVirial() { return usesAtomicVirial_; }
551 +    bool requiresPrepair() { return requiresPrepair_; }
552 +    bool requiresSkipCorrection() { return requiresSkipCorrection_;}
553 +    bool requiresSelfCorrection() { return requiresSelfCorrection_;}
554 +
555 +  private:
556      /// Data structures holding primary simulation objects
557      map<int, Molecule*>  molecules_;  /**< map holding pointers to LOCAL molecules */
558 <    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 <    
558 >
559      /// Stamps are templates for objects that are then used to create
560      /// groups of objects.  For example, a molecule stamp contains
561      /// information on how to build that molecule (i.e. the topology,
# Line 586 | Line 571 | namespace OpenMD{
571       * the simulation.  It should be nGlobalAtoms_ in size.
572       */
573      vector<int> globalGroupMembership_;
574 +  public:
575 +    vector<int> getGlobalGroupMembership() { return globalGroupMembership_; }
576 +  private:
577  
578      /**
579       * A vector that maps between the global index of an atom and the
# Line 593 | Line 581 | namespace OpenMD{
581       * by SimCreator once and only once, since it is never changed
582       * during the simulation. It shoudl be nGlobalAtoms_ in size.
583       */
584 <    vector<int> globalMolMembership_;        
584 >    vector<int> globalMolMembership_;
585 >
586 >    /**
587 >     * A vector that maps between the local index of an atom and the
588 >     * index of the AtomType.
589 >     */
590 >    vector<int> identArray_;
591 >  public:
592 >    vector<int> getIdentArray() { return identArray_; }
593 >  private:
594 >    
595 >    /**
596 >     * A vector which contains the fractional contribution of an
597 >     * atom's mass to the total mass of the cutoffGroup that atom
598 >     * belongs to.  In the case of single atom cutoff groups, the mass
599 >     * factor for that atom is 1.  For massless atoms, the factor is
600 >     * also 1.
601 >     */
602 >    vector<RealType> massFactors_;
603 >  public:
604 >    vector<RealType> getMassFactors() { return massFactors_; }
605 >
606 >    PairList* getExcludedInteractions() { return &excludedInteractions_; }
607 >    PairList* getOneTwoInteractions() { return &oneTwoInteractions_; }
608 >    PairList* getOneThreeInteractions() { return &oneThreeInteractions_; }
609 >    PairList* getOneFourInteractions() { return &oneFourInteractions_; }
610 >
611 >  private:
612                
613      /// lists to handle atoms needing special treatment in the non-bonded interactions
614      PairList excludedInteractions_;  /**< atoms excluded from interacting with each other */
# Line 623 | Line 638 | namespace OpenMD{
638      string statFileName_;
639      string restFileName_;
640          
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 */
641  
642 <    bool fortranInitialized_; /** flag to indicate whether the fortran side is initialized */
642 >    bool topologyDone_;  /** flag to indicate whether the topology has
643 >                             been scanned and all the relevant
644 >                             bookkeeping has been done*/
645      
646      bool calcBoxDipole_; /**< flag to indicate whether or not we calculate
647                              the simulation box dipole moment */
# Line 670 | Line 682 | namespace OpenMD{
682      }
683          
684    private:
673
674    void setupFortranParallel();
685          
686      /**
687       * The size of molToProcMap_ is equal to total number of molecules

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines