11# This file is part of BurnMan - a thermoelastic and thermodynamic toolkit
22# for the Earth and Planetary Sciences
3- # Copyright (C) 2012 - 2021 by the BurnMan team, released under the GNU
3+ # Copyright (C) 2012 - 2025 by the BurnMan team, released under the GNU
44# GPL v2 or later.
55
66# This module provides the functions required to process the
@@ -306,8 +306,6 @@ def process_solution_chemistry(solution_model):
306306 .. note:: Nothing is returned from this function, but the solution_model
307307 object gains the following attributes:
308308
309- * solution_formulae [list of dictionaries]
310- List of endmember formulae in dictionary form.
311309 * empty_formula [string]
312310 Abbreviated chemical formula with sites denoted by empty
313311 square brackets.
@@ -351,7 +349,6 @@ def process_solution_chemistry(solution_model):
351349 if not np .all (np .array ([f .count ("[" ) for f in formulae ]) == n_sites ):
352350 raise Exception ("All formulae must have the same " "number of distinct sites." )
353351
354- solution_formulae = [{} for i in range (n_endmembers )]
355352 sites = [[] for i in range (n_sites )]
356353 list_occupancies = []
357354 list_multiplicities = np .empty (shape = (n_endmembers , n_sites ))
@@ -384,12 +381,6 @@ def process_solution_chemistry(solution_model):
384381 else :
385382 proportion_species_on_site = Fraction (species_split [1 ])
386383
387- solution_formulae [i_mbr ][name_of_species ] = solution_formulae [
388- i_mbr
389- ].get (name_of_species , 0.0 ) + (
390- list_multiplicities [i_mbr ][i_site ] * proportion_species_on_site
391- )
392-
393384 if name_of_species not in sites [i_site ]:
394385 n_occupancies += 1
395386 sites [i_site ].append (name_of_species )
@@ -400,21 +391,6 @@ def process_solution_chemistry(solution_model):
400391 i_el = sites [i_site ].index (name_of_species )
401392 list_occupancies [i_mbr ][i_site ][i_el ] = proportion_species_on_site
402393
403- # Loop over species after site
404- if len (site_split ) != 1 :
405- not_in_site = site_split [1 ].strip ()
406- not_in_site = not_in_site .replace (mult , "" , 1 )
407- for enamenumber in re .findall ("[A-Z][^A-Z]*" , not_in_site ):
408- sp = list (filter (None , re .split (r"(\d+)" , enamenumber )))
409- # Look up number of atoms of element
410- if len (sp ) == 1 :
411- nel = 1.0
412- else :
413- nel = float (float (sp [1 ]))
414- solution_formulae [i_mbr ][sp [0 ]] = (
415- solution_formulae [i_mbr ].get (sp [0 ], 0.0 ) + nel
416- )
417-
418394 # Site occupancies and multiplicities
419395 endmember_occupancies = np .empty (shape = (n_endmembers , n_occupancies ))
420396 site_multiplicities = np .empty (shape = (n_endmembers , n_occupancies ))
@@ -438,7 +414,6 @@ def process_solution_chemistry(solution_model):
438414 solution_model .site_names .append ("{0}_{1}" .format (sp , ucase [i ]))
439415
440416 # Finally, make attributes for solution model instance:
441- solution_model .solution_formulae = solution_formulae
442417 solution_model .n_sites = n_sites
443418 solution_model .sites = sites
444419 solution_model .site_multiplicities = site_multiplicities
0 commit comments