erwanp / qtplaskin

A graphical tool to explore ZdPlaskin Results
GNU Lesser General Public License v3.0
7 stars 5 forks source link

get_molar_mass fails & two-letters molecule are not recognized #13

Closed maillardj closed 3 years ago

maillardj commented 4 years ago

Cannot read the output files with qtplaskin, in the Ar example case: File "/home/jean/Documents/qtplaskin/qtplaskin/database.py", line 52, in <listcomp> return sum([_molar_mass_dict[k]*v for k,v in atoms_dict.items()]) KeyError: 'A'

preprocessor transforms "Ar" into "AR". Then it is understood as a diatomic molecule by get_atoms_in(molecule). get_molar_mass doesn't know any "A" specie and fails.

Two problems need to be solved: 1) get_molar_mass should not fail but return NaN if it doesn't know a specie. 2) "AR" should be recognize as an atom. This could be solved by looking for common two-letters atoms in "qt_species_list.txt".

erwanp commented 3 years ago

@maillardj do you confirm this was fixed in #16 ?

maillardj commented 3 years ago

@maillardj do you confirm this was fixed in #16 ?

Yes !