ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/heatflux/src/UseTheForce/Amber_FF.cpp
(Generate patch)

Comparing:
trunk/src/UseTheForce/Amber_FF.cpp (file contents), Revision 1271 by gezelter, Tue Jul 1 13:53:43 2008 UTC vs.
branches/heatflux/src/UseTheForce/Amber_FF.cpp (file contents), Revision 1670 by chuckv, Fri Jan 27 19:07:19 2012 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 50 | Line 50
50   #include "io/BondTypesSectionParser.hpp"
51   #include "io/BendTypesSectionParser.hpp"
52   #include "io/TorsionTypesSectionParser.hpp"
53 + #include "io/InversionTypesSectionParser.hpp"
54   #include "io/OptionSectionParser.hpp"
55   #include "UseTheForce/ForceFieldCreator.hpp"
56  
57 < namespace oopse {
57 > namespace OpenMD {
58      
59    Amber_FF::Amber_FF(){
60  
# Line 63 | Line 64 | namespace oopse {
64      //The order of adding section parsers is important.
65  
66      spMan_.push_back(new OptionSectionParser(forceFieldOptions_));    
66
67      spMan_.push_back(new BaseAtomTypesSectionParser());
68      spMan_.push_back(new AtomTypesSectionParser());
69      spMan_.push_back(new LennardJonesAtomTypesSectionParser(forceFieldOptions_));
# Line 71 | Line 71 | namespace oopse {
71      spMan_.push_back(new BondTypesSectionParser(forceFieldOptions_));
72      spMan_.push_back(new BendTypesSectionParser(forceFieldOptions_));
73      spMan_.push_back(new TorsionTypesSectionParser(forceFieldOptions_));
74 <    
74 >    spMan_.push_back(new InversionTypesSectionParser(forceFieldOptions_));
75    }
76  
77    void Amber_FF::parse(const std::string& filename) {
78      ifstrstream* ffStream;
79  
80      ffStream = openForceFieldFile(filename);
81
81      spMan_.parse(*ffStream, *this);
82  
83      ForceField::AtomTypeContainer::MapTypeIterator i;
# Line 86 | Line 85 | namespace oopse {
85  
86      for (at = atomTypeCont_.beginType(i); at != NULL;
87           at = atomTypeCont_.nextType(i)) {
88 <      at->makeFortranAtomType();
88 >    
89 >      // useBase sets the responsibilities, and these have to be done
90 >      // after the atomTypes and Base types have all been scanned:
91 >
92 >      std::vector<AtomType*> ayb = at->allYourBase();      
93 >      if (ayb.size() > 1) {
94 >        for (int j = ayb.size()-1; j > 0; j--) {
95 >          
96 >          ayb[j-1]->useBase(ayb[j]);
97 >
98 >        }
99 >      }
100 >      at->makeFortranAtomType();      
101      }
102  
103      for (at = atomTypeCont_.beginType(i); at != NULL;
104           at = atomTypeCont_.nextType(i)) {
105        at->complete();
106      }    
107 <
107 >    
108      delete ffStream;
109      
110    }
# Line 101 | Line 112 | namespace oopse {
112    Amber_FF::~Amber_FF(){
113      destroyLJTypes();
114    }
115 < } //end namespace oopse
115 > } //end namespace OpenMD

Comparing:
trunk/src/UseTheForce/Amber_FF.cpp (property svn:keywords), Revision 1271 by gezelter, Tue Jul 1 13:53:43 2008 UTC vs.
branches/heatflux/src/UseTheForce/Amber_FF.cpp (property svn:keywords), Revision 1670 by chuckv, Fri Jan 27 19:07:19 2012 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines