ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/UseTheForce/EAM_FF.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/UseTheForce/EAM_FF.cpp (file contents):
Revision 3434 by tim, Wed May 17 21:51:42 2006 UTC vs.
Revision 3435 by gezelter, Wed Jul 16 02:07:09 2008 UTC

# Line 45 | Line 45
45   #include "UseTheForce/DarkSide/sticky_interface.h"
46   #include "UseTheForce/ForceFieldFactory.hpp"
47   #include "io/DirectionalAtomTypesSectionParser.hpp"
48 + #include "io/BaseAtomTypesSectionParser.hpp"
49   #include "io/AtomTypesSectionParser.hpp"
50   #include "io/LennardJonesAtomTypesSectionParser.hpp"
51   #include "io/ChargeAtomTypesSectionParser.hpp"
# Line 76 | Line 77 | namespace oopse {
77      //The order of BondTypesSectionParser, BendTypesSectionParser and TorsionTypesSectionParser are
78      //not important.
79      spMan_.push_back(new OptionSectionParser(forceFieldOptions_));
80 +    spMan_.push_back(new BaseAtomTypesSectionParser());
81      spMan_.push_back(new AtomTypesSectionParser());
82      spMan_.push_back(new EAMAtomTypesSectionParser(forceFieldOptions_));
83  
# Line 92 | Line 94 | namespace oopse {
94      AtomType* at;
95  
96      for (at = atomTypeCont_.beginType(i); at != NULL; at = atomTypeCont_.nextType(i)) {
97 +      // useBase sets the responsibilities, and these have to be done
98 +      // after the atomTypes and Base types have all been scanned:
99 +
100 +      std::vector<AtomType*> ayb = at->allYourBase();      
101 +      if (ayb.size() > 1) {
102 +        for (int j = ayb.size()-1; j > 0; j--) {
103 +          
104 +          ayb[j-1]->useBase(ayb[j]);
105 +
106 +        }
107 +      }
108        at->makeFortranAtomType();
109      }
110  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines