ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/nonbonded/SHAPES.cpp
(Generate patch)

Comparing branches/development/src/nonbonded/SHAPES.cpp (file contents):
Revision 1505 by gezelter, Sun Oct 3 22:18:59 2010 UTC vs.
Revision 1635 by gezelter, Thu Sep 15 16:24:03 2011 UTC

# Line 85 | Line 85 | namespace OpenMD {
85      // add it to the map:
86      AtomTypeProperties atp = atomType->getATP();    
87  
88 <    pair<map<int,ShapeAtomType*>::iterator, bool> ret;
89 <    ret = shapesMap.insert( pair<int, ShapeAtomType*>(atp.ident, atomType));
90 <    if (ret.second == false) {
91 <      sprintf( painCave.errmsg,
92 <               "SHAPES already had a previous entry with ident %d\n",
93 <               atp.ident);
94 <      painCave.severity = OPENMD_INFO;
95 <      painCave.isFatal = 0;
96 <      simError();        
97 <    }  
98 <    
99 <    ShapesMap.insert( pair<int, ShapeAtomType*>(atp.ident, sAtomType) );
100 <    
101 <  } else if (atomType->isLennardJones()) {
102 <      d1 = getLJSigma(atomType) / sqrt(2.0);
103 <      e1 = getLJEpsilon(atomType);
88 >    if (atomType->isShape() ) {
89 >      pair<map<int,ShapeAtomType*>::iterator, bool> ret;
90 >      ret = ShapesMap.insert( pair<int, ShapeAtomType*>(atp.ident, atomType));
91 >      if (ret.second == false) {
92 >        sprintf( painCave.errMsg,
93 >                 "SHAPES already had a previous entry with ident %d\n",
94 >                 atp.ident);
95 >        painCave.severity = OPENMD_INFO;
96 >        painCave.isFatal = 0;
97 >        simError();        
98 >      }  
99 >      
100 >      ShapesMap.insert( pair<int, ShapeAtomType*>(atp.ident, static_cast<ShapeAtomType*>(atomType)) );
101 >      
102 >    } else if (atomType->isLennardJones()) {
103 >      RealType d1 = getLJSigma(atomType) / sqrt(2.0);
104 >      RealType e1 = getLJEpsilon(atomType);
105      } else {
106        sprintf( painCave.errMsg,
107                 "SHAPES::addType was passed an atomType (%s) that does not\n"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines