dzs commited on
Commit
e743fc5
·
1 Parent(s): 9160077

added quick start guide

Browse files
Files changed (3) hide show
  1. figure.py +1 -1
  2. instructions.py +198 -10
  3. main_layout.py +1 -1
figure.py CHANGED
@@ -87,7 +87,7 @@ def build_figure(dataframe: pd.DataFrame) -> go.Figure:
87
  ),
88
  xaxis=dict(
89
  title=dict(
90
- text=r"Boundary chemicals (CAS)",
91
  standoff=0, # adjust: try 0–10 depending on how close you want it
92
  font = dict(size=18) # ← axis label size
93
  )
 
87
  ),
88
  xaxis=dict(
89
  title=dict(
90
+ text=r"Representative boundary chemicals (CAS)",
91
  standoff=0, # adjust: try 0–10 depending on how close you want it
92
  font = dict(size=18) # ← axis label size
93
  )
instructions.py CHANGED
@@ -1,20 +1,208 @@
 
1
  from dash import html, dcc
2
 
3
  def build_instructions_layout() -> html.Div:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  return html.Div(
5
- [
6
- html.H2("Instructions for Use"),
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
- html.H3("Overview"),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
- html.H3("Usage"),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
- html.H3("References"),
 
 
 
 
 
 
 
 
 
 
 
13
 
14
- html.Div(
15
- dcc.Link("← Back to model", href="/"),
16
- style={"marginTop": "2em"},
17
- ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  ],
19
- style={"maxWidth": "1200px", "margin": "2em auto"},
20
  )
 
1
+ # instructions.py
2
  from dash import html, dcc
3
 
4
  def build_instructions_layout() -> html.Div:
5
+ """
6
+ ~1-page Quick Start Guide layout for the Extraction Condition Comparison Tool.
7
+ Intended audience: analytical chemists & toxicologists.
8
+ """
9
+ page_style = {
10
+ "fontFamily": "Arial, Helvetica, sans-serif",
11
+ "padding": "20px",
12
+ }
13
+
14
+ card_style = {
15
+ "maxWidth": "950px",
16
+ "margin": "0 auto",
17
+ "padding": "18px 22px",
18
+ "border": "1px solid #e5e5e5",
19
+ "borderRadius": "8px",
20
+ "boxShadow": "0 1px 4px rgba(0,0,0,0.06)",
21
+ "backgroundColor": "white",
22
+ "lineHeight": "1.45",
23
+ }
24
+
25
+ h1_style = {"margin": "0 0 10px 0", "fontSize": "28px"}
26
+ h2_style = {"margin": "18px 0 8px 0", "fontSize": "18px"}
27
+ p_style = {"margin": "8px 0", "color": "#333"}
28
+ small_style = {"margin": "6px 0", "color": "#555", "fontSize": "13px"}
29
+ ul_style = {"margin": "8px 0 8px 22px"}
30
+ li_style = {"marginBottom": "6px"}
31
+ callout_style = {
32
+ "marginTop": "10px",
33
+ "padding": "10px 12px",
34
+ "borderLeft": "4px solid #999",
35
+ "backgroundColor": "#fafafa",
36
+ "color": "#333",
37
+ "fontSize": "13.5px",
38
+ }
39
+
40
  return html.Div(
41
+ style=page_style,
42
+ children=[
43
+ html.Div(
44
+ style=card_style,
45
+ children=[
46
+ html.H1("Quick Start Guide", style=h1_style),
47
+ html.P(
48
+ "Use this tool to compare predicted fractional release of boundary chemicals from a polymer "
49
+ "under two scenarios (Condition #1 vs Condition #2).",
50
+ style=p_style,
51
+ ),
52
+ html.P(
53
+ ["Return to the tool: ", dcc.Link("Main page", href="/")],
54
+ style=small_style,
55
+ ),
56
 
57
+ html.H2("1) Choose polymer properties", style=h2_style),
58
+ html.P(
59
+ "Start in the “Polymer component” section. These inputs define the material and geometry used "
60
+ "in the transport calculations.",
61
+ style=p_style,
62
+ ),
63
+ html.Ul(
64
+ style=ul_style,
65
+ children=[
66
+ html.Li([html.B("Matrix: "), "Select the polymer type (e.g., PP)."], style=li_style),
67
+ html.Li(
68
+ [
69
+ html.B("Tg (°C), Crystallinity (%), Density (g/cm³): "),
70
+ "Enter polymer properties (use best-available values; defaults are acceptable for screening).",
71
+ ],
72
+ style=li_style,
73
+ ),
74
+ html.Li(
75
+ [
76
+ html.B("Volume (cm³) and Surface area (cm²): "),
77
+ "Define the polymer amount and exposed area for the scenario being evaluated.",
78
+ ],
79
+ style=li_style,
80
+ ),
81
+ ],
82
+ ),
83
 
84
+ html.H2("2) Define Condition #1 and Condition #2", style=h2_style),
85
+ html.P(
86
+ "Each condition can represent either an extraction experiment (in vitro) or an in vivo exposure case.",
87
+ style=p_style,
88
+ ),
89
+ html.Ul(
90
+ style=ul_style,
91
+ children=[
92
+ html.Li(
93
+ [
94
+ html.B("In vitro: "),
95
+ "Enables solvent and extraction settings (solvent, solvent volume, swelling ratio = final mass divided by initial mass, "
96
+ "extraction temperature, iterations). Use this to mimic or design extraction conditions.",
97
+ ],
98
+ style=li_style,
99
+ ),
100
+ html.Li(
101
+ [
102
+ html.B("In vivo (conservative): "),
103
+ "Screening-level release assumption (often higher predicted release).",
104
+ ],
105
+ style=li_style,
106
+ ),
107
+ html.Li(
108
+ [
109
+ html.B("In vivo (tissue): "),
110
+ "Accounts for tissue-limited behavior for a more constrained release estimate.",
111
+ ],
112
+ style=li_style,
113
+ ),
114
+ ],
115
+ ),
116
+ html.P(
117
+ "For all modes, set “Extraction time (h)” to match the scenario duration of interest.",
118
+ style=small_style,
119
+ ),
120
 
121
+ html.H2("3) Monte Carlo samples", style=h2_style),
122
+ html.P(
123
+ "Set the number of samples under “Monte Carlo → Samples” (the default is typically fine).",
124
+ style=p_style,
125
+ ),
126
+ html.Ul(
127
+ style=ul_style,
128
+ children=[
129
+ html.Li([html.B("500–2000"), " for routine comparisons"], style=li_style),
130
+ html.Li([html.B(">5000"), " for more stable uncertainty bounds (slower)"], style=li_style),
131
+ ],
132
+ ),
133
 
134
+ html.H2("4) Run and interpret results", style=h2_style),
135
+ html.P(
136
+ ["Click ", html.B("Calculate"), ". The chart compares predicted fractional release by chemical (CASRN)."],
137
+ style=p_style,
138
+ ),
139
+ html.Ul(
140
+ style=ul_style,
141
+ children=[
142
+ html.Li([html.B("Red bars: "), "Condition 1"], style=li_style),
143
+ html.Li([html.B("Blue bars: "), "Condition 2"], style=li_style),
144
+ html.Li(
145
+ [
146
+ html.B("Error bars: "),
147
+ "uncertainty bounds (interquartile range). Larger error bars indicate greater uncertainty.",
148
+ ],
149
+ style=li_style,
150
+ ),
151
+ html.Li(
152
+ [
153
+ html.B("Log-scale y-axis: "),
154
+ "equal vertical steps represent orders of magnitude differences.",
155
+ ],
156
+ style=li_style,
157
+ ),
158
+ ],
159
+ ),
160
+
161
+ # --- Revised section (replaces any convex-hull language) ---
162
+ html.Div(
163
+ style=callout_style,
164
+ children=[
165
+ html.B("How to interpret the chemical list"),
166
+ html.Br(),
167
+ "The CASRNs shown are a representative boundary set selected to span the range of molecular "
168
+ "weight and hydrophobicity (logP) expected in a chemical characterization study. "
169
+ "Because this set covers the anticipated chemical space, tool-supported conclusions "
170
+ "(e.g., which condition is more/less conservative) are intended to be applicable broadly to "
171
+ "chemicals expected in that study context.",
172
+ ],
173
+ ),
174
+
175
+ html.H2("Common tips & troubleshooting", style=h2_style),
176
+ html.Ul(
177
+ style=ul_style,
178
+ children=[
179
+ html.Li(
180
+ "If in vitro fields appear disabled, ensure the condition mode is set to “In vitro”.",
181
+ style=li_style,
182
+ ),
183
+ html.Li(
184
+ "If results look unexpected, double-check units (cm³, cm², °C, hours) and polymer geometry inputs.",
185
+ style=li_style,
186
+ ),
187
+ html.Li(
188
+ "For screening, focus on relative differences between Condition 1 and 2 rather than absolute values.",
189
+ style=li_style,
190
+ ),
191
+ html.Li(
192
+ "If you need a defensible justification, document the polymer geometry, exposure duration, and "
193
+ "the rationale for choosing in vitro vs in vivo modes.",
194
+ style=li_style,
195
+ ),
196
+ ],
197
+ ),
198
+
199
+ html.Hr(style={"margin": "16px 0"}),
200
+ html.P(
201
+ "Note: Outputs are model-based predictions intended to support comparisons and study design. "
202
+ "Interpret results alongside analytical data, scenario context, and uncertainty considerations.",
203
+ style=small_style,
204
+ ),
205
+ ],
206
+ )
207
  ],
 
208
  )
main_layout.py CHANGED
@@ -478,7 +478,7 @@ def build_main_layout() -> html.Div:
478
  "This tool provides an interface to physics-based models that can assist in selecting extraction conditions. ",
479
  "It enables comparison of predicted fractional release across in vitro and in vivo scenarios. ",
480
  "For additional information, please refer to the ",
481
- dcc.Link("user guide", href="/instructions"),
482
  # ", and for reference and disclaimer information, please see the ",
483
  # dcc.Link("RST information page", href="/rst"),
484
  ".",
 
478
  "This tool provides an interface to physics-based models that can assist in selecting extraction conditions. ",
479
  "It enables comparison of predicted fractional release across in vitro and in vivo scenarios. ",
480
  "For additional information, please refer to the ",
481
+ dcc.Link("quick start guide", href="/instructions"),
482
  # ", and for reference and disclaimer information, please see the ",
483
  # dcc.Link("RST information page", href="/rst"),
484
  ".",