pymatgen.analysis.cost.cost module¶
This module is used to estimate the cost of various compounds. Costs are taken from the a CostDB instance, for example a CSV file via CostDBCSV. For compounds with no cost listed, a Phase Diagram style convex hull optimization is performed to determine a set of compositions that can be mixed to give the desired compound with lowest total cost.
-
class
CostAnalyzer(costdb)[source]¶ Bases:
objectGiven a CostDB, figures out the minimum cost solutions via convex hull
-
get_cost_per_kg(comp)[source]¶ Get best estimate of minimum cost/kg based on known data
Parameters: comp – Composition as a pymatgen.core.structure.Composition Returns: float of cost/kg
-
-
class
CostDB[source]¶ Bases:
objectAbstract class for representing a Cost database. Can be extended, e.g. for file-based or REST-based databases
-
class
CostDBCSV(filename)[source]¶ Bases:
pymatgen.analysis.cost.cost.CostDBRead a CSV file to get costs Format is formula,cost_per_kg,name,BibTeX
-
class
CostEntry(composition, cost, name, reference)[source]¶ Bases:
pymatgen.analysis.phase_diagram.PDEntryExtends PDEntry to include a BibTeX reference and include language about cost
Parameters: - composition – Composition as a pymatgen.core.structure.Composition
- cost – Cost (per mol, NOT per kg) of the full Composition
- name – Optional parameter to name the entry. Defaults to the reduced chemical formula as in PDEntry.
- reference – Reference data as BiBTeX string