pub struct Outcome {
pub products: ProductSet,
pub reactants: Vec<MolBuilder>,
pub discarded: Vec<Vec<u32>>,
}Expand description
一个匹配组合跑出来的结果。
Fields§
§products: ProductSet产物。数目由连通性决定,不由产物模板数决定,见 ProductSet。
reactants: Vec<MolBuilder>带映射号的反应物副本。
只在开启 atom_mapping 时非空。 关掉时反应物一个字节都不会被改动,
调用方手上的输入就是答案,复制一份纯属浪费 —— 而一次反应可以产出上百组
结果,每组都复制一遍反应物不是小开销。
discarded: Vec<Vec<u32>>discarded[i] = 第 i 个输入分子里没有进入任何产物的原子下标,升序。
这是一条事实记录,不含任何推断:模板明说要删的原子、以及只挂在它们 身上因而失去落脚点的原子,都在这里。产物侧看不到它们,所以不记的话这批 原子就是凭空消失 —— 而“消失“与“被判定为不该存在“是两回事。
把它们收口成分子是另一件事,由 crate::byproduct::reconstruct 做,
而且是推断:模板里没有“离去基团变成了什么“这条信息。两者分开是有意的 ——
本字段永远可信,那边的结论要看它自己给出的档次。
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Outcome
impl RefUnwindSafe for Outcome
impl Send for Outcome
impl Sync for Outcome
impl Unpin for Outcome
impl UnsafeUnpin for Outcome
impl UnwindSafe for Outcome
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more