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

Comparing:
trunk/src/brains/SimInfo.hpp (file contents), Revision 1277 by gezelter, Mon Jul 14 12:35:58 2008 UTC vs.
branches/development/src/brains/SimInfo.hpp (file contents), Revision 1549 by gezelter, Wed Apr 27 18:38:15 2011 UTC

# Line 6 | Line 6
6   * redistribute this software in source and binary code form, provided
7   * that the following conditions are met:
8   *
9 < * 1. Acknowledgement of the program authors must be made in any
10 < *    publication of scientific results based in part on use of the
11 < *    program.  An acceptable form of acknowledgement is citation of
12 < *    the article in which the program was described (Matthew
13 < *    A. Meineke, Charles F. Vardeman II, Teng Lin, Christopher
14 < *    J. Fennell and J. Daniel Gezelter, "OOPSE: An Object-Oriented
15 < *    Parallel Simulation Engine for Molecular Dynamics,"
16 < *    J. Comput. Chem. 26, pp. 252-271 (2005))
17 < *
18 < * 2. Redistributions of source code must retain the above copyright
9 > * 1. Redistributions of source code must retain the above copyright
10   *    notice, this list of conditions and the following disclaimer.
11   *
12 < * 3. Redistributions in binary form must reproduce the above copyright
12 > * 2. Redistributions in binary form must reproduce the above copyright
13   *    notice, this list of conditions and the following disclaimer in the
14   *    documentation and/or other materials provided with the
15   *    distribution.
# Line 37 | Line 28
28   * arising out of the use of or inability to use software, even if the
29   * University of Notre Dame has been advised of the possibility of
30   * such damages.
31 + *
32 + * SUPPORT OPEN SCIENCE!  If you use OpenMD or its source code in your
33 + * research, please cite the appropriate papers when you publish your
34 + * work.  Good starting points are:
35 + *                                                                      
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).                        
40   */
41  
42   /**
# Line 54 | Line 54
54   #include <utility>
55   #include <vector>
56  
57 < #include "brains/Exclude.hpp"
57 > #include "brains/PairList.hpp"
58   #include "io/Globals.hpp"
59   #include "math/Vector3.hpp"
60   #include "math/SquareMatrix3.hpp"
# 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 __C
68 > #define __OPENMD_C
69   #include "brains/fSimulation.h"
70  
71 < namespace oopse{
72 <
71 > using namespace std;
72 > namespace OpenMD{
73    //forward decalration
74    class SnapshotManager;
75    class Molecule;
76    class SelectionManager;
77    class StuntDouble;
78 +
79    /**
80 <   * @class SimInfo SimInfo.hpp "brains/SimInfo.hpp"
81 <   * @brief One of the heavy weight classes of OOPSE, SimInfo maintains a list of molecules.
82 <    * The Molecule class maintains all of the concrete objects
83 <    * (atoms, bond, bend, torsions, inversions, rigid bodies, cutoff groups,
84 <    * constraints). In both the single and parallel versions, atoms and
85 <    * rigid bodies have both global and local indices.  The local index is
86 <    * not relevant to molecules or cutoff groups.
87 <    */
80 >   * @class SimInfo SimInfo.hpp "brains/SimInfo.hpp"
81 >   *
82 >   * @brief One of the heavy-weight classes of OpenMD, SimInfo
83 >   * maintains objects and variables relating to the current
84 >   * simulation.  This includes the master list of Molecules.  The
85 >   * Molecule class maintains all of the concrete objects (Atoms,
86 >   * Bond, Bend, Torsions, Inversions, RigidBodies, CutoffGroups,
87 >   * Constraints). In both the single and parallel versions, Atoms and
88 >   * RigidBodies have both global and local indices.
89 >   */
90    class SimInfo {
91    public:
92 <    typedef std::map<int, Molecule*>::iterator  MoleculeIterator;
93 <
92 >    typedef map<int, Molecule*>::iterator  MoleculeIterator;
93 >    
94      /**
95       * Constructor of SimInfo
96 <     * @param molStampPairs MoleculeStamp Array. The first element of the pair is molecule stamp, the
97 <     * second element is the total number of molecules with the same molecule stamp in the system
96 >     *
97 >     * @param molStampPairs MoleculeStamp Array. The first element of
98 >     * the pair is molecule stamp, the second element is the total
99 >     * number of molecules with the same molecule stamp in the system
100 >     *
101       * @param ff pointer of a concrete ForceField instance
102 +     *
103       * @param simParams
96     * @note
104       */
105      SimInfo(ForceField* ff, Globals* simParams);
106      virtual ~SimInfo();
107  
108      /**
109       * Adds a molecule
110 <     * @return return true if adding successfully, return false if the molecule is already in SimInfo
110 >     *
111 >     * @return return true if adding successfully, return false if the
112 >     * molecule is already in SimInfo
113 >     *
114       * @param mol molecule to be added
115       */
116      bool addMolecule(Molecule* mol);
117  
118      /**
119       * Removes a molecule from SimInfo
120 <     * @return true if removing successfully, return false if molecule is not in this SimInfo
120 >     *
121 >     * @return true if removing successfully, return false if molecule
122 >     * is not in this SimInfo
123       */
124      bool removeMolecule(Molecule* mol);
125  
# Line 127 | Line 139 | namespace oopse{
139      }
140  
141      /**
142 <     * Returns the total number of integrable objects (total number of rigid bodies plus the total number
143 <     * of atoms which do not belong to the rigid bodies) in the system
142 >     * Returns the total number of integrable objects (total number of
143 >     * rigid bodies plus the total number of atoms which do not belong
144 >     * to the rigid bodies) in the system
145       */
146      int getNGlobalIntegrableObjects() {
147        return nGlobalIntegrableObjects_;
148      }
149  
150      /**
151 <     * Returns the total number of integrable objects (total number of rigid bodies plus the total number
152 <     * of atoms which do not belong to the rigid bodies) in the system
151 >     * Returns the total number of integrable objects (total number of
152 >     * rigid bodies plus the total number of atoms which do not belong
153 >     * to the rigid bodies) in the system
154       */
155      int getNGlobalRigidBodies() {
156        return nGlobalRigidBodies_;
# Line 231 | Line 245 | namespace oopse{
245  
246      int getFdf();
247      
248 <    //getNZconstraint and setNZconstraint ruin the coherent of SimInfo class, need refactorying
248 >    //getNZconstraint and setNZconstraint ruin the coherence of
249 >    //SimInfo class, need refactoring
250          
251      /** Returns the total number of z-constraint molecules in the system */
252      int getNZconstraint() {
# Line 267 | Line 282 | namespace oopse{
282  
283      /** Returns the center of the mass of the whole system.*/
284      Vector3d getCom();
285 <   /** Returns the center of the mass and Center of Mass velocity of the whole system.*/
285 >    /** Returns the center of the mass and Center of Mass velocity of
286 >        the whole system.*/
287      void getComAll(Vector3d& com,Vector3d& comVel);
288  
289 <    /** Returns intertia tensor for the entire system and system Angular Momentum.*/
289 >    /** Returns intertia tensor for the entire system and system
290 >        Angular Momentum.*/
291      void getInertiaTensor(Mat3x3d &intertiaTensor,Vector3d &angularMomentum);
292      
293      /** Returns system angular momentum */
294      Vector3d getAngularMomentum();
295  
296 <    /** Returns volume of system as estimated by an ellipsoid defined by the radii of gyration*/
296 >    /** Returns volume of system as estimated by an ellipsoid defined
297 >        by the radii of gyration*/
298      void getGyrationalVolume(RealType &vol);
299 <    /** Overloaded version of gyrational volume that also returns det(I) so dV/dr can be calculated*/
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 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 312 | Line 336 | namespace oopse{
336        i = molecules_.find(index);
337  
338        return i != molecules_.end() ? i->second : NULL;
315    }
316
317    RealType getRcut() {
318      return rcut_;
319    }
320
321    RealType getRsw() {
322      return rsw_;
339      }
340  
341 <    RealType getList() {
342 <      return rlist_;
341 >    int getGlobalMolMembership(int id){
342 >      return globalMolMembership_[id];
343      }
344 +
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 +    /**
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 <    std::string getFinalConfigFileName() {
359 >    string getFinalConfigFileName() {
360        return finalConfigFileName_;
361      }
362  
363 <    void setFinalConfigFileName(const std::string& fileName) {
363 >    void setFinalConfigFileName(const string& fileName) {
364        finalConfigFileName_ = fileName;
365      }
366  
367 <    std::string getRawMetaData() {
367 >    string getRawMetaData() {
368        return rawMetaData_;
369      }
370 <    void setRawMetaData(const std::string& rawMetaData) {
370 >    void setRawMetaData(const string& rawMetaData) {
371        rawMetaData_ = rawMetaData;
372      }
373          
374 <    std::string getDumpFileName() {
374 >    string getDumpFileName() {
375        return dumpFileName_;
376      }
377          
378 <    void setDumpFileName(const std::string& fileName) {
378 >    void setDumpFileName(const string& fileName) {
379        dumpFileName_ = fileName;
380      }
381  
382 <    std::string getStatFileName() {
382 >    string getStatFileName() {
383        return statFileName_;
384      }
385          
386 <    void setStatFileName(const std::string& fileName) {
386 >    void setStatFileName(const string& fileName) {
387        statFileName_ = fileName;
388      }
389          
390 <    std::string getRestFileName() {
390 >    string getRestFileName() {
391        return restFileName_;
392      }
393          
394 <    void setRestFileName(const std::string& fileName) {
394 >    void setRestFileName(const string& fileName) {
395        restFileName_ = fileName;
396      }
397  
# Line 369 | Line 399 | namespace oopse{
399       * Sets GlobalGroupMembership
400       * @see #SimCreator::setGlobalIndex
401       */  
402 <    void setGlobalGroupMembership(const std::vector<int>& globalGroupMembership) {
403 <      assert(globalGroupMembership.size() == nGlobalAtoms_);
402 >    void setGlobalGroupMembership(const vector<int>& globalGroupMembership) {
403 >      assert(globalGroupMembership.size() == static_cast<size_t>(nGlobalAtoms_));
404        globalGroupMembership_ = globalGroupMembership;
405      }
406  
# Line 378 | Line 408 | namespace oopse{
408       * Sets GlobalMolMembership
409       * @see #SimCreator::setGlobalIndex
410       */        
411 <    void setGlobalMolMembership(const std::vector<int>& globalMolMembership) {
412 <      assert(globalMolMembership.size() == nGlobalAtoms_);
411 >    void setGlobalMolMembership(const vector<int>& globalMolMembership) {
412 >      assert(globalMolMembership.size() == static_cast<size_t>(nGlobalAtoms_));
413        globalMolMembership_ = globalMolMembership;
414      }
415  
# Line 396 | Line 426 | namespace oopse{
426        return useAtomicVirial_;
427      }
428  
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.
429      /**
430       * Adds property into property map
431       * @param genData GenericData to be added into PropertyMap
# Line 409 | Line 436 | namespace oopse{
436       * Removes property from PropertyMap by name
437       * @param propName the name of property to be removed
438       */
439 <    void removeProperty(const std::string& propName);
439 >    void removeProperty(const string& propName);
440  
441      /**
442       * clear all of the properties
# Line 420 | Line 447 | namespace oopse{
447       * Returns all names of properties
448       * @return all names of properties
449       */
450 <    std::vector<std::string> getPropertyNames();
450 >    vector<string> getPropertyNames();
451  
452      /**
453       * Returns all of the properties in PropertyMap
454       * @return all of the properties in PropertyMap
455       */      
456 <    std::vector<GenericData*> getProperties();
456 >    vector<GenericData*> getProperties();
457  
458      /**
459       * Returns property
# Line 434 | Line 461 | namespace oopse{
461       * @return a pointer point to property with propName. If no property named propName
462       * exists, return NULL
463       */      
464 <    GenericData* getPropertyByName(const std::string& propName);
464 >    GenericData* getPropertyByName(const string& propName);
465  
466      /**
467 <     * add all exclude pairs of a molecule into exclude list.
467 >     * add all special interaction pairs (including excluded
468 >     * interactions) in a molecule into the appropriate lists.
469       */
470 <    void addExcludePairs(Molecule* mol);
470 >    void addInteractionPairs(Molecule* mol);
471  
472      /**
473 <     * remove all exclude pairs which belong to a molecule from exclude list
473 >     * remove all special interaction pairs which belong to a molecule
474 >     * from the appropriate lists.
475       */
476 +    void removeInteractionPairs(Molecule* mol);
477  
478 <    void removeExcludePairs(Molecule* mol);
479 <
450 <
451 <    /** Returns the unique atom types of local processor in an array */
452 <    std::set<AtomType*> getUniqueAtomTypes();
478 >    /** Returns the set of atom types present in this simulation */
479 >    set<AtomType*> getSimulatedAtomTypes();
480          
481 <    friend std::ostream& operator <<(std::ostream& o, SimInfo& info);
481 >    friend ostream& operator <<(ostream& o, SimInfo& info);
482  
483      void getCutoff(RealType& rcut, RealType& rsw);
484          
485    private:
486  
487 <    /** fill up the simtype struct*/
488 <    void setupSimType();
487 >    /** fill up the simtype struct and other simulation-related variables */
488 >    void setupSimVariables();
489  
463    /**
464     * Setup Fortran Simulation
465     * @see #setupFortranParallel
466     */
467    void setupFortranSim();
490  
469    /** Figure out the radius of cutoff, radius of switching function and pass them to fortran */
470    void setupCutoff();
471
472    /** Figure out which coulombic correction method to use and pass to fortran */
473    void setupElectrostaticSummationMethod( int isError );
474
475    /** Figure out which polynomial type to use for the switching function */
476    void setupSwitchingFunction();
477
491      /** Determine if we need to accumulate the simulation box dipole */
492      void setupAccumulateBoxDipole();
493  
# Line 483 | Line 496 | namespace oopse{
496      void calcNdfRaw();
497      void calcNdfTrans();
498  
486    ForceField* forceField_;      
487    Globals* simParams_;
488
489    std::map<int, Molecule*>  molecules_; /**< Molecule array */
490
499      /**
500 <     * Adds molecule stamp and the total number of the molecule with same molecule stamp in the whole
501 <     * system.
500 >     * Adds molecule stamp and the total number of the molecule with
501 >     * same molecule stamp in the whole system.
502       */
503      void addMoleculeStamp(MoleculeStamp* molStamp, int nmol);
496        
497    //degress of freedom
498    int ndf_;           /**< number of degress of freedom (excludes constraints),  ndf_ is local */
499    int fdf_local;       /**< number of frozen degrees of freedom */
500    int fdf_;            /**< number of frozen degrees of freedom */
501    int ndfRaw_;    /**< number of degress of freedom (includes constraints),  ndfRaw_ is local */
502    int ndfTrans_; /**< number of translation degress of freedom, ndfTrans_ is local */
503    int nZconstraint_; /** number of  z-constraint molecules, nZconstraint_ is global */
504        
505    //number of global objects
506    int nGlobalMols_;       /**< number of molecules in the system */
507    int nGlobalAtoms_;   /**< number of atoms in the system */
508    int nGlobalCutoffGroups_; /**< number of cutoff groups in this system */
509    int nGlobalIntegrableObjects_; /**< number of integrable objects in this system */
510    int nGlobalRigidBodies_; /**< number of rigid bodies in this system */
511    /**
512     * the size of globalGroupMembership_  is nGlobalAtoms. Its index is  global index of an atom, and the
513     * corresponding content is the global index of cutoff group this atom belong to.
514     * It is filled by SimCreator once and only once, since it never changed during the simulation.
515     */
516    std::vector<int> globalGroupMembership_;
504  
505 <    /**
506 <     * the size of globalGroupMembership_  is nGlobalAtoms. Its index is  global index of an atom, and the
507 <     * corresponding content is the global index of molecule this atom belong to.
521 <     * It is filled by SimCreator once and only once, since it is never changed during the simulation.
522 <     */
523 <    std::vector<int> globalMolMembership_;        
505 >    // Other classes holdingn important information
506 >    ForceField* forceField_; /**< provides access to defined atom types, bond types, etc. */
507 >    Globals* simParams_;     /**< provides access to simulation parameters set by user */
508  
509 <        
526 <    std::vector<int> molStampIds_;                                /**< stamp id array of all molecules in the system */
527 <    std::vector<MoleculeStamp*> moleculeStamps_;      /**< molecule stamps array */        
528 <        
529 <    //number of local objects
509 >    ///  Counts of local objects
510      int nAtoms_;              /**< number of atoms in local processor */
511      int nBonds_;              /**< number of bonds in local processor */
512      int nBends_;              /**< number of bends in local processor */
# Line 536 | Line 516 | namespace oopse{
516      int nIntegrableObjects_;  /**< number of integrable objects in local processor */
517      int nCutoffGroups_;       /**< number of cutoff groups in local processor */
518      int nConstraints_;        /**< number of constraints in local processors */
519 +        
520 +    /// Counts of global objects
521 +    int nGlobalMols_;              /**< number of molecules in the system (GLOBAL) */
522 +    int nGlobalAtoms_;             /**< number of atoms in the system (GLOBAL) */
523 +    int nGlobalCutoffGroups_;      /**< number of cutoff groups in this system (GLOBAL) */
524 +    int nGlobalIntegrableObjects_; /**< number of integrable objects in this system */
525 +    int nGlobalRigidBodies_;       /**< number of rigid bodies in this system (GLOBAL) */
526 +      
527 +    /// Degress of freedom
528 +    int ndf_;          /**< number of degress of freedom (excludes constraints) (LOCAL) */
529 +    int fdf_local;     /**< number of frozen degrees of freedom (LOCAL) */
530 +    int fdf_;          /**< number of frozen degrees of freedom (GLOBAL) */
531 +    int ndfRaw_;       /**< number of degress of freedom (includes constraints),  (LOCAL) */
532 +    int ndfTrans_;     /**< number of translation degress of freedom, (LOCAL) */
533 +    int nZconstraint_; /**< number of  z-constraint molecules (GLOBAL) */
534  
535 <    simtype fInfo_; /**< A dual struct shared by c++/fortran which indicates the atom types in simulation*/
536 <    Exclude exclude_;      
537 <    PropertyMap properties_;                  /**< Generic Property */
538 <    SnapshotManager* sman_;               /**< SnapshotManager */
535 >    /// logicals
536 >    bool usesPeriodicBoundaries_; /**< use periodic boundary conditions? */
537 >    bool usesDirectionalAtoms_;   /**< are there atoms with position AND orientation? */
538 >    bool usesMetallicAtoms_;      /**< are there transition metal atoms? */
539 >    bool usesElectrostaticAtoms_; /**< are there electrostatic atoms? */
540 >    bool usesAtomicVirial_;       /**< are we computing atomic virials? */
541 >    bool requiresPrepair_;        /**< does this simulation require a pre-pair loop? */
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++
558 +                                         and Fortran to pass
559 +                                         information about what types
560 +                                         of calculation are
561 +                                         required */
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,
566 +    /// the atoms, the bonds, etc.)  Once the system is built, the
567 +    /// stamps are no longer useful.
568 +    vector<int> molStampIds_;                /**< stamp id for molecules in the system */
569 +    vector<MoleculeStamp*> moleculeStamps_;  /**< molecule stamps array */        
570 +
571 +    /**
572 +     * A vector that maps between the global index of an atom, and the
573 +     * global index of cutoff group the atom belong to.  It is filled
574 +     * by SimCreator once and only once, since it never changed during
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
584 +     * global index of the molecule the atom belongs to.  It is filled
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_;
589 +
590      /**
591 <     * The reason to have a local index manager is that when molecule is migrating to other processors,
592 <     * the atoms and the rigid-bodies will release their local indices to LocalIndexManager. Combining the
593 <     * information of molecule migrating to current processor, Migrator class can query  the LocalIndexManager
594 <     * to make a efficient data moving plan.
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 */
601 >    PairList oneTwoInteractions_;    /**< atoms that are directly Bonded */
602 >    PairList oneThreeInteractions_;  /**< atoms sharing a Bend */    
603 >    PairList oneFourInteractions_;   /**< atoms sharing a Torsion */
604 >
605 >    PropertyMap properties_;       /**< Generic Properties can be added */
606 >    SnapshotManager* sman_;        /**< SnapshotManager (handles particle positions, etc.) */
607 >
608 >    /**
609 >     * The reason to have a local index manager is that when molecule
610 >     * is migrating to other processors, the atoms and the
611 >     * rigid-bodies will release their local indices to
612 >     * LocalIndexManager. Combining the information of molecule
613 >     * migrating to current processor, Migrator class can query the
614 >     * LocalIndexManager to make a efficient data moving plan.
615       */        
616      LocalIndexManager localIndexMan_;
617  
618      // unparsed MetaData block for storing in Dump and EOR files:
619 <    std::string rawMetaData_;
619 >    string rawMetaData_;
620  
621 <    //file names
622 <    std::string finalConfigFileName_;
623 <    std::string dumpFileName_;
624 <    std::string statFileName_;
625 <    std::string restFileName_;
621 >    // file names
622 >    string finalConfigFileName_;
623 >    string dumpFileName_;
624 >    string statFileName_;
625 >    string restFileName_;
626          
562    RealType rcut_;       /**< cutoff radius*/
563    RealType rsw_;        /**< radius of switching function*/
564    RealType rlist_;      /**< neighbor list radius */
627  
628 <    bool ljsp_; /**< use shifted potential for LJ*/
567 <    bool ljsf_; /**< use shifted force for LJ*/
568 <
569 <    bool fortranInitialized_; /**< flag indicate whether fortran side
570 <                                 is initialized */
628 >    bool fortranInitialized_; /** flag to indicate whether the fortran side is initialized */
629      
630      bool calcBoxDipole_; /**< flag to indicate whether or not we calculate
631                              the simulation box dipole moment */
632      
633      bool useAtomicVirial_; /**< flag to indicate whether or not we use
634                                Atomic Virials to calculate the pressure */
635 <
636 <    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);
635 >    
636 >  public:
637      /**
638 <     * return a StuntDouble by its global index. In MPI version, if the StuntDouble with specified
639 <     * global index does not belong to local processor, a NULL will be return.
640 <     */
641 <    //StuntDouble* getStuntDoubleFromGlobalIndex(int index);
642 <  //private:
643 <    //std::vector<StuntDouble*> sdByGlobalIndex_;
638 >     * return an integral objects by its global index. In MPI
639 >     * version, if the StuntDouble with specified global index does
640 >      * not belong to local processor, a NULL will be return.
641 >      */
642 >    StuntDouble* getIOIndexToIntegrableObject(int index);
643 >    void setIOIndexToIntegrableObject(const vector<StuntDouble*>& v);
644      
645 <    //in Parallel version, we need MolToProc
645 >  private:
646 >    vector<StuntDouble*> IOIndexToIntegrableObject;
647 >    
648    public:
649                  
650      /**
# Line 606 | Line 656 | namespace oopse{
656        //assert(globalIndex < molToProcMap_.size());
657        return molToProcMap_[globalIndex];
658      }
659 <
659 >    
660      /**
661       * Set MolToProcMap array
662       * @see #SimCreator::divideMolecules
663       */
664 <    void setMolToProcMap(const std::vector<int>& molToProcMap) {
664 >    void setMolToProcMap(const vector<int>& molToProcMap) {
665        molToProcMap_ = molToProcMap;
666      }
667          
668    private:
619
620    void setupFortranParallel();
669          
670      /**
671       * The size of molToProcMap_ is equal to total number of molecules
672       * in the system.  It maps a molecule to the processor on which it
673       * resides. it is filled by SimCreator once and only once.
674       */        
675 <    std::vector<int> molToProcMap_;
675 >    vector<int> molToProcMap_;
676  
629
677    };
678  
679 < } //namespace oopse
679 > } //namespace OpenMD
680   #endif //BRAINS_SIMMODEL_HPP
681  

Comparing:
trunk/src/brains/SimInfo.hpp (property svn:keywords), Revision 1277 by gezelter, Mon Jul 14 12:35:58 2008 UTC vs.
branches/development/src/brains/SimInfo.hpp (property svn:keywords), Revision 1549 by gezelter, Wed Apr 27 18:38:15 2011 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines