Skip to content

Commit 6c8ab59

Browse files
authored
Update atat_module.py
1 parent 7cf5b0b commit 6c8ab59

1 file changed

Lines changed: 27 additions & 10 deletions

File tree

atat_module.py

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,9 +1494,12 @@ def render_atat_sqs_section():
14941494
else:
14951495
element_list = [2, 2]
14961496
composition_input = []
1497-
chem_symbols, target_concentrations, otrs = render_site_sublattice_selector_fixed(
1498-
working_structure, all_sites, unique_sites, supercell_multiplicity
1499-
)
1497+
taby, tabx = st.tabs(
1498+
["🔵3️⃣ Step 3: Configure Sublattices", "➕🎲 Random Structure Quality Check"])
1499+
with taby:
1500+
chem_symbols, target_concentrations, otrs = render_site_sublattice_selector_fixed(
1501+
working_structure, all_sites, unique_sites, supercell_multiplicity
1502+
)
15001503

15011504
if composition_mode == "🔄 Global Composition":
15021505

@@ -1612,6 +1615,18 @@ def render_atat_sqs_section():
16121615
except Exception as e:
16131616
st.error(f"Error creating concentration preview: {e}")
16141617
else:
1618+
if len(element_list) >= 2 or (use_sublattice_mode and target_concentrations):
1619+
with tabx:
1620+
from random_vs_sqs_analysis import render_random_analysis_standalone
1621+
1622+
render_random_analysis_standalone(
1623+
working_structure=working_structure,
1624+
target_concentrations=target_concentrations,
1625+
transformation_matrix=transformation_matrix,
1626+
use_sublattice_mode=use_sublattice_mode,
1627+
chem_symbols=chem_symbols,
1628+
total_atoms=len(supercell_preview)
1629+
)
16151630
display_sublattice_preview_fixed(target_concentrations, chem_symbols, transformation_matrix, working_structure,
16161631
unique_sites)
16171632

@@ -1732,6 +1747,7 @@ def render_atat_sqs_section():
17321747

17331748
col_button, col_clear = st.columns([3, 1])
17341749

1750+
17351751
with col_button:
17361752
if not target_concentrations:
17371753
st.warning("Create at least 1 sublattice (with minimum of two elements) first.")
@@ -3682,7 +3698,7 @@ def render_site_sublattice_selector_fixed(working_structure, all_sites, unique_s
36823698
if sublattice_data:
36833699
tab_names = [f"Sublattice {data['sublattice_letter']}" for data in sublattice_data]
36843700
tabs = st.tabs(tab_names)
3685-
3701+
36863702
css = '''
36873703
<style>
36883704
.stTabs [data-baseweb="tab-list"] button [data-testid="stMarkdownContainer"] p {
@@ -4842,7 +4858,7 @@ def render_extended_optimization_analysis_tab():
48424858
for i, result in enumerate(parallel_results):
48434859
color = colors[i % len(colors)]
48444860
line_style = dict(color=color,
4845-
width=3 if result == best_run else 2 if result == worst_run else 1)
4861+
width=4 if result == best_run else 3 if result == worst_run else 2)
48464862

48474863
name_suffix = " (Best)" if result == best_run else " (Worst)" if result == worst_run else ""
48484864

@@ -4867,21 +4883,22 @@ def render_extended_optimization_analysis_tab():
48674883
legend=dict(
48684884
yanchor="top",
48694885
y=0.99,
4870-
xanchor="left",
4871-
x=0.01,
4886+
xanchor="right",
4887+
x=0.99,
48724888
font=dict(size=16)
48734889
),
48744890
font=dict(size=20, family="Arial"),
48754891
xaxis=dict(
48764892
title_font=dict(size=20, family="Arial Black"),
4877-
tickfont=dict(size=16)
4893+
tickfont=dict(size=18, color="black")
48784894
),
48794895
yaxis=dict(
48804896
title_font=dict(size=20, family="Arial Black"),
4881-
tickfont=dict(size=16)
4897+
tickfont=dict(size=18, color="black")
48824898
)
48834899
)
48844900

4901+
48854902
st.plotly_chart(fig, use_container_width=True)
48864903

48874904
st.subheader("📥 Download Results")
@@ -5600,7 +5617,7 @@ def render_monitor_script_section(results):
56005617
col_download, col_info = st.columns([1, 1])
56015618

56025619
with col_download:
5603-
if st.button("🛠️ Generate All-in-One Bash Script for SQS Search", type="tertiary", key="generate_monitor_script"):
5620+
if st.button("🛠️ Generate All-in-One Bash Script for SQS Search (monitor.sh)", type="tertiary", key="generate_monitor_script"):
56045621
try:
56055622
script_content = generate_atat_monitor_script(
56065623
results=results,

0 commit comments

Comments
 (0)