| 75 | 
  | 
          simError();           | 
| 76 | 
  | 
        }        | 
| 77 | 
  | 
      } | 
| 78 | 
< | 
    } else if (atomType->isEAM()) { | 
| 79 | 
< | 
      GenericData* data = atomType->getPropertyByName("EAM"); | 
| 80 | 
< | 
      if (data != NULL) { | 
| 81 | 
< | 
        EAMParamGenericData* eamData = dynamic_cast<EAMParamGenericData*>(data); | 
| 82 | 
< | 
         | 
| 83 | 
< | 
        if (eamData != NULL) { | 
| 84 | 
< | 
          EAMParam eamParam = eamData->getData(); | 
| 85 | 
< | 
          currShape = new Spheric(atom->getPos(), eamParam.rcut); | 
| 86 | 
< | 
        } else { | 
| 87 | 
< | 
          sprintf( painCave.errMsg, | 
| 88 | 
< | 
                   "Can not cast GenericData to EAMParam\n"); | 
| 89 | 
< | 
          painCave.severity = OOPSE_ERROR; | 
| 90 | 
< | 
          painCave.isFatal = 1; | 
| 91 | 
< | 
          simError();           | 
| 92 | 
< | 
        }        | 
| 78 | 
> | 
    } else { | 
| 79 | 
> | 
      int obanum = etab.GetAtomicNum((atom->getType()).c_str()); | 
| 80 | 
> | 
      if (obanum != 0) { | 
| 81 | 
> | 
        currShape = new Spheric(atom->getPos(), etab.GetVdwRad(obanum)); | 
| 82 | 
> | 
      } else { | 
| 83 | 
> | 
        sprintf( painCave.errMsg, | 
| 84 | 
> | 
                 "Could not find atom type in default element.txt\n"); | 
| 85 | 
> | 
        painCave.severity = OOPSE_ERROR; | 
| 86 | 
> | 
        painCave.isFatal = 1; | 
| 87 | 
> | 
        simError();           | 
| 88 | 
  | 
      } | 
| 89 | 
< | 
    }     | 
| 89 | 
> | 
    } | 
| 90 | 
  | 
    return currShape; | 
| 91 | 
  | 
  } | 
| 92 | 
  | 
   | 
| 131 | 
  | 
          painCave.isFatal = 1; | 
| 132 | 
  | 
          simError();           | 
| 133 | 
  | 
        }        | 
| 134 | 
< | 
      } else if (atomType->isEAM()) { | 
| 135 | 
< | 
        GenericData* data = atomType->getPropertyByName("EAM"); | 
| 136 | 
< | 
        if (data != NULL) { | 
| 137 | 
< | 
          EAMParamGenericData* eamData = dynamic_cast<EAMParamGenericData*>(data);           | 
| 138 | 
< | 
          if (eamData != NULL) { | 
| 139 | 
< | 
            EAMParam eamParam = eamData->getData(); | 
| 140 | 
< | 
            currShape = new Spheric(datom->getPos(), eamParam.rcut); | 
| 141 | 
< | 
          } else { | 
| 142 | 
< | 
            sprintf( painCave.errMsg, | 
| 143 | 
< | 
                     "Can not cast GenericData to EAMParam\n"); | 
| 149 | 
< | 
            painCave.severity = OOPSE_ERROR; | 
| 150 | 
< | 
            painCave.isFatal = 1; | 
| 151 | 
< | 
            simError();           | 
| 152 | 
< | 
          }        | 
| 134 | 
> | 
      } else { | 
| 135 | 
> | 
        int obanum = etab.GetAtomicNum((datom->getType()).c_str()); | 
| 136 | 
> | 
        if (obanum != 0) { | 
| 137 | 
> | 
          currShape = new Spheric(datom->getPos(), etab.GetVdwRad(obanum)); | 
| 138 | 
> | 
        } else { | 
| 139 | 
> | 
          sprintf( painCave.errMsg, | 
| 140 | 
> | 
                   "Could not find atom type in default element.txt\n"); | 
| 141 | 
> | 
          painCave.severity = OOPSE_ERROR; | 
| 142 | 
> | 
          painCave.isFatal = 1; | 
| 143 | 
> | 
          simError();           | 
| 144 | 
  | 
        } | 
| 145 | 
< | 
      } | 
| 145 | 
> | 
      }       | 
| 146 | 
  | 
    } | 
| 147 | 
  | 
    return currShape; | 
| 148 | 
  | 
  } |