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 1546 by gezelter, Sun Apr 10 15:16:39 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 344 | Line 341 | namespace OpenMD{
341      int getGlobalMolMembership(int id){
342        return globalMolMembership_[id];
343      }
347
348    RealType getCutoffRadius() {
349      return cutoffRadius_;
350    }
351
352    RealType getSwitchingRadius() {
353      return switchingRadius_;
354    }
355
356    RealType getListRadius() {
357      return listRadius_;
358    }
344          
345      string getFinalConfigFileName() {
346        return finalConfigFileName_;
# Line 476 | Line 461 | namespace OpenMD{
461       */
462      void removeInteractionPairs(Molecule* mol);
463  
479
480    /** Returns the unique atom types of local processor in an array */
481    set<AtomType*> getUniqueAtomTypes();
482
464      /** Returns the set of atom types present in this simulation */
465      set<AtomType*> getSimulatedAtomTypes();
466          
# Line 489 | Line 470 | namespace OpenMD{
470          
471    private:
472  
473 <    /** fill up the simtype struct*/
474 <    void setupSimType();
494 <
495 <    /**
496 <     * Setup Fortran Simulation
497 <     * @see #setupFortranParallel
498 <     */
499 <    void setupFortranSim();
473 >    /** fill up the simtype struct and other simulation-related variables */
474 >    void setupSimVariables();
475  
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();
476  
477      /** Determine if we need to accumulate the simulation box dipole */
478      void setupAccumulateBoxDipole();
# Line 563 | Line 528 | namespace OpenMD{
528      bool requiresSkipCorrection_; /**< does this simulation require a skip-correction? */
529      bool requiresSelfCorrection_; /**< does this simulation require a self-correction? */
530  
531 +  public:
532 +    bool usesElectrostaticAtoms() { return usesElectrostaticAtoms_; }
533 +    bool usesDirectionalAtoms() { return usesDirectionalAtoms_; }
534 +    bool usesMetallicAtoms() { return usesMetallicAtoms_; }
535 +    bool usesAtomicVirial() { return usesAtomicVirial_; }
536 +    bool requiresPrepair() { return requiresPrepair_; }
537 +    bool requiresSkipCorrection() { return requiresSkipCorrection_;}
538 +    bool requiresSelfCorrection() { return requiresSelfCorrection_;}
539 +
540 +  private:
541      /// Data structures holding primary simulation objects
542      map<int, Molecule*>  molecules_;  /**< map holding pointers to LOCAL molecules */
543      simtype fInfo_;                   /**< A dual struct shared by C++
# Line 570 | Line 545 | namespace OpenMD{
545                                           information about what types
546                                           of calculation are
547                                           required */
548 <    
548 >
549      /// Stamps are templates for objects that are then used to create
550      /// groups of objects.  For example, a molecule stamp contains
551      /// information on how to build that molecule (i.e. the topology,
# Line 593 | Line 568 | namespace OpenMD{
568       * by SimCreator once and only once, since it is never changed
569       * during the simulation. It shoudl be nGlobalAtoms_ in size.
570       */
571 <    vector<int> globalMolMembership_;        
571 >    vector<int> globalMolMembership_;
572 >
573 >    /**
574 >     * A vector that maps between the local index of an atom and the
575 >     * index of the AtomType.
576 >     */
577 >    vector<int> identArray_;
578 >  public:
579 >    vector<int> getIdentArray() { return identArray_; }
580 >  private:
581                
582      /// lists to handle atoms needing special treatment in the non-bonded interactions
583      PairList excludedInteractions_;  /**< atoms excluded from interacting with each other */
# Line 623 | Line 607 | namespace OpenMD{
607      string statFileName_;
608      string restFileName_;
609          
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 */
610  
611      bool fortranInitialized_; /** flag to indicate whether the fortran side is initialized */
612      
# Line 670 | Line 649 | namespace OpenMD{
649      }
650          
651    private:
673
674    void setupFortranParallel();
652          
653      /**
654       * The size of molToProcMap_ is equal to total number of molecules

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines