97 |
|
simError(); |
98 |
|
} |
99 |
|
} |
100 |
< |
} else if (atomType->isEAM()) { |
101 |
< |
GenericData* data = atomType->getPropertyByName("EAM"); |
102 |
< |
if (data != NULL) { |
103 |
< |
EAMParamGenericData* eamData = dynamic_cast<EAMParamGenericData*>(data); |
104 |
< |
if (eamData != NULL) { |
105 |
< |
EAMParam eamParam = eamData->getData(); |
106 |
< |
BeadParam currBead; |
107 |
< |
currBead.atomName = atom->getType(); |
108 |
< |
currBead.pos = atom->getPos(); |
109 |
< |
currBead.radius = eamParam.rcut; |
110 |
< |
beads.push_back(currBead); |
111 |
< |
} else { |
112 |
< |
sprintf( painCave.errMsg, |
113 |
< |
"Can not cast GenericData to EAMParam\n"); |
114 |
< |
painCave.severity = OOPSE_ERROR; |
115 |
< |
painCave.isFatal = 1; |
116 |
< |
simError(); |
117 |
< |
} |
100 |
> |
} else { |
101 |
> |
int obanum = etab.GetAtomicNum((atom->getType()).c_str()); |
102 |
> |
if (obanum != 0) { |
103 |
> |
BeadParam currBead; |
104 |
> |
currBead.atomName = atom->getType(); |
105 |
> |
currBead.pos = atom->getPos(); |
106 |
> |
currBead.radius = etab.GetVdwRad(obanum); |
107 |
> |
std::cout << "using rvdw = " << currBead.radius << " for atomic number " << obanum << "\n"; |
108 |
> |
beads.push_back(currBead); |
109 |
> |
} else { |
110 |
> |
sprintf( painCave.errMsg, |
111 |
> |
"Could not find atom type in default element.txt\n"); |
112 |
> |
painCave.severity = OOPSE_ERROR; |
113 |
> |
painCave.isFatal = 1; |
114 |
> |
simError(); |
115 |
|
} |
116 |
< |
return true; |
117 |
< |
} |
116 |
> |
} |
117 |
> |
return true; |
118 |
|
} |
119 |
|
} |