添加了固体加样器,丰富了json,修改了add protocol

This commit is contained in:
KCFeng425
2025-07-07 18:35:35 +08:00
parent 5767266563
commit ab2ab7fcc7
6 changed files with 926 additions and 746 deletions

View File

@@ -70,7 +70,7 @@ class SeparateProtocol(BaseModel):
repeats: int <Separate product_phase="bottom" purpose="extract" repeats="3" solvent="CH2Cl2" vessel="separator" volume="?"/>
stir_time: float<Separate product_phase="top" product_vessel="flask" purpose="separate" vessel="separator" waste_vessel="separator"/>
stir_speed: float
settling_time: float
settling_time: float 写了action
class EvaporateProtocol(BaseModel):
@@ -102,7 +102,7 @@ class AddProtocol(BaseModel):
vessel="main_reactor" volume="2.67 mL"/>
<Add ratio="?" reagent="tetrahydrofuran|tert-butanol" vessel="main_reactor" volume="?"/>
viscous: bool
purpose: str
purpose: str 写了action
class CentrifugeProtocol(BaseModel):
vessel: str
@@ -127,7 +127,7 @@ class HeatChillProtocol(BaseModel):
<HeatChill temp="256 °C" time="?" vessel="main_reactor"/>
<HeatChill reflux_solvent="methanol" temp_spec="reflux" time="2 h" vessel="main_reactor"/>
<HeatChillToTemp temp_spec="room temperature" vessel="main_reactor"/>
stir: bool
stir: bool 处理了
stir_speed: float
purpose: str
@@ -180,7 +180,7 @@ class DissolveProtocol(BaseModel):
amount: str = "" <Dissolve mass="12.9 g" reagent="4-tert-butylbenzyl bromide" vessel="main_reactor"/>
temp: float = 25.0 <Dissolve solvent="diisopropyl ether" vessel="rotavap" volume="?"/>
time: float = 0.0
stir_speed: float = 0.0
stir_speed: float = 0.0 写了action
class FilterThroughProtocol(BaseModel):
from_vessel: str
@@ -194,7 +194,7 @@ class FilterThroughProtocol(BaseModel):
class RunColumnProtocol(BaseModel):
from_vessel: str
to_vessel: str <RunColumn Rf="?" column="column" from_vessel="rotavap" pct1="40 %" pct2="50 %" solvent1="ethyl acetate" solvent2="hexane" to_vessel="rotavap"/>
column: str
column: str 写了action
class WashSolidProtocol(BaseModel):
vessel: str

View File

@@ -32,7 +32,11 @@
"separator_1",
"collection_bottle_1",
"collection_bottle_2",
"collection_bottle_3"
"collection_bottle_3",
"solid_dispenser_1",
"solid_reagent_bottle_1",
"solid_reagent_bottle_2",
"solid_reagent_bottle_3"
],
"parent": null,
"type": "device",
@@ -672,6 +676,98 @@
"data": {
"current_volume": 0.0
}
},
{
"id": "solid_dispenser_1",
"name": "固体粉末加样器",
"children": [],
"parent": "OrganicSynthesisStation",
"type": "device",
"class": "virtual_solid_dispenser",
"position": {
"x": 600,
"y": 300,
"z": 0
},
"config": {
"max_capacity": 100.0,
"precision": 0.001
},
"data": {
"status": "Ready",
"current_reagent": "",
"dispensed_amount": 0.0,
"total_operations": 0
}
},
{
"id": "solid_reagent_bottle_1",
"name": "固体试剂瓶1-氯化钠",
"children": [],
"parent": "OrganicSynthesisStation",
"type": "container",
"class": "container",
"position": {
"x": 550,
"y": 250,
"z": 0
},
"config": {
"volume": 500.0,
"reagent": "sodium_chloride",
"physical_state": "solid"
},
"data": {
"current_mass": 500.0,
"reagent_name": "sodium_chloride",
"physical_state": "solid"
}
},
{
"id": "solid_reagent_bottle_2",
"name": "固体试剂瓶2-碳酸钠",
"children": [],
"parent": "OrganicSynthesisStation",
"type": "container",
"class": "container",
"position": {
"x": 600,
"y": 250,
"z": 0
},
"config": {
"volume": 500.0,
"reagent": "sodium_carbonate",
"physical_state": "solid"
},
"data": {
"current_mass": 500.0,
"reagent_name": "sodium_carbonate",
"physical_state": "solid"
}
},
{
"id": "solid_reagent_bottle_3",
"name": "固体试剂瓶3-氯化镁",
"children": [],
"parent": "OrganicSynthesisStation",
"type": "container",
"class": "container",
"position": {
"x": 650,
"y": 250,
"z": 0
},
"config": {
"volume": 500.0,
"reagent": "magnesium_chloride",
"physical_state": "solid"
},
"data": {
"current_mass": 500.0,
"reagent_name": "magnesium_chloride",
"physical_state": "solid"
}
}
],
"links": [
@@ -964,6 +1060,46 @@
"solenoid_valve_3": "out",
"main_reactor": "top"
}
},
{
"id": "link_solid_dispenser_to_reactor",
"source": "solid_dispenser_1",
"target": "main_reactor",
"type": "resource",
"port": {
"solid_dispenser_1": "SolidOut",
"main_reactor": "top"
}
},
{
"id": "link_solid_bottle1_to_dispenser",
"source": "solid_reagent_bottle_1",
"target": "solid_dispenser_1",
"type": "resource",
"port": {
"solid_reagent_bottle_1": "top",
"solid_dispenser_1": "SolidIn"
}
},
{
"id": "link_solid_bottle2_to_dispenser",
"source": "solid_reagent_bottle_2",
"target": "solid_dispenser_1",
"type": "resource",
"port": {
"solid_reagent_bottle_2": "top",
"solid_dispenser_1": "SolidIn"
}
},
{
"id": "link_solid_bottle3_to_dispenser",
"source": "solid_reagent_bottle_3",
"target": "solid_dispenser_1",
"type": "resource",
"port": {
"solid_reagent_bottle_3": "top",
"solid_dispenser_1": "SolidIn"
}
}
]
}