File indexing completed on 2024-03-24 03:44:19
0001 /* 0002 SPDX-FileCopyrightText: 2005-2008 Carsten Niehaus <cniehaus@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef ISOTOPE_H 0008 #define ISOTOPE_H 0009 0010 #include "chemicaldataobject.h" 0011 0012 #include "science_export.h" 0013 0014 /** 0015 * @author Carsten Niehaus 0016 * 0017 * This class represents an Isotope with all its properties 0018 */ 0019 class SCIENCE_EXPORT Isotope 0020 { 0021 public: 0022 /** 0023 * Constructs a new empty isotope. 0024 */ 0025 Isotope(); 0026 0027 /** 0028 * Destructor 0029 */ 0030 ~Isotope(); 0031 0032 /** 0033 * This struct stores the information how the nucleons in the 0034 * isotopes are split into neutrons and protons. 0035 */ 0036 struct Nucleons { 0037 /** 0038 * the number of neutrons of the isotope 0039 */ 0040 int neutrons; 0041 0042 /** 0043 * the number of protons of the isotope 0044 */ 0045 int protons; 0046 }; 0047 0048 /** 0049 * @return the mass of the isotope 0050 */ 0051 double mass() const; 0052 0053 /** 0054 * @return the errormargin ( delta mass ) of the isotope 0055 */ 0056 QString errorMargin() const; 0057 0058 /** 0059 * If the isotope belongs to Iron, this method will return "26" 0060 * @return the number of the element the isotope belongs to 0061 */ 0062 int parentElementNumber() const; 0063 0064 /** 0065 * If the isotope belongs to Iron, this method will return "Fe" 0066 * @return the symbol of the element the isotope belongs to 0067 */ 0068 QString parentElementSymbol() const; 0069 0070 QString spin() const; 0071 0072 /** 0073 * @return the magnetic moment of the Isotope 0074 */ 0075 QString magmoment() const; 0076 0077 QString abundance() const; 0078 0079 /** 0080 * @return for example '17' if halflife of this Isotope is 17 seconds 0081 * @ref halflife() 0082 */ 0083 double halflife() const; 0084 0085 /** 0086 * @return for example 's' if the unit of the halflife of this Isotope is given in 0087 * seconds 0088 */ 0089 QString halflifeUnit() const; 0090 0091 /** 0092 * add the ChemicalDataObject @p o 0093 */ 0094 void addData(const ChemicalDataObject &o); 0095 0096 /** 0097 * Set the number of nucleons of the isotope to @p number 0098 */ 0099 void setNucleons(int number); 0100 0101 /** 0102 * @return the sum of protons and neutrons 0103 */ 0104 int nucleons() const; 0105 0106 /** 0107 * @return decay 0108 */ 0109 double ecdecay() const; 0110 0111 /** 0112 * @return decay likeliness 0113 */ 0114 double eclikeliness() const; 0115 0116 /** 0117 * @return decay 0118 */ 0119 double twoecdecay() const; 0120 0121 /** 0122 * @return decay likeliness 0123 */ 0124 double twoeclikeliness() const; 0125 0126 /** 0127 * @return decay 0128 */ 0129 double ecalphadecay() const; 0130 0131 /** 0132 * @return decay likeliness 0133 */ 0134 double ecalphalikeliness() const; 0135 0136 /** 0137 * @return decay 0138 */ 0139 double ecalphaprotondecay() const; 0140 0141 /** 0142 * @return decay likeliness 0143 */ 0144 double ecalphaprotonlikeliness() const; 0145 0146 /** 0147 * @return decay 0148 */ 0149 double ecprotondecay() const; 0150 0151 /** 0152 * @return decay likeliness 0153 */ 0154 double ecprotonlikeliness() const; 0155 0156 /** 0157 * @return decay 0158 */ 0159 double ectwoprotondecay() const; 0160 0161 /** 0162 * @return decay likeliness 0163 */ 0164 double ectwoprotonlikeliness() const; 0165 0166 /** 0167 * @return decay 0168 */ 0169 double ecthreeprotondecay() const; 0170 0171 /** 0172 * @return decay likeliness 0173 */ 0174 double ecthreeprotonlikeliness() const; 0175 0176 /** 0177 * @return decay 0178 */ 0179 double neutrondecay() const; 0180 0181 /** 0182 * @return decay likeliness 0183 */ 0184 double neutronlikeliness() const; 0185 0186 /** 0187 * @return decay 0188 */ 0189 double twoneutrondecay() const; 0190 0191 /** 0192 * @return decay likeliness 0193 */ 0194 double twoneutronlikeliness() const; 0195 0196 /** 0197 * @return decay 0198 */ 0199 double protondecay() const; 0200 0201 /** 0202 * @return decay likeliness 0203 */ 0204 double protonlikeliness() const; 0205 0206 /** 0207 * @return decay 0208 */ 0209 double twoprotondecay() const; 0210 0211 /** 0212 * @return decay likeliness 0213 */ 0214 double twoprotonlikeliness() const; 0215 0216 /** 0217 * @return decay 0218 */ 0219 double protonalphadecay() const; 0220 0221 /** 0222 * @return decay likeliness 0223 */ 0224 double protonalphalikeliness() const; 0225 0226 /** 0227 * @return decay 0228 */ 0229 double betaminusdecay() const; 0230 /** 0231 * @return decay likeliness 0232 */ 0233 double betaminuslikeliness() const; 0234 0235 /** 0236 * @return decay 0237 */ 0238 double twobetaminusdecay() const; 0239 /** 0240 * @return decay likeliness 0241 */ 0242 double twobetaminuslikeliness() const; 0243 0244 /** 0245 * @return decay 0246 */ 0247 double betaminusneutrondecay() const; 0248 /** 0249 * @return decay likeliness 0250 */ 0251 double betaminusneutronlikeliness() const; 0252 0253 /** 0254 * @return decay 0255 */ 0256 double betaminustwoneutrondecay() const; 0257 /** 0258 * @return decay likeliness 0259 */ 0260 double betaminustwoneutronlikeliness() const; 0261 0262 /** 0263 * @return decay 0264 */ 0265 double betaminusthreeneutrondecay() const; 0266 /** 0267 * @return decay likeliness 0268 */ 0269 double betaminusthreeneutronlikeliness() const; 0270 0271 /** 0272 * @return decay 0273 */ 0274 double betaminusfourneutrondecay() const; 0275 /** 0276 * @return decay likeliness 0277 */ 0278 double betaminusfourneutronlikeliness() const; 0279 /** 0280 * @return decay 0281 */ 0282 double betaminusfissiondecay() const; 0283 /** 0284 * @return decay likeliness 0285 */ 0286 double betaminusfissionlikeliness() const; 0287 0288 /** 0289 * @return decay 0290 */ 0291 double betaminusalphadecay() const; 0292 /** 0293 * @return decay likeliness 0294 */ 0295 double betaminusalphalikeliness() const; 0296 0297 /** 0298 * @return decay 0299 */ 0300 double betaminusalphaneutrondecay() const; 0301 /** 0302 * @return decay likeliness 0303 */ 0304 double betaminusalphaneutronlikeliness() const; 0305 0306 /** 0307 * @return decay 0308 */ 0309 double betaminustwoalphadecay() const; 0310 /** 0311 * @return decay likeliness 0312 */ 0313 double betaminustwoalphalikeliness() const; 0314 0315 /** 0316 * @return decay 0317 */ 0318 double betaminusthreealphadecay() const; 0319 /** 0320 * @return decay likeliness 0321 */ 0322 double betaminusthreealphalikeliness() const; 0323 0324 /** 0325 * @return decay 0326 */ 0327 double betaplusdecay() const; 0328 0329 /** 0330 * @return decay likeliness 0331 */ 0332 double betapluslikeliness() const; 0333 0334 /** 0335 * @return decay 0336 */ 0337 double twobetaplusdecay() const; 0338 0339 /** 0340 * @return decay likeliness 0341 */ 0342 double twobetapluslikeliness() const; 0343 0344 /** 0345 * @return decay 0346 */ 0347 double betaplusprotondecay() const; 0348 0349 /** 0350 * @return decay likeliness 0351 */ 0352 double betaplusprotonlikeliness() const; 0353 0354 /** 0355 * @return decay 0356 */ 0357 double betaplustwoprotondecay() const; 0358 0359 /** 0360 * @return decay likeliness 0361 */ 0362 double betaplustwoprotonlikeliness() const; 0363 0364 /** 0365 * @return decay 0366 */ 0367 double betaplusalphadecay() const; 0368 0369 /** 0370 * @return decay likeliness 0371 */ 0372 double betaplusalphalikeliness() const; 0373 0374 /** 0375 * @return decay 0376 */ 0377 double betaplustwoalphadecay() const; 0378 0379 /** 0380 * @return decay likeliness 0381 */ 0382 double betaplustwoalphalikeliness() const; 0383 0384 /** 0385 * @return decay 0386 */ 0387 double betaplusthreealphadecay() const; 0388 0389 /** 0390 * @return decay likeliness 0391 */ 0392 double betaplusthreealphalikeliness() const; 0393 0394 /** 0395 * @return decay 0396 */ 0397 double alphadecay() const; 0398 0399 /** 0400 * @return decay 0401 */ 0402 double alphalikeliness() const; 0403 0404 /** 0405 * @return decay 0406 */ 0407 double alphabetaminusdecay() const; 0408 0409 /** 0410 * @return decay 0411 */ 0412 double alphabetaminuslikeliness() const; 0413 0414 /** 0415 * @return decay 0416 */ 0417 double spontfissiondecay() const; 0418 0419 /** 0420 * @return decay 0421 */ 0422 double spontfissionlikeliness() const; 0423 0424 /** 0425 * This enum stores the different kinds of decay 0426 */ 0427 enum Decay { 0428 ALPHA /**<alpha decay*/, 0429 ALPHABETAMINUS, 0430 BETAPLUS /**<beta plus decay*/, 0431 BETAMINUS /**<beta minus decay*/, 0432 EC /**ec decay*/, 0433 NEUTRON /**neutron decay*/, 0434 PROTON /**proton decay*/ 0435 }; 0436 0437 /** 0438 * @return the nucleons of neutrons of the Isotope after the decay 0439 */ 0440 Isotope::Nucleons nucleonsAfterDecay(Decay kind); 0441 0442 private: 0443 /** 0444 * the symbol of the element the isotope belongs to 0445 */ 0446 ChemicalDataObject m_parentElementSymbol; 0447 0448 /** 0449 * stores the information about the mass of the Isotope 0450 */ 0451 ChemicalDataObject m_mass; 0452 0453 /** 0454 * stores the atomicNumber of the Isotope 0455 */ 0456 ChemicalDataObject m_identifier; 0457 0458 /** 0459 * stores the spin of the Isotope 0460 */ 0461 ChemicalDataObject m_spin; 0462 0463 /** 0464 * stores the magneticMoment of the Isotope 0465 */ 0466 ChemicalDataObject m_magmoment; 0467 0468 /** 0469 * stores the relative abundance of the Isotope 0470 */ 0471 ChemicalDataObject m_abundance; 0472 0473 /** 0474 * stores the halfLife of the Isotope 0475 */ 0476 ChemicalDataObject m_halflife; 0477 0478 /** 0479 * stores decay energy of the isotope 0480 */ 0481 ChemicalDataObject m_alphadecay; 0482 ChemicalDataObject m_protondecay; 0483 ChemicalDataObject m_twoprotondecay; 0484 ChemicalDataObject m_neutrondecay; 0485 ChemicalDataObject m_twoneutrondecay; 0486 ChemicalDataObject m_ecdecay; 0487 ChemicalDataObject m_twoecdecay; 0488 ChemicalDataObject m_betaminusdecay; 0489 ChemicalDataObject m_twobetaminusdecay; 0490 ChemicalDataObject m_betaplusdecay; 0491 ChemicalDataObject m_twobetaplusdecay; 0492 ChemicalDataObject m_betaminusneutrondecay; 0493 ChemicalDataObject m_betaminusfissiondecay; 0494 ChemicalDataObject m_betaminustwoneutrondecay; 0495 ChemicalDataObject m_betaminusthreeneutrondecay; 0496 ChemicalDataObject m_betaminusfourneutrondecay; 0497 ChemicalDataObject m_betaminusalphaneutrondecay; 0498 ChemicalDataObject m_betaminusalphadecay; 0499 ChemicalDataObject m_betaminustwoalphadecay; 0500 ChemicalDataObject m_betaminusthreealphadecay; 0501 ChemicalDataObject m_betaplusprotondecay; 0502 ChemicalDataObject m_betaplustwoprotondecay; 0503 ChemicalDataObject m_betaplusalphadecay; 0504 ChemicalDataObject m_betaplustwoalphadecay; 0505 ChemicalDataObject m_betaplusthreealphadecay; 0506 ChemicalDataObject m_alphabetaminusdecay; 0507 ChemicalDataObject m_protonalphadecay; 0508 ChemicalDataObject m_ecprotondecay; 0509 ChemicalDataObject m_ectwoprotondecay; 0510 ChemicalDataObject m_ecthreeprotondecay; 0511 ChemicalDataObject m_ecalphadecay; 0512 ChemicalDataObject m_ecalphaprotondecay; 0513 ChemicalDataObject m_spontfissiondecay; 0514 0515 /** 0516 * stores the likeliness of a decay of the isotope 0517 */ 0518 ChemicalDataObject m_alphalikeliness; 0519 ChemicalDataObject m_protonlikeliness; 0520 ChemicalDataObject m_twoprotonlikeliness; 0521 ChemicalDataObject m_neutronlikeliness; 0522 ChemicalDataObject m_twoneutronlikeliness; 0523 ChemicalDataObject m_eclikeliness; 0524 ChemicalDataObject m_twoeclikeliness; 0525 ChemicalDataObject m_betaminuslikeliness; 0526 ChemicalDataObject m_twobetaminuslikeliness; 0527 ChemicalDataObject m_betapluslikeliness; 0528 ChemicalDataObject m_twobetapluslikeliness; 0529 ChemicalDataObject m_betaminusfissionlikeliness; 0530 ChemicalDataObject m_betaminusneutronlikeliness; 0531 ChemicalDataObject m_betaminustwoneutronlikeliness; 0532 ChemicalDataObject m_betaminusthreeneutronlikeliness; 0533 ChemicalDataObject m_betaminusfourneutronlikeliness; 0534 ChemicalDataObject m_betaminusalphaneutronlikeliness; 0535 ChemicalDataObject m_betaminusalphalikeliness; 0536 ChemicalDataObject m_betaminustwoalphalikeliness; 0537 ChemicalDataObject m_betaminusthreealphalikeliness; 0538 ChemicalDataObject m_betaplusprotonlikeliness; 0539 ChemicalDataObject m_betaplustwoprotonlikeliness; 0540 ChemicalDataObject m_betaplusalphalikeliness; 0541 ChemicalDataObject m_betaplustwoalphalikeliness; 0542 ChemicalDataObject m_betaplusthreealphalikeliness; 0543 ChemicalDataObject m_alphabetaminuslikeliness; 0544 ChemicalDataObject m_protonalphalikeliness; 0545 ChemicalDataObject m_ecprotonlikeliness; 0546 ChemicalDataObject m_ectwoprotonlikeliness; 0547 ChemicalDataObject m_ecthreeprotonlikeliness; 0548 ChemicalDataObject m_ecalphalikeliness; 0549 ChemicalDataObject m_ecalphaprotonlikeliness; 0550 ChemicalDataObject m_spontfissionlikeliness; 0551 0552 int m_numberOfNucleons; 0553 }; 0554 0555 #endif // ISOTOPE_H