Introduction

Molecular dynamics (MD) simulation techniques provide a powerful route to establish the structure–property relationships in materials through solving the coupled equations of motions of interacting atoms and molecules in a material system1,2,3. Despite the great success of this computational technique, modeling of the macromolecules, such as proteins and polymers across multiple lengths and time scales is restrained by computational limitations. To overcome the challenges of modeling a macro-molecular system such as polymers for longer time scales, coarse-grained models (CG) are required. One of the key features of coarse-graining is the ability to probe polymer behavior over large spatiotemporal scales, which is otherwise difficult to achieve in high-resolution models.

The central problem in coarse-graining polymeric materials is, to retain the chain attributes of interest while constructing the adequate representation of pseudo-atom or CG bead. One of the defining characteristics of polymer materials is the long-time dynamical response that occurs at multiple length scales. Coarse-graining allows the combining of groups of atoms into fewer interaction sites, thus, reducing the degrees of freedom in the system. In addition, the accurate representation requires encoding of finer details, i.e., the chemical specificity should be incorporated into the CG bead descriptor. The CG model can be made to mimic the atomistic structural features by optimizing the interaction parameters by matching the atomistic distributions, the so-called bottom-up approach. Contrary, in the top-down strategy the chemical specificity is subsumed into the descriptor by matching the macroscopic properties such as density (ρ), glass transition temperature (Tg), elastic modulus (E), etc.4.

The classical methods such as iterative Boltzmann inversion (IBI)5,6,7,8, inverse Monte Carlo9,10, and relative entropy11,12 typically aim to map the structural distribution of the atomistic model. However, these structure-based conventional methods have limitations in capturing the correct thermodynamic properties and free energy landscape. While the force-matching methods such as the many-body potential of mean force (PMF) capture the accurate dynamics, they represent the atomistic structural features inaccurately13,14,15. Optimization of parameters defining nonbonded interactions in a bottom-up manner i.e., by optimizing the radial distribution functions (RDF), usually results in larger deviations of the thermal expansion coefficient (α). Hence, a purely bottom-up optimized CG model does not demonstrate thermomechanical consistency, therefore, temperature-dependent density transferability cannot be guaranteed a priori5,16,17. Therefore, transferability is achieved when CG potentials are able to accurately predict the structure, thermodynamics properties, and dynamics of the material for temperatures and molecular weights not originally included in the parametrization process. The hybrid approach, i.e., combining the bottom-up and top-down strategies, using conventional coarse-graining methodologies has been developed for a couple of materials systems4,18. For instance, the coarse-graining of polystyrene was studied by adopting the top-down strategy, where nonbonded potential parameters were optimized by increasing the pairwise potential energy well depth. The increased well depth reintroduces a rough additive potential energy landscape contrary to the usual smooth potential energy landscape of CG models4. Furthermore, using liquid perturbation theory, it has been demonstrated that for common polyethers the nonbonded interactions in the coarse-grained models are temperature-dependent18. Therefore, the temperature dependency needs to be accounted for in the coarse-graining strategy.

Although the conventional CG models are straightforward and allow much larger systems with reasonable computation costs19,20, they still suffer from some important issues in terms of thermomechanical consistency, representability, and transferability13,21. Despite the fact that the development of fully transferable CG potentials that could capture all material properties of interest across the entire desired range of temperatures remains a formidable challenge, significant efforts have been made to better understand the various coarse-graining mechanisms. Prior research has proposed several strategies to develop temperature-transferable CG models, including a multiscale CG (MS-CG) approach14,22,23,24, optimization of nonbonded interactions using multiple macroscopic properties4, an energy-renormalization approach, etc.25,26,27. Noid and his co-worker’s impressive “oeuvre” includes a spectrum of bottom-up strategies of multiscale coarse graining14,22,23,24,28,29. In recent reports, the state-point dependence of the CG potentials is examined for molecular liquids30 and a dual approach has been considered that combines structure-based and energy-based variational principles to determine effective potentials31. Keten and his co-workers have done extensive work, particularly focusing on reproducing the all-atom (AA) dynamics from CG potentials over a wide range of temperatures, using an energy-renormalization approach25,26,27 for nonbonded optimization. Therefore, the classical hybrid approach has improved the accuracy of the CG model predictions, but still creates formidable challenges, such as the need for careful fine-tuning of nonbonded LJ potential parameters (well depth ϵ) and variations in auxiliary LJ potential terms. The fine-tuning of pairwise interaction parameters can be very demanding and time-consuming for complex block copolymers and biological macromolecules32,33,34,35 due to multiple pairwise interaction sites and the inherent iterative process of the optimization.

