원시데이터 수집 시스템
선정목록으로

The explicit bonding reaction ensemble Monte Carlo method

간접 관련 화학·수지 · (21) 에폭시수지 (20) 페놀수지(23) 컴파운드

기본 정보

저자
  1. Pablo M. Blanco — Department of Physical and Macromolecular Chemistry, Faculty of Science, Charles University 1 , Hlavova 8, 128 40 Prague 2, Czech Republic|||Department of Material Science and Physical Chemistry, Research Institute of Theoretical and Computational Chemistry (IQTCUB), University of Barcelona 2 , Martí i Franquès 1, 08028 Barcelona, Spain|||Department of Physics, NTNU - Norwegian University of Science and Technology 3 , NO-7491 Trondheim, Norway
  2. Peter Košovan — Department of Physical and Macromolecular Chemistry, Faculty of Science, Charles University 1 , Hlavova 8, 128 40 Prague 2, Czech Republic
DOI
10.1063/5.0226122
저널
The Journal of Chemical Physics
발행년도
2024
발행기관
American Institute of Physics
피인용수
0
라이선스
cc-by-nc-nd
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1063/5.0226122
토픽
Polymer crystallization and properties
OpenAlex ID
W4402191823

평가 내용

관련도
간접 관련
사업분야
화학·수지 · (21) 에폭시수지
부 분야
(20) 페놀수지, (23) 컴파운드
R&D 측면
분석·모델링
확신도
0.70
근거 용어
polycondensation reactions, reversible bonding, macromolecular systems, Monte Carlo method, polymer synthesis
판단 근거
이 논문은 고분자 중합(polycondensation) 및 가교(cross-linking) 반응을 시뮬레이션하기 위한 새로운 몬테카를로 방법론을 다루고 있습니다. 이는 에폭시, 페놀 수지 등 코오롱인더스트리의 화학·수지 사업 분야에서 고분자 합성 공정 및 구조를 예측하는 모델링 기술로 응용 가능합니다.
R&D 활용 포인트
에폭시 및 페놀 수지의 경화 거동, 가교 밀도, 중합도 분포 등을 분자 수준에서 시뮬레이션하여 신규 수지 설계 및 공정 최적화에 활용할 수 있습니다.
평가 입력
본문 83,030자 중 30,032자 발췌

초록

We present the explicit bonding Reaction ensemble Monte Carlo (eb-RxMC) method, designed to sample reversible bonding reactions in macromolecular systems in thermodynamic equilibrium. Our eb-RxMC method is based on the reaction ensemble method; however, its implementation differs from the latter by the representation of the reaction. In the eb-RxMC implementation, we are adding or deleting bonds between existing particles, instead of inserting or deleting particles with different chemical identities. This new implementation makes the eb-RxMC method suitable for simulating the formation of reversible linkages between macromolecules, which would not be feasible with the original implementation. To enable coupling of our eb-RxMC algorithm with molecular dynamics algorithm for the sampling of the configuration space, we biased the sampling of reactions only within a certain inclusion radius. We validated our algorithm using a set of ideally behaving systems undergoing dimerization and polycondensation reactions, for which analytical results are available. For dimerization reactions with various equilibrium constants and initial compositions, the degree of conversion measured in our simulations perfectly matched the reference values given by the analytical equations. We also showed that this agreement is not affected by the arbitrary choice of the inclusion radius or the stiffness of the harmonic bond potential. Next, we showed that our simulations can correctly match the analytical results for the distribution of the degree of polymerization and end-to-end distance of ideal chains in polycondensation reactions. Altogether, we demonstrated that our eb-RxMC simulations correctly sample both reaction and configuration spaces of these reference systems, opening the door to future simulations of more complex interacting macromolecular systems.

본문 83,030자

본문 펼치기
# The explicit bonding Reaction ensemble Monte Carlo method #### Pablo M. Blanco ∗, †, ‡, ¶ and Peter Košovan ∗, † _†Department_ _of_ _Physical_ _and_ _Macromolecular_ _Chemistry,_ _Faculty_ _of_ _Science,_ _Charles_ _University,_ _Hlavova_ _8,_ _128_ _40_ _Prague_ _2,_ _Czech_ _Republic_ _‡Department_ _of_ _Material_ _Science_ _and_ _Physical_ _Chemistry,_ _Research_ _Institute_ _of_ _Theoretical_ _and_ _Computational_ _Chemistry_ _(IQTCUB),_ _University_ _of_ _Barcelona,_ _Martí_ _i_ _Franquès_ _1,_ _08028_ _Barcelona,_ _Spain_ _¶Department_ _of_ _Physics,_ _NTNU_ _-_ _Norwegian_ _University_ _of_ _Science_ _and_ _Technology,_ _NO-7491_ _Trondheim,_ _Norway_ E-mail: pablb@ntnu.no; peter.kosovan@natur.cuni.cz Abstract We present the explicit bonding Reaction ensemble Monte Carlo (eb-RxMC) method, designed to sample reversible bonding reactions in macromolecular systems in ther modynamic equilibrium. Our eb-RxMC method is based on the Reaction ensemble method, however, its implementation differs from the latter by the representation of the reaction. In the eb-RxMC implementation, we are adding or deleting bonds between existing particles, instead of inserting or deleting particles with different chemical identi ties. This new implementation makes the eb-RxMC method suitable for simulating the formation of reversible linkages between macromolecules, which would not be feasible with the original implementation. To enable coupling of our eb-RxMC algorithm with Molecular Dynamics algorithm for sampling of the configuration space, we biased the 1 sampling of reactions only within a certain inclusion radius. We validated our algorithm using a set of ideally behaving systems undergoing dimerization and polycondensation reactions, for which analytical results are available. For dimerization reactions with various equilibrium constants and initial compositions, the degree of conversion mea sured in our simulations perfectly matched the reference values given by the analytical equations. We also showed that this agreement is not affected by the arbitrary choice of the inclusion radius or the stiffness of the harmonic bond potential. Next, we showed that our simulations can correctly match the analytical results for the distribution of the degree of polymerization and end-to-end distance of ideal chains in polycondensa tion reactions. Altogether, we demonstrated that our eb-RxMC simulations correctly sample both reaction and configuration space of these reference systems, opening the door to future simulations of more complex interacting macromolecular systems. ### 1 Introduction Reversible chemical reactions are often present in macromolecular systems. Metathesis and polycondensation are typical examples of reversible reactions reaching equilibrium during the polymer synthesis. <sup>1–4</sup> These polymerization reactions typically lead to a broad distribution of degrees of polymerization <sup>5–8</sup> sometimes also leading to crosslinking and gelation. <sup>9–11</sup> The self-healing properties of polymer materials often rely on reversible formation of crosslinks, which can be easily re-formed after they have been broken due to an external stimulus. <sup>12–14</sup> The association of boronic acids is an interesting example of such a reaction which competes with the acid-base equilibrium reactions on the same functional groups. It has been hypoth esized that crosslinking between polymers functionalized with boronic acids is responsible for peculiar properties of these polymers but the actual mechanism of this crosslinking re mains unclear. <sup>15,16</sup> Chelation of metals to polyelectrolyte chains is known to collapse polymer chains, <sup>17,18</sup> sometimes also leading to crosslinking and gelation. <sup>19</sup> Last but not least, the re versible formation of hydrogen bonds plays a crucial role in many biochemical and biological 2 systems, as well as in synthetic polymers. <sup>20</sup> The common feature of the reversible bonds described above is that they connect two different macromolecules, or two parts of the same macromolecule, which are close in space but can be far from each other when measured along the contour of the macromolecule. On the one hand, the probability of forming these bonds is determined by the chemical nature of the reactants, which can be phenomenologically described by the equilibrium constant _K_ of the given chemical reaction. On the other hand, the spatial distribution of the reacting groups is determined not only by their overall concentration but also by the conformational properties of the macromolecule. This coupling between the conformation and reversible bond formation poses a fundamental challenge for modelling of such systems. Consequently, theoretical description of such reversible reactions are typically limited to analytical theories which assume homogeneous distribution of the reactive groups. Molecular simulation ap proaches fully accounting for the coupling between the reversible bond formation (reaction space) and conformation of the macromolecules (configuration space) are very scarce. Analytical theories describing reaction equilibria in macromolecular systems usually rely on strong approximations, which limit their applicability, while simultaneously writing the results as a closed-form analytical expression. In the ideal gas limit, the equilibrium com position of a reacting mixture can be analytically determined from the equilibrium constant _K_ of the reactions and the initial composition of the system. In the case of linear poly condensation reactions, the classical theory from Flory <sup>2</sup> permits calculating the molecular weight distribution of the polymer chains at a given degree of conversion of the reaction _p_ . More modern theories include cyclization of the polymer chains, allowing to calculate the fraction of linear chains and the fraction of rings. <sup>7,8</sup> In general, these theories can be aug mented beyond the ideal gas approximation by accounting for the excess chemical potential or, equivalently, the activity of the reactants. Such an approach has been used for example in the analytical theories describing acid-base equilibria in weak polyelectrolytes, account ing in an approximate manner for coupling between the reaction and configuration space of 3 the macromolecule. <sup>21–23</sup> However, accounting for non-ideal behaviour due to interactions in reactive macromolecular systems is beyond the capabilities of many analytical theories. As an alternative to analytical theories, computer simulations can numerically sample the configuration space and simultaneously the reaction space. The full description of chemical reactions requires the use of quantum mechanics to determine the electronic structure, which is not feasible for macromolecular systems due to high computational cost. The use of hybrid Quantum Mechanics / all-atom Molecular Dynamics slightly alleviates the problem but remains restricted to a small number of reactive chemical species. <sup>24</sup> The computational cost can be further mitigated, by replacing the Quantum description of the chemical reactions by effective reactive potentials. <sup>25,26</sup> However, the above methods are computationally too demanding for macromolecular systems which include long chains and hundreds of reactive groups simultaneously participating in the equilibrium reaction. At this level, a further reduction of the resolution of the model is required, representing whole functional groups or monomeric units as single particles, referred to as coarse-grained models. At this level, chemical reactions can be treated as stochastic events and simulated using Monte Carlo (MC) methods. The reaction is then represented by a change of chemical identities of the coarse grained particles, or by the formation or disappearance of chemical bonds between existing particles. In such phenomenological description, the thermodynamic equilibrium constant and the reaction stoichiometry are the only input parameters, whereas the detailed reaction mechanism becomes irrelevant. Indeed, MC simulations in various statistical ensembles are now commonly used to study pH-sensitive polymer systems. <sup>27,28</sup> These simulations are restricted to reactions which involve a change of chemical identities, while simultaneously releasing a small particle from a macromolecule or attaching this particle in the reverse step of the reaction. However, such a representation cannot be smoothly extended to represent reversible bond formation between two macromolecules or even oligomers. The Reaction ensemble Monte Carlo (RxMC) <sup>29,30</sup> method offers a general framework for sampling chemical equilibria. In the original implementation of the RxMC, the chemical re 4 action is represented by an exchange of particles with a virtual reservoir. Smith and Triska <sup>30</sup> validated the RxMC method using reversible dimerization reactions in which two reactant molecules associate to create a product molecule. In their implementation, a forward di rection of the dimerization reaction entails deleting two reactant particles from the system and inserting a new product particle into the system. The reverse direction entails deleting the product particle and inserting two reactant particles. In this description, the forma tion and breaking of chemical bonds is represented only _implicitly_ through the equilibrium constant _K_ = exp( _−_ ∆r _G/RT_ ), where ∆r _G_ is the standard Gibbs free energy of reaction. When applied to macromolecules, such implicit description of the bonding is sufficient only if it represents binding of small reactants to big molecules, for example when studying the protonation / deprotonation of weakly acidic or basic groups. <sup>27,28,31,32</sup> However, in other cases, it is desirable to implement the chemical reaction as the creation or deletion of bonds between particles which already exist in the simulated system. Examples of such cases in clude cross-linking reactions in hydrogels, <sup>12–14</sup> chelation of metals in polyelectrolytes <sup>17–19</sup> or various polymerization reactions. <sup>5–7</sup> Examples of simulations of reactive macromolecular systems with explicit reversible bonds are relatively scarce in the literature. Radical polymerization reactions have been studied with reactive MC schemes in which permanent bonds are created between nearby pairs of reactive particles. <sup>6,10</sup> Polycondensation reactions with cyclization have been simulated us ing MC schemes with probability criteria based on kinetic arguments. <sup>7,8</sup> A modified RxMC scheme, including explicit description of the reversible bonds, has been proposed to inves tigate polymerization reactions in silica gels. <sup>33–35</sup> The challenge in these simulations is to simultaneously sample the reaction and configuration spaces of the macromolecules. In a pure MC approach, the reactive MC moves can be combined with configuration moves. <sup>33–35</sup> However, these configuration moves need to be carefully chosen and fine-tuned for each spe cific case to enable efficient sampling of the system. <sup>36,37</sup> Alternatively, one can combine the reactive MC moves with Molecular Dynamics (MD) to explore the configuration space. The 5 advantage of such a combination is that the MD part uses the collective dynamics of the whole system to sample the configuration space, which is both universal and reasonably efficient also for dense systems. Simultaneously, the combination of MC with MD imposes additional restrictions. In such a combined approach, one typically needs to restrict the reaction MC moves to only select pairs of neighboring particles. Otherwise, occasional ac ceptance of energetically less favourable configurations would result in big forces due to the newly created bonds, which could break a subsequent MD integration scheme. <sup>6,10</sup> Therefore, combining the MC schemes for sampling the reactions with MD integration for sampling the system configurations remains a challenge. In this work, we present a biased MC algorithm to sample chemical equilibrium in the Re action ensemble including _explicit_ formation of reversible bonds. We refer to this algorithm as explicit bonding Reaction Ensemble Monte Carlo (eb-RxMC) to distinguish it from the original implementation, in which the reaction is modeled by inserting and deleting particles from the simulation box. <sup>29,30</sup> Our eb-RxMC can be constrained to only sample the reaction within an inclusion radius _r_ in which permits combining it with MD schemes, as illustrated in Fig. 1 (upper panel). The intended use case of the eb-RxMC method are simulations of reversible bonding reactions in macromolecular systems in thermodynamic equilibrium, schematically shown in Fig. 1 (lower panel). They include, but are not limited to, the following types of reactions: polymerization reactions reaching equilibrium ( _e.g._ polycon densation reactions), <sup>5,7,8</sup> reversible cross-linking reactions, <sup>12–14</sup> reversible non-covalent bonds ( _e.g._ hydrogen bonding), <sup>15,16</sup> chelation of metal ions in macromolecular systems <sup>17–19</sup> and polyassociation reactions in dynamers. <sup>38</sup> Our eb-RxMC is designed to sample thermody namic equilibrium properties of reversible bonding reactions, avoiding the need to describe the actual reaction mechanism or to do any specific assumption on the kinetics of the reac tion. Therefore, sampling of the chemical reaction proceeds at a user-defined rate, allowing the user to control the effective time scale on which the reaction equilibrium is established. As a downside, this means that our eb-RxMC is not designed to provide any information 6 about the actual dynamics of the system. In return, our eb-RxMC is able to efficiently sam ple the equilibrium properties of macromolecular systems with several hundreds of reactive groups. In the following sections, we first provide an overview of some known analytical results for dimerization and polycondensation reactions which we use to establish the nomenclature and as benchmarks to validate our eb-RxMC method. Next, we describe our implementation of the eb-RxMC method and how we bias it to enable its coupling with Langevin Dynamics. Then, we validate our eb-RxMC algorithm for a set of ideally behaving systems, using the analytical results presented in the previous sections. We conclude by outlining several interesting open problems that could be addressed by our eb-RxMC method in the near future, indicating probable further development of the method. 7 Figure 1: Top panel: Scheme illustrating our proposed explicit bonding Reaction Ensemble Monte Carlo (eb-RxMC) algorithm that creates explicit reversible bonds between particles. These particles can only react when they are at a distance below an inclusion radius (dashed circle). A suitably chosen inclusion radius permits coupling of the eb-RxMC algorithm with Molecular Dynamics. Bottom panel: schematic examples of reactions which can be simulated using our proposed algorithm. In the illustrations, permanent bonds are represented by solid lines whereas reversible bonds are represented by dashed lines. In all panels blue and red particles represent reactive chemical groups that can react with each other while grey circles represent chemically inert groups. ### 2 Theoretical background In this section, we recapitulate some known analytical results for the equilibrium degree of conversion of dimerization and polycondensation reactions. This recapitulation is provided in order to introduce a unified notation for both types of reactions. These analytical results will 8 be used later as a benchmark for testing the numerical results of our eb-RxMC simulations. #### 2.1 Equilibrium in dimerization reactions The dimerization reaction can involve either association of two identical molecules (monomers) or two different ones, schematically represented by the reactions A + A _−−↽−−⇀_ A _−_ A (1a) A + B _−−↽−−⇀_ A _−_ B (1b) where A and B represent different functional groups which can react with each other by forming a reversible bond. The chemical equilibrium of the reversible bonding reactions is defined by the equilibrium constant _K_, related to the Gibbs free energy of the reaction as ∆r _G_ = _−RT_ ln _K_ (2) where _T_ is the temperature and _R_ is the molar gas constant. The equilibrium constant of Eq. 21 can be expressed in terms of activities of the reacted groups A–A and free groups A and analogically, equilibrium constant of Eq. 29 can be expressed in terms of activities of the reacted groups A–B and free groups A and B: _K_ _≡_ <sup>_<u>a</u>_</sup> <sup><u>A</u></sup> <sup>_<u>−</u>_</sup> <sup><u>A</u></sup> ideal = <sup>_<u>c</u>_</sup> <sup><u>A</u></sup> <sup>_<u>−</u>_</sup> <sup><u>A</u></sup> <sup>_<u>c⊖</u>_</sup> _c_ <sup>2</sup> A _a_ <sup>2</sup> A A A _,_ (3a) _,_ (3b) _K_ _≡_ <sup>_<u>a</u>_</sup> <sup><u>A</u></sup> <sup>_<u>−</u>_</sup> <sup><u>B</u></sup> _a_ A _a_ B ideal = <sup>_<u>c</u>_</sup> <sup><u>A</u></sup> <sup>_<u>−</u>_</sup> <sup><u>B</u></sup> <sup>_<u>c⊖</u>_</sup> _c_ A _c_ B where _c_ <sup>_⊖_</sup> is the reference concentration, conventionally chosen as _c_ <sup>_⊖_</sup> = 1 mol _/_ kg. <sup>39</sup> In the ideal gas limit, _i.e._ in absence of interactions, the activities of various functional groups can be replaced with their concentrations, as indicated by the second equality in Eqs. 23 and 9 31. For reaction Eq. 21, we define the degree of conversion as _p ≡_ <sup>_<u>c</u>_</sup> <sup><u>A</u></sup> <sup>_<u>−</u>_</sup> <sup><u>A</u></sup> _c_ <sup>max</sup> A _−_ _,_ (4) A _−_ A = <sup>_<u>c</u>_</sup> <sup><u>tot</u></sup> <sup>_<u>−</u>_</sup> <sup>_<u>c</u>_</sup> <sup><u>A</u></sup> _c_ tot where _c_ <sup>max</sup> A _−_ A <sup>is</sup> <sup>the</sup> <sup>maximum</sup> <sup>attainable</sup> <sup>concentration</sup> <sup>of</sup> <sup>A–A</sup> <sup>bonds</sup> <sup>and</sup> <sup>_c_</sup> <sup>tot</sup> <sup>is</sup> <sup>the</sup> <sup>total</sup> concentration of reactive groups, i.e. _c_ tot = _c_ A + 2 _c_ A _−_ A. For reaction Eq. 29 we define the degree of conversion in an analogous manner _p ≡_ <sup>_<u>c</u>_</sup> <sup><u>A</u></sup> <sup>_<u>−</u>_</sup> <sup><u>B</u></sup> _c_ <sup>max</sup> A _−_ A _−_ B = <sup>_<u>c</u>_</sup> _c_ <sup><u>tot</u></sup> tot <sup>_<u>−</u>_</sup> (1 <sup>_<u>c</u>_</sup> _−_ <sup><u>A</u></sup> <sup>_<u>−</u>_</sup> _r_ ex <sup>_<u>c</u>_</sup> ) <sup><u>B</u></sup> <sup>_,_</sup> (5) where _c_ <sup>max</sup> A _−_ B <sup>is</sup> <sup>the</sup> <sup>maximum</sup> <sup>attainable</sup> <sup>concentration</sup> <sup>of</sup> <sup>A–B</sup> <sup>bonds,</sup> <sup>_c_</sup> <sup>tot</sup> <sup>is</sup> <sup>the</sup> <sup>total</sup> <sup>con-</sup> centration of reactive groups, i.e. _c_ tot = _c_ A + _c_ B + 2 _c_ A _−_ B and _r_ ex is the excess ratio, defined as _r_ ex = _|_ 2 _f_ A _−_ 1 _|_ (6) where _f_ A is the mole fraction of A groups in the reactive mixture, including both bonded and free A groups. The excess ratio characterizes deviations of the composition of the reactive mixture from the ideal equimolar ratio of A and B. In the ideal limit, the degree of conversion at equilibrium can be expressed by the following equations: _p_ = 1 + <sup><u>1</u></sup> <sup>_<u>−</u>_</sup> _√_ <u>1 + 8</u> _<u>λ</u>_ (Eq. 21, ideal gas), (7a) 4 _λ_ _p_ = (1 _−_ _r_ ex) <sup>_−_</sup> <sup>1</sup> - ~~�~~ 1 + 2 _λ_ + _λ_ <sup>2</sup> _r_ <u>ex</u> <sup>2</sup> 1 + <sup>1</sup> <sup>_−_</sup> _λ_ (Eq. 29, ideal gas), (7b) where _λ_ = _Kc_ tot _/c_ <sup>_⊖_</sup> . A detailed derivation of Eqs. 27 and 36 is provided in the Supporting Information (Section S1). Typically, one needs values of _K_ or _c_ tot spanning over various orders of magnitude to cover the whole range of possible _p_ values. Therefore, it is convenient to introduce p _λ_, defined as p _λ_ = _−_ log10( _λ_ ) = p _K_ + p _C_ (8) 10 where p _K_ = _−_ log10( _K_ ) and p _C_ = _−_ log10( _c_ tot _/c_ <sup>_⊖_</sup> ). This logarithmic scale is in analogy with the acidity constant p _K_ A = _−_ log10( _K_ A), commonly used to describe the acid-base equilibria. <sup>27,28</sup> #### 2.2 Equilibrium in polycondensation reactions If the molecule (monomer) contains two reactive groups, then it can form polymer chains in a polycondensation reaction A _−_ A + A _−_ A _−−↽−−⇀_ (A _−_ A)2 (9a) (A _−_ A) _n_ + (A _−_ A) _m_ _↽−−−−⇀_ (A _−_ A) _n_ + _m_ (9b) where _n_ and _m_ are integers, referring to the number of A–A monomers comprising the chain molecule, i.e. the degree of polymerization of the chain. The degree of conversion for Eq. 9b can be defined in the same way as Eq. 24 and its value at equilibrium is given by Eq. 27. Flory <sup>40</sup> assumed that ∆r _G_ of reactions Eqs. 9a and 9b does not depend on the values of _m_ and _n_ . Under this assumption, he obtained an analytical expression for the mass fraction of chains composed of _M_ monomers _w_ ( _M_ ) = _Mp_ <sup>_M_</sup> <sup>_−_</sup> <sup>1</sup> (1 _−_ _p_ ) <sup>2</sup> _._ (10) The mass fraction is defined as _w_ ( _M_ ) = <sup>_<u>MN</u>_</sup> <sup><u>M</u></sup> _M_ t _,_ (11) were _N_ M is the number of chains consisting of _M_ monomers and _M_ t = <sup>�</sup> _M_ <sup>_MNM_</sup> <sup>is</sup> <sup>the</sup> total number of monomers in solution. 11 ### 3 Method and model In our simulation model, we employ a simplified coarse-grained representation, where one particle in the simulation represents one functional group of a molecule, as defined in Eqs. 21, 29, 9a and 9b. We simulate an ensemble of these molecules, evolving in the reaction space, _i.e._, undergoing the chemical reactions, and simultaneously evolving in the configu ration space, _i.e._, undergoing conformational changes and diffusing in the simulation box. The evolution in reaction space is simulated using the explicit bonding reaction ensemble Monte Carlo (eb-RxMC). The evolution in configuration space is simulated using Langevin Dynamics (LD) in implicit solvent. One simulation cycle thus consists of a set of eb-RxMC moves, followed by a set of integration steps in the LD. The whole simulation then comprises many of such cycles. Implementation of the eb-RxMC protocol which enables its coupling to LD comprises the key result of our work. #### 3.1 The explicit bonding Reaction Monte Carlo algorithm Our eb-RxMC implementation consists of the following steps, which are described in more detail below: 1. Select a forward or reverse direction of the reaction and select the reactive groups involved; 2. Compute the acceptance probability; 3. Change to a new state if the trial move is accepted, _i.e._ create or delete bonds between the reactive particles in the simulation box, mimicking Eq. 21 or Eq. 29. These trial moves are accepted with a probability given by the Reaction ensemble. <sup>29,30</sup> We have implemented the eb-RxMC within the framework of the ESPResSo software, <sup>41,42</sup> which permits to combine it with the other features already implemented in ESPResSo. In particular, we couple it to Langevin Dynamics allowing us to sample the reaction and configuration space simultaneously, as explained in Section 3.2. The inputs of our algorithm are the equilibrium constant _K_ and the initial concentration of the reactants. It samples the equilibrium concentration of each reacting species, which can be used to calculate the degree of conversion and other derived quantities. 12 In each trial move, the algorithm proceeds by performing the following steps: 1. _Selecting_ _the_ _direction_ _of_ _reaction_ _and_ _the_ _reactive_ _groups_ _involved._ A direction of the reaction (forward or reverse) is selected randomly with equal probability. If the forward direction is selected, A + A _−−→_ A _−_ A (12a) A + B _−−→_ A _−_ B (12b) a free functional group A is randomly chosen with equal probability. Depending on the type of reaction, (Eq. 12a or 12b) a second free functional group A or B is randomly chosen with equal probability. If the reverse direction is selected, A _−_ A _−−→_ A + A (13a) A _−_ B _−−→_ A + B (13b) a bonded pair A–A or A–B is randomly chosen with equal probability. To enable coupling of the eb-RxMC with Molecular Dynamics schemes, the algorithm can be restricted to only select reactive groups at a distance below a given inclusion radius _r_ in. Such restriction must be applied both in the forward (Eq. 12) and in the reverse (Eqs. 13) directions of the reaction. 2. _Accepting_ _the_ _trial_ _move_ with the probability given by the Reaction ensemble <sup>29,30</sup> _P_ <sup>acc</sup> = min [1 _, W_ RxMC] = min 1 _,_ ( _KV_ <sup>_−_</sup> <sup>1</sup> _N_ A <sup>_−_</sup> <sup>1</sup> <sup>_/c⊖_</sup> <sup>)</sup> <sup>_ξ_</sup> <sup>exp (</sup> <sup>_−β_</sup> <sup>∆</sup> <sup>_U_</sup> <sup>)</sup> _i_ _<u>Ni</u>_ <u>!</u> ( _Ni_ + _νiξ_ )! (14) where _V_ is the volume of the simulation box, _β_ = 1 _/_ ( _k_ B _T_ ) is the inverse of the thermal energy, _N_ A is the Avogadro number, _νi_ and _Ni_ respectively are the stoichiometric coefficient and the number of the reactive group _i_, where _i_ _∈{_ A _,_ B _,_ A _−_ A _,_ A _−_ B _}_ is the set of reactive groups involved in the reaction. The value of _ξ_ is _ξ_ = 1 in the 13 forward direction (Eq. 12) and it is _ξ_ = _−_ 1 in the reverse direction (Eq. 13). ∆ _U_ is the change in the potential energy of the system due to the reaction (Eq. 12 or Eq. 13). We emphasize that ∆ _U_ does not include the potential energy of the newly created or deleted bond. The Gibbs free energy of the reaction, which results in the bond formation, ∆r _G_, includes the potential energy of the bond, as well as the entropy contributions and changes in the solvation free energies of the reacting species. <sup>43,44</sup> Therefore, the potential energy of the newly created or deleted bond is already included in the value of _K_ (Eq. 2). This also implies that the choice of the bonding potential is arbitrary and should not affect the equilibrium degree of conversion. If the selection of reactive particles is constrained within _r_ in in the previous step, then this bias introduced in the probability of selecting the bond partners needs to be reflected in correcting the acceptance probability in Eq. 14. In Section 3.2, we provide a detailed explanation on how to correct for the introduced bias. 3. _Changing_ _the_ _system_ _to_ _a_ _new_ _state_ _if_ _the_ _trial_ _move_ _has_ _been_ _accepted._ In the forward direction, we add a bonding potential _U_ bond between the two selected groups, repre senting a chemical bond. In the reverse direction, we remove the bonding potential between the selected pair. #### 3.2 Bias of the eb-RxMC to enable coupling with Langevin Dy- namics To enable Langevin Dynamics (LD) integration after a set of eb-RxMC moves, it is neces sary to ensure that the forces between the simulated particles are not too big. Big forces would cause an unstable integration and consequently a failure of the integrator. To pre vent such problems, we biased the eb-RxMC algorithm to only propose creating or deleting bonds between particle pairs separated by a distance below a certain inclusion radius _r_ in, as schematically illustrated in Fig. 2. This radius is an adjustable parameter of the method. 14 The specific choice of _r_ in should not affect the sampling of the equilibrium properties of the system, however, it could affect the sampling efficiency and stability of the subsequent LD. In general, the value of this radius is chosen as a compromise between a large enough value to enable sufficient sampling while avoiding failure of the LD integrator due to the forces arising when creating new bonds. Figure 2: Flow diagram of our implementation of the eb-RxMC algorithm. Scheme adapted from a flow diagram originally produced using the software from the website code2flow.com. To ensure detailed balance, we corrected for the bias in the proposal probability by modifying the acceptance probability accordingly. <sup>45</sup> The sufficient condition to satisfy the 15 detailed balance is that the flow of configurations from an arbitrary state _si_ to any other state _sj_ is equal to flow in the opposite direction, _P_ obs( _si_ ) _P_ trial( _si_ _→_ _sj_ ) _P_ acc( _si_ _→_ _sj_ ) = _P_ obs( _sj_ ) _P_ trial( _sj_ _→_ _si_ ) _P_ acc( _sj_ _→_ _si_ ) (15) where _P_ obs( _si_ ) is the probability of observing state _si_, _P_ trial( _si_ _→_ _sj_ ) is the probability of proposing a trial move from _si_ to _sj_ and _P_ acc( _si_ _→_ _sj_ ) is the probability of accepting such trial move. In absence of any inclusion radius, _P_ trial( _si_ _→_ _sj_ ) = _P_ trial( _sj_ _→_ _si_ ) and _P_ acc is given by Eq. 14. The biased proposal probability is different in the forward and reverse direction of the reaction because the probability of finding a pair of _unbonded_ particles within _r_ in is different from that of finding a pair of _bonded_ particles within the same distance, _P_ trial( _si_ _→_ _sj_ ) _̸_ = _P_ trial( _sj_ _→_ _si_ ). In order to correct for such asymmetric sampling of the reaction space, _P_ acc needs to be chosen so that it fulfils the detailed balance condition _PP_ accacc(( _ssji_ _<u>→→</u>_ _<u>ssji</u>_ )) <sup>=</sup> <sup>_<u>P</u>_</sup> _P_ <sup><u>trial</u></sup> trial <sup><u>(</u></sup> ( <sup>_<u>s</u>_</sup> _s_ <sup>_<u>j</u>_</sup> _i_ _→_ <sup>_<u>→</u>_</sup> _s_ <sup>_<u>s</u>_</sup> _j_ <sup>_<u>i</u>_</sup> <sup><u>)</u></sup> ) Our choice of _P_ acc that satisfies Eq. 38 is given by _<u>P</u>_ <u>obs(</u> _<u>sj</u>_ <u>)</u> _P_ obs( _si_ ) <sup>_._</sup> (16) - _<u>P</u>_ <u>b(</u> _<u>r</u>_ <u>in)</u> 1 _,_ A _P_ u( _r_ in) <sup>_KV_</sup> <sup>_−_</sup> <sup>1</sup> <sup>_N −_</sup> <sup>1</sup> i - _ξ_ exp ( _−β_ ∆ _U_ ) = min [1 _, W_ bias _W_ RxMC] _._ (17) _<u>N</u>_ <u>i!</u> ( _N_ i + _ν_ i _ξ_ )! _P_ acc = min where _P_ u( _r_ in) is the probability of finding two unbonded particles within _r_ in, _P_ b( _r_ in) is the probability of finding two bonded particles within _r_ in and _W_ bias = ( _P_ b( _r_ in) _/P_ u( _r_ in)) <sup>_ξ_</sup> . In the ideal case, when simulating a system without other interactions than the bonds between the particles, _P_ b( _r_ in) and _P_ u( _r_ in) can be calculated in advance. On the contrary, when simulating an interacting system, both _P_ b and _P_ u are affected by other interactions. In such case, _P_ b and _P_ u need to be calculated on the fly during the simulation to ensure self-consistency of the sampling. It follows from Eq. 17 that the restriction of only proposing trial moves 16 between particles at a distance below the inclusion radius must be applied in both directions of the reaction. More details about the derivation of Eq. 17 can be found in the Supporting Information (Section S2), including the analytical solutions of _P_ u and _P_ b under the ideal gas approximation. #### 3.3 Simulation model In our simulations, each coarse-grained particle represents one functional group. The number of particles _N_ part remained constant throughout whole simulation but the bonds between them were randomly created or deleted, following the eb-RxMC procedure described in Section 3.1. We note that the size of the simulation box and concentration can be chosen arbitrarily for an ideal system because the only relevant parameter that determines the equilibrium properties of the system is p _λ_ = p _K_ + p _C_ . Therefore, one can equivalently choose to fix the concentration and vary the value of _K_ or fix the value of _K_ and vary the concentration. Our choice was to fix the concentration and vary the equilibrium constant of the reaction _K_ as the input of our simulations. For a non-ideal system, this choice is no longer arbitrary, because the effect of interactions on the equilibrium properties depends on distances between the particles, and hence on their concentration. The outputs, such as the equilibrium degree of conversion or the chain length distribution in the polycondensation reactions, were then calculated as ensemble averages over the generated configurations, as detailed in Section 3.4. The bonds between particles were represented by a harmonic potential _U_ bond = <sup><u>1</u></sup> (18) 2 <sup>_k_</sup> <sup>h(</sup> <sup>_l −_</sup> <sup>_l_</sup> <sup>0)2</sup> where _l_ is the distance between the bonded particles, _l_ 0 is the equilibrium bond length and _k_ h is the harmonic constant that determines the stiffness of the potential. This harmonic poten tial was added and removed between particles following the eb-RxMC procedure described 17 in Section 3.1. Unless otherwise stated, all bonds in our simulation box were harmonic bonds (Eq. 18) with _k_ h = 790 _k_ B _T/_ nm <sup>2</sup> and _l_ 0 = 0 _._ 355 nm. Similar to the choice of concentration, also the choices of _k_ h and _l_ 0 are arbitrary, as long as we are simulating an ideal system. Nevertheless, for future reference, we set them to values commonly used in coarse-grained models of polymers. <sup>46,47</sup> For the dimerization reactions between identical monomers, Eq. 21, our initial configura tion contained _N_ part identical particles of type A. Then, we varied the equilibrium constant as the input parameter of the simulation. For the dimerization reactions between differ ent monomers, Eq. 29, our initial configuration contained _f_ A _N_ part particles of type A and (1 _−_ _f_ A) _N_ part particles of type B. Then, in addition to the variation of equilibrium constant, we also varied the initial composition of the reacting mixture by varying the value of _f_ A. Our simulation box size is _L_ = 30 _l_ 0 = 10 _._ 65 nm. With _N_ part = 50 particles in the box, the molar concentration of monomers becomes _c_ tot = 70 mM. For the polycondensation reactions, 9b, we represented each monomer by two particles of the same type, corresponding to two reactive functional groups. These two particles were connected by a permanent bond, which was not considered in the eb-RxMC procedure. Fur thermore, we prevented the formation of rings by not permitting intra-molecular reactions. In this case, we used a larger box size _L_ = 50 _l_ 0 = 17 _._ 75 nm and larger number of particles _N_ part = 200 particles, yielding a molar concentration of monomers of _c_ tot = 60 mM. Oth erwise, all parameters used in the simulations of polycondensations were the same as for dimerizations. #### 3.4 Simulation protocol We used the ESPResSo v4.2.1. <sup>41,42</sup> simulation software to perform the simulations. One simulation cycle consisted of trial reaction moves equal to the number of particles _N_ trial = _N_ part, followed by _N_ MD = 4 _·_ 10 <sup>4</sup> integration steps of the Langevin dynamics. A typical simulation consisted of 30000 such cycles, yielding a total _t_ sim = 1 _._ 2 _·_ 10 <sup>7</sup> _τ_ of Langevin 18 dynamics time evolution and 6 _·_ 10 <sup>6</sup> reaction trial moves, consuming 12 hours of computing time on the MetaCentrum computing cluster, typically using nodes with Intel(R) Xeon(R) Gold 6130 CPU @ 2.10GHz, 192 GB RAM and 1x 960 GB NVMe of disk. Unless otherwise stated, the reactions were sampled using the eb-RxMC algorithm described in Section 3.1 with an inclusion radius of _r_ in = 3 _._ 8 nm. The LD simulations were performed using a time step _δt_ = 0 _._ 01 _τ_, and a damping constant _γ_ = 1 _._ 0 _/τ_, where _τ_ = _l_ 0 ~~�~~ _m/k_ B _T_ with a reduced temperature _T_ = _k_ h _l_ 0 <sup>2</sup> <sup>_/k_</sup> <sup>B.</sup> <sup>Similar</sup> <sup>to</sup> the choice of _k_ h, also the choices of temperature _T_ and particle mass _m_ are arbitrary and have no effect on the computed equilibrium properties, as long as we are simulating an ideal system. During the simulation, we were estimating on the fly the probability density of bond lengths, _P_ ( _l_ ). All sampled quantities were stored with time intervals _t_ coord = 400 _τ_ and were averaged after discarding the first 30% of each simulation run as equilibration, corresponding to the first 3 _._ 6 _·_ 10 <sup>6</sup> _τ_ of the simulation. Statistical uncertainty of the computed averages was estimated using the block analysis method. <sup>48</sup> ### 4 Results and discussion We aim to validate our implementation of the eb-RxMC algorithm using simple systems, for which exact analytical solutions are available. Therefore, we restrict the results in this article to ideal non-interacting systems, in which the only interaction present is the harmonic bond potential (Eq. 18), representing both reversible and permanent bonds between particles. First, we use dimerization reactions to show that our eb-RxMC simulations yield the correct degree of conversion and bond length distribution of the reversible bonds, regardless of the choice of the equilibrium constant _K_, stiffness of the harmonic bond _k_ h or inclusion radius _r_ in for the biased sampling. Next, we simulate linear polycondensation reactions to prove that our eb-RxMC algorithm also samples the correct equilibrium distribution of polymer chain lengths, quantified by the mass fraction _w_ ( _M_ ), and end-to-end distances, _R_ e( _M_ ), for 19 each chain length _M_ . #### 4.1 Dimerization reactions We start with dimerization reactions, the same test case used by Smith and Triska to validate the original RxMC algorithm. <sup>30</sup> To independently validate the sampling of the reaction space, we did not sample the configuration space in these simulations, therefore we did not use any inclusion radius _r_ in. In Fig. 3 (left panel), we present the degree of conversion _p_ measured in our eb-RxMC simulations (markers) as a function of p _λ_ = p _K_ + p _C_, where _K_ is the equilibrium constant and _C_ is the relative concentration of the reacting species, as defined in Eq. 8. The dimerization between two chemically identical monomers (Eq. 21) reaches _p_ = 0 _._ 5 at p _λ_ = 0. Fig. 3 (left panel) shows that our simulation results reproduce the analytical reference result of Eq. 27 with a very high accuracy. Dimerization between two chemically different monomers, (Eq. 29), at equimolar stoichiometric ratio reaches _p_ = 0 _._ 5 at a slightly lower value of p _λ_ but otherwise the dependence _p_ (p _λ_ ) results in curve with a very similar shape. The residuals in Fig. 3 are calculated as the difference between the simulated _p_ -value and the exact _p_ -value from the theory. They show that the agreement between the numerical results and the analytical theory is excellent. We only observe a very small systematic deviation in some corner cases with a high degree of of conversion, which are presumably related to finite-size effects, as discussed in Ref. <sup>49</sup> For dimerization between two chemically different species, we further investigate how the degree of conversion is affected by the initial composition. In Fig. 3 (right panel) we show simulation results at various initial compositions of the system, ranging from _f_ A = 0 _._ 1 to _f_ A = 0 _._ 9. Once again, we observe a very good agreement between our simulations and analytical results for the given composition. When either of the reactants is in excess, the _p_ -values of A+B reactions as a function of p _λ_ are increased, as compared to _f_ A = 0 _._ 5. Interestingly, the curves become almost symmetric around p _λ_ = 0 at very high or very low value of _f_ A. Based on the above comparison, we conclude that our eb-RxMC simulations correctly sample the reaction space 20 for a broad range of equilibrium constants _K_ and initial compositions of the system, in absence of any inclusion radius _r_ in. Figure 3: Left panel: Degree of conversion _p_ as a function of p _λ_ (Eq. 8) for A+A dimerization reactions (Eq. 21) and A+B dimerization reactions (Eq. 29) at equimolar composition. Right panel: _p_ as a function of p _λ_ for A+B dimerization reactions at various initial compositions, defined by the mole fraction of A _f_ A. The eb-RxMC simulations (markers) are compared with analytical solutions given by Eq. 27 (continuous line) and 36 (dashed lines). Residuals (bottom panels) are calculated as the difference between the simulated _p_ -value and the theoretical _p_ -value (Eqs. 27-36). Next, we validate that our eb-RxMC algorithm can be combined with Langevin Dynamics (LD) to simultaneously sample the reaction and configuration space without introducing any artifacts. When combining both simulation schemes, we use the biased eb-RxMC, sampling the reactions only within an inclusion radius _r_ in. We aim to verify that the inclusion radius can be selected almost arbitrarily. The only practical constraint is that the forces due to the harmonic potential within this range are small enough to ensure that the subsequent LD integration remains stable. Furthermore, we aim to verify that the degree of conversion is not affected by the arbitrary choice of the stiffness constant of the harmonic potential (Eq. 18). For this purpose, we consider the case of a A+A dimerization with p _λ_ = _−_ 1, corresponding to an expected relatively high degree of conversion _p_ = 0 _._ 8 (Eq. 27). This p _λ_ -value is a convenient choice for the later study of polycondensation reactions, because it permits to 21 measure a relatively wide distribution of polymer chains of different lengths. In Fig. 4 (left panel), we show the residuals in the degree of conversion _p_ as a function of the chosen value of _r_ in at various values of _k_ h. All these residuals are very close to zero, and appear randomly distributed around this reference line, confirming that both arbitrary choices, _r_ in and _k_ h, have no effect on the computed degree of conversion and that our combination of eb-RxMC with LD yields the correct results. The choice of _r_ in only affects the efficiency of the eb-RxMC sampling but does not change the ensemble averages of any observable. Therefore, one can choose _r_ in completely arbitrarily, as long as a pure MC simulation scheme is used. The only criterion for the optimum value of _r_ in is the sampling efficiency. When simulating interacting systems using a combination of eb RxMC and LD, the optimum value of _r_ in should be chosen as a compromise between higher sampling efficiency of the eb-RxMC algorithm (high _r_ in values) and a stable integration of the chosen MD scheme (low _r_ in values). Our preliminary eb-RxMC simulations with systems including Lennard-Jones and electrostatic interactions suggest that values of _r_ in _≈_ 1 nm are a good compromise between a sufficient sampling and a stable integration of LD. However, this value of _r_ in should be taken only as a reasonable choice and, in general, one should tune _r_ in for each specific system of study. To prove that our simulations also correctly sample the configuration space, we measured the equilibrium distribution of bond lengths of the reversible bonds at different values of _k_ h. For a harmonic oscillator, this equilibrium distribution can be calculated exactly as the probability density _<u>l</u>_ <sup>2</sup> <u>e</u> <sup>_−βU_</sup> <sup>bond(</sup> <sup>_l_</sup> <sup>)</sup> _P_ ( _l_ ) = (19) <u>�</u> _<u>∞</u>_ 0 <sup>_r_</sup> <sup>2e</sup> <sup>_−βU_</sup> <sup>bond(</sup> <sup>_r_</sup> <sup>)d</sup> <sup>_r._</sup> For the harmonic potential, _P_ ( _l_ ) depends on the chosen value of _k_ h _via_ _U_ bond (Eq. 18). Fig. 4 (right panel) proves that our simulations perfectly match the theoretical prediction given by Eq. 19. This result confirms that our simulations properly sample not only the reaction space but also the configuration space of the dimerization reactions. For completion, we provide an analogous analysis for the case of A+B dimerization at equimolar conditions 22 ( _f_ A = 0 _._ 5) in the Supporting Information (Section S3). Our results show that our combined scheme LD/eb-RxMC also samples correctly the reaction and the configuration space in this case with no significant deviations from the reference analytical equations for the ideal case. Figure 4: Left panel: Residuals in the degree of conversion _p_ as a function of the inclusion radius _r_ in at various values of the harmonic constant for the reversible bond _k_ h. The residuals are calculated as the difference between the measured value in our simulations and the expected value _p_ = 0 _._ 8 given by Eq. 27 at p _λ_ = _−_ 1. Right panel: Probability density _P_ ( _l_ ) of observing a reversible bond with a length _l_ in a bin at a distance _r_ with size d _r_ at different values of _k_ h. The numerical results from our simulations (markers) follow the exact result given by Eq. 19 (dashed lines). #### 4.2 Polycondensation reactions After validating our eb-RxMC implementation for dimerization reactions, we would like to apply it to a more complex problem. Ideal polycondensation reactions are a suitable complex problem, thanks to the analytical results for chain length distribution <sup>40</sup> and for end-to end distance. <sup>1,50</sup> In this section, we show that our eb-RxMC implementation quantitatively reproduces these analytical results. For illustration, we start with p _λ_ = _−_ 1, which yields an expected relatively high degree of conversion _p_ = 0 _._ 8 (Eq. 27) and a broad distribution of chain lengths. In Fig. 5, we show 23 snapshots of the simulation of a polycondensation reaction at different simulation cycles. In this figure, each colour represents chains of a specific chain length _M_ . In cycle #0, the starting configuration contains only monomers, _i.e._ _p_ = 0. As the simulation progresses, the particles reversibly bind and unbind to each other, causing that longer chains gradually appear, until an equilibrium state is reached. In equilibrium, the number of chains and their length both fluctuate during the simulation, although the total number of particles in solution remains constant. 24 Figure 5: Simulation snapshots of different configurations obtained with our eb-RxMC algorithm with explicit reversible bonds. The simulation is initialized with a system consisting in monomers, each containing two reactive particles (Cycle #0). Throughout the simulation, these monomers can reversibly undergo linear polycondensation reactions (Eq. 9b) yielding a distribution of chains with different lengths. For clarity, polymer chains with the same number of monomers have been colored with the same color. In Fig. 6 (left panel), we compare the simulated mass fraction _w_ ( _M_ ) with the analytical result given by Eq. 10 for various values of p _λ_, corresponding to various degrees of conversion. 25 We observe a very good agreement for all values of p _λ_, even for rather long chains with mass fractions below 0.001. We note, however, that for long chains the _w_ ( _M_ ) distributions obtained from simulations can deviate from the analytical results due to finite-size effects, <sup>49</sup> as we demonstrate in the Supporting Information (S4). Therefore, it is important to ensure that the expected average chain length is much lower than the number of monomers in the simulation box. As a rule of thumb, the total number of monomers should be at least 10 times higher than the average chain length. To validate the sampling of configurational space, in Fig. 6 (right panel), we plot the simulated end-to-end distance of the chains, _R_ e( _M_ ), divided by the exact analytical results for the freely jointed chain (FJC) <sup>1,50</sup> _R_ e <sup>2</sup> _,_ FJC <sup>(</sup> <sup>_M_</sup> <sup>) =</sup> <sup>_b_</sup> <sup>2 (2</sup> <sup>_M_</sup> <sup>_−_</sup> <sup>1)</sup> (20) where _b_ is the Kuhn segment length of the FJC. In this comparison, we assume that the Kuhn segment length of the FJC can be approximated by the average bond length measured in the simulation, _b_ _≈⟨l⟩_ ≳ _l_ 0. For _R_ e, our simulation results once again match the theory within statistical error. The simulation results deviate from Eq. 20 for the longer chains of each distribution, but these chains occur only rarely in our simulations, which is also reflected in the high statistical uncertainty of their estimated end-to-end distance. Altogether, our validation for polycondensation reactions has shown that our simulations correctly sample both the reaction and configuration space of polymer chains formed during the reaction. 26 Figure 6: Left panel: mass fraction _w_ as a function of the number of monomers in the polymer chain _M_ at various p _λ_ values. Markers follow the data measured in our eb-RxMC simulation and the dashed line follows the exact value given by Eqs. 27 and 10. Right panel: end-to-end distance _R_ e as a function of _M_ at various p _λ_ values (markers). Markers follow the data measured in our simulation and the dashed line follows the exact value given by Eq. 20. For convenience, all results are normalized by _R_ e <sup>2</sup> _,_ FJC <sup>.</sup> ### 5 Conclusions We have designed a biased Monte Carlo algorithm to sample chemical equilibrium in the Reaction ensemble by creating explicit bonds between particles in the simulation box. We refer to such algorithm as explicit bonding Reaction Ensemble Monte Carlo (eb-RxMC) to distinguish it from the original implementation of the reaction ensemble, in which the reaction is represented by inserting the newly formed particles and deleting the ones which have reacted. The eb-RxMC algorithm will become publicly available as a module in one of the future releases of ESPResSo. <sup>41,42</sup> Our eb-RxMC algorithm is biased to sample only the reaction within an inclusion radius _r_ in. This bias allows us to couple the eb-RxMC with Langevin Dynamics to sample the configuration space. The value of _r_ in can be chosen arbitrarily but, in order to enable this coupling, it should be chosen such that big forces do not occur due to newly created bonds, 27 so that the LD integration remains stable. By simulating systems for which exact analyt ical solutions are known, we demonstrated that our algorithm correctly samples both the reaction and configuration space. Namely, we showed that for dimerization reactions with different equilibrium constants and initial compositions, the degree of conversion measured in our simulations perfectly matched the reference value given by the analytical equations, irrespective of the choice of the inclusion radius _r_ in or the stiffness of the harmonic poten tial, _k_ h. Next, we showed that our simulations can correctly match the analytical chain length distribution <sup>2</sup> and end-to-end distance <sup>1,50</sup> of ideal chains in polycondensation reac tions. Therefore, we conclude that our eb-RxMC simulations correctly sample both the reaction and the configuration space of these reference systems. In this work, we have validated our algorithm for a set of ideally behaving systems, for which analytical results are available. The interesting applications of our algorithm consist in using it for interacting systems, for which analytical results are not available, and therefore, their behaviour is difficult to predict from theory. However, such applications would not be trustworthy without a previous validation. For example, we are currently using our eb RxMC algorithm to simulate polymers containing derivatives of boronic acids in the side chains. <sup>15,16</sup> In these polymers, the formation of hydrogen bonds competes with the acid-base ionization equilibrium. Both the hydrogen bonds and ionization of the side-chains affect the chain conformation, creating a complicated feedback loop, which is difficult to capture by intuition. Another example includes hydrogen bonding in linear poly(ethyleneimine), which has been proposed as a hypothetical explanation for the peculiar features of titration curve of this molecule. <sup>21</sup> Our preliminary results suggest that our algorithm captures well the competition of the hydrogen bonding with the acid-base equilibrium in these systems, being able to explain features of the potentiometric titration curves that cannot be justified by purely electrostatic arguments. In a broader scope, our algorithm has potential applications in various other dynamical macromolecular systems, in which the formation of reversible bonds is one of the governing factors. 28 ### 6 Supplementary Material Additional material provided in the Supporting Information: (i) detailed derivation for the degree of conversion reactions in the ideal gas limit (Eqs. 27 and 36); (ii) detailed derivation for the acceptance probability of the eb-RxMC method (Eq. 17); (iii) additional plots showing that the eb-RxMC correctly samples the reaction and configuration space of A+B dimerization reactions with _f_ A = 0 _._ 5; and (iv) a brief discussion on finite size effects in eb-RxMC simulation of linear polycondensation reactions. ### Acknowledgement We thank Dr. Rita S. Dias for useful discussions. We acknowledge the financial support of the Czech Science Foundation, Grant 21-31978J, and the funding from the Norway grants, provided by the Czech Ministry of finance, project number EHP-BFNU-OVNKM-4-215-01 2022. P.M.B. acknowledges the European Union’s Horizon Europe research and innovation program under the Marie Sklodowska-Curie grant agreement No 101062456 (ModEMUS). Computational resources were supplied by the project "e-Infrastruktura CZ" (e-INFRA CZ LM2018140) supported by the Ministry of Education, Youth and Sports of the Czech Re public. ### References (1) Flory, P. J. _Statistical_ _Mechanics_ _of_ _Chain_ _Molecules_ ; Wiley, 1969. (2) Flory, P. J. Molecular size distribution in linear condensation polymers1. _Journal_ _of_ _the_ _American_ _Chemical_ _Society_ 1936, _58_, 1877–1885. (3) Munk, P. _Introduction_ _to_ _Macromolecular_ _Science_ ; Wiley-Interscience, 1989. 29 (4) Höcker, H. Metathesis polymerization - stepwise or chain growth reaction? _Journal_ _of_ _Molecular_ _Catalysis_ 1991, _65_, 95–99. (5) Kéki, S.; Zsuga, M.; Kuki, A. Theoretical size distribution in linear step-growth poly merization for a small number of reacting species. _The_ _Journal_ _of_ _Physical_ _Chemistry_ _B_ 2013, _117_, 4151–4155. (6) Gavrilov, A. A.; Chertovich, A. V. Copolymerization of partly incompatible monomers: An insight from computer simulations. _Macromolecules_ 2017, _50_, 4677–4685. (7) Lang, M.; Kumar, K. S. Simple and general approach for reversible condensation poly merization with cyclization. _Macromolecules_ 2021, _54_, 7021–7035. (8) Lang, M.; Kumar, K. S. Reversible Stepwise Condensation Polymerization with Cy clization: Strictly Alternating Co-polymerization and Homopolymerization Based upon Two Orthogonal Reactions. _Macromolecules_ 2021, _54_, 7036–7050. (9) Rudyak, V. Y.; Kozhunova, E. Y.; Chertovich, A. V. Towards the realistic computer model of precipitation polymerization microgels. _Scientific_ _reports_ 2019, _9_, 13052. (10) Gavrilov, A. A.; Rudyak, V. Y.; Chertovich, A. V. Computer simulation of the core-shell microgels synthesis via precipitation polymerization. _Journal_ _of_ _colloid_ _and_ _interface_ _science_ 2020, _574_, 393–398. (11) Nian, S.; Patil, S.; Zhang, S.; Kim, M.; Chen, Q.; Zhernenkov, M.; Ge, T.; Cheng, S.; Cai, L.-H., et al. Dynamics of Associative Polymers with High Density of Reversible Bonds. _Physical_ _Review_ _Letters_ 2023, _130_, 228101. (12) Stukalin, E. B.; Cai, L.-H.; Kumar, N. A.; Leibler, L.; Rubinstein, M. Self-Healing of Unentangled Polymer Networks with Reversible Bonds. _Macromolecules_ 2013, _46_, 7525–7541. 30 (13) Parada, G. A.; Zhao, X. Ideal reversible polymer networks. _Soft_ _Matter_ 2018, _14_, 5186–5196. (14) Othman, M. H.; Ito, Y.; Akimoto, J. Mild-Temperature-Induced Recombination of Crosslinking Structures in Hydrogels Using Phenylboronic-Acid-Functionalized 3D Nanoparticle Crosslinkers. _ACS_ _Applied_ _Polymer_ _Materials_ 2022, _4_, 5047–5055. (15) Ďorďovič, V.; Vojtová, J.; Jana, S.; Uchman, M. Charge reversal and swelling in saccharide binding polyzwitterionic phenylboronic acid-modified poly (4-vinylpyridine) nanoparticles. _Polymer_ _Chemistry_ 2019, _10_, 5522–5533. (16) Marková, P.; Uchman, M. Synthesis and self-assembly of polyzwitterionic phenylboronic acid-containing double hydrophilic block copolymers. _European Polymer Journal_ 2021, _151_, 110439. (17) Koper, G.; Borkovec, M. Binding of Metal Ions to Polyelectrolytes and Their Oligomeric Counterparts: An Application of a Generalized Potts Model. _The_ _Journal_ _of_ _Physical_ _Chemistry_ _B_ 2001, _105_, 6666–6674. (18) Nap, R. J.; Park, S. H.; Szleifer, I. Competitive calcium ion binding to end-tethered weak polyelectrolytes. _Soft_ _Matter_ 2018, _14_, 2365–2378. (19) Ermoshkin, A. V.; Olvera de la Cruz, M. Polyelectrolytes in the Presence of Multivalent Ions: Gelation Versus Segregation. _Phys._ _Rev._ _Lett._ 2003, _90_, 125504. (20) Khutoryanskiy, V. V.; Staikos, G. _Hydrogen-bonded interpolymer complexes:_ _formation,_ _structure_ _and_ _applications_ ; World Scientific, 2009. (21) Garcés, J. L.; Madurga, S.; Borkovec, M. Coupling of conformational and ionization equilibria in linear poly(ethylenimine): A study based on the site binding/rotational isomeric state (SBRIS) model. _Physical_ _Chemistry_ _Chemical_ _Physics_ 2014, _16_, 4626– 4638. 31 (22) Garcés, J. L.; Madurga, S.; Rey-Castro, C.; Mas, F. Dealing with long-range interactions in the determination of polyelectrolyte ionization properties. Extension of the transfer matrix formalism to the full range of ionic strengths. _Journal_ _of_ _Polymer_ _Science,_ _Part_ _B:_ _Polymer_ _Physics_ 2017, _55_, 275–284. (23) Blanco, P. M.; Madurga, S.; Mas, F.; Garcés, J. L. Coupling of charge regulation and conformational equilibria in linearweak polyelectrolytes: Treatment of long-range inter actions via effective short-ranged and pH-dependent interaction parameters. _Polymers_ 2018, _10_, 811. (24) Mieres-Perez, J.; Sanchez-Garcia, E. _Advances in Physical Organic Chemistry_ ; Elsevier, 2020; Vol. 54; pp 143–183. (25) Paciolla, M.; Likos, C. N.; Moreno, A. J. Validity of Effective Potentials in Crowded Solutions of Linear and Ring Polymers with Reversible Bonds. _Macromolecules_ 2022, _55_, 2659–2674. (26) Carvalho, A. P.; Santos, S. M.; Pérez-Sánchez, G.; Gouveia, J. D.; Gomes, J. R.; Jorge, M. Sticky-MARTINI as a reactive coarse-grained model for molecular dynamics simulations of silica polymerization. _npj_ _Computational_ _Materials_ 2022, _8_, 49. (27) Landsgesell, J.; Nová, L.; Rud, O.; Uhlík, F.; Sean, D.; Hebbeker, P.; Holm, C.; Košo van, P. Simulations of ionization equilibria in weak polyelectrolyte solutions and gels. _Soft_ _Matter_ 2019, _15_, 1155–1185. (28) Blanco, P. M.; Narambuena, C. F.; Madurga, S.; Mas, F.; Garcés, J. L. Unusual Aspects of Charge Regulation in Flexible Weak Polyelectrolytes. _Polymers_ 2023, _15_, 2680. (29) Johnson, J. K.; Panagiotopoulos, A. Z.; Gubbins, K. E. Reactive canonical Monte Carlo: a new simulation technique for reacting or associating fluids. _Molecular_ _Physics_ 1994, _81_, 717–733. 32 (30) Smith, W.; Triska, B. The reaction ensemble method for the computer simulation of chemical and phase equilibria. I. Theory and basic examples. _The_ _Journal_ _of_ _chemical_ _physics_ 1994, _100_, 3019–3027. (31) Uhlík, F.; Košovan, P.; Limpouchová, Z.; Procházka, K.; Borisov, O. V.; Leermakers, F. A. M. Modeling of Ionization and Conformations of Starlike Weak Polyelectrolytes. _Macromolecules_ 2014, _47_, 4004–4016. (32) Nová, L.; Uhlík, F.; Košovan, P. Local pH and effective p _K_ A of weak polyelectrolytes - insights from computer simulations. _Physical_ _Chemistry_ _Chemical_ _Physics_ 2017, _19_, 14376–14387. (33) Malani, A.; Auerbach, S. M.; Monson, P. A. Probing the mechanism of silica poly merization at ambient temperatures using Monte Carlo simulations. _The_ _Journal_ _of_ _Physical_ _Chemistry_ _Letters_ 2010, _1_, 3219–3224. (34) Malani, A.; Auerbach, S. M.; Monson, P. A. Monte Carlo simulations of silica poly merization and network formation. _The_ _Journal_ _of_ _Physical_ _Chemistry_ _C_ 2011, _115_, 15988–16000. (35) Chien, S.-C.; Auerbach, S. M.; Monson, P. A. Reactive ensemble Monte Carlo simu lations of silica polymerization that yield zeolites and related crystalline microporous structures. _The_ _Journal_ _of_ _Physical_ _Chemistry_ _C_ 2015, _119_, 26628–26635. (36) Oyarzún, B.; Mognetti, B. M. Efficient sampling of reversible cross-linking polymers: Self-assembly of single-chain polymeric nanoparticles. _The Journal of Chemical Physics_ 2018, _148_, 114110. (37) Oyarzún, B.; Mognetti, B. M. Efficient sampling of reversible cross-linking polymers: Self-assembly of single-chain polymeric nanoparticles. _The Journal of Chemical Physics_ 2018, _148_, 114110. 33 (38) Lehn, J.-M. Dynamers: dynamic molecular and supramolecular polymers. _Progress_ _in_ _Polymer_ _Science_ 2005, _30_, 814–831, Plenary Lectures. (39) McNaught, A. D.; Wilkinson, A. _IUPAC._ _Compendium_ _of_ _Chemical_ _Terminology_ ; Blackwell Scientific Publications: Oxford, United Kingdom, 1997. (40) Flory, P. J. Molecular size distribution in linear condensation polymers1. _Journal_ _of_ _the_ _American_ _Chemical_ _Society_ 1936, _58_, 1877–1885. (41) Weik, F.; Weeber, R.; Szuttor, K.; Breitsprecher, K.; de Graaf, J.; Kuron, M.; Landsge sell, J.; Menke, H.; Sean, D.; Holm, C. ESPResSo 4.0 - an extensible software package for simulating soft matter systems. _European_ _Physical_ _Journal_ _Special_ _Topics_ 2019, _227_, 1789–1816. (42) Weeber, R.; Grad, J.-N.; Beyer, D.; Blanco, P. M.; Kreissl, P.; Reinauer, A.; Tischler, I.; Košovan, P.; Holm, C. In _Comprehensive Computational Chemistry_, 1st ed.; Yáñez, M., Boyd, R. J., Eds.; Elsevier: Oxford, 2024; pp 578–601. (43) McQuarrie, D. A.; Simon, J. D. In _Physical_ _Chemistry:_ _a_ _Molecular_ _Approach_, 1st ed.; McGuire, A., Ed.; University Science Books, 1997. (44) Atkins, P. W. _Atkins_ _Physical_ _Chemistry,_ _6th_ _edition_ ; Oxford University Publishing, 1998. (45) Frenkel, D.; Smit, B. _Understanding Molecular Simulation_ ; Academic Press: San Diego, 1996. (46) Lunkad, R.; Murmiliuk, A.; Hebbeker, P.; Boublík, M.; Tošner, Z.; Štěpánek, M.; Košovan, P. Quantitative prediction of charge regulation in oligopeptides. _Molecular_ _Systems_ _Design_ _and_ _Engineering_ 2021, _6_, 122–131. 34 (47) Lunkad, R.; Barroso da Silva, F. L.; Košovan, P. Both Charge-Regulation and Charge Patch Distribution Can Drive Adsorption on the Wrong Side of the Isoelectric Point. _Journal_ _of_ _the_ _American_ _Chemical_ _Society_ 2022, _144_, 1813–1825. (48) Janke, W. Statistical Analysis of Simulations: Data Correlations and Error Estimation. _Quantum_ _Simulations_ _of_ _Complex_ _Many-Body_ _Systems:_ _from_ _Theory_ _to_ _Algorithms_ 2002, 423–445. (49) Hebbeker, P.; Blanco, P. M.; Uhlík, F.; Košovan, P. Finite-Size Effects in Simulations of Chemical Reactions. _ChemRxiv_ 2023, (50) Rubinstein, M.; Colby, R. H. _Polymer_ _Physics_ ; Oxford University Press: Oxford, UK, 2003. ### 7 Supporting information #### 7.1 Derivation of the degree of conversion for dimerization reactions in the ideal gas limit Let us start with the reversible association between two identical functional groups A, 2 A _−−↽−−⇀_ A _−_ A (21) where A–A represents a pair of bonded A groups. The chemical reaction equilibrium in Eq. 21 is determined by the corresponding equilibrium constant _K_ _≡_ <sup>_<u>a</u>_</sup> <sup><u>A</u></sup> <sup>_<u>−</u>_</sup> <sup><u>A</u></sup> _a_ <sup>2</sup> A _,_ (22) A where _ax_ is the activity of the group _x ∈{_ A _,_ A _−_ A _}_ . In the ideal gas limit, _i.e._ assuming a non-interacting system, the activities in Eq. 22 can be replaced by concentrations _a_ x = _c_ x _/c_ <sup>_⊖_</sup>, 35 yielding _K_ ideal = <sup>_<u>c</u>_</sup> <sup><u>A</u></sup> <sup>_<u>−</u>_</sup> <sup><u>A</u></sup> <sup>_<u>c⊖</u>_</sup> _c_ <sup>2</sup> A (23) A where _c_ <sup>_⊖_</sup> = 1mol _/_ kg is the reference concentration, following the definition by the Inter national Union of Pure and Applied Chemistry (IUPAC). <sup>39</sup> The choice of _c_ <sup>_⊖_</sup> defines the value of the chemical potential and simultaneously ensures that _K_ is dimensionless. For the reaction in Eq. 21, we define the degree of conversion as the fraction of the concentration of A–A pairs over their maximum attainable concentration, _c_ <sup>max</sup> A _−_ A <sup>,</sup> _p ≡_ <sup>_<u>c</u>_</sup> <sup><u>A</u></sup> <sup>_<u>−</u>_</sup> <sup><u>A</u></sup> _,_ (24) _c_ <sup>max</sup> A _−_ A _−_ A = <sup>_<u>c</u>_</sup> <sup><u>tot</u></sup> <sup>_<u>−</u>_</sup> <sup>_<u>c</u>_</sup> <sup><u>A</u></sup> _c_ tot where _c_ tot is the total concentration of reactive groups, _i.e._ _c_ tot = _c_ A + 2 _c_ A _−_ A. The con centration of each of the reactive groups can be expressed using the degree of conversion, _c_ A = _c_ tot(1 _−_ _p_ ) _,_ (25a) _c_ A _−_ A = <sup><u>1</u></sup> (25b) 2 <sup>_c_</sup> <sup>tot</sup> <sup>_p ._</sup> The equilibrium constant can be reformulated in therms of the degree of conversion inserting Eqs. 25a and 25b into Eq. 23, _K_ ideal _<u>c</u>_ <sup>_⊖_</sup> = 2 _c_ tot _<u>p</u>_ (1 _−_ _p_ ) <sup>2</sup> <sup>_._</sup> (26) Eq. 7a in the main text is obtained by solving Eq. 26 for _p_, _p_ = 1 + <sup><u>1</u></sup> <sup>_<u>−</u>_</sup> _√_ <u>1 + 8</u> _<u>λ</u>_ _,_ (27) 4 _λ_ where we have defined _λ_ as p _λ_ = _−_ log10( _λ_ ) = p _K_ + p _C,_ (28) 36 or alternatively _λ_ = _Kc_ tot _/c_ <sup>_⊖_</sup>, where p _K_ = _−_ log10( _K_ ) and p _C_ = _−_ log10( _c_ tot _/c_ <sup>_⊖_</sup> ). The definition of p _λ_ simplifies the functional form of Eq. 27 and it casts the equation in the logarithmic form, which is convenient when using p _K_ instead of _K_ . In the case of dimerization reactions between two chemically different functional groups A and B, A + B _−−↽−−⇀_ A _−_ B _,_ (29) the derivation of the degree of conversion proceeds similar to Eq. 21. The equilibrium constant for Eq. 29 is given by _K_ _≡_ <sup>_<u>a</u>_</sup> <sup><u>A</u></sup> <sup>_<u>−</u>_</sup> <sup><u>B</u></sup> _a_ A _a_ B _,_ (30) where _a_ x is the activity of the chemical species _x_ _∈{_ A _,_ B _,_ A _−_ B _}_ . In the ideal gas limit, _K_ can be expressed in terms of the concentrations of reactants _K_ ideal = <sup>_<u>c</u>_</sup> <sup><u>A</u></sup> <sup>_<u>−</u>_</sup> <sup><u>B</u></sup> <sup>_<u>c⊖</u>_</sup> _c_ A _c_ B _._ (31) Following analogous arguments as than in the case of dimerization reactions (Eq. 24), we define the degree of conversion for Eq. 29 as the fraction of the concentration of A–B pairs over their maximum attainable concentration, _c_ <sup>max</sup> A _−_ B <sup>,</sup> _p ≡_ <sup>_<u>c</u>_</sup> <sup><u>A</u></sup> <sup>_<u>−</u>_</sup> <sup><u>B</u></sup> _c_ <sup>max</sup> A _−_ A _−_ B = <sup>_<u>c</u>_</sup> _c_ <sup><u>tot</u></sup> tot <sup>_<u>−</u>_</sup> (1 <sup>_<u>c</u>_</sup> _−_ <sup><u>A</u></sup> <sup>_<u>−</u>_</sup> _r_ ex <sup>_<u>c</u>_</sup> ) <sup><u>B</u></sup> <sup>_,_</sup> (32) where _c_ tot is the total concentration of reactive groups, _i.e._ _c_ tot = _c_ A + _c_ B + 2 _c_ A _−_ B and _r_ ex is the excess ratio, defined as _r_ ex _≡_ <sup>_<u>c</u>_</sup> <sup><u>ex</u></sup> _c_ tot = _|_ 2 _f_ A _−_ 1 _|_ (33) where _c_ ex = _|c_ A _−_ _c_ B _|_ is the excess concentration of reactive groups and _f_ A is the mole fraction of A groups in the reactive mixture, including both bonded and free A groups. By introducing _r_ ex in Eq. 32, we ensure that _p_ = 1 corresponds to the maximum attainable 37 conversion of the reaction, independently of the initial composition of the reacting system. From now on, we will assume that reactant B is in excess. This comes without loss of gen erality because A and B had equivalent roles in the preceding equations. Then concentration of individual reactants can be expressed using _p_ and _r_ ex as _c_ A = <sup><u>1</u></sup> 2 <sup>_c_</sup> <sup>tot(1</sup> <sup>_−_</sup> <sup>_p_</sup> <sup>)(1</sup> <sup>_−_</sup> <sup>_r_</sup> <sup>ex) =</sup> <sup><u>1</u></sup> 2 <sup>_c_</sup> <sup>tot(1</sup> <sup>_−_</sup> <sup>_p −_</sup> <sup>_r_</sup> <sup>ex +</sup> <sup>_pr_</sup> <sup>ex)</sup> <sup>_,_</sup> (34a) _c_ B = 2 <sup><u>1</u></sup> <sup>_c_</sup> <sup>tot(1</sup> <sup>_−_</sup> <sup>_p_</sup> <sup>)(1</sup> <sup>_−_</sup> <sup>_r_</sup> <sup>ex) +</sup> <sup>_c_</sup> <sup>tot</sup> <sup>_r_</sup> <sup>ex</sup> <sup>=</sup> <sup><u>1</u></sup> 2 <sup>_c_</sup> <sup>tot(1</sup> <sup>_−_</sup> <sup>_p_</sup> <sup>+</sup> <sup>_r_</sup> <sup>ex +</sup> <sup>_pr_</sup> <sup>ex)</sup> <sup>_,_</sup> (34b) _c_ A _−_ B = <sup><u>1</u></sup> (34c) 2 <sup>_c_</sup> <sup>tot</sup> <sup>_p_</sup> <sup>(1</sup> <sup>_−_</sup> <sup>_r_</sup> <sup>ex)</sup> <sup>_._</sup> Inserting Eqs. 34a-34c into Eq. 31, _K_ can be expressed in therms of _p_ and _r_ ex, _K_ _≡_ <sup><u>2</u></sup> <sup>_<u>c⊖</u>_</sup> _c_ tot _<u>p</u>_ (1 _−_ _p_ )(1 _−_ _p_ + _r_ ex + _pr_ ex) <sup>_._</sup> (35) Finally, Eq. 7b in the main text is obtained by solving Eq. 35 for p, _p_ = (1 _−_ _r_ ex) <sup>_−_</sup> <sup>1</sup> where p _λ_ is given by Eq. 28. - ~~�~~ 1 + 2 _λ_ + _λ_ <sup>2</sup> _r_ <u>ex</u> <sup>2</sup> 1 + <sup>1</sup> <sup>_−_</sup> _λ_ _,_ (36) #### 7.2 Derivation of the acceptance probability for the explicit bond- ing Reaction ensemble Monte Carlo Below, we show that our algorithm satisfies detailed balance, which is a sufficient condition for its convergence to the desired equilibrium distribution. <sup>45</sup> The requirement of detailed balance can be formulated such that the flow of configurations from an arbitrary state _si_ to any other state _sj_ is equal to flow in the opposite direction, _P_ obs( _si_ ) _P_ trial( _si_ _→_ _sj_ ) _P_ acc( _si_ _→_ _sj_ ) = _P_ obs( _sj_ ) _P_ trial( _sj_ _→_ _si_ ) _P_ acc( _sj_ _→_ _si_ ) (37) 38 where _P_ obs( _si_ ) is the probability of observing state _si_ at equilibrium, _P_ trial( _si_ _→_ _sj_ ) is the probability of proposing a trial move from _si_ to _sj_ and _P_ acc( _si_ _→_ _sj_ ) is the probability of accepting such trial move. To satisfy Eq. 37, the acceptance probability of our Monte Carlo method must fulfill the following _PP_ accacc(( _ssji_ _<u>→→</u>_ _<u>ssji</u>_ )) <sup>=</sup> <sup>_<u>P</u>_</sup> _P_ <sup><u>trial</u></sup> trial <sup><u>(</u></sup> ( <sup>_<u>s</u>_</sup> _s_ <sup>_<u>j</u>_</sup> _i_ _→_ <sup>_<u>→</u>_</sup> _s_ <sup>_<u>s</u>_</sup> _j_ <sup>_<u>i</u>_</sup> <sup><u>)</u></sup> ) _<u>P</u>_ <u>obs(</u> _<u>sj</u>_ <u>)</u> _P_ obs( _si_ ) <sup>_._</sup> (38) In the Reaction ensemble, the probability of observing a reaction state _s_ is _V_ _Nx_ ( _s_ ) exp( _−βU_ ( _s,⃗r_ ))d _⃗r_ (39) _P_ obs( _s_ ) = <sup><u>1</u></sup> _Q_ _x_ _Nx_ ( _s_ )! <u>(</u> _<u>KV</u>_ <sup>_−_</sup> <sup>1</sup> _<u>N</u>_ <u>A</u> <sup>_−_</sup> <sup>1</sup> <u>A</u> <sup>_−_</sup> <sup>1</sup> <sup>_<u>/c⊖</u>_</sup> <sup><u>)</u></sup> where _Q_ is the partition function in the Reaction ensemble, _c_ <sup>_⊖_</sup> is the reference concentration, _U_ ( _s,⃗r_ ) is the potential energy of the system in the state _s_ in a particular configuration, given by the position vectors of all particles, _⃗r_ . The product runs over all reacting groups _x_ . In the following, we will only consider _ξ_ = _±_ 1, meaning that only one bonded pair is being formed ( _ξ_ = +1) or destroyed ( _ξ_ = _−_ 1) upon transition from state _i_ to _j_ . The number of particles of type _x_ is given by _Nx_ ( _si_ ) = _Nx_ ( _sj_ ) + _ξνx_, where _νx_ is the stoichiometric coefficient of species _x_ . The relative statistical weight of states _si_ and _sj_ follows as _W_ RxMC = <sup>_<u>P</u>_</sup> <sup><u>obs(</u></sup> <sup>_<u>sj</u>_</sup> <sup><u>)</u></sup> _P_ obs( _si_ ) <sup>_−_</sup> A <sup>1</sup> <sup>_/c⊖_</sup> <sup>)</sup> <sup>_ξ_</sup> <sup>exp (</sup> <sup>_−β_</sup> <sup>∆</sup> <sup>_U_</sup> <sup>)</sup> _x_ _<u>Nx</u>_ <u>(</u> _<u>si</u>_ <u>)!</u> ( _Nx_ ( _si_ ) + _νxξ_ )! <sup>_._</sup> (40) <sup>_<u>P</u>_</sup> _P_ <sup><u>obs</u></sup> obs <sup><u>(</u></sup> ( <sup>_<u>s</u>_</sup> _s_ <sup>_<u>j</u>_</sup> _i_ ) <sup><u>)</u></sup> <sup>= (</sup> <sup>_KV_</sup> <sup>_−_</sup> <sup>1</sup> <sup>_N −_</sup> A <sup>1</sup> In the original implementation of the Reaction ensemble Monte Carlo <sup>30</sup> (RxMC), the al gorithm proposed the trial moves with equal probability in either direction of the reaction _P_ trial( _si_ _→_ _sj_ ) = _P_ trial( _sj_ _→_ _si_ ). Consequently, the acceptance probability was given by Eq. 40. In our eb-RxMC algorithm, we introduced an additional bias by sampling of the reaction only within the inclusion radius _r_ in, in order to enable coupling with Langevin Dynamics. The proposal probability in our eb-RxMC is asymmetric because the probability of finding 39 two unbonded particles within a given radius is different from that of finding two bonded particles within the same distance. In the forward direction of the reaction ( _ξ_ = 1), the probability of generating a trial move is given by the probability of finding two unbonded particles within the reaction volume given by _r_ in, _P_ trial( _ξ_ = +1 _, r_ in) = _P_ u( _r_ in) = �0 _r_ in 4 _πr_ <sup>2</sup> _P_ u( _r_ )d _r_ (41) <u>�</u> _V_ <sup>4</sup> <sup>_πr_</sup> <sup>2</sup> <sup>_P_</sup> <sup>u(</sup> <sup>_r_</sup> <sup>)d</sup> <sup>_r_</sup> where _P_ u( _r_ ) is the probability of finding a pair of unbonded particles at a distance _r_ . Anal ogously, the probability of performing a trial move in the reverse direction is given by the probability of finding two bonded particles within _r_ in, _P_ trial( _ξ_ = _−_ 1 _, r_ in) = _P_ b( _r_ in) = �0 _r_ in 4 _πr_ <sup>2</sup> _P_ b( _r_ )d _r_ (42) <u>�</u> _V_ <sup>4</sup> <sup>_πr_</sup> <sup>2</sup> <sup>_P_</sup> <sup>b(</sup> <sup>_r_</sup> <sup>)d</sup> <sup>_r_</sup> where _P_ b( _r_ ) is the probability of finding a pair of bonded particles at a distance _r_ . Therefore, the relative statistical weight of the bias introduced by restricting the proposals only within _r_ in is - _ξ_ _._ (43) _W_ bias = <sup>_<u>P</u>_</sup> <sup><u>trial(</u></sup> <sup>_<u>si</u>_</sup> <sup>_<u>−→</u>_</sup> <sup>_<u>sj</u>_</sup> <sup><u>)</u></sup> _P_ trial( _sj_ _−→_ _si_ ) <sup>=</sup> - _<u>P</u>_ <u>b</u> _P_ u By substituting Eqs. 40 and 43 in Eq. 38, one obtains _x_ - _ξ_ exp ( _−β_ ∆ _U_ ) _<u>P</u>_ <u>acc(</u> _<u>si</u>_ _<u>−→</u>_ _<u>sj</u>_ <u>)</u> _P_ acc( _sj_ _−→_ _si_ ) <sup>=</sup> - _<u>P</u>_ <u>b(</u> _<u>r</u>_ <u>in)</u> _P_ u( _r_ in) <sup>_KV_</sup> <sup>_−_</sup> <sup>1</sup> <sup>_N −_</sup> A <sup>1</sup> <sup>_/c⊖_</sup> _<u>Nx</u>_ <u>(</u> _<u>si</u>_ <u>)!</u> ( _Nx_ ( _si_ ) + _νxξ_ )! <sup>=</sup> <sup>_W_</sup> <sup>bias</sup> <sup>_W_</sup> <sup>RxMC</sup> (44) which is our choice as acceptance probability for biased eb-RxMC simulations. Let us now demonstrate how to calculate _P_ u and _P_ b for the simplest case of an ideal gas. In an ideal gas, the probability of finding a free particle is equal everywhere, hence, _i.e._ _P_ u( _r_ ) = const, therefore, Eq. 41 simplifies to _P_ trial( _ξ_ = 1 _, r_ in) ideal = _V_ R( _r_ in) _/V_ (45) 40 where _V_ R is the reaction volume and _V_ is the volume of the simulation box. If the inclusion radius is smaller than half of the simulation box length, the reaction volume is _V_ R = 4 _/_ 3 _πr_ in <sup>3</sup> <sup>.</sup> However, the inclusion radius can also take higher values, up to the full box length. In such a case, the reaction volume can be estimated by Monte Carlo integration of the reaction volume inside of the simulation box. This calculation is an important aspect of validation of our algorithm. Nevertheless, in practical applications on would typically choose inclusion radius smaller than half of the box length. In the absence of any other interactions, the probability of finding two bonded particles at a particular distance is proportional to the Boltzmann factor, exp( _−βU_ bond( _r_ )), where _U_ bond( _r_ ) is the potential energy of the bond and _β_ = 1 _/_ ( _k_ b _T_ ) is the inverse thermal energy. Therefore, one can rewrite Eq. 42 as �0 _r_ in 4 _πr_ <sup>2</sup> exp( _−βU_ bond( _r_ ))d _r_ (46) <u>�</u> _V_ <sup>4</sup> <sup>_πr_</sup> <sup>2</sup> <sup>exp(</sup> <sup>_−βU_</sup> <sup>bond(</sup> <sup>_r_</sup> <sup>))d</sup> <sup>_r_</sup> <sup>_._</sup> _P_ trial( _ξ_ = _−_ 1 _, r_ in) ideal = One possible choice for the potential energy of the bond is the harmonic potential _U_ bond = 21 <sup>_k_</sup> <sup>h(</sup> <sup>_r −_</sup> <sup>_l_</sup> <sup>0)2,</sup> <sup>where</sup> <sup>_k_</sup> <sup>h</sup> <sup>is</sup> <sup>the</sup> <sup>harmonic</sup> <sup>constant</sup> <sup>and</sup> <sup>_l_</sup> <sup>0</sup> <sup>is</sup> <sup>the</sup> <sup>equilibrium</sup> <sup>bond</sup> <sup>length.</sup> <sup>For</sup> this choice, the integrals in Eq. 46 have an analytical solution given by - _r_ in <sup><u>1</u></sup> 2 <sup>_βk_</sup> <sup>h(</sup> <sup>_r −_</sup> <sup>_l_</sup> <sup>0)2</sup> - d _r_ = _A_ [ _B_ (erf( _F_ 1) + erf( _F_ 2)) _−_ _C_ 1 exp( _E_ 1) + _C_ 2 exp( _E_ 2)] _r_ in 4 _πr_ <sup>2</sup> exp _−_ <sup><u>1</u></sup> 0 2 (47) 41 where erf is the error function and the coefficients are equal to _A_ = 2 _π_ ( _βk_ h) <sup>_−_</sup> <sup>3</sup> <sup>_/_</sup> <sup>2</sup> _√_ _B_ = ( _βk_ h _l_ 0 <sup>2</sup> <sup>+ 1)</sup> 2 _π_ _C_ 1 = 2( _r_ in + _l_ 0) ~~�~~ _βk_ h _C_ 2 = 2 _l_ 0 ~~�~~ _βk_ h (48) _E_ 1 = _−_ 0 _._ 5 _βk_ h( _l_ 0 _−_ _r_ in) <sup>2</sup> _E_ 2 = _−_ 0 _._ 5 _βk_ h _l_ 0 <sup>2</sup> _F_ 1 = 2 <sup>_−_</sup> <sup>1</sup> <sup>_/_</sup> <sup>2</sup> ( _r_ in _−_ _l_ 0) ~~�~~ _βk_ h _F_ 2 = 2 <sup>_−_</sup> <sup>1</sup> <sup>_/_</sup> <sup>2</sup> _l_ 0 ~~�~~ _βk_ h We used Eqs. 45 and 46 as a self-consistency test to check that our algorithm produces trial moves with the correct probability, irrespective of the choice of _k_ h. In Fig. 7, we compare the probabilities of performing a trial move in the forward ( _ξ_ = 1) and reverse ( _ξ_ = _−_ 1) directions yielded by our eb-RxMC simulations (markers) with the expected values given by Eqs. 46 (dashed lines) and 45 (continuous line) as a function of the fraction of reactive volume _V_ R _/V_ . We considered the case of dimerization reactions between chemically identical groups (Eq. 21). We compare simulations with different values of the harmonic constant _k_ h, which have significantly different trial probabilities in the reverse direction of the reaction. In all cases, the agreement between the simulation and the theory is excellent, confirming that our algorithm generates trial configurations with the correct probability. 42 Figure 7: Probability of performing a trial move _P_ trial( _ξ, r_ in) in the forward ( _ξ_ = 1) and reverse ( _ξ_ = _−_ 1) directions of the reaction a function of the fraction of reactive volume _V_ R _/V_ . The markers follow the _P_ trial( _ξ, r_ in) yielded by our eb-RxMC algorithm at different values of the harmonic constant. For an ideal gas, _P_ trial( _ξ, r_ in) can be exactly calculated using Eqs. 46 (dashed lines) and 45 (continuous lines). 43 #### 7.3 Sampling the reaction and configuration space of A+B dimer- ization reactions with f A = 0 . 5 Figure 8: Left panel: Residuals in the degree of conversion _p_ as a function of the inclusion radius _r_ in at various values of the harmonic constant for the reversible bond _k_ h. The residuals are calculated as the difference between the measured value in our simulations and the expected value _p_ = 0 _._ 8 given by Eq. 36 at p _λ_ = _−_ 1 and _r_ ex = 0, corresponding to _f_ A = 0 _._ 5. Right panel: Probability density _P_ ( _l_ ) of observing a reversible bond with a length _l_ in a bin at a distance _r_ with size d _r_ at different values of _k_ h. The numerical results from our simulations (markers) follow the exact result given by Eq. 19 (dashed lines). #### 7.4 Finite size effects in eb-RxMC simulation of linear polyconden- sation In Fig. 9, we demonstrate that the mass fraction distribution measured by our eb-RxMC simulation can be affected by artifacts due to finite size effects caused by a relatively small number of particles _N_ part in the simulation box. <sup>49</sup> To illustrate the effect, let us consider the case of a polycodensation of the type given by Eq. 9b with p _λ_ = _−_ 1. In theory, concentrations of all species are treated as continuous variables. In contrast, the number of particles of each species in the simulation box can only attain an integer value. These finite size effects are 44 especially significant if the degree of conversion is very high, so that the most probable chain length is on the same order of magnitude as _N_ part. As can be observed for the simulations with lower number of particles _N_ part = 10 and _N_ part = 20, the finite size effect causes underestimation of the mass fraction of short chains and, simultaneously, overestimation of the mass fraction of long chains. Interestingly, the finite size effect does not affect the average degree of conversion, which matches the expected result given by Eq. 7a, at least for the ideal systems studied here. Nonetheless, for a sufficiently high number of particles, our eb-RxMC simulation correctly sample the distribution of polymer chains matching the exact analytical solution given by Eqs. 7a and 10. Figure 9: Mass fraction _w_ as a function of the number of monomers in the polymer chain _M_ for p _λ_ = _−_ 1 at various values of total number of particles _N_ part. Markers follow the data measured in our eb-RxMC simulation and the dashed line follows the exact value given by Eqs. 7a and 10. 45

섹션 본문 117문단 · 52,189자

(제목 없음)

1We present the explicit bonding Reaction ensemble Monte Carlo (eb-RxMC) method, designed to sample reversible bonding reactions in macromolecular systems in thermodynamic equilibrium.Our eb-RxMC method is based on the Reaction ensemble method, however, its implementation differs from the latter by the representation of the reaction.In the eb-RxMC implementation, we are adding or deleting bonds between existing particles, instead of inserting or deleting particles with different chemical identities.This new implementation makes the eb-RxMC method suitable for simulating the formation of reversible linkages between macromolecules, which would not be feasible with the original implementation.To enable coupling of our eb-RxMC algorithm with Molecular Dynamics algorithm for sampling of the configuration space, we biased the

Introduction

2Reversible chemical reactions are often present in macromolecular systems.[14] The association of boronic acids is an interesting example of such a reaction which competes with the acid-base equilibrium reactions on the same functional groups.It has been hypothesized that crosslinking between polymers functionalized with boronic acids is responsible for peculiar properties of these polymers but the actual mechanism of this crosslinking remains unclear. 15,16Chelation of metals to polyelectrolyte chains is known to collapse polymer chains, 17,18 sometimes also leading to crosslinking and gelation. 19Last but not least, the reversible formation of hydrogen bonds plays a crucial role in many biochemical and biological systems, as well as in synthetic polymers. 20e common feature of the reversible bonds described above is that they connect two different macromolecules, or two parts of the same macromolecule, which are close in space but can be far from each other when measured along the contour of the macromolecule.On the one hand, the probability of forming these bonds is determined by the chemical nature of the reactants, which can be phenomenologically described by the equilibrium constant K of the given chemical reaction.On the other hand, the spatial distribution of the reacting groups is determined not only by their overall concentration but also by the conformational properties of the macromolecule.This coupling between the conformation and reversible bond formation poses a fundamental challenge for modelling of such systems.Consequently, theoretical description of such reversible reactions are typically limited to analytical theories which assume homogeneous distribution of the reactive groups.Molecular simulation approaches fully accounting for the coupling between the reversible bond formation (reaction space) and conformation of the macromolecules (configuration space) are very scarce.

3Analytical theories describing reaction equilibria in macromolecular systems usually rely on strong approximations, which limit their applicability, while simultaneously writing the results as a closed-form analytical expression.In the ideal gas limit, the equilibrium composition of a reacting mixture can be analytically determined from the equilibrium constant K of the reactions and the initial composition of the system.In the case of linear polycondensation reactions, the classical theory from Flory 2 permits calculating the molecular weight distribution of the polymer chains at a given degree of conversion of the reaction p.

4More modern theories include cyclization of the polymer chains, allowing to calculate the fraction of linear chains and the fraction of rings. 7,8In general, these theories can be augmented beyond the ideal gas approximation by accounting for the excess chemical potential or, equivalently, the activity of the reactants.2][23] However, accounting for non-ideal behaviour due to interactions in reactive macromolecular systems is beyond the capabilities of many analytical theories.

5As an alternative to analytical theories, computer simulations can numerically sample the configuration space and simultaneously the reaction space.The full description of chemical reactions requires the use of quantum mechanics to determine the electronic structure, which is not feasible for macromolecular systems due to high computational cost.The use of hybrid Quantum Mechanics / all-atom Molecular Dynamics slightly alleviates the problem but remains restricted to a small number of reactive chemical species. 24The computational cost can be further mitigated, by replacing the Quantum description of the chemical reactions by effective reactive potentials. 25,26However, the above methods are computationally too demanding for macromolecular systems which include long chains and hundreds of reactive groups simultaneously participating in the equilibrium reaction.At this level, a further reduction of the resolution of the model is required, representing whole functional groups or monomeric units as single particles, referred to as coarse-grained models.At this level, chemical reactions can be treated as stochastic events and simulated using Monte Carlo (MC) methods.The reaction is then represented by a change of chemical identities of the coarsegrained particles, or by the formation or disappearance of chemical bonds between existing particles.In such phenomenological description, the thermodynamic equilibrium constant and the reaction stoichiometry are the only input parameters, whereas the detailed reaction mechanism becomes irrelevant.Indeed, MC simulations in various statistical ensembles are now commonly used to study pH-sensitive polymer systems. 27,28These simulations are restricted to reactions which involve a change of chemical identities, while simultaneously releasing a small particle from a macromolecule or attaching this particle in the reverse step of the reaction.However, such a representation cannot be smoothly extended to represent reversible bond formation between two macromolecules or even oligomers.

