修复了部分的protocol因为XDL更新导致的问题

但是pumptransfer,add,dissolve,separate还没修,后续还需要写virtual固体加料器
This commit is contained in:
KCFeng425
2025-07-06 19:21:53 +08:00
parent bef44b2293
commit 4c6e437eb1
18 changed files with 3034 additions and 1606 deletions

View File

@@ -51,9 +51,9 @@ class PumpTransferProtocol(BaseModel):
time: float = 0
viscous: bool = False
rinsing_solvent: str = "air" <Transfer from_vessel="main_reactor" to_vessel="rotavap"/>
rinsing_volume: float = 5000
rinsing_repeats: int = 2
solid: bool = False
rinsing_volume: float = 5000 <Transfer event="A" from_vessel="reactor" rate_spec="dropwise" to_vessel="main_reactor"/>
rinsing_repeats: int = 2 <Transfer from_vessel="separator" through="cartridge" to_vessel="rotavap"/>
solid: bool = False 添加了缺失的参数但是体积为0以及打印日志的问题修不好
flowrate: float = 500
transfer_flowrate: float = 2500
@@ -66,9 +66,9 @@ class SeparateProtocol(BaseModel):
waste_phase_to_vessel: str
solvent: str
solvent_volume: float <Separate product_phase="bottom" purpose="wash" solvent="water" vessel="separator" volume="?"/>
through: str
repeats: int
stir_time: float
through: str <Separate product_phase="top" purpose="separate" vessel="separator"/>
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
@@ -77,14 +77,14 @@ class EvaporateProtocol(BaseModel):
vessel: str
pressure: float
temp: float <Evaporate solvent="ethanol" vessel="rotavap"/>
time: float
time: float 加完了
stir_speed: float
class EvacuateAndRefillProtocol(BaseModel):
vessel: str
gas: str <EvacuateAndRefill gas="nitrogen" vessel="main_reactor"/>
repeats: int
repeats: int 处理完了
class AddProtocol(BaseModel):
vessel: str
@@ -95,21 +95,27 @@ class AddProtocol(BaseModel):
time: float
stir: bool
stir_speed: float <Add reagent="ethanol" vessel="main_reactor" volume="2.7 mL"/>
<Add event="A" mass="19.3 g" mol="0.28 mol" rate_spec="portionwise" reagent="sodium nitrite" time="1 h" vessel="main_reactor"/>
<Add mass="4.5 g" mol="16.2 mmol" reagent="(S)-2-phthalimido-6-hydroxyhexanoic acid" vessel="main_reactor"/>
<Add purpose="dilute" reagent="hydrochloric acid" vessel="main_reactor" volume="?"/>
<Add equiv="1.1" event="B" mol="25.2 mmol" rate_spec="dropwise" reagent="1-fluoro-2-nitrobenzene" time="20 min"
vessel="main_reactor" volume="2.67 mL"/>
<Add ratio="?" reagent="tetrahydrofuran|tert-butanol" vessel="main_reactor" volume="?"/>
viscous: bool
purpose: str
class CentrifugeProtocol(BaseModel):
vessel: str
speed: float
time: float 自创的
time: float 没毛病
temp: float
class FilterProtocol(BaseModel):
vessel: str
filtrate_vessel: str
stir: bool <Filter vessel="filter"/>
stir_speed: float
temp: float
stir_speed: float <Filter filtrate_vessel="rotavap" vessel="filter"/>
temp: float 处理了
continue_heatchill: bool
volume: float
@@ -118,6 +124,9 @@ class HeatChillProtocol(BaseModel):
temp: float
time: float <HeatChill pressure="1 mbar" temp_spec="room temperature" time="?" vessel="main_reactor"/>
<HeatChill temp_spec="room temperature" time_spec="overnight" vessel="main_reactor"/>
<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_speed: float
purpose: str
@@ -133,7 +142,9 @@ class HeatChillStopProtocol(BaseModel):
class StirProtocol(BaseModel):
stir_time: float
stir_speed: float <Stir time="0.5 h" vessel="main_reactor"/>
settling_time: float
<Stir event="A" time="30 min" vessel="main_reactor"/>
<Stir time_spec="several minutes" vessel="filter"/>
settling_time: float 处理完了
class StartStirProtocol(BaseModel):
vessel: str
@@ -149,11 +160,11 @@ class TransferProtocol(BaseModel):
volume: float
amount: str = ""
time: float = 0
viscous: bool = False <Transfer from_vessel="main_reactor" to_vessel="rotavap"/>
viscous: bool = False
rinsing_solvent: str = ""
rinsing_volume: float = 0.0
rinsing_repeats: int = 0
solid: bool = False
solid: bool = False 这个protocol早该删掉了
class CleanVesselProtocol(BaseModel):
vessel: str
@@ -166,8 +177,8 @@ class DissolveProtocol(BaseModel):
vessel: str
solvent: str
volume: float <Dissolve mass="2.9 g" mol="0.12 mol" reagent="magnesium" vessel="main_reactor"/>
amount: str = ""
temp: float = 25.0
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
@@ -191,8 +202,8 @@ class WashSolidProtocol(BaseModel):
volume: float
filtrate_vessel: str = ""
temp: float = 25.0 <WashSolid filtrate_vessel="rotavap" solvent="formic acid" vessel="main_reactor" volume="?"/>
stir: bool = False
stir_speed: float = 0.0
stir: bool = False <WashSolid solvent="acetone" vessel="rotavap" volume="5 mL"/>
stir_speed: float = 0.0 处理完了
time: float = 0.0
repeats: int = 1