pub struct BranchedBuilder { /* private fields */ }Expand description
Builder for non-linear polymer architectures (branched, graft, macromonomer).
Unlike LinearBuilder, this builder takes
two BigSMILES strings: one for the backbone and one for the branch.
Implementations§
Source§impl BranchedBuilder
impl BranchedBuilder
Sourcepub fn new(
backbone: BigSmiles,
branch: BigSmiles,
strategy: BuildStrategy,
) -> Self
pub fn new( backbone: BigSmiles, branch: BigSmiles, strategy: BuildStrategy, ) -> Self
Creates a new builder from backbone and branch BigSMILES strings plus a build strategy that governs the backbone length.
Sourcepub fn comb_polymer(
&self,
_branch_every: usize,
) -> Result<PolymerChain, PolySimError>
pub fn comb_polymer( &self, _branch_every: usize, ) -> Result<PolymerChain, PolySimError>
Generates a comb (regularly branched) polymer.
branch_every — attach one branch every N backbone repeat units.
Sourcepub fn graft_copolymer(
&self,
_graft_fraction: f64,
) -> Result<PolymerChain, PolySimError>
pub fn graft_copolymer( &self, _graft_fraction: f64, ) -> Result<PolymerChain, PolySimError>
Generates a graft copolymer (random branch-point placement).
graft_fraction — fraction of backbone repeat units that carry a branch
(0.0 = no grafting, 1.0 = every backbone unit is grafted).
Sourcepub fn macromonomer(&self) -> Result<PolymerChain, PolySimError>
pub fn macromonomer(&self) -> Result<PolymerChain, PolySimError>
Generates a macromonomer: a single branch/side chain with a polymerisable end group.
Auto Trait Implementations§
impl Freeze for BranchedBuilder
impl RefUnwindSafe for BranchedBuilder
impl Send for BranchedBuilder
impl Sync for BranchedBuilder
impl Unpin for BranchedBuilder
impl UnsafeUnpin for BranchedBuilder
impl UnwindSafe for BranchedBuilder
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