6The Reaction ensemble Monte Carlo (RxMC) 29,30 method offers a general framework for sampling chemical equilibria.In the original implementation of the RxMC, the chemical re-action is represented by an exchange of particles with a virtual reservoir.Smith and Triska 30 validated the RxMC method using reversible dimerization reactions in which two reactant molecules associate to create a product molecule.In their implementation, a forward direction of the dimerization reaction entails deleting two reactant particles from the system and inserting a new product particle into the system.The reverse direction entails deleting the product particle and inserting two reactant particles.In this description, the formation and breaking of chemical bonds is represented only implicitly through the equilibrium constant K = exp(−∆ r G/RT ), where ∆ r G is the standard Gibbs free energy of reaction.

7When applied to macromolecules, such implicit description of the bonding is sufficient only if it represents binding of small reactants to big molecules, for example when studying the protonation / deprotonation of weakly acidic or basic groups. 27,28,31,32However, in other cases, it is desirable to implement the chemical reaction as the creation or deletion of bonds between particles which already exist in the simulated system.[7] Examples of simulations of reactive macromolecular systems with explicit reversible bonds are relatively scarce in the literature.Radical polymerization reactions have been studied with reactive MC schemes in which permanent bonds are created between nearby pairs of reactive particles. 6,10Polycondensation reactions with cyclization have been simulated using MC schemes with probability criteria based on kinetic arguments. 7,84][35] The challenge in these simulations is to simultaneously sample the reaction and configuration spaces of the macromolecules.[35] However, these configuration moves need to be carefully chosen and fine-tuned for each specific case to enable efficient sampling of the system. 36,37Alternatively, one can combine the reactive MC moves with Molecular Dynamics (MD) to explore the configuration space.The advantage of such a combination is that the MD part uses the collective dynamics of the whole system to sample the configuration space, which is both universal and reasonably efficient also for dense systems.Simultaneously, the combination of MC with MD imposes additional restrictions.In such a combined approach, one typically needs to restrict the reaction MC moves to only select pairs of neighboring particles.Otherwise, occasional acceptance of energetically less favourable configurations would result in big forces due to the newly created bonds, which could break a subsequent MD integration scheme. 6,10Therefore, combining the MC schemes for sampling the reactions with MD integration for sampling the system configurations remains a challenge.

8In this work, we present a biased MC algorithm to sample chemical equilibrium in the Reaction ensemble including explicit formation of reversible bonds.We refer to this algorithm as explicit bonding Reaction Ensemble Monte Carlo (eb-RxMC) to distinguish it from the original implementation, in which the reaction is modeled by inserting and deleting particles from the simulation box. 29,30Our eb-RxMC can be constrained to only sample the reaction within an inclusion radius r in which permits combining it with MD schemes, as illustrated in Fig. 1 (upper panel).The intended use case of the eb-RxMC method are simulations of reversible bonding reactions in macromolecular systems in thermodynamic equilibrium, schematically shown in Fig. 1 (lower panel).They include, but are not limited to, the following types of reactions: polymerization reactions reaching equilibrium (e.g.polycondensation reactions), 5,7,8 reversible cross-linking reactions, [12][13][14] reversible non-covalent bonds (e.g.hydrogen bonding), 15,16 chelation of metal ions in macromolecular systems [17][18][19] and polyassociation reactions in dynamers. 38Our eb-RxMC is designed to sample thermodynamic equilibrium properties of reversible bonding reactions, avoiding the need to describe the actual reaction mechanism or to do any specific assumption on the kinetics of the reaction.Therefore, sampling of the chemical reaction proceeds at a user-defined rate, allowing the user to control the effective time scale on which the reaction equilibrium is established.

9As a downside, this means that our eb-RxMC is not designed to provide any information about the actual dynamics of the system.In return, our eb-RxMC is able to efficiently sample the equilibrium properties of macromolecular systems with several hundreds of reactive groups.

10In the following sections, we first provide an overview of some known analytical results for dimerization and polycondensation reactions which we use to establish the nomenclature and as benchmarks to validate our eb-RxMC method.Next, we describe our implementation of the eb-RxMC method and how we bias it to enable its coupling with Langevin Dynamics.

11Then, we validate our eb-RxMC algorithm for a set of ideally behaving systems, using the analytical results presented in the previous sections.We conclude by outlining several interesting open problems that could be addressed by our eb-RxMC method in the near future, indicating probable further development of the method.These particles can only react when they are at a distance below an inclusion radius (dashed circle).A suitably chosen inclusion radius permits coupling of the eb-RxMC algorithm with Molecular Dynamics.Bottom panel: schematic examples of reactions which can be simulated using our proposed algorithm.In the illustrations, permanent bonds are represented by solid lines whereas reversible bonds are represented by dashed lines.In all panels blue and red particles represent reactive chemical groups that can react with each other while grey circles represent chemically inert groups.

Theoretical background

12In this section, we recapitulate some known analytical results for the equilibrium degree of conversion of dimerization and polycondensation reactions.This recapitulation is provided in order to introduce a unified notation for both types of reactions.These analytical results will be used later as a benchmark for testing the numerical results of our eb-RxMC simulations.

Equilibrium in dimerization reactions

13The dimerization reaction can involve either association of two identical molecules (monomers) or two different ones, schematically represented by the reactions

14where A and B represent different functional groups which can react with each other by forming a reversible bond.

15The chemical equilibrium of the reversible bonding reactions is defined by the equilibrium constant K, related to the Gibbs free energy of the reaction as

16where T is the temperature and R is the molar gas constant.The equilibrium constant of Eq.21 can be expressed in terms of activities of the reacted groups A -A and free groups A and analogically, equilibrium constant of Eq. 29 can be expressed in terms of activities of the reacted groups A -B and free groups A and B:

17where c ⊖ is the reference concentration, conventionally chosen as c ⊖ = 1 mol/kg. 39In the ideal gas limit, i.e. in absence of interactions, the activities of various functional groups can be replaced with their concentrations, as indicated by the second equality in Eqs.23 and 31.For reaction Eq.21, we define the degree of conversion as

18where c max A−A is the maximum attainable concentration of A -A bonds and c tot is the total concentration of reactive groups, i.e. c tot = c A + 2c A−A .For reaction Eq. 29 we define the degree of conversion in an analogous manner

19where c max A−B is the maximum attainable concentration of A -B bonds, c tot is the total concentration of reactive groups, i.e. c tot = c A + c B + 2c A−B and r ex is the excess ratio, defined as

20where f A is the mole fraction of A groups in the reactive mixture, including both bonded and free A groups.The excess ratio characterizes deviations of the composition of the reactive mixture from the ideal equimolar ratio of A and B.

21In the ideal limit, the degree of conversion at equilibrium can be expressed by the following equations:

22where λ = Kc tot /c ⊖ .A detailed derivation of Eqs.27 and 36 is provided in the Supporting Information (Section S1).Typically, one needs values of K or c tot spanning over various orders of magnitude to cover the whole range of possible p values.Therefore, it is convenient to introduce pλ, defined as

23where pK = − log 10 (K) and pC = − log 10 (c tot /c ⊖ ).This logarithmic scale is in analogy with the acidity constant pK A = − log 10 (K A ), commonly used to describe the acid-base equilibria. 27,28

Equilibrium in polycondensation reactions

24If the molecule (monomer) contains two reactive groups, then it can form polymer chains in a polycondensation reaction

25where n and m are integers, referring to the number of A -A monomers comprising the chain molecule, i.e. the degree of polymerization of the chain.The degree of conversion for Eq.9b can be defined in the same way as Eq.24 and its value at equilibrium is given by Eq. 27.

26Flory 40 assumed that ∆ r G of reactions Eqs.9a and 9b does not depend on the values of m and n.Under this assumption, he obtained an analytical expression for the mass fraction of chains composed of M monomers

27The mass fraction is defined as

28were N M is the number of chains consisting of M monomers and M t = M M N M is the total number of monomers in solution.

Method and model

29In our simulation model, we employ a simplified coarse-grained representation, where one particle in the simulation represents one functional group of a molecule, as defined in Eqs.

3021, 29, 9a and 9b.We simulate an ensemble of these molecules, evolving in the reaction space, i.e., undergoing the chemical reactions, and simultaneously evolving in the configuration space, i.e., undergoing conformational changes and diffusing in the simulation box.

31The evolution in reaction space is simulated using the explicit bonding reaction ensemble Monte Carlo (eb-RxMC).The evolution in configuration space is simulated using Langevin Dynamics (LD) in implicit solvent.One simulation cycle thus consists of a set of eb-RxMC moves, followed by a set of integration steps in the LD.The whole simulation then comprises many of such cycles.Implementation of the eb-RxMC protocol which enables its coupling to LD comprises the key result of our work.

The explicit bonding Reaction Monte Carlo algorithm

32Our eb-RxMC implementation consists of the following steps, which are described in more detail below: 1. Select a forward or reverse direction of the reaction and select the reactive groups involved; 2. Compute the acceptance probability; 3. Change to a new state if the trial move is accepted, i.e. create or delete bonds between the reactive particles in the simulation box, mimicking Eq.21 or Eq.29.These trial moves are accepted with a probability given by the Reaction ensemble. 29,30We have implemented the eb-RxMC within the framework of the ESPResSo software, 41,42 which permits to combine it with the other features already implemented in ESPResSo.In particular, we couple it to Langevin Dynamics allowing us to sample the reaction and configuration space simultaneously, as explained in Section 3.2.

33The inputs of our algorithm are the equilibrium constant K and the initial concentration of the reactants.It samples the equilibrium concentration of each reacting species, which can be used to calculate the degree of conversion and other derived quantities.

34In each trial move, the algorithm proceeds by performing the following steps:

351. Selecting the direction of reaction and the reactive groups involved.A direction of the reaction (forward or reverse) is selected randomly with equal probability.If the forward direction is selected,

36a free functional group A is randomly chosen with equal probability.Depending on the type of reaction, (Eq.12a or 12b) a second free functional group A or B is randomly chosen with equal probability.If the reverse direction is selected,

37a bonded pair A -A or A -B is randomly chosen with equal probability.To enable coupling of the eb-RxMC with Molecular Dynamics schemes, the algorithm can be restricted to only select reactive groups at a distance below a given inclusion radius r in .Such restriction must be applied both in the forward (Eq.12) and in the reverse (Eqs.13) directions of the reaction.

2.

38Accepting the trial move with the probability given by the Reaction ensemble 29,30

39where V is the volume of the simulation box, β = 1/(k B T ) is the inverse of the thermal energy, N A is the Avogadro number, ν i and N i respectively are the stoichiometric coefficient and the number of the reactive group i, where i ∈ {A, B, A−A, A−B} is the set of reactive groups involved in the reaction.The value of ξ is ξ = 1 in the forward direction (Eq.12) and it is ξ = −1 in the reverse direction (Eq.13).∆U

