import base64 from pathlib import Path import streamlit as st from src.ui_style import apply_global_style st.set_page_config(page_title="Home", layout="wide") apply_global_style() logo_path = Path(__file__).resolve().parent / "icons" / "logo.png" logo_data_uri = "" if logo_path.exists(): logo_data_uri = "data:image/png;base64," + base64.b64encode(logo_path.read_bytes()).decode("ascii") logo_html = ( f'' if logo_data_uri else "" ) st.markdown( f"""
{logo_html}
Polymer Discovery Platform
""", unsafe_allow_html=True, ) st.markdown( """ This platform provides an end-to-end workflow for polymer screening and selection: quick single-polymer checks, bulk property prediction, 2D/3D molecular visualization, and multi-objective discovery with Pareto analysis, trust scoring, and diversity-aware candidate selection. You can run the process with manual controls or AI-assisted setup to accelerate exploration from requirements to shortlisted candidates. """ ) st.divider() st.markdown("### Platform Modules") st.caption( "Use the modules below to probe, predict, visualize, and discover polymers with manual control or AI support." ) cards = [ ( "Property Probe", "Input a single SMILES or polymer name and retrieve predicted or available values for one target property. " "Best for quick validation before larger screening.", "pages/1_Property_Probe.py", ), ( "Batch Prediction", "Upload or paste many SMILES and run bulk property prediction in one job. " "Useful when you want ranked outputs and exportable tables for downstream analysis.", "pages/2_Batch_Prediction.py", ), ( "Molecular View", "Render 2D and 3D molecular structures, inspect composition, and download visual assets " "or MOL files for documentation and simulation setup.", "pages/3_Molecular_View.py", ), ( "Discovery (Manual)", "Set hard constraints, objectives, trust/selection weights, and diversity settings directly. " "Designed for controlled multi-objective exploration with transparent parameter tuning.", "pages/4_Discovery_(Manual).py", ), ( "Discovery (AI)", "Describe target behavior in natural language and let the LLM build discovery settings. " "You can run directly or inspect/edit the generated JSON in advanced mode.", "pages/5_Discovery_(AI).py", ), ( "Novel SMILES Generation", "Sample new polymer SMILES with the pretrained RNN and filter out molecules already present " "in local datasets (EXP/MD/DFT/GC/POLYINFO/PI1M).", "pages/6_Novel_SMILES_Generation.py", ), ( "Feedback", "Send bug reports, feature requests, and usage feedback.", "pages/7_Feedback.py", ), ] for i, (title, desc, page_path) in enumerate(cards, start=1): box = st.container(border=True) with box: c1, c2 = st.columns([5, 1.2]) with c1: st.markdown(f"**{title}**") st.caption(desc) with c2: if st.button("Go", type="primary", key=f"home_go_{i}"): st.switch_page(page_path) st.divider() st.markdown("**Developed by**") st.markdown("### MONSTER Lab") st.markdown("**Molecular/Nano-Scale Transport & Energy Research Laboratory**") st.markdown("**College of Engineering, University of Notre Dame**") st.markdown( "The MÖNSTER Lab (MOlecular/Nano-Scale Transport & Energy Research Laboratory) " "studies the fundamental physics of energy and mass transport from the molecular and " "nano-scale using theories, simulations, data-driven approaches and experiments, and " "apply the knowledge toward engineering materials with tailored thermal properties, " "thermal management of electronics, improving efficiency of energy devices, designing " "molecules and system for water desalination, high-sensitivity bio-sensing and additive " "manufacturing." ) st.markdown("[Visit MONSTER Lab Website](https://monsterlab.nd.edu/)")