polysim_core/builder/strategy.rs
1/// Determines how many repeat units are incorporated into a generated chain.
2///
3/// All mass-based variants use SI/chemistry conventions:
4/// - molecular weights in **g/mol**
5/// - monoisotopic masses in **g/mol**
6#[derive(Debug, Clone)]
7pub enum BuildStrategy {
8 /// Generate exactly `n` repeat units.
9 ByRepeatCount(usize),
10
11 /// Target number-average molecular weight (Mn) in g/mol.
12 ///
13 /// The repeat count is chosen so that the chain Mn is as close as possible
14 /// to the given target. Requires molecular weight calculation to be
15 /// implemented (see `properties::molecular_weight`).
16 ByTargetMn(f64),
17
18 /// Target an exact (monoisotopic) chain mass in g/mol.
19 ///
20 /// The repeat count is chosen so that the monoisotopic mass is as close as
21 /// possible to the given target. Requires molecular weight calculation to be
22 /// implemented (see `properties::molecular_weight`).
23 ByExactMass(f64),
24}