40is the change in the potential energy of the system due to the reaction (Eq.12 or

41Eq. 13).We emphasize that ∆U does not include the potential energy of the newly created or deleted bond.The Gibbs free energy of the reaction, which results in the bond formation, ∆ r G, includes the potential energy of the bond, as well as the entropy contributions and changes in the solvation free energies of the reacting species. 43,44erefore, the potential energy of the newly created or deleted bond is already included in the value of K (Eq.2).This also implies that the choice of the bonding potential is arbitrary and should not affect the equilibrium degree of conversion.If the selection of reactive particles is constrained within r in in the previous step, then this bias introduced in the probability of selecting the bond partners needs to be reflected in correcting the acceptance probability in Eq. 14.In Section 3.2, we provide a detailed explanation on how to correct for the introduced bias.

423. Changing the system to a new state if the trial move has been accepted.In the forward direction, we add a bonding potential U bond between the two selected groups, representing a chemical bond.In the reverse direction, we remove the bonding potential between the selected pair.

Bias of the eb-RxMC to enable coupling with Langevin Dynamics

43To enable Langevin Dynamics (LD) integration after a set of eb-RxMC moves, it is necessary to ensure that the forces between the simulated particles are not too big.Big forces would cause an unstable integration and consequently a failure of the integrator.To prevent such problems, we biased the eb-RxMC algorithm to only propose creating or deleting bonds between particle pairs separated by a distance below a certain inclusion radius r in , as schematically illustrated in Fig. 2.This radius is an adjustable parameter of the method.

44The specific choice of r in should not affect the sampling of the equilibrium properties of the system, however, it could affect the sampling efficiency and stability of the subsequent LD.

45In general, the value of this radius is chosen as a compromise between a large enough value to enable sufficient sampling while avoiding failure of the LD integrator due to the forces arising when creating new bonds.To ensure detailed balance, we corrected for the bias in the proposal probability by modifying the acceptance probability accordingly. 45The sufficient condition to satisfy the detailed balance is that the flow of configurations from an arbitrary state s i to any other state s j is equal to flow in the opposite direction, P obs (s i )P trial (s i → s j )P acc (s i → s j ) = P obs (s j )P trial (s j → s i )P acc (s j → s i )

46where P obs (s i ) is the probability of observing state s i , P trial (s i → s j ) is the probability of proposing a trial move from s i to s j and P acc (s i → s j ) is the probability of accepting such trial move.In absence of any inclusion radius, P trial (s i → s j ) = P trial (s j → s i ) and P acc is given by Eq. 14.

47The biased proposal probability is different in the forward and reverse direction of the reaction because the probability of finding a pair of unbonded particles within r in is different from that of finding a pair of bonded particles within the same distance, P trial (s i → s j ) ̸ = P trial (s j → s i ).In order to correct for such asymmetric sampling of the reaction space, P acc needs to be chosen so that it fulfils the detailed balance condition

48Our choice of P acc that satisfies Eq. 38 is given by

49where P u (r in ) is the probability of finding two unbonded particles within r in , P b (r in ) is the probability of finding two bonded particles within r in and W bias = (P b (r in )/P u (r in )) ξ .In the ideal case, when simulating a system without other interactions than the bonds between the particles, P b (r in ) and P u (r in ) can be calculated in advance.On the contrary, when simulating an interacting system, both P b and P u are affected by other interactions.In such case, P b and P u need to be calculated on the fly during the simulation to ensure self-consistency of the sampling.It follows from Eq. 17 that the restriction of only proposing trial moves between particles at a distance below the inclusion radius must be applied in both directions of the reaction.More details about the derivation of Eq. 17 can be found in the Supporting Information (Section S2), including the analytical solutions of P u and P b under the ideal gas approximation.

Simulation model

50In our simulations, each coarse-grained particle represents one functional group.The number of particles N part remained constant throughout whole simulation but the bonds between them were randomly created or deleted, following the eb-RxMC procedure described in Section 3.1.We note that the size of the simulation box and concentration can be chosen arbitrarily for an ideal system because the only relevant parameter that determines the equilibrium properties of the system is pλ = pK + pC.Therefore, one can equivalently choose to fix the concentration and vary the value of K or fix the value of K and vary the concentration.Our choice was to fix the concentration and vary the equilibrium constant of the reaction K as the input of our simulations.For a non-ideal system, this choice is no longer arbitrary, because the effect of interactions on the equilibrium properties depends on distances between the particles, and hence on their concentration.The outputs, such as the equilibrium degree of conversion or the chain length distribution in the polycondensation reactions, were then calculated as ensemble averages over the generated configurations, as detailed in Section 3.4.

51The bonds between particles were represented by a harmonic potential

52where l is the distance between the bonded particles, l 0 is the equilibrium bond length and k h is the harmonic constant that determines the stiffness of the potential.This harmonic potential was added and removed between particles following the eb-RxMC procedure described in Section 3.1.Unless otherwise stated, all bonds in our simulation box were harmonic bonds (Eq.18) with k h = 790 k B T /nm 2 and l 0 = 0.355 nm.Similar to the choice of concentration, also the choices of k h and l 0 are arbitrary, as long as we are simulating an ideal system.

53Nevertheless, for future reference, we set them to values commonly used in coarse-grained models of polymers. 46,47r the dimerization reactions between identical monomers, Eq.21, our initial configuration contained N part identical particles of type A. Then, we varied the equilibrium constant as the input parameter of the simulation.For the dimerization reactions between different monomers, Eq. 29, our initial configuration contained f A N part particles of type A and

54Then, in addition to the variation of equilibrium constant, we also varied the initial composition of the reacting mixture by varying the value of f A .

55Our simulation box size is L = 30l 0 = 10.65 nm.With N part = 50 particles in the box, the molar concentration of monomers becomes c tot = 70 mM.

56For the polycondensation reactions, 9b, we represented each monomer by two particles of the same type, corresponding to two reactive functional groups.These two particles were connected by a permanent bond, which was not considered in the eb-RxMC procedure.Furthermore, we prevented the formation of rings by not permitting intra-molecular reactions.

57In this case, we used a larger box size L = 50l 0 = 17.75 nm and larger number of particles N part = 200 particles, yielding a molar concentration of monomers of c tot = 60 mM.Otherwise, all parameters used in the simulations of polycondensations were the same as for dimerizations.

Simulation protocol

58We used the ESPResSo v4.Gold 6130 CPU @ 2.10GHz, 192 GB RAM and 1x 960 GB NVMe of disk.Unless otherwise stated, the reactions were sampled using the eb-RxMC algorithm described in Section 3.1 with an inclusion radius of r in = 3.8 nm.

59The LD simulations were performed using a time step δt = 0.01τ , and a damping constant γ = 1.0/τ , where τ = l 0 m/k B T with a reduced temperature T = k h l 2 0 /k B .Similar to the choice of k h , also the choices of temperature T and particle mass m are arbitrary and have no effect on the computed equilibrium properties, as long as we are simulating an ideal system.During the simulation, we were estimating on the fly the probability density of bond lengths, P (l).All sampled quantities were stored with time intervals t coord = 400 τ and were averaged after discarding the first 30% of each simulation run as equilibration, corresponding to the first 3.6 • 10 6 τ of the simulation.Statistical uncertainty of the computed averages was estimated using the block analysis method. 48

Results and discussion

60We aim to validate our implementation of the eb-RxMC algorithm using simple systems, for which exact analytical solutions are available.Therefore, we restrict the results in this article to ideal non-interacting systems, in which the only interaction present is the harmonic bond potential (Eq.18), representing both reversible and permanent bonds between particles.

61First, we use dimerization reactions to show that our eb-RxMC simulations yield the correct degree of conversion and bond length distribution of the reversible bonds, regardless of the choice of the equilibrium constant K, stiffness of the harmonic bond k h or inclusion radius r in for the biased sampling.Next, we simulate linear polycondensation reactions to prove that our eb-RxMC algorithm also samples the correct equilibrium distribution of polymer chain lengths, quantified by the mass fraction w(M ), and end-to-end distances, R e (M ), for each chain length M .

Dimerization reactions

62We start with dimerization reactions, the same test case used by Smith and Triska to validate the original RxMC algorithm. 30To independently validate the sampling of the reaction space, we did not sample the configuration space in these simulations, therefore we did not use any inclusion radius r in .In Fig. 3 (left panel), we present the degree of conversion p measured in our eb-RxMC simulations (markers) as a function of pλ = pK + pC, where K is the equilibrium constant and C is the relative concentration of the reacting species, as defined in Eq. 8.The dimerization between two chemically identical monomers (Eq.21) reaches p = 0.5 at pλ = 0. Fig. 3 (left panel) shows that our simulation results reproduce the analytical reference result of Eq. 27 with a very high accuracy.Dimerization between two chemically different monomers, (Eq.29), at equimolar stoichiometric ratio reaches p = 0.5 at a slightly lower value of pλ but otherwise the dependence p(pλ) results in curve with a very similar shape.The residuals in Fig. 3 are calculated as the difference between the simulated p-value and the exact p-value from the theory.They show that the agreement between the numerical results and the analytical theory is excellent.We only observe a very small systematic deviation in some corner cases with a high degree of of conversion, which are presumably related to finite-size effects, as discussed in Ref. 49 For dimerization between two chemically different species, we further investigate how the degree of conversion is affected by the initial composition.In Fig. 3 (right panel) we show simulation results at various initial compositions of the system, ranging from f A = 0.1 to f A = 0.9.Once again, we observe a very good agreement between our simulations and analytical results for the given composition.When either of the reactants is in excess, the p-values of A+B reactions as a function of pλ are increased, as compared to f A = 0.5.Interestingly, the curves become almost symmetric around pλ = 0 at very high or very low value of f A .Based on the above comparison, we conclude that our eb-RxMC simulations correctly sample the reaction space for a broad range of equilibrium constants K and initial compositions of the system, in absence of any inclusion radius r in .Next, we validate that our eb-RxMC algorithm can be combined with Langevin Dynamics (LD) to simultaneously sample the reaction and configuration space without introducing any artifacts.When combining both simulation schemes, we use the biased eb-RxMC, sampling the reactions only within an inclusion radius r in .We aim to verify that the inclusion radius can be selected almost arbitrarily.The only practical constraint is that the forces due to the harmonic potential within this range are small enough to ensure that the subsequent LD integration remains stable.Furthermore, we aim to verify that the degree of conversion is not affected by the arbitrary choice of the stiffness constant of the harmonic potential (Eq.18).

63For this purpose, we consider the case of a A+A dimerization with pλ = −1, corresponding to an expected relatively high degree of conversion p = 0.8 (Eq.27).This pλ-value is a convenient choice for the later study of polycondensation reactions, because it permits to measure a relatively wide distribution of polymer chains of different lengths.In Fig. 4 (left panel), we show the residuals in the degree of conversion p as a function of the chosen value of r in at various values of k h .All these residuals are very close to zero, and appear randomly distributed around this reference line, confirming that both arbitrary choices, r in and k h , have no effect on the computed degree of conversion and that our combination of eb-RxMC with LD yields the correct results.

64The choice of r in only affects the efficiency of the eb-RxMC sampling but does not change the ensemble averages of any observable.Therefore, one can choose r in completely arbitrarily, as long as a pure MC simulation scheme is used.The only criterion for the optimum value of r in is the sampling efficiency.When simulating interacting systems using a combination of eb-RxMC and LD, the optimum value of r in should be chosen as a compromise between higher sampling efficiency of the eb-RxMC algorithm (high r in values) and a stable integration of the chosen MD scheme (low r in values).Our preliminary eb-RxMC simulations with systems including Lennard-Jones and electrostatic interactions suggest that values of r in ≈ 1 nm are a good compromise between a sufficient sampling and a stable integration of LD.However, this value of r in should be taken only as a reasonable choice and, in general, one should tune r in for each specific system of study.

65To prove that our simulations also correctly sample the configuration space, we measured the equilibrium distribution of bond lengths of the reversible bonds at different values of k h .

66For a harmonic oscillator, this equilibrium distribution can be calculated exactly as the probability density

67For the harmonic potential, P (l) depends on the chosen value of k h via U bond (Eq.18).Fig. 4 (right panel) proves that our simulations perfectly match the theoretical prediction given by Eq. 19.This result confirms that our simulations properly sample not only the reaction space but also the configuration space of the dimerization reactions.For completion, we provide an analogous analysis for the case of A+B dimerization at equimolar conditions (f A = 0.5) in the Supporting Information (Section S3).Our results show that our combined scheme LD/eb-RxMC also samples correctly the reaction and the configuration space in this case with no significant deviations from the reference analytical equations for the ideal case. of observing a reversible bond with a length l in a bin at a distance r with size dr at different values of k h .The numerical results from our simulations (markers) follow the exact result given by Eq. 19 (dashed lines).

Polycondensation reactions

68After validating our eb-RxMC implementation for dimerization reactions, we would like to apply it to a more complex problem.Ideal polycondensation reactions are a suitable complex problem, thanks to the analytical results for chain length distribution 40 and for end-toend distance. 1,50In this section, we show that our eb-RxMC implementation quantitatively reproduces these analytical results.

69For illustration, we start with pλ = −1, which yields an expected relatively high degree of conversion p = 0.8 (Eq.27) and a broad distribution of chain lengths.In Fig. 5, we show snapshots of the simulation of a polycondensation reaction at different simulation cycles.

70In this figure, each colour represents chains of a specific chain length M .In cycle #0, the starting configuration contains only monomers, i.e. p = 0.As the simulation progresses, the particles reversibly bind and unbind to each other, causing that longer chains gradually appear, until an equilibrium state is reached.In equilibrium, the number of chains and their length both fluctuate during the simulation, although the total number of particles in solution remains constant.

71Figure 5: Simulation snapshots of different configurations obtained with our eb-RxMC algorithm with explicit reversible bonds.The simulation is initialized with a system consisting in monomers, each containing two reactive particles (Cycle #0).Throughout the simulation, these monomers can reversibly undergo linear polycondensation reactions (Eq.9b) yielding a distribution of chains with different lengths.For clarity, polymer chains with the same number of monomers have been colored with the same color.

72In Fig. 6 (left panel), we compare the simulated mass fraction w(M ) with the analytical result given by Eq. 10 for various values of pλ, corresponding to various degrees of conversion.

73We observe a very good agreement for all values of pλ, even for rather long chains with mass fractions below 0.001.We note, however, that for long chains the w(M ) distributions obtained from simulations can deviate from the analytical results due to finite-size effects, 49 as we demonstrate in the Supporting Information (S4).Therefore, it is important to ensure that the expected average chain length is much lower than the number of monomers in the simulation box.As a rule of thumb, the total number of monomers should be at least 10 times higher than the average chain length.

74To validate the sampling of configurational space, in Fig. 6 (right panel), we plot the simulated end-to-end distance of the chains, R e (M ), divided by the exact analytical results

75for the freely jointed chain (FJC) 1,50

76where b is the Kuhn segment length of the FJC.In this comparison, we assume that the Kuhn segment length of the FJC can be approximated by the average bond length measured in the simulation, b ≈ ⟨l⟩ ≳ l 0 .For R e , our simulation results once again match the theory within statistical error.The simulation results deviate from Eq. 20 for the longer chains of each distribution, but these chains occur only rarely in our simulations, which is also reflected in the high statistical uncertainty of their estimated end-to-end distance.Altogether, our validation for polycondensation reactions has shown that our simulations correctly sample both the reaction and configuration space of polymer chains formed during the reaction.

Conclusions

77We have designed a biased Monte Carlo algorithm to sample chemical equilibrium in the Reaction ensemble by creating explicit bonds between particles in the simulation box.We refer to such algorithm as explicit bonding Reaction Ensemble Monte Carlo (eb-RxMC)

78to distinguish it from the original implementation of the reaction ensemble, in which the reaction is represented by inserting the newly formed particles and deleting the ones which have reacted.The eb-RxMC algorithm will become publicly available as a module in one of the future releases of ESPResSo. 41,42r eb-RxMC algorithm is biased to sample only the reaction within an inclusion radius r in .This bias allows us to couple the eb-RxMC with Langevin Dynamics to sample the configuration space.The value of r in can be chosen arbitrarily but, in order to enable this coupling, it should be chosen such that big forces do not occur due to newly created bonds, so that the LD integration remains stable.By simulating systems for which exact analytical solutions are known, we demonstrated that our algorithm correctly samples both the reaction and configuration space.Namely, we showed that for dimerization reactions with different equilibrium constants and initial compositions, the degree of conversion measured in our simulations perfectly matched the reference value given by the analytical equations, irrespective of the choice of the inclusion radius r in or the stiffness of the harmonic potential, k h .Next, we showed that our simulations can correctly match the analytical chain length distribution 2 and end-to-end distance 1,50 of ideal chains in polycondensation reactions.Therefore, we conclude that our eb-RxMC simulations correctly sample both the reaction and the configuration space of these reference systems.

79In this work, we have validated our algorithm for a set of ideally behaving systems, for which analytical results are available.The interesting applications of our algorithm consist in using it for interacting systems, for which analytical results are not available, and therefore, their behaviour is difficult to predict from theory.However, such applications would not be trustworthy without a previous validation.For example, we are currently using our eb-RxMC algorithm to simulate polymers containing derivatives of boronic acids in the side chains. 15,16In these polymers, the formation of hydrogen bonds competes with the acid-base ionization equilibrium.Both the hydrogen bonds and ionization of the side-chains affect the chain conformation, creating a complicated feedback loop, which is difficult to capture by intuition.Another example includes hydrogen bonding in linear poly(ethyleneimine), which has been proposed as a hypothetical explanation for the peculiar features of titration curve of this molecule. 21Our preliminary results suggest that our algorithm captures well the competition of the hydrogen bonding with the acid-base equilibrium in these systems, being able to explain features of the potentiometric titration curves that cannot be justified by purely electrostatic arguments.In a broader scope, our algorithm has potential applications in various other dynamical macromolecular systems, in which the formation of reversible bonds is one of the governing factors.

80Additional material provided in the Supporting Information: (i) detailed derivation for the degree of conversion reactions in the ideal gas limit (Eqs.27 and 36); (ii) detailed derivation for the acceptance probability of the eb-RxMC method (Eq.17); (iii) additional plots

81showing that the eb-RxMC correctly samples the reaction and configuration space of A+B dimerization reactions with f A = 0.5; and (iv) a brief discussion on finite size effects in eb-RxMC simulation of linear polycondensation reactions.

827.1 Derivation of the degree of conversion for dimerization reactions in the ideal gas limit

83Let us start with the reversible association between two identical functional groups A,

84where A -A represents a pair of bonded A groups.The chemical reaction equilibrium in Eq.

8521 is determined by the corresponding equilibrium constant

86where a x is the activity of the group x ∈ {A, A−A}.In the ideal gas limit, i.e. assuming a non-interacting system, the activities in Eq. 22 can be replaced by concentrations a

87where c ⊖ = 1mol/kg is the reference concentration, following the definition by the International Union of Pure and Applied Chemistry (IUPAC). 39The choice of c ⊖ defines the value of the chemical potential and simultaneously ensures that K is dimensionless.For the reaction in Eq.21, we define the degree of conversion as the fraction of the concentration of A -A pairs over their maximum attainable concentration,

88where c tot is the total concentration of reactive groups, i.e. c tot = c A + 2c A−A .The concentration of each of the reactive groups can be expressed using the degree of conversion,

89The equilibrium constant can be reformulated in therms of the degree of conversion inserting Eqs.25a and 25b into Eq.23,

90Eq. 7a in the main text is obtained by solving Eq. 26 for p,

91where we have defined λ as pλ = − log 10 (λ) = pK + pC ,

92or alternatively λ = Kc tot /c ⊖ , where pK = − log 10 (K) and pC = − log 10 (c tot /c ⊖ ).The definition of pλ simplifies the functional form of Eq. 27 and it casts the equation in the logarithmic form, which is convenient when using pK instead of K.

93In the case of dimerization reactions between two chemically different functional groups A and B,

94the derivation of the degree of conversion proceeds similar to Eq. 21.The equilibrium constant for Eq. 29 is given by

95where a x is the activity of the chemical species x ∈ {A, B, A−B}.In the ideal gas limit, K can be expressed in terms of the concentrations of reactants

96Following analogous arguments as than in the case of dimerization reactions (Eq.24), we define the degree of conversion for Eq. 29 as the fraction of the concentration of A -B pairs over their maximum attainable concentration,

97where c tot is the total concentration of reactive groups, i.e. c tot = c A + c B + 2c A−B and r ex is the excess ratio, defined as

98where c ex = |c A − c B | is the excess concentration of reactive groups and f A is the mole fraction of A groups in the reactive mixture, including both bonded and free A groups.By introducing r ex in Eq. 32, we ensure that p = 1 corresponds to the maximum attainable conversion of the reaction, independently of the initial composition of the reacting system.

99From now on, we will assume that reactant B is in excess.This comes without loss of generality because A and B had equivalent roles in the preceding equations.Then concentration of individual reactants can be expressed using p and r ex as

100Inserting Eqs.34a-34c into Eq.31, K can be expressed in therms of p and r ex ,

101Finally, Eq. 7b in the main text is obtained by solving Eq. 35 for p,

102where pλ is given by Eq. 28.

Derivation of the acceptance probability for the explicit bonding Reaction ensemble Monte Carlo

103Below, we show that our algorithm satisfies detailed balance, which is a sufficient condition for its convergence to the desired equilibrium distribution. 45The requirement of detailed balance can be formulated such that the flow of configurations from an arbitrary state s i to any other state s j is equal to flow in the opposite direction, P obs (s i )P trial (s i → s j )P acc (s i → s j ) = P obs (s j )P trial (s j → s i )P acc (s j → s i ) (37) where erf is the error function and the coefficients are equal to A = h ) −3/2 B = (βk h l 2 0 + 1)

104We used Eqs.45 and 46 as a self-consistency test to check that our algorithm produces trial moves with the correct probability, irrespective of the choice of k h .In Fig. 7, we compare the probabilities of performing a trial move in the forward (ξ = 1) and reverse (ξ = −1)

105directions yielded by our eb-RxMC simulations (markers) with the expected values given by Eqs.46 (dashed lines) and 45 (continuous line) as a function of the fraction of reactive volume V R /V .We considered the case of dimerization reactions between chemically identical groups (Eq.21).We compare simulations with different values of the harmonic constant k h , which have significantly different trial probabilities in the reverse direction of the reaction.

106In all cases, the agreement between the simulation and the theory is excellent, confirming that our algorithm generates trial configurations with the correct probability.Right panel: Probability density P (l) of observing a reversible bond with a length l in a bin at a distance r with size dr at different values of k h .The numerical results from our simulations (markers) follow the exact result given by Eq. 19 (dashed lines).

Finite size effects in eb-RxMC simulation of linear polycondensation

107In Fig. 9, we demonstrate that the mass fraction distribution measured by our eb-RxMC simulation can be affected by artifacts due to finite size effects caused by a relatively small number of particles N part in the simulation box. 49To illustrate the effect, let us consider the case of a polycodensation of the type given by Eq. 9b with pλ = −1.In theory, concentrations of all species are treated as continuous variables.In contrast, the number of particles of each species in the simulation box can only attain an integer value.These finite size effects are especially significant if the degree of conversion is very high, so that the most probable chain length is on the same order of magnitude as N part .As can be observed for the simulations with lower number of particles N part = 10 and N part = 20, the finite size effect causes underestimation of the mass fraction of short chains and, simultaneously, overestimation of the mass fraction of long chains.Interestingly, the finite size effect does not affect the average degree of conversion, which matches the expected result given by Eq. 7a, at least for the ideal systems studied here.Nonetheless, for a sufficiently high number of particles, our eb-RxMC simulation correctly sample the distribution of polymer chains matching the exact analytical solution given by Eqs.7a and 10.

Figure 1 :

108Figure 1: Top panel: Scheme illustrating our proposed explicit bonding Reaction Ensemble Monte Carlo (eb-RxMC) algorithm that creates explicit reversible bonds between particles.These particles can only react when they are at a distance below an inclusion radius (dashed circle).A suitably chosen inclusion radius permits coupling of the eb-RxMC algorithm with Molecular Dynamics.Bottom panel: schematic examples of reactions which can be simulated using our proposed algorithm.In the illustrations, permanent bonds are represented by solid lines whereas reversible bonds are represented by dashed lines.In all panels blue and red particles represent reactive chemical groups that can react with each other while grey circles represent chemically inert groups.

Figure 2 :

109Figure 2: Flow diagram of our implementation of the eb-RxMC algorithm.Scheme adapted from a flow diagram originally produced using the software from the website code2flow.com.

2 . 1 .

11041,42 simulation software to perform the simulations.One simulation cycle consisted of trial reaction moves equal to the number of particles N trial = N part , followed by N MD = 4 • 10 4 integration steps of the Langevin dynamics.A typical simulation consisted of 30000 such cycles, yielding a total t sim = 1.2 • 10 7 τ of Langevin dynamics time evolution and 6 • 10 6 reaction trial moves, consuming 12 hours of computing time on the MetaCentrum computing cluster, typically using nodes with Intel(R) Xeon(R)

Figure 3 :

111Figure 3: Left panel: Degree of conversion p as a function of pλ (Eq.8) for A+A dimerization reactions (Eq.21) and A+B dimerization reactions (Eq.29) at equimolar composition.Right panel: p as a function of pλ for A+B dimerization reactions at various initial compositions, defined by the mole fraction of A f A .The eb-RxMC simulations (markers) are compared with analytical solutions given by Eq. 27 (continuous line) and 36 (dashed lines).Residuals (bottom panels) are calculated as the difference between the simulated p-value and the theoretical p-value (Eqs.27-36).

Figure 4 :

112Figure 4: Left panel: Residuals in the degree of conversion p as a function of the inclusion radius r in at various values of the harmonic constant for the reversible bond k h .The residuals are calculated as the difference between the measured value in our simulations and the expected value p = 0.8 given by Eq. 27 at pλ = −1.Right panel: Probability density P (l)of observing a reversible bond with a length l in a bin at a distance r with size dr at different values of k h .The numerical results from our simulations (markers) follow the exact result given by Eq. 19 (dashed lines).

Figure 6 :

113Figure 6: Left panel: mass fraction w as a function of the number of monomers in the polymer chain M at various pλ values.Markers follow the data measured in our eb-RxMC simulation and the dashed line follows the exact value given by Eqs.27 and 10.Right panel: end-to-end distance R e as a function of M at various pλ values (markers).Markers follow the data measured in our simulation and the dashed line follows the exact value given by Eq. 20.For convenience, all results are normalized by R 2 e,FJC .

Figure 7 :

114Figure 7: Probability of performing a trial move P trial (ξ, r in ) in the forward (ξ = 1) and(ξ = −1) directions of the reaction a function of the fraction of reactive volume V R /V .The markers follow the P trial (ξ, r in ) yielded by our eb-RxMC algorithm at different values of the harmonic constant.For an ideal gas, P trial (ξ, r in ) can be exactly calculated using Eqs.46 (dashed lines) and 45 (continuous lines).

7. 3

115Sampling the reaction and configuration space of A+B dimerization reactions with f A = 0.5

Figure 8 :

116Figure8: Left panel: Residuals in the degree of conversion p as a function of the inclusion radius r in at various values of the harmonic constant for the reversible bond k h .The residuals are calculated as the difference between the measured value in our simulations and the expected value p = 0.8 given by Eq. 36 at pλ = −1 and r ex = 0, corresponding to f A = 0.5.Right panel: Probability density P (l) of observing a reversible bond with a length l in a bin at a distance r with size dr at different values of k h .The numerical results from our simulations (markers) follow the exact result given by Eq. 19 (dashed lines).

Figure 9 :

117Figure 9: Mass fraction w as a function of the number of monomers in the polymer chain M for pλ = −1 at various values of total number of particles N part .Markers follow the data measured in our eb-RxMC simulation and the dashed line follows the exact value given by Eqs.7a and 10.

참고문헌 37건

  1. Physical chemistry: a molecular approach Choice Reviews Online · Association of College and Research Libraries · 1998 10.5860/choice.35-2708
  2. Reactive canonical Monte Carlo Molecular Physics · Taylor & Francis · 1994 10.1080/00268979400100481
  3. Metathesis polymerization — stepwise or chain growth reaction? Journal of Molecular Catalysis · Science Press · 1991 10.1016/0304-5102(91)85086-h
  4. Theoretical Size Distribution in Linear Step-Growth Polymerization for a Small Number of Reacting Species The Journal of Physical Chemistry B · American Chemical Society · 2013 10.1021/jp401238m
  5. The reaction ensemble method for the computer simulation of chemical and phase equilibria. I. Theory and basic examples The Journal of Chemical Physics · American Institute of Physics · 1994 10.1063/1.466443
  6. Polyelectrolytes in the Presence of Multivalent Ions: Gelation Versus Segregation Physical Review Letters · American Physical Society · 2003 10.1103/physrevlett.90.125504
  7. Dynamers: dynamic molecular and supramolecular polymers Progress in Polymer Science · Elsevier BV · 2005 10.1016/j.progpolymsci.2005.06.002
  8. Self-Healing of Unentangled Polymer Networks with Reversible Bonds Macromolecules · American Chemical Society · 2013 10.1021/ma401111n
  9. Probing the Mechanism of Silica Polymerization at Ambient Temperatures using Monte Carlo Simulations The Journal of Physical Chemistry Letters · American Chemical Society · 2010 10.1021/jz101046y
  10. Binding of Metal Ions to Polyelectrolytes and Their Oligomeric Counterparts: An Application of a Generalized Potts Model The Journal of Physical Chemistry B · American Chemical Society · 2001 10.1021/jp010320k
  11. Coupling of conformational and ionization equilibria in linear poly(ethylenimine): a study based on the site binding/rotational isomeric state (SBRIS) model Physical Chemistry Chemical Physics · Royal Society of Chemistry · 2013 10.1039/c3cp54211d
  12. Molecular Size Distribution in Linear Condensation Polymers<sup>1</sup> Journal of the American Chemical Society · American Chemical Society · 1936 10.1021/ja01301a016
  13. Modeling of Ionization and Conformations of Starlike Weak Polyelectrolytes Macromolecules · American Chemical Society · 2014 10.1021/ma500377y
  14. Monte Carlo Simulations of Silica Polymerization and Network Formation The Journal of Physical Chemistry C · American Chemical Society · 2011 10.1021/jp202209g
  15. Reactive Ensemble Monte Carlo Simulations of Silica Polymerization That Yield Zeolites and Related Crystalline Microporous Structures The Journal of Physical Chemistry C · American Chemical Society · 2015 10.1021/acs.jpcc.5b09404
  16. Dealing with long‐range interactions in the determination of polyelectrolyte ionization properties. Extension of the transfer matrix formalism to the full range of ionic strengths Journal of Polymer Science Part B Polymer Physics · Wiley · 2016 10.1002/polb.24269
  17. Copolymerization of Partly Incompatible Monomers: An Insight from Computer Simulations Macromolecules · American Chemical Society · 2017 10.1021/acs.macromol.7b00180
  18. Local pH and effective pK<sub>A</sub> of weak polyelectrolytes – insights from computer simulations Physical Chemistry Chemical Physics · Royal Society of Chemistry · 2017 10.1039/c7cp00265c
  19. Competitive calcium ion binding to end-tethered weak polyelectrolytes Soft Matter · Royal Society of Chemistry · 2018 10.1039/c7sm02434g
  20. Ideal reversible polymer networks Soft Matter · Royal Society of Chemistry · 2018 10.1039/c8sm00646f
  21. Coupling of Charge Regulation and Conformational Equilibria in Linear Weak Polyelectrolytes: Treatment of Long-Range Interactions via Effective Short-Ranged and pH-Dependent Interaction Parameters Polymers · Multidisciplinary Digital Publishing Institute · 2018 10.3390/polym10080811
  22. ESPResSo 4.0 – an extensible software package for simulating soft matter systems The European Physical Journal Special Topics · Springer Science+Business Media · 2019 10.1140/epjst/e2019-800186-9
  23. Simulations of ionization equilibria in weak polyelectrolyte solutions and gels Soft Matter · Royal Society of Chemistry · 2019 10.1039/c8sm02085j
  24. Towards the realistic computer model of precipitation polymerization microgels Scientific Reports · Nature Portfolio · 2019 10.1038/s41598-019-49512-3
  25. Charge reversal and swelling in saccharide binding polyzwitterionic phenylboronic acid-modified poly(4-vinylpyridine) nanoparticles Polymer Chemistry · Royal Society of Chemistry · 2019 10.1039/c9py00938h
  26. Computer simulation of the core-shell microgels synthesis via precipitation polymerization Journal of Colloid and Interface Science · Elsevier BV · 2020 10.1016/j.jcis.2020.04.064
  27. Quantitative prediction of charge regulation in oligopeptides Molecular Systems Design & Engineering · Royal Society of Chemistry · 2020 10.1039/d0me00147c
  28. Synthesis and self-assembly of polyzwitterionic phenylboronic acid-containing double hydrophilic block copolymers European Polymer Journal · Elsevier BV · 2021 10.1016/j.eurpolymj.2021.110439
  29. Simple and General Approach for Reversible Condensation Polymerization with Cyclization Macromolecules · American Chemical Society · 2021 10.1021/acs.macromol.1c00718
  30. Reversible Stepwise Condensation Polymerization with Cyclization: Strictly Alternating Co-polymerization and Homopolymerization Based upon Two Orthogonal Reactions Macromolecules · American Chemical Society · 2021 10.1021/acs.macromol.1c00720
  31. Both Charge-Regulation and Charge-Patch Distribution Can Drive Adsorption on the Wrong Side of the Isoelectric Point Journal of the American Chemical Society · American Chemical Society · 2022 10.1021/jacs.1c11676
  32. Sticky-MARTINI as a reactive coarse-grained model for molecular dynamics simulations of silica polymerization npj Computational Materials · Nature Portfolio · 2022 10.1038/s41524-022-00722-w
  33. Validity of Effective Potentials in Crowded Solutions of Linear and Ring Polymers with Reversible Bonds Macromolecules · American Chemical Society · 2022 10.1021/acs.macromol.1c02610
  34. Mild-Temperature-Induced Recombination of Crosslinking Structures in Hydrogels Using Phenylboronic-Acid-Functionalized 3D Nanoparticle Crosslinkers ACS Applied Polymer Materials · American Chemical Society · 2022 10.1021/acsapm.2c00581
  35. Dynamics of Associative Polymers with High Density of Reversible Bonds Physical Review Letters · American Physical Society · 2023 10.1103/physrevlett.130.228101
  36. Unusual Aspects of Charge Regulation in Flexible Weak Polyelectrolytes Polymers · Multidisciplinary Digital Publishing Institute · 2023 10.3390/polym15122680
  37. Comprehensive Computational Chemistry Elsevier eBooks · Elsevier BV · 2023 10.1016/c2019-0-03595-9