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

Comparing trunk/OOPSE-2.0/src/UseTheForce/SHAPES_FF.cpp (file contents):
Revision 2210 by chrisfen, Mon Apr 18 03:50:23 2005 UTC vs.
Revision 2211 by chrisfen, Thu Apr 21 14:12:19 2005 UTC

# Line 54 | Line 54
54   #include "io/BendTypesSectionParser.hpp"
55   #include "io/TorsionTypesSectionParser.hpp"
56   #include "UseTheForce/ForceFieldCreator.hpp"
57 + #include "UseTheForce/SHAPES_FF.hpp"
58   #include "utils/simError.h"
59   namespace oopse {
60      
61    SHAPES_FF::SHAPES_FF(){
62      
63      //set default force field filename
64 <    setForceFieldFileName("EAM.frc");
64 >    setForceFieldFileName("Shapes.frc");
65      
66 <    //The order of adding section parsers are important
67 <    //DirectionalAtomTypesSectionParser should be added before
66 >    //The ordering of section parsers is important
67 >    //DirectionalAtomTypesSectionParser should be before
68      //AtomTypesSectionParser since these two section parsers will actually
69      //create "real" AtomTypes (AtomTypesSectionParser will create AtomType
70 <    //and DirectionalAtomTypesSectionParser will creat DirectionalAtomType
70 >    //and DirectionalAtomTypesSectionParser will create DirectionalAtomType
71      //which is a subclass of AtomType, therefore it should come first). Other
72      //AtomTypes Section Parser will not create the "real" AtomType, they only
73 <    //add and set some attribute of the AtomType. Thus their order are not
74 <    //important. AtomTypesSectionParser should be added before other atom
73 >    //add and set some attribute of the AtomType. Thus the ordering of these
74 >    //are not important. AtomTypesSectionParser should be added before other atom
75      //type section parsers. Make sure they are added after
76      //DirectionalAtomTypesSectionParser and AtomTypesSectionParser. The order
77      //of BondTypesSectionParser, BendTypesSectionParser and
# Line 87 | Line 88 | namespace oopse {
88      spMan_.push_back(new BendTypesSectionParser());
89      spMan_.push_back(new TorsionTypesSectionParser());
90      
91 < }
92 <
91 >  }
92 >  
93    SHAPES_FF::~SHAPES_FF(){
94      // We need to clean up the fortran side so we don't have bad things happen if
95      // we try to create a second EAM force field.
96 <    destroyEAMTypes();
96 >    destroyShapeTypes();
97    }
98 < } //end namespace oopse
99 <
99 < void SHAPES_FF::parse(const std::string& filename) {
98 >  
99 >  void SHAPES_FF::parse(const std::string& filename) {
100      ifstrstream* ffStream;
101      ffStream = openForceFieldFile(filename);
102 <
102 >    
103      spMan_.parse(*ffStream, *this);
104 <
104 >    
105      ForceField::AtomTypeContainer::MapTypeIterator i;
106      AtomType* at;
107 <
107 >    
108      for (at = atomTypeCont_.beginType(i); at != NULL; at = atomTypeCont_.nextType(i)) {
109 <        at->makeFortranAtomType();
109 >      at->makeFortranAtomType();
110      }
111 <
111 >    
112      for (at = atomTypeCont_.beginType(i); at != NULL; at = atomTypeCont_.nextType(i)) {
113 <        at->complete();
113 >      at->complete();
114      }
115  
116 +    int isError = 0;
117 +    completeShapeFF(&isError);
118 +    
119      delete ffStream;
120 < }
121 <
122 <
123 < double SHAPES_FF::getRcutFromAtomType(AtomType* at){
124 <
125 < }
126 <
124 <
120 >  }
121 >  
122 >  
123 > //  double SHAPES_FF::getRcutFromAtomType(AtomType* at){
124 > //  }
125 > } //end namespace oopse
126 >  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines