extract_property

despasito.equations_of_state.eos_toolbox.extract_property

extract_property(prop, bead_library, beads, default=None)[source]

Extract single property or key from a dictionary within a dictionary (e.g. bead parameters) and into a single array of the same length and order as a list of bead names.

The expected structure is a dictionary of dictionaries, such as a parameter library.

Parameters:
  • property (str) – Name of property in bead_library

  • bead_library (dict) – A dictionary where bead names are the keys to access EOS self interaction parameters:

  • beads (list[str]) – List of unique bead names used among components

  • default (any, Optional, default=None) – If property is not present, set to this value. Although if the default is None, an error will result.

Returns:

prop_array – array of desired property

Return type:

numpy.ndarray