Skip to content
Snippets Groups Projects
Commit 797fb69a authored by deserevi's avatar deserevi
Browse files

* Fix bug in NPNucleus

   + when finding a specific isotope, the size of the symbol is now taken
     into account: 31S and 31S are now well treated for example.
parent ff0660f3
No related branches found
No related tags found
No related merge requests found
...@@ -35,13 +35,13 @@ using namespace NPL; ...@@ -35,13 +35,13 @@ using namespace NPL;
Nucleus::Nucleus() Nucleus::Nucleus()
{ {
//----------- Default Constructor ---------- //----------- Default Constructor ----------
fName = "XX DEFAULT XX" ; fName = "XX DEFAULT XX";
fCharge = 0 ; fCharge = 0;
fAtomicWeight = 0 ; fAtomicWeight = 0;
fMassExcess = 0 ; fMassExcess = 0;
fSpinParity = "" ; fSpinParity = "";
fSpin = 0 ; fSpin = 0;
fParity = "" ; fParity = "";
} }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
...@@ -63,7 +63,7 @@ Nucleus::Nucleus(string isotope) ...@@ -63,7 +63,7 @@ Nucleus::Nucleus(string isotope)
while (!inFile.eof()) { while (!inFile.eof()) {
getline(inFile,line); getline(inFile,line);
s_name = line.substr(11,6); s_name = line.substr(11,6);
if (s_name.find(Isotope) != string::npos) break; if (s_name.find(Isotope) != string::npos && s_name.length() == isotope.length()) break;
} }
Extract(line.data()); Extract(line.data());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment