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

Comparing:
trunk/src/primitives/Molecule.hpp (file contents), Revision 1211 by gezelter, Wed Jan 23 16:38:22 2008 UTC vs.
branches/development/src/primitives/Molecule.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 58 | Line 59
59   #include "primitives/Bond.hpp"
60   #include "primitives/Bend.hpp"
61   #include "primitives/Torsion.hpp"
62 + #include "primitives/Inversion.hpp"
63   #include "primitives/CutoffGroup.hpp"
64 + #include "utils/PropertyMap.hpp"
65  
66 < namespace oopse{
66 > namespace OpenMD{
67  
68    class Constraint;
69  
# Line 75 | Line 78 | namespace oopse{
78      typedef std::vector<Bond*>::iterator BondIterator;
79      typedef std::vector<Bend*>::iterator BendIterator;
80      typedef std::vector<Torsion*>::iterator TorsionIterator;
81 +    typedef std::vector<Inversion*>::iterator InversionIterator;
82      typedef std::vector<RigidBody*>::iterator RigidBodyIterator;
83      typedef std::vector<CutoffGroup*>::iterator CutoffGroupIterator;
84      typedef std::vector<StuntDouble*>::iterator IntegrableObjectIterator;
# Line 84 | Line 88 | namespace oopse{
88      
89      Molecule(int stampId, int globalIndex, const std::string& molName);
90      virtual ~Molecule();
91 <    
91 >
92      /**
93       * Returns the global index of this molecule.
94       * @return  the global index of this molecule
# Line 129 | Line 133 | namespace oopse{
133      
134      /** add a torsion into this molecule*/
135      void addTorsion(Torsion* torsion);
136 +
137 +    /** add an improper torsion into this molecule*/
138 +    void addInversion(Inversion* inversion);
139      
140      /** add a rigidbody into this molecule */
141      void addRigidBody(RigidBody *rb);
# Line 162 | Line 169 | namespace oopse{
169      unsigned int getNTorsions() {
170        return torsions_.size();
171      }
172 +
173 +    /** Returns the total number of improper torsions in this molecule */
174 +    unsigned int getNInversions() {
175 +      return inversions_.size();
176 +    }
177      
178      /** Returns the total number of rigid bodies in this molecule */        
179      unsigned int getNRigidBodies() {
# Line 233 | Line 245 | namespace oopse{
245        ++i;
246        return (i == torsions_.end()) ? NULL : *i;    
247      }    
248 +
249 +    Inversion* beginInversion(std::vector<Inversion*>::iterator& i) {
250 +      i = inversions_.begin();
251 +      return (i == inversions_.end()) ? NULL : *i;
252 +    }
253      
254 +    Inversion* nextInversion(std::vector<Inversion*>::iterator& i) {
255 +      ++i;
256 +      return (i == inversions_.end()) ? NULL : *i;    
257 +    }    
258 +    
259      RigidBody* beginRigidBody(std::vector<RigidBody*>::iterator& i) {
260        i = rigidBodies_.begin();
261        return (i == rigidBodies_.end()) ? NULL : *i;
# Line 283 | Line 305 | namespace oopse{
305        ++i;
306        return (i == constraintElems_.end()) ? NULL : *i;    
307      }
308 <    
308 >        
309      /**
310       * Returns the total potential energy of short range interaction
311       * of this molecule
# Line 307 | Line 329 | namespace oopse{
329      }
330          
331      friend std::ostream& operator <<(std::ostream& o, Molecule& mol);
332 +
333 +    //below functions are just forward functions
334 +    /**
335 +     * Adds property into property map
336 +     * @param genData GenericData to be added into PropertyMap
337 +     */
338 +    void addProperty(GenericData* genData);
339 +
340 +    /**
341 +     * Removes property from PropertyMap by name
342 +     * @param propName the name of property to be removed
343 +     */
344 +    void removeProperty(const std::string& propName);
345 +
346 +    /**
347 +     * clear all of the properties
348 +     */
349 +    void clearProperties();
350 +
351 +    /**
352 +     * Returns all names of properties
353 +     * @return all names of properties
354 +     */
355 +    std::vector<std::string> getPropertyNames();
356 +
357 +    /**
358 +     * Returns all of the properties in PropertyMap
359 +     * @return all of the properties in PropertyMap
360 +     */      
361 +    std::vector<GenericData*> getProperties();
362 +
363 +    /**
364 +     * Returns property
365 +     * @param propName name of property
366 +     * @return a pointer point to property with propName. If no property named propName
367 +     * exists, return NULL
368 +     */      
369 +    GenericData* getPropertyByName(const std::string& propName);
370      
371    private:
372      
# Line 316 | Line 376 | namespace oopse{
376      std::vector<Bond*> bonds_;
377      std::vector<Bend*> bends_;
378      std::vector<Torsion*> torsions_;
379 +    std::vector<Inversion*> inversions_;
380      std::vector<RigidBody*> rigidBodies_;
381      std::vector<StuntDouble*> integrableObjects_;
382      std::vector<CutoffGroup*> cutoffGroups_;
# Line 323 | Line 384 | namespace oopse{
384      std::vector<ConstraintElem*> constraintElems_;
385      int stampId_;
386      std::string moleculeName_;
387 +    PropertyMap properties_;
388 +
389    };
390  
391 < } //namespace oopse
391 > } //namespace OpenMD
392   #endif //

Comparing:
trunk/src/primitives/Molecule.hpp (property svn:keywords), Revision 1211 by gezelter, Wed Jan 23 16:38:22 2008 UTC vs.
branches/development/src/primitives/Molecule.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