<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr"><div style="font-family:times new roman,serif;font-size:small">I'm having an issue getting isotopes working in my material database file. I'm using Gate V9.1. I've looked in the source files looking for a way to use isotopes and found parts that should give the functionality. Using what they show I'm getting an error where f=0.8 in +iso: name=Boron10 ; f=0.8 doesn't get read and returns the error message in the terminal:<br></div><div style="font-family:times new roman,serif;font-size:small"><br></div><div style="font-size:small"><font face="monospace"><span style="color:rgb(0,0,0)">GateMDBCreators.cc (l.198): Sum of fraction is not 1.0 for mat solidIsotope 0</span><br></font>
<br></div><div style="font-size:small"><font face="monospace">Changing the +iso with +el and changing the name to a defined element makes it work as expected so I'm not convinced it's the structure of the database file. Does anyone know how to use this functionality? Any help would be appreciated.</font></div><div style="font-size:small"><font face="monospace"><br></font></div><div style="font-size:small"><div style="font-family:"times new roman",serif">Lines from database file<br>[Isotopes]<br>Boron10: S=B ; z= 5. ; N= 10; A=10 g/mole<br></div><div style="font-family:"times new roman",serif"><br></div><div style="font-family:"times new roman",serif"><span style="font-family:Arial,Helvetica,sans-serif">[Materials]</span></div><div style="font-family:"times new roman",serif">solidIsotope: d=10.013 g/cm3 ; n=1<br></div><div style="font-family:"times new roman",serif"> +iso: name=Boron10 ; f=0.8<br> +el: name=Tungsten ; f=0.2</div></div><div style="font-size:small"><font face="monospace"><br></font></div><div style="font-size:small"><font face="monospace"><br></font></div><div style="font-family:times new roman,serif;font-size:small"><br></div><div style="font-family:times new roman,serif;font-size:small">Source files that show use use of isotopes</div><div style="font-size:small"><font face="monospace">// Read a new isotope from the DB file --> returns an isotope creator<br>GateIsotopeCreator* GateMDBFile::ReadIsotope(const G4String& isotopeName)<br>{<br> GateMessage("Materials", 5,<br> "GateMDBFile<" << fileName<br> << ">::ReadIsotope("<br> << isotopeName <<")\n");<br><br> // Find the isotope definition line in the [Isotopes] section of the DB file<br> G4String line = ReadItem("Isotopes", isotopeName);<br> if (line == theReadItemErrorMsg) return 0;<br><br> GateMessage("Materials", 5,<br> "GateMDBFile<" << fileName<br> << ">: found definition for isotope '"<br> << isotopeName << "' as an elementary isotope.\n");<br><br> if (line == "")<br> DecodingException(isotopeName,"\tThe isotope's definition line seems to be empty\n");<br><br> // Create an empty isotope-creator<br> GateIsotopeCreator *creator = new GateIsotopeCreator(isotopeName);<br><br> // Read the 1st field as the isotope's atomic number (Z)<br> GateTokenizer::BrokenString stringPair = GateTokenizer::BreakString(line,theFieldSeparator);<br> creator->atomicNumber = ReadAtomicNumber(isotopeName,stringPair.first);<br><br> // Read the 2nd field as the element's nucleon number (N)<br> stringPair = GateTokenizer::BreakString(stringPair.second,theFieldSeparator);<br> creator->nucleonNumber = ReadNucleonNumber(isotopeName,stringPair.first);<br><br> // Read the 3rd field as the element's molar mass (A)<br> stringPair = GateTokenizer::BreakString(stringPair.second,theFieldSeparator);<br> creator->molarMass = ReadMolarMass(isotopeName,stringPair.first);<br><br> GateMessage("Materials", 5,<br> "GateMDBFile<" << fileName<br> << ": definition loaded for isotope '"<br> << isotopeName <<"'.\n");<br><br> return creator;<br></font></div><div style="font-family:times new roman,serif;font-size:small"><br></div></div>
</div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div><div><div><br></div></div></div></div></div></div></div>