ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/UseTheForce/EAM.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-3.0/src/UseTheForce/EAM.cpp (file contents):
Revision 1891 by tim, Wed Dec 15 21:07:48 2004 UTC vs.
Revision 1892 by tim, Thu Dec 16 17:27:47 2004 UTC

# Line 39 | Line 39
39   #include "io/BendTypesSectionParser.hpp"
40   #include "io/TorsionTypesSectionParser.hpp"
41   #include "UseTheForce/ForceFieldCreator.hpp"
42 <
42 > #include "utils/simError.h"
43   namespace oopse {
44      
45   EAM::EAM(){
# Line 88 | Line 88 | void EAM::parse(const std::string& filename) {
88      
89   }
90  
91 +
92 + double EAM::getRcutFromAtomType(AtomType* at){
93 +    
94 +    if (at->isEAM()) {
95 +        GenericData* data = at->getPropertyByName("EAM");
96 +        if (data != NULL) {
97 +            EAMParamGenericData* eamData = dynamic_cast<EAMParamGenericData*>(data);
98 +
99 +            if (eamData != NULL) {
100 +
101 +                EAMParam& eamParam = eamData->getData();
102 +                return eamParam.rcut;
103 +            } else {
104 +                    sprintf( painCave.errMsg,
105 +                           "Can not cast GenericData to EAMParam\n");
106 +                    painCave.severity = OOPSE_ERROR;
107 +                    painCave.isFatal = 1;
108 +                    simError();          
109 +            }
110 +        } else {
111 +            sprintf( painCave.errMsg, "Can not find EAM Parameters\n");
112 +            painCave.severity = OOPSE_ERROR;
113 +            painCave.isFatal = 1;
114 +            simError();          
115 +        }
116 +    }    else {
117 +        return ForceField::getRcutFromAtomType(at);
118 +    }
119 +    
120 + }
121 +
122   } //end namespace oopse

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines