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 507 by gezelter, Fri Apr 15 22:04:00 2005 UTC vs.
branches/development/src/brains/SimInfo.hpp (file contents), Revision 1665 by gezelter, Tue Nov 22 20:38:56 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]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40 + * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
42  
43   /**
# Line 54 | Line 55
55   #include <utility>
56   #include <vector>
57  
58 < #include "brains/Exclude.hpp"
58 > #include "brains/PairList.hpp"
59   #include "io/Globals.hpp"
60   #include "math/Vector3.hpp"
61 + #include "math/SquareMatrix3.hpp"
62   #include "types/MoleculeStamp.hpp"
63   #include "UseTheForce/ForceField.hpp"
64   #include "utils/PropertyMap.hpp"
65   #include "utils/LocalIndexManager.hpp"
66 + #include "nonbonded/SwitchingFunction.hpp"
67  
68 < //another nonsense macro declaration
69 < #define __C
70 < #include "brains/fSimulation.h"
68 <
69 < namespace oopse{
70 <
71 <  //forward decalration
68 > using namespace std;
69 > namespace OpenMD{
70 >  //forward declaration
71    class SnapshotManager;
72    class Molecule;
73    class SelectionManager;
74 +  class StuntDouble;
75 +
76    /**
77 <   * @class SimInfo SimInfo.hpp "brains/SimInfo.hpp"
78 <   * @brief As one of the heavy weight class of OOPSE, SimInfo
79 <   * One of the major changes in SimInfo class is the data struct. It only maintains a list of molecules.
80 <   * And the Molecule class will maintain all of the concrete objects (atoms, bond, bend, torsions, rigid bodies,
81 <   * cutoff groups, constrains).
82 <   * Another major change is the index. No matter single version or parallel version,  atoms and
83 <   * rigid bodies have both global index and local index. Local index is not important to molecule as well as
84 <   * cutoff group.
77 >   * @class SimInfo SimInfo.hpp "brains/SimInfo.hpp"
78 >   *
79 >   * @brief One of the heavy-weight classes of OpenMD, SimInfo
80 >   * maintains objects and variables relating to the current
81 >   * simulation.  This includes the master list of Molecules.  The
82 >   * Molecule class maintains all of the concrete objects (Atoms,
83 >   * Bond, Bend, Torsions, Inversions, RigidBodies, CutoffGroups,
84 >   * Constraints). In both the single and parallel versions, Atoms and
85 >   * RigidBodies have both global and local indices.
86     */
87    class SimInfo {
88    public:
89 <    typedef std::map<int, Molecule*>::iterator  MoleculeIterator;
90 <
89 >    typedef map<int, Molecule*>::iterator  MoleculeIterator;
90 >    
91      /**
92       * Constructor of SimInfo
93 <     * @param molStampPairs MoleculeStamp Array. The first element of the pair is molecule stamp, the
94 <     * second element is the total number of molecules with the same molecule stamp in the system
93 >     *
94 >     * @param molStampPairs MoleculeStamp Array. The first element of
95 >     * the pair is molecule stamp, the second element is the total
96 >     * number of molecules with the same molecule stamp in the system
97 >     *
98       * @param ff pointer of a concrete ForceField instance
99 +     *
100       * @param simParams
95     * @note
101       */
102 <    SimInfo(MakeStamps* stamps, std::vector<std::pair<MoleculeStamp*, int> >& molStampPairs, ForceField* ff, Globals* simParams);
102 >    SimInfo(ForceField* ff, Globals* simParams);
103      virtual ~SimInfo();
104  
105      /**
106       * Adds a molecule
107 <     * @return return true if adding successfully, return false if the molecule is already in SimInfo
107 >     *
108 >     * @return return true if adding successfully, return false if the
109 >     * molecule is already in SimInfo
110 >     *
111       * @param mol molecule to be added
112       */
113      bool addMolecule(Molecule* mol);
114  
115      /**
116       * Removes a molecule from SimInfo
117 <     * @return true if removing successfully, return false if molecule is not in this SimInfo
117 >     *
118 >     * @return true if removing successfully, return false if molecule
119 >     * is not in this SimInfo
120       */
121      bool removeMolecule(Molecule* mol);
122  
# Line 126 | Line 136 | namespace oopse{
136      }
137  
138      /**
139 <     * Returns the total number of integrable objects (total number of rigid bodies plus the total number
140 <     * of atoms which do not belong to the rigid bodies) in the system
139 >     * Returns the total number of integrable objects (total number of
140 >     * rigid bodies plus the total number of atoms which do not belong
141 >     * to the rigid bodies) in the system
142       */
143      int getNGlobalIntegrableObjects() {
144        return nGlobalIntegrableObjects_;
145      }
146  
147      /**
148 <     * Returns the total number of integrable objects (total number of rigid bodies plus the total number
149 <     * of atoms which do not belong to the rigid bodies) in the system
148 >     * Returns the total number of integrable objects (total number of
149 >     * rigid bodies plus the total number of atoms which do not belong
150 >     * to the rigid bodies) in the system
151       */
152      int getNGlobalRigidBodies() {
153        return nGlobalRigidBodies_;
# Line 155 | Line 167 | namespace oopse{
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 170 | Line 185 | namespace oopse{
185        return nTorsions_;
186      }
187  
188 +    /** Returns the number of local torsions */        
189 +    unsigned int getNInversions() {
190 +      return nInversions_;
191 +    }
192      /** Returns the number of local rigid bodies */        
193      unsigned int getNRigidBodies() {
194        return nRigidBodies_;
# Line 206 | Line 225 | namespace oopse{
225  
226      /** Returns the number of degrees of freedom */
227      int getNdf() {
228 <      return ndf_;
228 >      return ndf_ - getFdf();
229      }
230  
231      /** Returns the number of raw degrees of freedom */
# Line 219 | Line 238 | namespace oopse{
238        return ndfTrans_;
239      }
240  
241 <    //getNZconstraint and setNZconstraint ruin the coherent of SimInfo class, need refactorying
241 >    /** sets the current number of frozen degrees of freedom */
242 >    void setFdf(int fdf) {
243 >      fdf_local = fdf;
244 >    }
245 >
246 >    int getFdf();
247 >    
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 255 | 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
286 +        the whole system.*/
287 +    void getComAll(Vector3d& com,Vector3d& comVel);
288  
289 <    /** main driver function to interact with fortran during the initialization and molecule migration */
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
297 >        by the radii of gyration*/
298 >    void getGyrationalVolume(RealType &vol);
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 >
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 290 | Line 338 | namespace oopse{
338        return i != molecules_.end() ? i->second : NULL;
339      }
340  
341 <    /** Calculate the maximum cutoff radius based on the atom types */
342 <    double calcMaxCutoffRadius();
295 <
296 <    double getRcut() {
297 <      return rcut_;
341 >    int getGlobalMolMembership(int id){
342 >      return globalMolMembership_[id];
343      }
344  
345 <    double getRsw() {
346 <      return rsw_;
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 >    /**
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          
360 <    std::string getFinalConfigFileName() {
360 >    string getFinalConfigFileName() {
361        return finalConfigFileName_;
362      }
363 <        
364 <    void setFinalConfigFileName(const std::string& fileName) {
363 >
364 >    void setFinalConfigFileName(const string& fileName) {
365        finalConfigFileName_ = fileName;
366      }
367  
368 <    std::string getDumpFileName() {
368 >    string getRawMetaData() {
369 >      return rawMetaData_;
370 >    }
371 >    void setRawMetaData(const string& rawMetaData) {
372 >      rawMetaData_ = rawMetaData;
373 >    }
374 >        
375 >    string getDumpFileName() {
376        return dumpFileName_;
377      }
378          
379 <    void setDumpFileName(const std::string& fileName) {
379 >    void setDumpFileName(const string& fileName) {
380        dumpFileName_ = fileName;
381      }
382  
383 <    std::string getStatFileName() {
383 >    string getStatFileName() {
384        return statFileName_;
385      }
386          
387 <    void setStatFileName(const std::string& fileName) {
387 >    void setStatFileName(const string& fileName) {
388        statFileName_ = fileName;
389      }
390          
391 <    std::string getRestFileName() {
391 >    string getRestFileName() {
392        return restFileName_;
393      }
394          
395 <    void setRestFileName(const std::string& fileName) {
395 >    void setRestFileName(const string& fileName) {
396        restFileName_ = fileName;
397      }
398  
# Line 337 | Line 400 | namespace oopse{
400       * Sets GlobalGroupMembership
401       * @see #SimCreator::setGlobalIndex
402       */  
403 <    void setGlobalGroupMembership(const std::vector<int>& globalGroupMembership) {
404 <      assert(globalGroupMembership.size() == nGlobalAtoms_);
403 >    void setGlobalGroupMembership(const vector<int>& globalGroupMembership) {
404 >      assert(globalGroupMembership.size() == static_cast<size_t>(nGlobalAtoms_));
405        globalGroupMembership_ = globalGroupMembership;
406      }
407  
# Line 346 | Line 409 | namespace oopse{
409       * Sets GlobalMolMembership
410       * @see #SimCreator::setGlobalIndex
411       */        
412 <    void setGlobalMolMembership(const std::vector<int>& globalMolMembership) {
413 <      assert(globalMolMembership.size() == nGlobalAtoms_);
412 >    void setGlobalMolMembership(const vector<int>& globalMolMembership) {
413 >      assert(globalMolMembership.size() == static_cast<size_t>(nGlobalAtoms_));
414        globalMolMembership_ = globalMolMembership;
415      }
416  
417  
418 <    bool isFortranInitialized() {
419 <      return fortranInitialized_;
418 >    bool isTopologyDone() {
419 >      return topologyDone_;
420      }
421          
422 <    //below functions are just forward functions
423 <    //To compose or to inherit is always a hot debate. In general, is-a relation need subclassing, in the
424 <    //the other hand, has-a relation need composing.
422 >    bool getCalcBoxDipole() {
423 >      return calcBoxDipole_;
424 >    }
425 >
426 >    bool getUseAtomicVirial() {
427 >      return useAtomicVirial_;
428 >    }
429 >
430      /**
431       * Adds property into property map
432       * @param genData GenericData to be added into PropertyMap
# Line 369 | Line 437 | namespace oopse{
437       * Removes property from PropertyMap by name
438       * @param propName the name of property to be removed
439       */
440 <    void removeProperty(const std::string& propName);
440 >    void removeProperty(const string& propName);
441  
442      /**
443       * clear all of the properties
# Line 380 | Line 448 | namespace oopse{
448       * Returns all names of properties
449       * @return all names of properties
450       */
451 <    std::vector<std::string> getPropertyNames();
451 >    vector<string> getPropertyNames();
452  
453      /**
454       * Returns all of the properties in PropertyMap
455       * @return all of the properties in PropertyMap
456       */      
457 <    std::vector<GenericData*> getProperties();
457 >    vector<GenericData*> getProperties();
458  
459      /**
460       * Returns property
# Line 394 | Line 462 | namespace oopse{
462       * @return a pointer point to property with propName. If no property named propName
463       * exists, return NULL
464       */      
465 <    GenericData* getPropertyByName(const std::string& propName);
465 >    GenericData* getPropertyByName(const string& propName);
466  
467      /**
468 <     * add all exclude pairs of a molecule into exclude list.
468 >     * add all special interaction pairs (including excluded
469 >     * interactions) in a molecule into the appropriate lists.
470       */
471 <    void addExcludePairs(Molecule* mol);
471 >    void addInteractionPairs(Molecule* mol);
472  
473      /**
474 <     * remove all exclude pairs which belong to a molecule from exclude list
474 >     * remove all special interaction pairs which belong to a molecule
475 >     * from the appropriate lists.
476       */
477 +    void removeInteractionPairs(Molecule* mol);
478  
479 <    void removeExcludePairs(Molecule* mol);
480 <
410 <
411 <    /** Returns the unique atom types of local processor in an array */
412 <    std::set<AtomType*> getUniqueAtomTypes();
479 >    /** Returns the set of atom types present in this simulation */
480 >    set<AtomType*> getSimulatedAtomTypes();
481          
482 <    friend std::ostream& operator <<(std::ostream& o, SimInfo& info);
482 >    friend ostream& operator <<(ostream& o, SimInfo& info);
483  
484 <    void getCutoff(double& rcut, double& rsw);
484 >    void getCutoff(RealType& rcut, RealType& rsw);
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  
423    /**
424     * Setup Fortran Simulation
425     * @see #setupFortranParallel
426     */
427    void setupFortranSim();
491  
492 <    /** Figure out the radius of cutoff, radius of switching function and pass them to fortran */
493 <    void setupCutoff();
492 >    /** Determine if we need to accumulate the simulation box dipole */
493 >    void setupAccumulateBoxDipole();
494  
495      /** Calculates the number of degress of freedom in the whole system */
496      void calcNdf();
# Line 435 | Line 498 | namespace oopse{
498      void calcNdfTrans();
499  
500      /**
501 <     * Adds molecule stamp and the total number of the molecule with same molecule stamp in the whole
502 <     * system.
501 >     * Adds molecule stamp and the total number of the molecule with
502 >     * same molecule stamp in the whole system.
503       */
504      void addMoleculeStamp(MoleculeStamp* molStamp, int nmol);
505  
506 <    MakeStamps* stamps_;
507 <    ForceField* forceField_;      
508 <    Globals* simParams_;
506 >    // Other classes holdingn important information
507 >    ForceField* forceField_; /**< provides access to defined atom types, bond types, etc. */
508 >    Globals* simParams_;     /**< provides access to simulation parameters set by user */
509  
510 <    std::map<int, Molecule*>  molecules_; /**< Molecule array */
510 >    ///  Counts of local objects
511 >    int nAtoms_;              /**< number of atoms in local processor */
512 >    int nBonds_;              /**< number of bonds in local processor */
513 >    int nBends_;              /**< number of bends in local processor */
514 >    int nTorsions_;           /**< number of torsions in local processor */
515 >    int nInversions_;         /**< number of inversions in local processor */
516 >    int nRigidBodies_;        /**< number of rigid bodies in local processor */
517 >    int nIntegrableObjects_;  /**< number of integrable objects in local processor */
518 >    int nCutoffGroups_;       /**< number of cutoff groups in local processor */
519 >    int nConstraints_;        /**< number of constraints in local processors */
520          
521 <    //degress of freedom
522 <    int ndf_;           /**< number of degress of freedom (excludes constraints),  ndf_ is local */
523 <    int ndfRaw_;    /**< number of degress of freedom (includes constraints),  ndfRaw_ is local */
524 <    int ndfTrans_; /**< number of translation degress of freedom, ndfTrans_ is local */
453 <    int nZconstraint_; /** number of  z-constraint molecules, nZconstraint_ is global */
454 <        
455 <    //number of global objects
456 <    int nGlobalMols_;       /**< number of molecules in the system */
457 <    int nGlobalAtoms_;   /**< number of atoms in the system */
458 <    int nGlobalCutoffGroups_; /**< number of cutoff groups in this system */
521 >    /// Counts of global objects
522 >    int nGlobalMols_;              /**< number of molecules in the system (GLOBAL) */
523 >    int nGlobalAtoms_;             /**< number of atoms in the system (GLOBAL) */
524 >    int nGlobalCutoffGroups_;      /**< number of cutoff groups in this system (GLOBAL) */
525      int nGlobalIntegrableObjects_; /**< number of integrable objects in this system */
526 <    int nGlobalRigidBodies_; /**< number of rigid bodies in this system */
526 >    int nGlobalRigidBodies_;       /**< number of rigid bodies in this system (GLOBAL) */
527 >      
528 >    /// Degress of freedom
529 >    int ndf_;          /**< number of degress of freedom (excludes constraints) (LOCAL) */
530 >    int fdf_local;     /**< number of frozen degrees of freedom (LOCAL) */
531 >    int fdf_;          /**< number of frozen degrees of freedom (GLOBAL) */
532 >    int ndfRaw_;       /**< number of degress of freedom (includes constraints),  (LOCAL) */
533 >    int ndfTrans_;     /**< number of translation degress of freedom, (LOCAL) */
534 >    int nZconstraint_; /**< number of  z-constraint molecules (GLOBAL) */
535 >
536 >    /// logicals
537 >    bool usesPeriodicBoundaries_; /**< use periodic boundary conditions? */
538 >    bool usesDirectionalAtoms_;   /**< are there atoms with position AND orientation? */
539 >    bool usesMetallicAtoms_;      /**< are there transition metal atoms? */
540 >    bool usesElectrostaticAtoms_; /**< are there electrostatic atoms? */
541 >    bool usesAtomicVirial_;       /**< are we computing atomic virials? */
542 >    bool requiresPrepair_;        /**< does this simulation require a pre-pair loop? */
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 >
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,
562 >    /// the atoms, the bonds, etc.)  Once the system is built, the
563 >    /// stamps are no longer useful.
564 >    vector<int> molStampIds_;                /**< stamp id for molecules in the system */
565 >    vector<MoleculeStamp*> moleculeStamps_;  /**< molecule stamps array */        
566 >
567      /**
568 <     * the size of globalGroupMembership_  is nGlobalAtoms. Its index is  global index of an atom, and the
569 <     * corresponding content is the global index of cutoff group this atom belong to.
570 <     * It is filled by SimCreator once and only once, since it never changed during the simulation.
568 >     * A vector that maps between the global index of an atom, and the
569 >     * global index of cutoff group the atom belong to.  It is filled
570 >     * by SimCreator once and only once, since it never changed during
571 >     * the simulation.  It should be nGlobalAtoms_ in size.
572       */
573 <    std::vector<int> globalGroupMembership_;
573 >    vector<int> globalGroupMembership_;
574 >  public:
575 >    vector<int> getGlobalGroupMembership() { return globalGroupMembership_; }
576 >  private:
577  
578      /**
579 <     * the size of globalGroupMembership_  is nGlobalAtoms. Its index is  global index of an atom, and the
580 <     * corresponding content is the global index of molecule this atom belong to.
581 <     * It is filled by SimCreator once and only once, since it is never changed during the simulation.
579 >     * A vector that maps between the global index of an atom and the
580 >     * global index of the molecule the atom belongs to.  It is filled
581 >     * by SimCreator once and only once, since it is never changed
582 >     * during the simulation. It shoudl be nGlobalAtoms_ in size.
583       */
584 <    std::vector<int> globalMolMembership_;        
584 >    vector<int> globalMolMembership_;
585  
586 <        
587 <    std::vector<int> molStampIds_;                                /**< stamp id array of all molecules in the system */
588 <    std::vector<MoleculeStamp*> moleculeStamps_;      /**< molecule stamps array */        
589 <        
590 <    //number of local objects
591 <    int nAtoms_;                        /**< number of atoms in local processor */
592 <    int nBonds_;                        /**< number of bonds in local processor */
593 <    int nBends_;                        /**< number of bends in local processor */
594 <    int nTorsions_;                    /**< number of torsions in local processor */
595 <    int nRigidBodies_;              /**< number of rigid bodies in local processor */
596 <    int nIntegrableObjects_;    /**< number of integrable objects in local processor */
597 <    int nCutoffGroups_;             /**< number of cutoff groups in local processor */
598 <    int nConstraints_;              /**< number of constraints in local processors */
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 <    simtype fInfo_; /**< A dual struct shared by c++/fortran which indicates the atom types in simulation*/
607 <    Exclude exclude_;      
608 <    PropertyMap properties_;                  /**< Generic Property */
609 <    SnapshotManager* sman_;               /**< SnapshotManager */
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 */
615 +    PairList oneTwoInteractions_;    /**< atoms that are directly Bonded */
616 +    PairList oneThreeInteractions_;  /**< atoms sharing a Bend */    
617 +    PairList oneFourInteractions_;   /**< atoms sharing a Torsion */
618 +
619 +    PropertyMap properties_;       /**< Generic Properties can be added */
620 +    SnapshotManager* sman_;        /**< SnapshotManager (handles particle positions, etc.) */
621 +
622      /**
623 <     * The reason to have a local index manager is that when molecule is migrating to other processors,
624 <     * the atoms and the rigid-bodies will release their local indices to LocalIndexManager. Combining the
625 <     * information of molecule migrating to current processor, Migrator class can query  the LocalIndexManager
626 <     * to make a efficient data moving plan.
623 >     * The reason to have a local index manager is that when molecule
624 >     * is migrating to other processors, the atoms and the
625 >     * rigid-bodies will release their local indices to
626 >     * LocalIndexManager. Combining the information of molecule
627 >     * migrating to current processor, Migrator class can query the
628 >     * LocalIndexManager to make a efficient data moving plan.
629       */        
630      LocalIndexManager localIndexMan_;
631  
632 <    //file names
633 <    std::string finalConfigFileName_;
634 <    std::string dumpFileName_;
635 <    std::string statFileName_;
636 <    std::string restFileName_;
632 >    // unparsed MetaData block for storing in Dump and EOR files:
633 >    string rawMetaData_;
634 >
635 >    // file names
636 >    string finalConfigFileName_;
637 >    string dumpFileName_;
638 >    string statFileName_;
639 >    string restFileName_;
640          
508    double rcut_;       /**< cutoff radius*/
509    double rsw_;        /**< radius of switching function*/
641  
642 <    bool fortranInitialized_; /**< flag indicate whether fortran side is initialized */
643 <
644 < #ifdef IS_MPI
645 <    //in Parallel version, we need MolToProc
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 */
648 >    
649 >    bool useAtomicVirial_; /**< flag to indicate whether or not we use
650 >                              Atomic Virials to calculate the pressure */
651 >    
652    public:
653 +    /**
654 +     * return an integral objects by its global index. In MPI
655 +     * version, if the StuntDouble with specified global index does
656 +      * not belong to local processor, a NULL will be return.
657 +      */
658 +    StuntDouble* getIOIndexToIntegrableObject(int index);
659 +    void setIOIndexToIntegrableObject(const vector<StuntDouble*>& v);
660 +    
661 +  private:
662 +    vector<StuntDouble*> IOIndexToIntegrableObject;
663 +    
664 +  public:
665                  
666      /**
667       * Finds the processor where a molecule resides
# Line 523 | Line 672 | namespace oopse{
672        //assert(globalIndex < molToProcMap_.size());
673        return molToProcMap_[globalIndex];
674      }
675 <
675 >    
676      /**
677       * Set MolToProcMap array
678       * @see #SimCreator::divideMolecules
679       */
680 <    void setMolToProcMap(const std::vector<int>& molToProcMap) {
680 >    void setMolToProcMap(const vector<int>& molToProcMap) {
681        molToProcMap_ = molToProcMap;
682      }
683          
684    private:
536
537    void setupFortranParallel();
685          
686      /**
687 <     * The size of molToProcMap_ is equal to total number of molecules in the system.
688 <     *  It maps a molecule to the processor on which it resides. it is filled by SimCreator once and only
689 <     * once.
687 >     * The size of molToProcMap_ is equal to total number of molecules
688 >     * in the system.  It maps a molecule to the processor on which it
689 >     * resides. it is filled by SimCreator once and only once.
690       */        
691 <    std::vector<int> molToProcMap_;
691 >    vector<int> molToProcMap_;
692  
546 #endif
547
693    };
694  
695 < } //namespace oopse
695 > } //namespace OpenMD
696   #endif //BRAINS_SIMMODEL_HPP
697  

Comparing:
trunk/src/brains/SimInfo.hpp (property svn:keywords), Revision 507 by gezelter, Fri Apr 15 22:04:00 2005 UTC vs.
branches/development/src/brains/SimInfo.hpp (property svn:keywords), Revision 1665 by gezelter, Tue Nov 22 20:38:56 2011 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines