13 |
|
|
14 |
|
// initialize to an error: |
15 |
|
atp.ident = -1; |
16 |
< |
// make the type empty: |
17 |
< |
name = NULL; |
16 |
> |
|
17 |
|
// and massless: |
18 |
|
mass = 0.0; |
19 |
|
|
20 |
|
// atom type is a Tabula Rasa: |
21 |
+ |
atp.is_Directional = 0; |
22 |
|
atp.is_LennardJones = 0; |
23 |
|
atp.is_Electrostatic = 0; |
24 |
|
atp.is_Charge = 0; |
25 |
< |
atp.is_Directional = 0; |
25 |
> |
atp.is_Dipole = 0; |
26 |
|
atp.is_Sticky = 0; |
27 |
|
atp.is_GayBerne = 0; |
28 |
|
atp.is_EAM = 0; |
30 |
|
atp.is_FLARB = 0; |
31 |
|
} |
32 |
|
|
33 |
– |
AtomType::~AtomType() { |
34 |
– |
if ( name != NULL ) free(name); |
35 |
– |
} |
36 |
– |
|
33 |
|
void AtomType::complete() { |
34 |
|
|
35 |
|
int status; |
36 |
|
|
37 |
< |
if (name == NULL) { |
37 |
> |
if (name.empty()) { |
38 |
|
sprintf( painCave.errMsg, |
39 |
|
"Attempting to complete an AtomType without giving " |
40 |
|
"it a name!\n"); |
46 |
|
if (atp.ident == -1) { |
47 |
|
sprintf( painCave.errMsg, |
48 |
|
"Attempting to complete AtomType %s without setting the" |
49 |
< |
" ident!/n", name); |
49 |
> |
" ident!/n", name.c_str()); |
50 |
|
painCave.severity = OOPSE_ERROR; |
51 |
|
painCave.isFatal = 1; |
52 |
|
simError(); |
54 |
|
|
55 |
|
status = 0; |
56 |
|
|
57 |
< |
makeAtype(atp, &status); |
57 |
> |
makeAtype(&atp, &status); |
58 |
|
|
59 |
|
if (status != 0) { |
60 |
|
sprintf( painCave.errMsg, |
61 |
< |
"Fortran rejected AtomType %s!\n", name); |
61 |
> |
"Fortran rejected AtomType %s!\n", name.c_str()); |
62 |
|
painCave.severity = OOPSE_ERROR; |
63 |
|
painCave.isFatal = 1; |
64 |
|
simError(); |