To address the questions pertaining to generic coarse-graining strategies of complex molecules and accelerate the process, data-driven and machine-learned (ML) potentials are emerging as an alternative approach. The machine-learned CG potentials have been proposed to present the free-energy landscape of the all-atom (AA) molecular model with enhanced efficiency and accuracy36. Thus, the ML-enabled CG potentials are becoming a tool to bridge the gap between accurate and computationally expensive all-atom methods and enable the development of approximate but computationally affordable CG methods37,38,39,40,41,42,43,44,45. Since the accuracy of the machine learning model depends intrinsically on the accuracy of the reference model, improved accuracy has been sought by using ab-initio reference models to obtain machine-learned CG potentials that can predict the properties of complex molecules46,47,48.

To reduce the computational cost, machine learning and optimization techniques such as particle swarm optimization (PSO), genetic algorithm (GA), and simplex method39,49,50 were previously integrated to enhance the efficiency of these methods. Therefore, the emerging data-driven technique51,52 is promising and is credible to achieve accuracy with enhanced efficiency compared to the conventional approaches.

The potential of machine learning algorithms such as neural networks lies in capturing the hidden representations of complex data. They are proven to be capable of formulating complex potentials using AA molecular dynamics simulation data as reference or ground truth53. Similar to classical CG potentials, the machine-learned CG (MLCG) methods are also categorized as bottom-up MLCG methods39,40,49 and top-down MLCG methods54,55,56,57,58. Generally, in the bottom-up MLCG methods, a CG potential that is related to representations of CG beads is introduced through multi-layer neural networks53. Then the neural network is trained and optimized by utilizing the reference system i.e., data set from the all-atom molecular simulations. In the top-down MLCG method, an empirical relation of the interactions between CG beads (e.g. LJ potential for a simple fluid) is given as a priori39,40,54. The interaction parameters in the empirical relation are then optimized by a statistical learning technique to match features such as radial distribution function and temperature-dependent volumetric behavior with corresponding simulations/experimental results.

In this work, we propose a framework by combining bottom-up and top-down MLCG methods that enable thermodynamic consistency and transferability, while maintaining structural representability. Further, we demonstrate the application of the proposed method by coarse-graining poly(tetramethylene oxide) (PTMO), which is one of the major components of elastomeric polyurethanes. The coarse-grained PTMO model represents the soft segment of the polyurethane (PU) chain. The framework involves the integration of MLCG methods with genetic algorithm (GA) and molecular dynamics (MD) simulations. In the developed protocol the bottom-up MLCG approach is used to establish the bonded interactions by training deep neural networks (DNN) and top-down MLCG is used by incorporating a GA optimization scheme to obtain nonbonded interaction parameters by matching temperature-dependent density. One of the key highlights of the proposed framework is that the MD simulations are replaced by a DNN that is trained to predict the temperature-dependent density to further accelerate the optimization component. Therefore, we avoid the need for a large number of simulations, where data are generally not reused. Thus, DNNs are used as surrogate models, which addresses the re-usability issue of the data59. Our focus is on the working mechanism of the framework by demonstrating the ability of the CG model to make accurate predictions, and the validation of the trained model. The CG potentials developed in this work provide a statistical mechanical description of the system that is consistent with properties derived directly from a high-resolution united-atom ensemble; however, they may not be completely transferable across different thermodynamic conditions, which we discuss in the conclusion section as a task for future work.

Results

CG model predictions and validations

The performance of DNN accelerated CG potentials is examined by investigating universality and temperature-transferability in two ways. The first way is to compute properties, which have not been included in the training. Second is to demonstrate transferability by the application of the potential parameters for temperatures and molecular weights, which are outside the range of the training set. The machine-learned coarse-grained systems (where Nb is the number of beads/chains and Nc is the number of chains) studied in this work are listed in Table 1 along with the ground truth data.

Table 1 Machine-learned coarse-grained (MLCG) PTMO systems studied in this work at T = 453 K.

We first study the structural and conformational properties of the machine-learned coarse-grained model of PTMO melts through MD simulations. The distribution of the radius of gyration Rg of CG and UA models are compared in Fig. 1a for Nb = 50. It is to underline that chain size with 50 beads was included in the training data for potential parametrization. The estimated root mean square of the radius of gyration \({\langle {R}_{{\rm {g}}}^{2}\rangle }^{1/2}=24.56\pm 1.50\) and 25.86 Å from CG and UA systems, respectively. The gyration distributions from the two models are in good agreement. We also analyzed the chain dimensions of the coarse-grained PTMO for all the systems tabulated in Table 1. Figure 1b visualizes the averaged-mean-squared radius of gyration \(\langle {R}_{{\rm {g}}}^{2}\rangle\), as a function of chain length Nb. Note that Nb = Nm with Nm being the number of monomers (repeat units) in the UA system. It can be seen that with an increasing chain length of PTMO in the melt, \(\langle {R}_{{\rm {g}}}^{2}\rangle\) is approaching random coil hypothesis predictions (linear Nb dependence, shown by dashed line). Figure 1b represents the chain statistics well above and below the chain size (Nb = Nm = 50), which was included in training and testing. \(\langle {R}_{{\rm {g}}}^{2}\rangle\) for Nb = 200 is in good agreement with the chain size of the united atom model at Nm = 200, which indicates that the MLCG potential captures the structural features very well.

Fig. 1: Resulting chain statistics and structural comparison is shown.
figure 1

a Distribution of radius of gyration Rg is shown for MLCG and UA system for the chain size Nb = Nm = 50. b The average-mean-squared radius of gyration \(\langle {R}_{{\rm {g}}}^{2}\rangle\) as a function of chain length Nb (T = 453 K). The diamond symbols represent data from united-atom systems. The dashed line indicates a fit of the power law, \(\langle {R}_{{\rm {g}}}^{2}\rangle \propto {{N}_{{\rm {b}}}}^{2\nu }\) with ν = 1/2 for ideal chains.

Figure 2 represents the temperature-dependent volumetric behavior along with predicted limiting behavior in terms of glass transition temperature (Tg) of the PTMO system. It is important to note that the volumetric behavior shown in Fig. 2a is from the temperature range 313–153 K, which was not included in the nonbonded potential parametrization. The dotted arrow in Fig. 2a indicates the predicted Tg = 233 K for chain length Nb = 500. Figure 2b visualizes the limiting behavior of PTMO melt predicted by MLCG potentials. The predicted glass transition temperatures lie within the range of experimental estimates as tabulated in Table 2. The limiting behavior is identified by fitting the Flory–Fox relationship to the predicted Tg for the range of molecular weight. The dashed line is to show the experimental observation60 and the dotted line represents the Flory–Fox fit given by the equation:

$${T}_{{\rm {g}}}({M}_{{\rm {n}}})={T}_{{\rm {g}}\infty }(1-K/{M}_{{\rm {n}}})$$
(1)

where Tg is the glass transition temperature for PTMO chains approaching infinite length and K is an empirical constant and is equal to 130.0 g/mol from Fig. 2b. We consider the model to be “thermodynamically consistent” if it accurately predicts Tg at higher molecular weights. Therefore, the results shown in Fig. 2 are an indication of the transferability of the developed potentials, using our hybrid approach for different thermodynamic states.

Fig. 2: Prediction of glass transition temperature (Tg) from MLCG model.
figure 2

a The glass transition temperature is estimated from the specific volume at Nb = 500. b The limiting behavior of the PTMO is shown by fitting the Flory–Fox equation to the predicted Tg from the developed MLCG potential and shown in a dotted line. The dashed line shows the experimental Tg.

Table 2 Glass transition temperature predicted by MLCG systems at different molecular weights.

To account for the faster dynamics in CG systems, Fritz et al. proposed a dynamic scaling factor, SAACG to obtain the quantitative agreement between dynamics in atomistic and CG simulations for one component system. The time scaling factor is the ratio of diffusion coefficients of CG and AA system such that SAACG = DCG/DAA and can also be estimated using the mean squared displacement of beads61. We estimate the dynamic scaling factor SUA−CG from the linear part of the mean squared displacement of the center of mass (\(\langle {({R}_{{\rm {cm}}}(t)-{R}_{{\rm {cm}}}(0))}^{2}\rangle\)) as a function of time using the Einstein equation:

$$D=\mathop{\lim }\limits_{t\to \infty }\frac{1}{6t}\langle {({R}_{{\rm {cm}}}(t)-{R}_{{\rm {cm}}}(0))}^{2}\rangle$$
(2)

