species_name_to_fastchem_name

species_name_to_fastchem_name#

shone.chemistry.translate.species_name_to_fastchem_name(species, charge=None, return_mass=False)[source]#

Convert generic species name, like “H2O” or “ClAlF2”, to Hill notation for FastChem, like “H2O1” or “Al1Cl1F2”.

Optionally, return the total mass of the species by summing the masses of its components.

Parameters:
  • species (str) – Generic name, like “H2O” or “Ti”.

  • charge (None or int) – If species is an atom, specify the charge.

Returns:

hill_name – Name in Hill notation, like “H2O1”, “Ti”, “Ti1+”, or “Ti1-“.

Return type:

str