Skip to content

YueFang18/kMC_BO_depolymerization

Repository files navigation

Polymer Simulation & Optimization

A Python framework for simulating polymer synthesis and degradation using Kinetic Monte Carlo (KMC) and Bayesian Optimization.

🚀 Quick Start

Install Dependencies:

pip install numpy pandas matplotlib seaborn scipy scikit-optimize

Set Executable Path:

Update the KMC_EXECUTABLE_PATH in optimizer.py to point to your compiled C++ program.

⚙️ How to Run

You can toggle the three main tasks by changing the switches in optimizer.py:

1. Model Validation (Single Run)

Runs simulations to compare against experimental data. code Python DO_SINGLE_ANALYSIS = True

2. Parameter Sweep (Large Scale)

Explores how different Temperatures and Ratios affect the polymer. code Python DO_PARAMETER_SWEEP = True

3. Bayesian Optimization (Find Best Conditions)

Automatically finds the fastest synthesis/recycling conditions while maintaining chain length. code Python DO_OPTIMIZATION = True

📊 Outputs

All results are saved in the output_new/ folder:

Validation Plots: Figure1_..._Overview.png(Figure 1)

Kinetics Analysis: Part2_....png(Figure 2);Part3_...png(Figure 3);Part4_...png(Figure 4)

Optimization Dashboard: optimization_dashboard_new.png(Figure 5)

📂 Structure

optimizer.py: Main control and plotting script.

Experiment data.txt: Lab data for comparison.

output/: Simulation results and figures.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors