51 |
|
#include "UseTheForce/DarkSide/lj_interface.h" |
52 |
|
#include "UseTheForce/DarkSide/eam_interface.h" |
53 |
|
#include "UseTheForce/DarkSide/electrostatic_interface.h" |
54 |
+ |
#include "UseTheForce/DarkSide/suttonchen_interface.h" |
55 |
|
namespace oopse { |
56 |
|
AtomType::AtomType(){ |
57 |
|
|
74 |
|
atp.is_EAM = 0; |
75 |
|
atp.is_Shape = 0; |
76 |
|
atp.is_FLARB = 0; |
77 |
+ |
atp.is_SC = 0; |
78 |
+ |
atp.is_MEAM = 0; |
79 |
|
} |
80 |
|
|
81 |
|
void AtomType::makeFortranAtomType() { |
233 |
|
} |
234 |
|
|
235 |
|
|
236 |
+ |
if (isSC()) { |
237 |
+ |
data = getPropertyByName("SC"); |
238 |
+ |
if (data != NULL) { |
239 |
+ |
SCParamGenericData* SCData = dynamic_cast<SCParamGenericData*>(data); |
240 |
+ |
|
241 |
+ |
if (SCData != NULL) { |
242 |
+ |
|
243 |
+ |
SCParam scParam = SCData->getData(); |
244 |
+ |
|
245 |
+ |
|
246 |
+ |
newSCtype(&atp.ident, &scParam.c, &scParam.m, |
247 |
+ |
&scParam.n, &scParam.alpha, &scParam.epsilon, |
248 |
+ |
&isError ); |
249 |
+ |
|
250 |
+ |
if (isError != 0) { |
251 |
+ |
sprintf( painCave.errMsg, |
252 |
+ |
"Fortran rejected newSCtype\n"); |
253 |
+ |
painCave.severity = OOPSE_ERROR; |
254 |
+ |
painCave.isFatal = 1; |
255 |
+ |
simError(); |
256 |
+ |
} |
257 |
+ |
} else { |
258 |
+ |
sprintf( painCave.errMsg, |
259 |
+ |
"Can not cast GenericData to SCParam\n"); |
260 |
+ |
painCave.severity = OOPSE_ERROR; |
261 |
+ |
painCave.isFatal = 1; |
262 |
+ |
simError(); |
263 |
+ |
} |
264 |
+ |
} else { |
265 |
+ |
sprintf( painCave.errMsg, "Can not find SC Parameters\n"); |
266 |
+ |
painCave.severity = OOPSE_ERROR; |
267 |
+ |
painCave.isFatal = 1; |
268 |
+ |
simError(); |
269 |
+ |
} |
270 |
+ |
} |
271 |
+ |
|
272 |
+ |
|
273 |
+ |
|
274 |
|
} |
275 |
|
|
276 |
|
void AtomType::addProperty(GenericData* genData) { |