File size: 4,175 Bytes
a55a905
 
67ef359
8736226
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import streamlit as st

def show():
    # Custom styles for dark theme and remove top padding
    st.markdown("""
        <style>
        body {
            background-color: #121212;
            color: #f1f1f1;
        }
        section[data-testid="stSidebar"] + div div[data-testid="stVerticalBlock"] {
            padding-top: 0rem;
        }
        .section-title {
            font-size: 26px;
            font-weight: bold;
            color: #4B8BBE;
            margin-top: 2rem;
        }
        .subsection {
            font-size: 18px;
            margin-top: 1rem;
        }
        .faq, .glossary, .troubleshoot {
            background-color: #333333;
            padding: 1rem;
            border-radius: 10px;
            margin-bottom: 1rem;
            color: #f1f1f1;
        }
        .email-box {
            background-color: #2C3E50;
            padding: 1rem;
            border-radius: 10px;
            color: #f1f1f1;
        }
        .st-expanderHeader {
            color: #4B8BBE;
        }
        .st-expanderContent {
            color: #f1f1f1;
        }
        </style>
    """, unsafe_allow_html=True)

    # Page title
    st.title("πŸ“˜ Help & Support - TransPolymer")

    st.markdown("<div class='section-title'>❓ Help Center - TransPolymer</div>", unsafe_allow_html=True)
    st.markdown("Welcome to the **TransPolymer Help Page**. This guide will walk you through how to use the app effectively.")

    # 1. Getting Started
    st.markdown("<div class='section-title'>πŸš€ Getting Started</div>", unsafe_allow_html=True)
    st.markdown("""
    - **Step 1:** Go to the **Prediction** page.
    - **Step 2:** Enter a valid **SMILES string** or choose a polymer from the dropdown.
    - **Step 3:** Click **Predict** to see the results.
    - The app will return **six polymer properties** based on your input.
    """)

    # 2. FAQ
    st.markdown("<div class='section-title'>πŸ“Œ Frequently Asked Questions</div>", unsafe_allow_html=True)
    with st.expander("🧬 What is a SMILES format?"):
        st.markdown("SMILES (Simplified Molecular Input Line Entry System) is a line notation for describing molecular structures using short ASCII strings.")
    with st.expander("❌ What if I enter an invalid SMILES string?"):
        st.markdown("The system will show an error if the SMILES string is incorrectly formatted or contains special characters.")

    # 3. Glossary / Terminology
    st.markdown("<div class='section-title'>πŸ“– Glossary</div>", unsafe_allow_html=True)
    with st.container():
        st.markdown("""
        - **Tensile Strength (MPa):** The maximum stress a material can withstand while being stretched or pulled before breaking.
        - **Ionization Energy (eV):** The energy required to remove an electron from a molecule or atom in its gaseous state. Higher values indicate more stability.
        - **Electron Affinity (eV):** The amount of energy released when an electron is added to a molecule or atom.
        - **logP:** The logarithm of the partition coefficient between octanol and water, indicating the compound's hydrophobicity.
        - **Refractive Index:** A measure of how much light bends (or refracts) when passing through a material.
        - **Molecular Weight (g/mol):** The mass of one mole of a substance’s molecules, calculated as the sum of atomic weights.
        """)

    # 4. Troubleshooting Tips
    st.markdown("<div class='section-title'>πŸ› οΈ Troubleshooting</div>", unsafe_allow_html=True)
    with st.container():
        st.markdown("""
        - ❌ **Common Mistakes**:
            - Extra spaces in SMILES strings
            - Using unsupported or uncommon formats
        - πŸ”„ **To Refresh**: Press `Ctrl+R` or click the "Rerun" button if something goes wrong.
        """)

    # 5. Support
    st.markdown("<div class='section-title'>πŸ“¬ Support</div>", unsafe_allow_html=True)
    st.markdown("""
    For further help, reach us at πŸ“§ **transpolymer365@gmail.com**  
    Or report issues on [GitHub](https://github.com/your-username/transpolymer/issues)
    """)

# Run this file directly for testing
if __name__ == "__main__":
    show()