ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/primitives/Molecule.hpp
(Generate patch)

Comparing trunk/src/primitives/Molecule.hpp (file contents):
Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
Revision 1908 by gezelter, Fri Jul 19 21:25:45 2013 UTC

# Line 35 | Line 35
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).                        
38 > * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (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 83 | Line 84 | namespace OpenMD{
84      typedef std::vector<StuntDouble*>::iterator IntegrableObjectIterator;
85      typedef std::vector<ConstraintPair*>::iterator ConstraintPairIterator;
86      typedef std::vector<ConstraintElem*>::iterator ConstraintElemIterator;
87 +    typedef std::vector<Atom*>::iterator FluctuatingChargeIterator;
88      
89 <    
88 <    Molecule(int stampId, int globalIndex, const std::string& molName);
89 >    Molecule(int stampId, int globalIndex, const std::string& molName, int region);
90      virtual ~Molecule();
91 <    
91 >
92      /**
93       * Returns the global index of this molecule.
94       * @return  the global index of this molecule
# Line 106 | Line 107 | namespace OpenMD{
107      int getStampId() {
108        return stampId_;
109      }
110 +    int getRegion() {
111 +      return region_;
112 +    }
113      
114      /** Returns the name of the molecule */
115      std::string getType() {
# Line 114 | Line 118 | namespace OpenMD{
118      
119      /**
120       * Sets the global index of this molecule.
121 <     * @param new global index to be set
121 >     * @param index new global index to be set
122       */
123      void setGlobalIndex(int index) {
124        globalIndex_ = index;
125      }
126 +
127 +    void setConstrainTotalCharge(bool ctc) {
128 +      constrainTotalCharge_ = ctc;
129 +    }
130      
131 <    
131 >    bool constrainTotalCharge() {
132 >      return constrainTotalCharge_;
133 >    }
134 >
135      /** add an atom into this molecule */
136      void addAtom(Atom* atom);
137      
# Line 193 | Line 204 | namespace OpenMD{
204      unsigned int getNConstraintPairs() {
205        return constraintPairs_.size();
206      }
207 <    
207 >
208 >    /** Returns the total number of fluctuating charges in this molecule */
209 >    unsigned int getNFluctuatingCharges() {
210 >      return fluctuatingCharges_.size();
211 >    }
212 >
213      Atom* getAtomAt(unsigned int i) {
214        assert(i < atoms_.size());
215        return atoms_[i];
# Line 303 | Line 319 | namespace OpenMD{
319      ConstraintElem* nextConstraintElem(std::vector<ConstraintElem*>::iterator& i) {            
320        ++i;
321        return (i == constraintElems_.end()) ? NULL : *i;    
322 +    }
323 +
324 +    Atom* beginFluctuatingCharge(std::vector<Atom*>::iterator& i) {
325 +      i = fluctuatingCharges_.begin();
326 +      return (i == fluctuatingCharges_.end()) ? NULL : *i;
327      }
328 +    
329 +    Atom* nextFluctuatingCharge(std::vector<Atom*>::iterator& i) {
330 +      ++i;
331 +      return (i == fluctuatingCharges_.end()) ? NULL : *i;    
332 +    }
333 +
334          
335      /**
336       * Returns the total potential energy of short range interaction
# Line 381 | Line 408 | namespace OpenMD{
408      std::vector<CutoffGroup*> cutoffGroups_;
409      std::vector<ConstraintPair*> constraintPairs_;
410      std::vector<ConstraintElem*> constraintElems_;
411 +    std::vector<Atom*> fluctuatingCharges_;
412      int stampId_;
413 +    int region_;
414      std::string moleculeName_;
415      PropertyMap properties_;
416 +    bool constrainTotalCharge_;
417  
418    };
419  

Comparing trunk/src/primitives/Molecule.hpp (property svn:keywords):
Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
Revision 1908 by gezelter, Fri Jul 19 21:25:45 2013 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines