polykin.copolymerization¤
sequence_multi ¤
sequence_multi(
Pself: FloatVectorLike,
k: Optional[Union[int, IntArrayLike]] = None,
) -> FloatArray
Calculate the instantaneous sequence length probability or the number-average sequence length.
For a multicomponent system, the probability of finding \(k\) consecutive units of monomer \(i\) in a chain is:
and the corresponding number-average sequence length is:
where \(P_{ii}\) is the self-transition probability \(i \rightarrow i\), which is a function of the monomer composition and the reactivity ratios.
References
- NA Dotson, R Galván, RL Laurence, and M Tirrel. Polymerization process modeling, Wiley, 1996, p. 177.
PARAMETER | DESCRIPTION |
---|---|
Pself
|
Vector of self-transition probabilities, \(P_{ii}\), corresponding to the diagonal of the matrix of transition probabilities.
TYPE:
|
k
|
Sequence length, i.e., number of consecutive units in a chain.
If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatArray(N, M)
|
If |
See also
transitions_multi
: instantaneous transition probabilities.tuples_multi
: instantaneous tuple fractions.
Examples:
>>> from polykin.copolymerization import sequence_multi
>>> from polykin.copolymerization import transitions_multi
>>> import numpy as np
Define reactivity ratio matrix.
>>> r = np.ones((3, 3))
>>> r[0, 1] = 0.2
>>> r[1, 0] = 2.3
>>> r[0, 2] = 3.0
>>> r[2, 0] = 0.9
>>> r[1, 2] = 0.4
>>> r[2, 1] = 1.5
Evaluate self-transition probabilities.
>>> f = [0.5, 0.3, 0.2]
>>> Pself = transitions_multi(f, r).diagonal()
>>> Pself
array([0.24193548, 0.29487179, 0.20930233])
Evaluate number-average sequence lengths for all monomers.
>>> S = sequence_multi(Pself)
>>> S
array([1.31914894, 1.41818182, 1.26470588])
Evaluate probabilities for certain sequence lengths.
>>> S = sequence_multi(Pself, k=[1, 5])
>>> S
array([[0.75806452, 0.00259719],
[0.70512821, 0.00533091],
[0.79069767, 0.00151742]])
Source code in src/polykin/copolymerization/multicomponent.py
563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 |
|