The mean squared displacement of CG and UA system is compared and the dynamic scaling factor (SUA−CG) is computed for Nb = 50 at T = 453 K (chain length and temperature included in training set) and T = 553 K. In Fig. 3a the mean squared displacement from CG PTMO system, MSD(tCG) is shifted along the time axis by a feasible time scaling factor SUA−CG = 3.35 resulting in an agreement with united-atom data, such that MSD(tCGSUA−CG) = MSD(tUA). Figure 3b represents the dynamic analysis at a higher temperature (T = 553 K). This is to underline that the time-scaled MSD of the CG model is in good agreement with UA, but the scaling factor has increased at a higher temperature. The increased dynamic shift factor with increasing temperature is consistent with earlier findings, where a classical hybrid optimization approach was used to develop the CG model of polymer4. Moreover, time-scaled CG curves follow the UA for distances above a few Å and for a time above a few hundred picoseconds. It is reported elsewhere that the agreement between the motion of polymer chains at such a small length scale and a short time scale indicates the inherence of atomistic features in the coarse-grained model17,62. It is noteworthy to mention that T = 553 K was not included in the parametrization process. Thus, developed potentials show good temperature transferability. However, it is important to note that dynamic scaling factors are empirically derived from the MSD. These scaling factors are effective at reproducing dynamics, particularly at high temperatures, and may require recalibration for different temperatures. Wenjie et al. demonstrated that temperature-transferability of the polymer dynamics over a wide range of temperatures can be achieved by correcting the deviations in activation-free energy25. In their energy-renormalization approach, an inference has been drawn from Adam–Gibbs (AG) theory of glass formation, which allows the prediction of dynamic properties over the broad range of temperatures (i.e., Arrhenius regime, the non-Arrhenius regime, and the non-equilibrium glassy regime). The energy-normalization approach achieves this by introducing temperature-dependent rescaling factors for nonbonded parameters ϵ and σ25,27. A similar approach could be adopted in a data-driven method, where the ML-enabled framework in the present study provides the basis to further expand its parametrization space which could allow the training of the temperature-dependent LJ parameters to predict dynamics over wider temperature ranges.

Fig. 3: Dynamic scaling and diffusion comparison between UA and MLCG model is shown.
figure 3

The mean squared displacement (MSD) of the center of mass of CG-PTMO and UA chains are computed at a T = 453 K and b T = 553 K. The dashed lines represent the time-scaled MSD of the CG system with scaling factors SUACG = 3.35 and 3.55 at 453 and 553 K, respectively.

Figure 4 shows the relaxation spectrum G(t) for a machine-learned coarse-grained system of PTMO along with united atom simulation. Figure 4a and b show the long and short time behavior of the CG system, respectively. The stress relaxation spectrum is also computed for chain lengths Nb = 50 and 500 to demonstrate the predictive power of the CG potentials beyond the entanglement length (experimentally, effective entanglement in polyether diol ≈ 10,500 g/mol corresponding to 145 PTMO repeating units or 181 propylene oxide repeating units63). As shown in Fig. 4a the agreement between the UA model and CG PTMO system is excellent from intermediate time scales to long time scales (10 ps ≤ t ≤ 102 ns) for the chain length of 50 beads. Generally, for AA models sufficient sampling becomes increasingly difficult beyond 1 ns and stress decays rapidly with higher deviations in relaxation time predictions. However, in this study, the multi-tau correlator method64 is employed to calculate the stress auto-correlation function (SACF) in a canonical ensemble (NVT). The simulation time is increased up to 102−103 ns, which provides sufficiently accurate estimates of the relaxation spectrum of the UA model. Importantly, the efficiency of the CG model allows for sufficient sampling well beyond 103 ns, far from the achievable range of atomistic MD simulations. The relaxation spectrum of chain length Nb = 500 is an indication of this with the appearance of a plateau in G(t) up to 104 ns. The comparison between two molecular weights also underlines the consistency of the developed potentials in terms of the good agreement from the short time scale (Fig. 4b) to the intermediate time scale (Fig. 4a). The extended plateau for Nb = 500 is due to entanglement.

Fig. 4: Molecular-weight dependent relaxation behaviour from MLCG system is visualized.
figure 4

a The relaxation spectrum of CG-PTMO and UA chains are computed at T = 453 K. b The short timescale relaxation behavior of PTMO chain lengths below and above the entanglement limit.

Discussion

We proposed a framework for the development of efficient, accurate, and transferable coarse-grained (CG) potentials for a model polymer by integrating bottom-up and top-down approaches through machine learning and optimization algorithms. We have demonstrated the versatility of the integrated machine learning method for coarse-graining polyether polymers such as poly(tetramethylene oxide). Using a simple one-bead mapping mechanism, and introducing a deep neural network-trained bottom-up optimization to match the atomistic target bonded distributions, we were able to reproduce the structural features of the polymer chain system. In addition, developing a top-down optimization approach for the nonbonded LJ potential parameters allowed us to match the local structure in terms of the radial distribution function. We also demonstrated that optimizing the nonbonded parameters by matching the specific volume at multiple temperature points in the liquid state provides transferability of potentials to predict the accurate glass transition temperature Tg consistent with experiments. The molecular weight-dependent Tg allows the fitting of the Flory–Fox equation to predict the limiting behavior of PTMO, which is found to be in good agreement with experimental measurements. This indicates that the developed framework may become a versatile approach to enable the transferability of certain thermodynamic state-dependent properties in CG systems. Calculated dynamic scaling factor through comparison of the CG and UA mean squared displacement of the center of mass indicates the accelerated speed of CG systems. By comparing the actual computer wall-time of the UA and CG simulations run for 50 monomer systems, we found out that the performance of the UA system is 9.084 ns/day and for CG system 1735.109 ns/day on a computer of 28 CPUs with an average CPU speed of 98.9%. This means that the CG model of PTMO provides a speed-up of over 200 times compared to the UA model due to the lower degrees of freedom and larger time step. The CG model enables prediction of the long-time behavior, of particular importance for capturing the full stress relaxation behavior of the polymeric systems. This is due to the increased efficiency and faster dynamics of the CG chains.

Therefore, in the present work, we established the advantages of using a hybrid MLCG method for polymer coarse-graining over the classical coarse-graining methods. Using our method, first, we are able to demonstrate simultaneous and accurate prediction of structural, dynamics, and experimentally consistent glass transition along with limiting behavior, which has been elusive to accomplish in traditional coarse-graining methods. Second, our framework enables the transferability of the developed potentials to ensure accurate thermomechanical predictive behavior by including the polymer chain length well beyond the oligomers, in the parametrization (training, testing, and optimization) process. Third, by incorporating experimental data of temperature-dependent density into nonbonded parametrization, the accuracy is enhanced (i.e., experimentally consistent Tg and limiting behavior are achieved) while ensuring the generalizability for thermodynamic state-dependent properties of CG models. Finally, the protocol has been shown to be robust and having been applied to poly(tetramethylene oxide), it could potentially be applied to other polymeric systems.

In closing, we recognize additional directions for future work. In this work, we considered the top-down optimization using temperature-dependent density from experiments, while primarily focusing on establishing an entirely data-driven framework that can capture a variety of material properties. Even though the machine-learned potentials demonstrated that optimized parameters are transferable to predict the thermodynamic properties, further study is necessary to assess the generality of the trends for other properties as well. Of particular interest is to investigate the temperature-transferability of dynamics at temperatures lower than the glass transition by expanding the parametrization space of the framework or amending a physics-informed learning protocol. Future work, therefore, will aim to include temperature-dependent cohesive interaction strength in training and testing for nonbonded optimization, thus building on the framework provided in this work.

Method

Characterization of the MLCG framework

We have established a framework through integrating machine learning, optimization, and MD simulations as illustrated in Fig. 5 to develop a temperature-transferable coarse-grained (CG) model that accurately represents poly(tetramethylene oxide). In the present study, target averaged distributions (bonded interaction parameters) are generated from the united-atom (UA) molecular dynamics simulations. A single-bead CG model is utilized, where each bead represents a repeating unit i.e., −(CH2CH2OCH2CH2)− of PTMO along the polymer chain. The resulting CG bead chains can therefore be denoted by chains of n beads, which corresponds to the number of repeat units in the united-atom resolution of PTMO (see section MD simulation details). Each CG bead is assigned a mass equal to the sum of the atomistic masses of its constituent elements, which is m = 72 g/mol. Both UA and CG molecular dynamics simulations were performed using the LAMMPS software package65.

Fig. 5: Schematic representation of the framework is shown.
figure 5

A hybrid optimization approach has been used to develop interaction parameters for coarse-graining polymer molecules using machine learning techniques. The framework includes the bottom-up optimization approach (detail given in MD simulation details section) for predicting bonded interaction parameters (\({k}_{l}^{{\rm {CG-PTMO}}},{l}_{0}^{{\rm {CG-PTMO}}},{k}_{\theta }^{{\rm {CG-PTMO}}},{\theta }_{0}^{{\rm {CG-PTMO}}}\)) by matching bond (\({P}_{l}^{{\rm {UA-PTMO}}}\)) and angle distributions (\({P}_{\theta }^{{\rm {UA-PTMO}}}\)) from a united-atom model of PTMO as ground truth. In the bonded optimization process, the DNN was trained using bond (\({P}_{l}^{{\rm {PCG}}}(l)\)) and angle (\({P}_{\theta }^{{\rm {PCG}}}(\theta )\)) distribution data from prototype-coarse-grained (PCG) simulations. The top-down approach (MD simulation details) was incorporated with a genetic algorithm and deep neural network for predicting the nonbonded interaction parameters (σCG−PTMO, ϵCG−PTMO) of the CG model. The DNN was trained using parameters (\({k}_{l}^{{\rm {PCG}}},{l}_{0}^{{\rm {PCG}}},{k}_{\theta }^{{\rm {PCG}}},{\theta }_{0}^{{\rm {PCG}}},{\epsilon }^{{\rm {PCG}}},{\sigma }^{{\rm {PCG}}}\), and T) acquired from PCG simulations and was integrated into GA along with parameters obtained in the bottom-up step to predict the density. Consecutively, nonbonded interaction parameters (ϵCG−PTMO, σCG−PTMO) were optimized by matching temperature-dependent experimental density. The dashed green arrows indicate the optimal parameters i.e., machine-learned CG parameters, obtained using the bottom-up and top-down portions of the strategy.

In order to capture the structure-property relation of CG-PTMO, we use the “Prototype” coarse-grained (PCG) systems (Prototype is called PCG throughout this paper) for data acquisition. Thousands of independent MD simulations were run for PCG, to obtain the data for training and testing purposes. These simulations were run using the potential energy (Utotal) described by Eq. (3).

$${U}_{{\rm {total}}}={U}_{{\rm {stretch}}}+{U}_{{\rm {bend}}}+{U}_{{\rm {nonb}}}$$
(3)

The total potential energy of the PCG, Utotal is given by three contributions for which the functional forms are given in Table 4. Ustretch is the energy associated with stretching the bonds of equilibrium bond length l0 between adjacent beads along the polymer chain, Ubend is the energy associated with bending, i.e., the angles subtended by consecutive bonds with equilibrium angle θ0, and Unonb is the energy of nonbonded interactions between beads of inter chains or beads separated by more than three bonds on the same chain. Thus, the target (CG-PTMO) model demands optimization of a total of six potential parameters (kl, l0, θ, kθ, σ, and ϵ) to fully describe the energetics and conformational dynamics of the system. The potential parameters of the target CG system are determined in two steps. In the first step, the bottom-up approach is used to establish the bonded interaction parameters. In the second step, the nonbonded parameters are determined from the top-down approach involving the temperature-dependent volumetric behavior of the system. To explore the parameter space, the bonded and nonbonded potential parameters were randomly sampled over a specific range based on the ground truth information, where ±Δ defines the upper and lower bounds of the explored range from the UA ground truth. The sampling range was defined by refining the region in the search space based on initial 500 (out of 5000) PCG simulations, which were run for wide ±Δ values of bonded parameters by calculating the mean and variance of the bond and angle distributions of the UA-PTMO. For nonbonded parameters, the range for a sampling of ϵ and σ was narrowed down based on the radial distance and magnitude of the first peak of RDF as well as the literature. In particular, the ϵ range was further refined based on an increased well-depth in the top-down optimization of the CG model of various materials4,14,66.

Bottom-up MLCG: bonded interaction optimization

Multi-layer feed-forward DNNs was developed to learn the relationship between the bonded interaction parameters and local chain structures. The expression of the complex relationship between the underlying potential and structural features is given in Eqs. (4) and (5).

$$({k}_{l},{l}_{0})=f({P}_{l}(l))$$
(4)
$$({k}_{\theta },{\theta }_{0})=f({P}_{\theta }(\theta ))$$
(5)

The extensive training data set of energies and structural properties of PTMO are taken from 5000 independent PCG systems with random sampling over a broad range of bond and angle potential parameters. The data are normalized and randomly split into two sets. 70% of the data was used to train the model, which included a random split with the ratio 1:4 for validation:training. A 5-fold cross-validation technique was used to reduce the bias in the model as it ensures that every observation from the data set has the chance of appearing in the training and validation set. The remaining 30% of data is used for testing, i.e., to evaluate the generality and the performance of the network for unseen data. The accuracy of the network is assessed using the mean absolute error (MAE) that calculates the deviation between the predicted and target values. The calculated MAE values for testing, training and 5-fold validations are tabulated in Table 3. The network is optimized using the Adam optimizer, which is a stochastic gradient descent algorithm based on adaptive estimates of lower-order moments67. Multiple DNN architectures with different activation functions, learning rates, and the number of layers and nodes were evaluated, and the best architecture was then selected based on the lowest MAE and the least over-fitting.

Table 3 Performance of the deep neural networks (DNNs).

By adopting the bottom-up machine-learned coarse-graining (MLCG) approach, the data acquired from PCG simulations are fed into the network. The architecture of the developed DNN is shown in Fig. 6a. The input vector xi is the distribution of the ith PCG system, which is discretized between its minimum and maximum range, i.e., \({x}_{l}^{i}=P({l}_{{\rm {min}}}\, < \,l \, < \,{l}_{{\rm {max}}})\), and \({x}_{\theta }^{i}=P(\theta )\) where θmin < θ < θmax. Two distinct DNNs with densely connected layers were trained to predict the bonded potential parameters of the CG-PTMO from the bond and angle distributions as shown in Fig. 6b and c. The DNN for the bond distribution has four hidden layers with 80 nodes for each layer, with a sigmoid activation function at each layer. The output layer consists of two nodes for kl, and l0. The DNN developed for the angle potential consists of three hidden layers, with 60 nodes and a sigmoid activation function at each layer. The two nodes in the output layer correspond to kθ and θ0.

