citrine.informatics.descriptors module

Tools for working with Descriptors.

class citrine.informatics.descriptors.CategoricalDescriptor(key: str, *, categories: Set[str])

Bases: Serializable[CategoricalDescriptor], Descriptor

A descriptor to hold categorical variables.

An exhaustive list of categorical values may be supplied.

Parameters:
  • key (str) – the key corresponding to a descriptor

  • categories (Set[str]) – possible categories for this descriptor

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

classmethod get_type(data) Type[Serializable]

Return the subtype.

categories: Set[str] = None
key: str = None
typ = 'Categorical'
class citrine.informatics.descriptors.ChemicalFormulaDescriptor(key: str)

Bases: Serializable[ChemicalFormulaDescriptor], Descriptor

Captures domain-specific context about a stoichiometric chemical formula.

Parameters:

key (str) – the key corresponding to a descriptor

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

classmethod get_type(data) Type[Serializable]

Return the subtype.

key: str = None
typ = 'Inorganic'
class citrine.informatics.descriptors.Descriptor

Bases: PolymorphicSerializable[Descriptor]

A Descriptor describes the range of values that a quantity can take on.

Abstract type that returns the proper type given a serialized dict.

classmethod build(data: dict) SelfType

Build the underlying type.

classmethod get_type(data) Type[Serializable]

Return the subtype.

key = None
class citrine.informatics.descriptors.FormulationDescriptor(key: FormulationKey | str)

Bases: Serializable[FormulationDescriptor], Descriptor

A descriptor to hold formulations.

Parameters:

key (str) – The key for the descriptor, which must be either ‘Formulation’ or ‘Flat Formulation’ to produce valid Citrine Platform assets. The two allowed values can be accessed from the FormulationKey enum.

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

classmethod flat() FormulationDescriptor

The flat formulation descriptor with key ‘Flat Formulation’.

classmethod get_type(data) Type[Serializable]

Return the subtype.

classmethod hierarchical() FormulationDescriptor

The hierarchical formulation descriptor with key ‘Formulation’.

key = None
typ = 'Formulation'
class citrine.informatics.descriptors.FormulationKey(value)

Bases: BaseEnumeration

The allowed names for a FormulationDescriptor.

  • HIERARCHICAL is the key “Formulation”

  • FLAT is the key “Flat Formulation”

FLAT = 'Flat Formulation'
HIERARCHICAL = 'Formulation'
class citrine.informatics.descriptors.IntegerDescriptor(key: str, *, lower_bound: int, upper_bound: int)

Bases: Serializable[IntegerDescriptor], Descriptor

[ALPHA] A descriptor to hold integer-valued numbers.

Warning: IntegerDescriptors are not fully supported by the Citrine Platform web interface and may cause unexpected issues until resolved.

Parameters:
  • key (str) – the key corresponding to a descriptor

  • lower_bound (int) – inclusive lower bound for valid integer values

  • upper_bound (int) – inclusive upper bound for valid int values

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

classmethod get_type(data) Type[Serializable]

Return the subtype.

key: str = None
lower_bound: int = None
typ = 'Integer'
upper_bound: int = None
class citrine.informatics.descriptors.MolecularStructureDescriptor(key: str)

Bases: Serializable[MolecularStructureDescriptor], Descriptor

Material descriptor for an organic molecule.

Accepts SMILES, IUPAC, and InChI String values.

Parameters:

key (str) – The column header key corresponding to this descriptor

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

classmethod get_type(data) Type[Serializable]

Return the subtype.

key: str = None
typ = 'Organic'
class citrine.informatics.descriptors.RealDescriptor(key: str, *, lower_bound: float, upper_bound: float, units: str)

Bases: Serializable[RealDescriptor], Descriptor

A descriptor to hold real-valued numbers.

Parameters:
  • key (str) – the key corresponding to a descriptor

  • lower_bound (float) – inclusive lower bound for valid real values

  • upper_bound (float) – inclusive upper bound for valid real values

  • units (str) – units string; use an empty string to denote a dimensionless quantity

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

classmethod get_type(data) Type[Serializable]

Return the subtype.

key: str = None
lower_bound: float = None
typ = 'Real'
units = ''
upper_bound: float = None