Inventory
Inventory
¶
Bases: PrimaryBaseNode
Definition¶
An Inventory Node is a list of material nodes. An example of an inventory can be a grouping of materials that were extracted from literature and curated into a group for machine learning, or it can be a subset of chemicals that are used for a certain type of synthesis.
Attributes¶
Attribute | Type | Example | Description |
---|---|---|---|
material | list[Material] | material that you like to group together | |
notes | str | "my awesome notes" | miscellaneous information, or custom data structure |
JSON Representation¶
{
"name":"my inventory name",
"node":["Inventory"],
"uid":"_:90f45778-b7c9-4b77-8b83-a6ea9671a937",
"uuid":"90f45778-b7c9-4b77-8b83-a6ea9671a937",
"material":[
{
"node":["Material"],
"name":"my material 1",
"uid":"_:9679ff12-f9b4-41f4-be95-080b78fa71fd",
"uuid":"9679ff12-f9b4-41f4-be95-080b78fa71fd"
"bigsmiles":"[H]{[>][<]C(C[>])c1ccccc1[]}",
},
{
"node":["Material"],
"name":"my material 2",
"uid":"_:1ee41708-3531-43eb-8049-4bb91ad73df6",
"uuid":"1ee41708-3531-43eb-8049-4bb91ad73df6"
"bigsmiles":"654321",
}
]
}
Source code in src/cript/nodes/primary_nodes/inventory.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
|
material: List[Union[Material, UIDProxy]]
property
writable
¶
List of material in this inventory
Examples:
>>> import cript
>>> my_material = cript.Material(
... name="my material",
... bigsmiles = "my bigsmiles",
... )
>>> my_inventory = cript.Inventory(name="my inventory", material=[my_material])
>>> new_material = cript.Material(
... name="new material",
... bigsmiles = "my bigsmiles",
... )
>>> my_inventory.material = [new_material]
Returns:
Type | Description |
---|---|
List[Material]
|
list of material representing the inventory within the collection |
JsonAttributes
dataclass
¶
Bases: JsonAttributes
all Inventory attributes
Source code in src/cript/nodes/primary_nodes/inventory.py
__init__(name, material, notes='', **kwargs)
¶
Instantiate an inventory node
Examples:
>>> import cript
>>> material_1 = cript.Material(
... name="material 1",
... bigsmiles = "material 1 bigsmiles",
... )
>>> material_2 = cript.Material(
... name="material 2",
... bigsmiles = "material 2 bigsmiles",
... )
>>> my_inventory = cript.Inventory(
... name="my inventory name", material=[material_1, material_2]
... )
Parameters:
Name | Type | Description | Default |
---|---|---|---|
material |
List[Union[Material, UIDProxy]]
|
list of materials in this inventory |
required |
Returns:
Type | Description |
---|---|
None
|
instantiate an inventory node |