dara.prediction.rn module#

An interface for rxn_network for predicting products in a chemical reaction.

class ReactionNetworkEngine(cost_function='weighted_sum', max_rereact=10)[source]#

Bases: PredictionEngine

Engine for predicting products in a chemical reaction.

predict(precursors, temp, computed_entries=None, open_elem=None, chempot=0, e_hull_cutoff=0.05)[source]#

Interface with reaction-network package for phase prediction based on interface reaction hulls.

Parameters:
  • precursors (list[str]) – List of precursor formulas (no stoichiometry required)

  • temp (float) – Temperature in Kelvin

  • computed_entries (list[ComputedStructureEntry] | MongoStore | None) – Optional list of ComputedStructureEntry objects or a store linking to an entry database. If None, will download from Materials Project using your MP_API key (must be stored in environment variables as $MP_API_KEY)

  • open_elem (str | None) – Optional open element (e.g., “O” for oxygen). If “O_air” is provided, will automatically default to oxygen with appropriate chemical potential (0.21 atm at desired temp).

  • chempot (float) – Optional chemical potential, defaults to 0 (standard state at the desired temp)

  • e_hull_cutoff (float) – Energy above hull cutoff by which to filter entries (default: takes all entries with an E_hull <= 50 meV/atom.)

get_entry_by_formula(gibbs_entries, formula)[source]#

Either returns the minimum energy entry or a new interpolated entry.