You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/workflows/design_spaces.rst
+164Lines changed: 164 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,6 +123,170 @@ The enumerated design space defined in this way might product the following cand
123
123
Hierarchical Design Space
124
124
-------------------------
125
125
126
+
A :class:`~citrine.informatics.design_spaces.hierarchical_design_space.HierarchicalDesignSpace` produces candidates that represent full material histories.
127
+
Unlike a :class:`~citrine.informatics.design_spaces.product_design_space.ProductDesignSpace`, which produces flat candidates with composition represented only by raw ingredients, a hierarchical design space generates candidates with a tree structure: a terminal (root) material connected to sub-materials through formulation ingredients.
128
+
129
+
The design space is defined by a **root** node and zero or more **subspace** nodes, each represented by a :class:`~citrine.informatics.design_spaces.hierarchical_design_space.MaterialNodeDefinition`.
130
+
The root node defines the attributes and formulation contents of the terminal material in each candidate.
131
+
Subspaces define any new materials that appear in the history of the terminal material.
132
+
133
+
Commonly, each node in a hierarchical design space contains a :class:`~citrine.informatics.design_spaces.formulation_design_space.FormulationDesignSpace` as its ``formulation_subspace``, which defines the ingredients, labels, and constraints for that level of the material history.
134
+
See `Formulation Design Space <#formulation-design-space>`__ below for details on configuring formulation subspaces.
135
+
136
+
Nodes are connected through formulation ingredient names.
137
+
If the root node contains a formulation subspace with an ingredient named ``"New Mixture-001"``, and a sub-node has its ``name`` set to ``"New Mixture-001"``, the resulting candidate will include that sub-node's material as an ingredient in the root material's formulation.
138
+
This linking can be extended to sub-nodes referencing other sub-nodes, allowing arbitrarily deep material history shapes.
139
+
140
+
Material Node Definitions
141
+
~~~~~~~~~~~~~~~~~~~~~~~~~
142
+
143
+
Each :class:`~citrine.informatics.design_spaces.hierarchical_design_space.MaterialNodeDefinition` describes a single node in the material history and has the following fields:
144
+
145
+
- ``name``: A unique identifier used to reference materials produced by this node.
146
+
When a formulation subspace on another node includes this name as an ingredient, the nodes become linked in the resulting candidate.
147
+
- ``attributes``: A list of :class:`~citrine.informatics.dimensions.Dimension` objects defining the processing parameters on the materials produced by this node.
148
+
These dimensions are explored independently during Candidate Generation.
149
+
- ``formulation_subspace``: An optional :class:`~citrine.informatics.design_spaces.formulation_design_space.FormulationDesignSpace` defining the ingredients, labels, and constraints for formulations on materials produced by this node.
150
+
- ``template_link``: An optional :class:`~citrine.informatics.design_spaces.hierarchical_design_space.TemplateLink` linking the node to material and process templates on the Citrine Platform.
151
+
- ``scope``: An optional custom scope used to identify the materials produced by this node.
152
+
- ``display_name``: An optional display name for identifying the node on the Citrine Platform (does not appear in generated candidates).
153
+
154
+
Template Links
155
+
~~~~~~~~~~~~~~
156
+
157
+
A :class:`~citrine.informatics.design_spaces.hierarchical_design_space.TemplateLink` associates a node with on-platform material and process templates via their UUIDs.
158
+
Template names can optionally be provided for readability.
159
+
160
+
Data Sources
161
+
~~~~~~~~~~~~
162
+
163
+
:class:`~citrine.informatics.data_sources.DataSource` objects can be included on the design space to allow design over "known" materials.
164
+
When constructing candidates, the Citrine Platform looks up ingredient names from formulation subspaces in the provided data sources and injects their composition and properties into the material history.
165
+
When constructing a default hierarchical design space, the platform includes any data sources found on the associated predictor configuration.
166
+
167
+
See our documentation on :doc:`Data Sources <data_sources>` for more information.
168
+
169
+
Creating a Hierarchical Design Space
170
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
171
+
172
+
The easiest way to build a hierarchical design space is to use :func:`~citrine.resources.design_space.DesignSpaceCollection.create_default` with ``mode=DefaultDesignSpaceMode.HIERARCHICAL``.
173
+
This inspects the predictor's training data to infer the material history shape and automatically constructs the root node, sub-nodes, dimensions, and formulation subspaces:
174
+
175
+
.. code:: python
176
+
177
+
from citrine.informatics.design_spaces import DefaultDesignSpaceMode
If you already have a registered :class:`~citrine.informatics.design_spaces.product_design_space.ProductDesignSpace`, you can convert it into an equivalent hierarchical design space using :func:`~citrine.resources.design_space.DesignSpaceCollection.convert_to_hierarchical`:
In this example, each candidate produced by the design space will contain a terminal coating material whose formulation includes a "Binder" (resolved from the data source) and a "Pigment Mixture" (a newly designed material with its own formulation and mixing temperature).
0 commit comments