Fig. 6: Bottom-up approach is shown along with performance of the neural networks.
figure 6

a The architecture of the DNN used in obtaining the bonded potential parameters. b The scatter plots represent the predictions of the DNN and the target of training and testing data for bond length (l0) and stretching coefficient (kl) along with the performance analysis of the neural network during training, and corresponding potential and bond distribution from MLCG predictions. c The target and the predictions from the DNN for angle (θ0) and bending coefficient (kθ) along with the performance of the DNN during training and corresponding potential and angle distribution from MLCG and ground truth.

Once the training of the neural networks is accomplished, the bond and angle distributions from the united-atom MD simulations, i.e., “the ground truth” are fed into the networks to predict the corresponding bonded potential parameters. This way, the DNN provides the bonded interaction parameters of the CG-PTMO model that represents the same bond distributions as the UA-PTMO model.

As shown in Fig. 6b and c the bond and angle distributions of the CG system exhibit a good match with reference values from the UA system, suggesting that the developed stretching and bending potentials, using the deep neural networks successfully represent the PTMO chains. The dashed lines represent the developed potentials obtained via equations listed in Table 4 for bonded contributions. In Table 4, we have also listed the readily available potential parameters for PTMO from the literature. Please note parameters taken from the literature for PTMO are for the soft segment of the polyurea5. The CG predictions of the current study are not directly comparable with the CG model by using these potentials due to the unavailability of the nonbonded interaction parameters.

Table 4 Summary of predicted interaction parameters from machine-learned coarse-grained (MLCG) model of PTMO.

Top-down MLCG: nonbonded interaction optimization

In the conventional CG MD simulations, developing transferable force field parameters have been a long-standing challenge, particularly for complex macromolecules. The traditional approaches involve the optimization of the radial distribution function, which often requires an additional correction term to include pressure fluctuations for accurate prediction of the thermodynamical behavior. In our framework, to predict the accurate thermodynamics across broad temperature ranges, the nonbonded interaction parameters are determined using the density of poly(tetramethylene oxide) from the experiments68, while bonded potential parameters are obtained in the bottom-up approach using UA data as ground truth.

A genetic algorithm (GA)-based optimization scheme is introduced to map the density of the CG model at different thermodynamic states. The objective function of the algorithm is given as Eq. (6), where Ti is the ith temperature state, ρCG and ρGT are the densities of the CG systems and ground truth (GT), respectively. The objective function evaluates the error between the supplemented density data (experimental data) and the predicted density from the CG model.

$${{{\rm{Objective}}}}\,{{{\rm{function}}}}\; :\,{\rm{min}} \mathop{\sum}\limits_{i}{\left(\frac{{\rho }_{{\rm {CG}}}({T}_{i})}{{\rho }_{{\rm {GT}}}({T}_{i})}-1\right)}^{2}$$
(6)

Since the GA is a meta-heuristic search algorithm based on the natural selection of a population with the process of adaptation for survival, it is a robust and efficient technique to explore complex nonlinear solution space. Compared to other algorithms, such as swarm intelligence-based optimization techniques, GA is less likely to have a premature convergence to a local optimal solution69.

Due to the iterative process of optimization algorithms, generally, several hundred thousand MD simulations are required to capture the reasonable range in the data. Therefore, approximations or surrogate models with less computational costs can be constructed to replace the MD simulations. In our framework, we have constructed a DNN as a surrogate model to establish the relationship between the CG potential parameters and the temperature-dependent density of the CG model. As a result, the need for further data acquisition for density from computationally expensive MD simulations has been avoided.

To train the deep neural network, bonded potential parameters of the PCG-MD simulations are fed along with temperatures to learn the multiplex relation between density and potential parameters. The multiplex expression is given in Eq. (7), where ρ is the density, and σ, ϵ, kl, l0, kθ, θ0 are the potential parameters.

$$\rho (T)=f(\sigma ,\epsilon ,{k}_{l},{l}_{0},{k}_{\theta },{\theta }_{0})$$
(7)

