Newer
Older
static const MagneticIon Pd0("Pd", static_cast<uint16_t>(0), j_Pd0[0],
j_Pd0[1], j_Pd0[2], j_Pd0[3], 2.);
static const MagneticIon Pd1("Pd", static_cast<uint16_t>(1), j_Pd1[0],
j_Pd1[1], j_Pd1[2], j_Pd1[3], 2.);
static const MagneticIon Ce2("Ce", static_cast<uint16_t>(2), j_Ce2[0],
j_Ce2[1], j_Ce2[2], j_Ce2[3], 0.8);
static const MagneticIon Ce3("Ce", static_cast<uint16_t>(2), j_Ce2[0],
ion_map["Ce3"] = Ce3;
static const MagneticIon Nd2("Nd", static_cast<uint16_t>(2), j_Nd2[0],
j_Nd2[1], j_Nd2[2], j_Nd2[3], 0.6);
static const MagneticIon Nd3("Nd", static_cast<uint16_t>(3), j_Nd3[0],
static const MagneticIon Sm2("Sm", static_cast<uint16_t>(2), j_Sm2[0],
j_Sm2[1], j_Sm2[2], j_Sm2[3], 0.);
static const MagneticIon Sm3("Sm", static_cast<uint16_t>(3), j_Sm3[0],
static const MagneticIon Eu2("Eu", static_cast<uint16_t>(2), j_Eu2[0],
j_Eu2[1], j_Eu2[2], j_Eu2[3], 2.);
static const MagneticIon Eu3("Eu", static_cast<uint16_t>(3), j_Eu3[0],
j_Eu3[1], j_Eu3[2], j_Eu3[3], 0.);
static const MagneticIon Gd2("Gd", static_cast<uint16_t>(2), j_Gd2[0],
j_Gd2[1], j_Gd2[2], j_Gd2[3], 1.5);
static const MagneticIon Gd3("Gd", static_cast<uint16_t>(3), j_Gd3[0],
j_Gd3[1], j_Gd3[2], j_Gd3[3], 2.);
static const MagneticIon Tb2("Tb", static_cast<uint16_t>(2), j_Tb2[0],
static const MagneticIon Tb3("Tb", static_cast<uint16_t>(3), j_Tb3[0],
j_Tb3[1], j_Tb3[2], j_Tb3[3], 1.5);
static const MagneticIon Dy2("Dy", static_cast<uint16_t>(2), j_Dy2[0],
j_Dy2[1], j_Dy2[2], j_Dy2[3], 1.25);
static const MagneticIon Dy3("Dy", static_cast<uint16_t>(3), j_Dy3[0],
static const MagneticIon Ho2("Ho", static_cast<uint16_t>(2), j_Ho2[0],
j_Ho2[1], j_Ho2[2], j_Ho2[3], 1.2);
static const MagneticIon Ho3("Ho", static_cast<uint16_t>(3), j_Ho3[0],
j_Ho3[1], j_Ho3[2], j_Ho3[3], 1.25);
static const MagneticIon Er2("Er", static_cast<uint16_t>(2), j_Er2[0],
static const MagneticIon Er3("Er", static_cast<uint16_t>(3), j_Er3[0],
j_Er3[1], j_Er3[2], j_Er3[3], 1.2);
static const MagneticIon Tm2("Tm", static_cast<uint16_t>(2), j_Tm2[0],
static const MagneticIon Tm3("Tm", static_cast<uint16_t>(3), j_Tm3[0],
static const MagneticIon Yb2("Yb", static_cast<uint16_t>(2), j_Yb2[0],
j_Yb2[1], j_Yb2[2], j_Yb2[3], 2.);
static const MagneticIon Yb3("Yb", static_cast<uint16_t>(3), j_Yb3[0],
static const MagneticIon Pr3("Pr", static_cast<uint16_t>(3), j_Pr3[0],
static const MagneticIon U3("U", static_cast<uint16_t>(3), j_U3[0], j_U3[1],
static const MagneticIon U4("U", static_cast<uint16_t>(4), j_U4[0], j_U4[1],
j_U4[2], j_U4[3], 0.8);
static const MagneticIon U5("U", static_cast<uint16_t>(5), j_U5[0], j_U5[1],
static const MagneticIon Np3("Np", static_cast<uint16_t>(3), j_Np3[0],
j_Np3[1], j_Np3[2], j_Np3[3], 0.6);
static const MagneticIon Np4("Np", static_cast<uint16_t>(4), j_Np4[0],
static const MagneticIon Np5("Np", static_cast<uint16_t>(5), j_Np5[0],
j_Np5[1], j_Np5[2], j_Np5[3], 0.8);
static const MagneticIon Np6("Np", static_cast<uint16_t>(6), j_Np6[0],
static const MagneticIon Pu3("Pu", static_cast<uint16_t>(3), j_Pu3[0],
static const MagneticIon Pu4("Pu", static_cast<uint16_t>(4), j_Pu4[0],
j_Pu4[1], j_Pu4[2], j_Pu4[3], 0.6);
static const MagneticIon Pu5("Pu", static_cast<uint16_t>(5), j_Pu5[0],
static const MagneticIon Pu6("Pu", static_cast<uint16_t>(6), j_Pu6[0],
j_Pu6[1], j_Pu6[2], j_Pu6[3], 0.8);
static const MagneticIon Am2("Am", static_cast<uint16_t>(2), j_Am2[0],
j_Am2[1], j_Am2[2], j_Am2[3], 2.);
static const MagneticIon Am3("Am", static_cast<uint16_t>(3), j_Am3[0],
j_Am3[1], j_Am3[2], j_Am3[3], 0.);
static const MagneticIon Am4("Am", static_cast<uint16_t>(4), j_Am4[0],
static const MagneticIon Am5("Am", static_cast<uint16_t>(5), j_Am5[0],
j_Am5[1], j_Am5[2], j_Am5[3], 0.6);
static const MagneticIon Am6("Am", static_cast<uint16_t>(6), j_Am6[0],
static const MagneticIon Am7("Am", static_cast<uint16_t>(7), j_Am7[0],
j_Am7[1], j_Am7[2], j_Am7[3], 0.8);
// 5d ions
static const MagneticIon Hf2("Hf", static_cast<uint16_t>(2), j_Hf2[0],
j_Hf2[1], j_Hf2[2], 2.);
ion_map["Hf2"] = Hf2;
static const MagneticIon Hf3("Hf", static_cast<uint16_t>(3), j_Hf3[0],
j_Hf3[1], j_Hf3[2], 2.);
ion_map["Hf3"] = Hf3;
static const MagneticIon Ta2("Ta", static_cast<uint16_t>(2), j_Ta2[0],
j_Ta2[1], j_Ta2[2], 2.);
ion_map["Ta2"] = Ta2;
static const MagneticIon Ta3("Ta", static_cast<uint16_t>(3), j_Ta3[0],
j_Ta3[1], j_Ta3[2], 2.);
ion_map["Ta3"] = Ta3;
static const MagneticIon Ta4("Ta", static_cast<uint16_t>(4), j_Ta4[0],
j_Ta4[1], j_Ta4[2], 2.);
ion_map["Ta4"] = Ta4;
static const MagneticIon W0("W", static_cast<uint16_t>(0), j_W0[0], j_W0[1],
j_W0[2], 2.);
ion_map["W0"] = W0;
static const MagneticIon W1("W", static_cast<uint16_t>(1), j_W1[0], j_W1[1],
j_W1[2], 2.);
ion_map["W1"] = W1;
static const MagneticIon W2("W", static_cast<uint16_t>(2), j_W2[0], j_W2[1],
j_W2[2], 2.);
ion_map["W2"] = W2;
static const MagneticIon W3("W", static_cast<uint16_t>(3), j_W3[0], j_W3[1],
j_W3[2], 2.);
ion_map["W3"] = W3;
static const MagneticIon W4("W", static_cast<uint16_t>(4), j_W4[0], j_W4[1],
j_W4[2], 2.);
ion_map["W4"] = W4;
static const MagneticIon W5("W", static_cast<uint16_t>(5), j_W5[0], j_W5[1],
j_W5[2], 2.);
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
ion_map["W5"] = W5;
static const MagneticIon Re0("Re", static_cast<uint16_t>(0), j_Re0[0],
j_Re0[1], j_Re0[2], 2.);
ion_map["Re0"] = Re0;
static const MagneticIon Re1("Re", static_cast<uint16_t>(1), j_Re1[0],
j_Re1[1], j_Re1[2], 2.);
ion_map["Re1"] = Re1;
static const MagneticIon Re2("Re", static_cast<uint16_t>(2), j_Re2[0],
j_Re2[1], j_Re2[2], 2.);
ion_map["Re2"] = Re2;
static const MagneticIon Re3("Re", static_cast<uint16_t>(3), j_Re3[0],
j_Re3[1], j_Re3[2], 2.);
ion_map["Re3"] = Re3;
static const MagneticIon Re4("Re", static_cast<uint16_t>(4), j_Re4[0],
j_Re4[1], j_Re4[2], 2.);
ion_map["Re4"] = Re4;
static const MagneticIon Re5("Re", static_cast<uint16_t>(5), j_Re5[0],
j_Re5[1], j_Re5[2], 2.);
ion_map["Re5"] = Re5;
static const MagneticIon Re6("Re", static_cast<uint16_t>(6), j_Re6[0],
j_Re6[1], j_Re6[2], 2.);
ion_map["Re6"] = Re6;
static const MagneticIon Os0("Os", static_cast<uint16_t>(0), j_Os0[0],
j_Os0[1], j_Os0[2], 2.);
ion_map["Os0"] = Os0;
static const MagneticIon Os1("Os", static_cast<uint16_t>(1), j_Os1[0],
j_Os1[1], j_Os1[2], 2.);
ion_map["Os1"] = Os1;
static const MagneticIon Os2("Os", static_cast<uint16_t>(2), j_Os2[0],
j_Os2[1], j_Os2[2], 2.);
ion_map["Os2"] = Os2;
static const MagneticIon Os3("Os", static_cast<uint16_t>(3), j_Os3[0],
j_Os3[1], j_Os3[2], 2.);
ion_map["Os3"] = Os3;
static const MagneticIon Os4("Os", static_cast<uint16_t>(4), j_Os4[0],
j_Os4[1], j_Os4[2], 2.);
ion_map["Os4"] = Os4;
static const MagneticIon Os5("Os", static_cast<uint16_t>(5), j_Os5[0],
j_Os5[1], j_Os5[2], 2.);
ion_map["Os5"] = Os5;
static const MagneticIon Os6("Os", static_cast<uint16_t>(6), j_Os6[0],
j_Os6[1], j_Os6[2], 2.);
ion_map["Os6"] = Os6;
static const MagneticIon Os7("Os", static_cast<uint16_t>(7), j_Os7[0],
j_Os7[1], j_Os7[2], 2.);
ion_map["Os7"] = Os7;
static const MagneticIon Ir0("Ir", static_cast<uint16_t>(0), j_Ir0[0],
j_Ir0[1], j_Ir0[2], 2.);
ion_map["Ir0"] = Ir0;
static const MagneticIon Ir1("Ir", static_cast<uint16_t>(1), j_Ir1[0],
j_Ir1[1], j_Ir1[2], 2.);
ion_map["Ir1"] = Ir1;
static const MagneticIon Ir2("Ir", static_cast<uint16_t>(2), j_Ir2[0],
j_Ir2[1], j_Ir2[2], 2.);
ion_map["Ir2"] = Ir2;
static const MagneticIon Ir3("Ir", static_cast<uint16_t>(3), j_Ir3[0],
j_Ir3[1], j_Ir3[2], 2.);
ion_map["Ir3"] = Ir3;
static const MagneticIon Ir4("Ir", static_cast<uint16_t>(4), j_Ir4[0],
j_Ir4[1], j_Ir4[2], 2.);
ion_map["Ir4"] = Ir4;
static const MagneticIon Ir5("Ir", static_cast<uint16_t>(5), j_Ir5[0],
j_Ir5[1], j_Ir5[2], 2.);
ion_map["Ir5"] = Ir5;
static const MagneticIon Ir6("Ir", static_cast<uint16_t>(6), j_Ir6[0],
j_Ir6[1], j_Ir6[2], 2.);
ion_map["Ir6"] = Ir6;
static const MagneticIon Pt1("Pt", static_cast<uint16_t>(1), j_Pt1[0],
j_Pt1[1], j_Pt1[2], 2.);
ion_map["Pt1"] = Pt1;
static const MagneticIon Pt2("Pt", static_cast<uint16_t>(2), j_Pt2[0],
j_Pt2[1], j_Pt2[2], 2.);
ion_map["Pt2"] = Pt2;
static const MagneticIon Pt3("Pt", static_cast<uint16_t>(3), j_Pt3[0],
j_Pt3[1], j_Pt3[2], 2.);
ion_map["Pt3"] = Pt3;
static const MagneticIon Pt4("Pt", static_cast<uint16_t>(4), j_Pt4[0],
j_Pt4[1], j_Pt4[2], 2.);
ion_map["Pt4"] = Pt4;
static const MagneticIon Pt5("Pt", static_cast<uint16_t>(5), j_Pt5[0],
j_Pt5[1], j_Pt5[2], 2.);
ion_map["Pt5"] = Pt5;
static const MagneticIon Pt6("Pt", static_cast<uint16_t>(6), j_Pt6[0],
j_Pt6[1], j_Pt6[2], 2.);
ion_map["Pt6"] = Pt6;
static const MagneticIon Au1("Au", static_cast<uint16_t>(1), j_Au1[0],
j_Au1[1], j_Au1[2], 2.);
ion_map["Au1"] = Au1;
static const MagneticIon Au2("Au", static_cast<uint16_t>(2), j_Au2[0],
j_Au2[1], j_Au2[2], 2.);
ion_map["Au2"] = Au2;
static const MagneticIon Au3("Au", static_cast<uint16_t>(3), j_Au3[0],
j_Au3[1], j_Au3[2], 2.);
ion_map["Au3"] = Au3;
static const MagneticIon Au4("Au", static_cast<uint16_t>(4), j_Au4[0],
j_Au4[1], j_Au4[2], 2.);
ion_map["Au4"] = Au4;
static const MagneticIon Au5("Au", static_cast<uint16_t>(5), j_Au5[0],
j_Au5[1], j_Au5[2], 2.);
ion_map["Au5"] = Au5;
/**
* Returns a MagneticIon corresponding to the given symbol containing the atom &
* charge
* Throws std::runtime_error if one cannot be found
* @param symbol :: The string symbol
* @return A reference to the required ion
*/
const MagneticIon &getMagneticIon(const std::string &symbol) {
const IonIndex &ionIndex = ionMap();
if (cit == ionIndex.end()) {
// no such combination
std::stringstream msg;
msg << "Failed to find an atom using symbol=" << symbol;
throw std::runtime_error(msg.str());
} else {
return cit->second;
}
}
/**
* Returns a MagneticIon corresponding to the given symbol & charge.
* Throws std::runtime_error if one cannot be found
* @param symbol :: The string symbol
* @param charge :: The charge
* @return
*/
const MagneticIon &getMagneticIon(const std::string &symbol,
const uint16_t charge) {
std::stringstream what;
what << symbol << charge;
return getMagneticIon(what.str());
}
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
/**
* Returns the coffieients for a given angular momentum
* @param symbol :: The string symbol defining the element
* @param charge :: The charge
* @param l :: The angular momentum
* @return The coefficients or throws if either the ion doesn't exist or the
* angular momentum is invalid
*/
std::vector<double> getJL(const std::string &symbol, const uint16_t charge,
const uint16_t l) {
MagneticIon ion(getMagneticIon(symbol, charge));
std::vector<double> v(8, 0.);
switch (l) {
case 0:
v = ion.j0;
break;
case 2:
v = ion.j2;
break;
case 4:
v = ion.j4;
break;
case 6:
v = ion.j6;
break;
default:
// all other <jl> are not defined
std::stringstream msg;
msg << "Failed to find <j" << l << ">";
throw std::runtime_error(msg.str());
}
return v;
}
/**
* Returns a std::vector<std::string> of the keys of ion_map
* (a list of all ions programmed into this class)
* @return
*/
std::vector<std::string> getMagneticIonList() {
const IonIndex &ionIndex = ionMap();
std::vector<std::string> keys;
keys.reserve(ionIndex.size());
std::transform(ionIndex.cbegin(), ionIndex.cend(), std::back_inserter(keys),
[](const auto kv) { return kv.first; });
} // namespace PhysicalConstants
} // namespace Mantid