Relationships and the item graph¶
Relationships link items together. They record where each item came from, so you can trace a result back to the materials behind it.
Kinds of relationship¶
- Parent
- An item that this one was made from. Constituents of a sample are its parents.
- Child
- An item made from this one. The opposite of a parent.
- Part of
- This item is a component of another. A cell's electrodes and electrolyte are parts of the cell.
- Sibling
- Two items related as equals, such as two samples from the same batch.
- Collection
- The item belongs to a collection. See Collections.
Creating relationships¶
Most relationships are created for you when you fill in an item's details:
- Constituents. Picking an item under Synthesis Information makes it a parent of the sample. See Link items together.
- Cell components. Picking items for a cell's electrodes or electrolyte makes them parts of the cell.
- Collections. Adding an item to a collection links it to the collection.
Mentioning another item in a description with @ creates a clickable link in the text. It
does not create a relationship.
Reading the graph¶
Each item page shows a small graph of the items linked to it. Click an item in the graph to open it.
For a wider view, click Graph View in the top menu. It shows how all the items you can see are linked. You can use it to find everything made from one batch of starting material, or everything that went into a cell.
To work with the graph in code, use get_item_graph in the Python API.