This DNN consists of three hidden layers, each with 40 nodes and rectified linear unit (Relu) activation function. The trained DNN is then integrated into the GA optimization algorithm to expedite the exploration of the optimal LJ potential parameters of the CG system. This ML-based optimization aims to achieve the desired temperature-dependent density, which is consistent with the ground truth (i.e., supplemented experimental data). The average prediction time for the trained DNN to predict the density at one temperature state from a 2.3 GHz core i7 processor is ~0.01 s, whereas the PCG-MD simulation takes an average of 60 s. This pinpoints the speed increment by a factor of 6.2 × 103 compared to MD simulations, and therefore, significantly accelerates the optimization process.

From the predicted nonbonded interaction parameters, the resulting local structure i.e., radial distribution function g(r) is shown in Fig. 7c along with RDF from the united atom model and LJ potential (dashed line). The radial distribution functions g(r) of the UA-PTMO and CG-PTMO are calculated at 453 K. The initial peak for both the UA and CG systems is found to correspond to the same radial distance; however, the CG peak value is relatively higher than that of the UA system. This is the result of an increased well-depth as predicted by the DNN in the top-down optimization of the nonbonded parameters. In bottom-up coarse-graining (classical or machine learning), the local structures are optimized, and the resulting RDF almost always matches perfectly with atomistic models5,40. However, in top-down approach, where the nonbonded interactions are tuned by incorporating temperature-dependent density (ρT), glass transition temperature (Tg), or elastic modulus (E), the resulting radial distribution function has a larger peak value than that from atomistic simulations, as was also found earlier in a top-down optimization of a coarse-grained model of polystyrene4.

Fig. 7: Top-Down approach is shown.
figure 7

a The schematic of top-down optimization protocol. b The scatter plots represent the predictions from the DNN and the target for training and testing data for density (ρCG), along with the performance of the DNN during training. c From the predicted parameters (σ and ϵ) the resulting radial distribution function (g(r)) of the CG system is accompanying the corresponding potential and RDF of the UA system. d The specific volume of the MLCG system is shown along with ground truth, i.e., experiment (dashed line) and UA PTMO simulations. e Snapshot of the CG PTMO system with equilibrated density, ρ = 0.875 g/cm3 at T = 453 K.

MD simulation details

We performed united-atom (UA) molecular dynamics simulations to generate reference (the ground truth) structural distributions of PTMO chains in the melt state for the purpose of parametrizing the potential parameters of the CG bead-chain model. Generally, for polymeric materials, the CG potentials are derived from simulations of shorter chains or oligomers with the assumption that the derived potentials are transferable to longer chains5. In this study, we use UA chains of PTMO containing 50 repeating units, equivalent to 250 atoms and united atoms along the chain for generating the structural distributions. Considering the computational limitations of the UA-PTMO MD simulations we selected the system of 50 such chains for collecting data as a reference. UA-MD simulations were performed using the LAMMPS software package65.

The repeat unit −(CH2CH2OCH2CH2)− of the UA-PTMO chain is defined in such a way that every oxygen and every methylene group is treated as an atom and united atom, respectively. The UA potential used in the reference system is the Transferable Potentials for Phase Equilibria-UA (TraPPE-UA) for the intra (bonded) and inter-molecular (nonbonded) interactions initially developed by Lempesis et al.3. Shireen et al. further validated and established the TraPPE-UA potentials to study shear and bulk relaxation behavior of melt PTMO70. Before collecting data, the system was equilibrated at T = 453 K for 5 ns in a canonical ensemble using the deterministic Nose–Hoover thermostat71,72. Subsequently, the equilibrated system was quenched in the NPT ensemble at P = 1 atm, from 453 to 313 K in decrements of 20 K). While quenching, isothermal and isobaric conditions were maintained with constants 0.1 and 1 ps, where at each temperature the simulation ran for 5 ns.

We measure two types of structural distributions as well as the temperature-dependent density of the melt PTMO from our UA simulations. First, we collect the bond length l0 distribution data, i.e., the distances between “virtual” bead centers along the UA-PTMO chain, representing centers of the adjacent beads in the CG-PTMO model. Given that all the beads in the CG chains are of the same type, there is only one type of chemical bond in the CG system, thus, only one set of bond length distribution data is recorded. This distribution is used to parameterize the bond stretching potential (the functional form of the potential is given in Table 4). Second, we collect bond angle θ0 data and its distribution between three consecutive CG beads, and this distribution is used to parameterize the CG-PTMO bending potential (the functional form of the potential is given in Table 4).

We also measured the temperature-dependent density of melt PTMO at P = 1 atm from 453 to 313 K. The measured temperature-dependent density data is shown in Fig. 7d along with MLCG and experimental values. UA-PTMO chains used for ground truth data has repeat units Nm = 50, which is below the value at which density becomes insensitive to chain length, therefore, density values are slightly different, and calculated deviations are within 1%.