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

Comparing trunk/src/UseTheForce/CLAYFF.cpp (file contents):
Revision 788 by gezelter, Mon Dec 5 22:23:57 2005 UTC vs.
Revision 1280 by gezelter, Wed Jul 16 02:07:09 2008 UTC

# Line 43 | Line 43
43   #include "UseTheForce/CLAYFF.hpp"
44   #include "UseTheForce/DarkSide/lj_interface.h"
45   #include "UseTheForce/ForceFieldFactory.hpp"
46 + #include "io/BaseAtomTypesSectionParser.hpp"
47   #include "io/AtomTypesSectionParser.hpp"
48   #include "io/LennardJonesAtomTypesSectionParser.hpp"
49   #include "io/ChargeAtomTypesSectionParser.hpp"
# Line 59 | Line 60 | namespace oopse {
60      setForceFieldFileName("CLAYFF.frc");
61  
62      spMan_.push_back(new OptionSectionParser(forceFieldOptions_));    
63 +    spMan_.push_back(new BaseAtomTypesSectionParser());
64      spMan_.push_back(new AtomTypesSectionParser());
65 <    spMan_.push_back(new LennardJonesAtomTypesSectionParser());
66 <    spMan_.push_back(new ChargeAtomTypesSectionParser());
67 <    spMan_.push_back(new BondTypesSectionParser());
68 <    spMan_.push_back(new BendTypesSectionParser());
65 >    spMan_.push_back(new LennardJonesAtomTypesSectionParser(forceFieldOptions_));
66 >    spMan_.push_back(new ChargeAtomTypesSectionParser(forceFieldOptions_));
67 >    spMan_.push_back(new BondTypesSectionParser(forceFieldOptions_));
68 >    spMan_.push_back(new BendTypesSectionParser(forceFieldOptions_));
69      
70    }
71  
# Line 78 | Line 80 | namespace oopse {
80  
81      for (at = atomTypeCont_.beginType(i); at != NULL;
82           at = atomTypeCont_.nextType(i)) {
83 +      // useBase sets the responsibilities, and these have to be done
84 +      // after the atomTypes and Base types have all been scanned:
85 +
86 +      std::vector<AtomType*> ayb = at->allYourBase();      
87 +      if (ayb.size() > 1) {
88 +        for (int j = ayb.size()-1; j > 0; j--) {
89 +          
90 +          ayb[j-1]->useBase(ayb[j]);
91 +
92 +        }
93 +      }
94        at->makeFortranAtomType();
95      }
96  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines