Skip to content

Commit 2b1232f

Browse files
authored
Update random_vs_sqs_analysis.py
1 parent 212d7bc commit 2b1232f

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

random_vs_sqs_analysis.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ def render_random_analysis_standalone(working_structure, target_concentrations,
424424
st.info(f"Supercell: {nx}×{ny}×{nz} | Total Atoms: {total_atoms}")
425425

426426
with col_script:
427-
if st.button("📥 Generate Standalone Script", use_container_width=True):
427+
if st.button("📥 Generate Standalone Script", width='stretch'):
428428
script = generate_random_analysis_script_standalone(
429429
working_structure, target_concentrations, transformation_matrix,
430430
use_sublattice_mode, chem_symbols, n_random_structures
@@ -437,7 +437,7 @@ def render_random_analysis_standalone(working_structure, target_concentrations,
437437
data=st.session_state['generated_random_script'],
438438
file_name="random_analysis_standalone.sh",
439439
mime="text/plain",
440-
use_container_width=True,
440+
width='stretch',
441441
type='primary'
442442
)
443443
with st.expander("Script Preview"):
@@ -447,7 +447,7 @@ def render_random_analysis_standalone(working_structure, target_concentrations,
447447
run_clicked = st.button(
448448
"🚀 Run Live Analysis",
449449
type="primary",
450-
use_container_width=True
450+
width='stretch'
451451
)
452452

453453
if run_clicked:
@@ -619,10 +619,10 @@ def display_results():
619619
fig.update_xaxes(title_text="Structure ID", title_font=dict(size=24), tickfont=dict(size=20), row=1, col=2)
620620
fig.update_yaxes(title_text="Score", title_font=dict(size=24), tickfont=dict(size=20), row=1, col=2)
621621

622-
st.plotly_chart(fig, use_container_width=True)
622+
st.plotly_chart(fig, width='stretch')
623623

624624
with st.expander("📄 View Detailed Data"):
625-
st.dataframe(df, use_container_width=True)
625+
st.dataframe(df, width='stretch')
626626

627627
st.markdown("---")
628628
st.markdown("### 📦 Download Best Structures")
@@ -666,9 +666,9 @@ def display_results():
666666

667667
st.markdown(f"**Preview: Top 3 structures (sorted by {sort_column})**")
668668
preview_cols = ['ID', 'Overall Score', 'RMSE'] + [k for k in all_sublattice_keys if k in sorted_df.columns]
669-
st.dataframe(sorted_df[preview_cols].head(3), use_container_width=True)
669+
st.dataframe(sorted_df[preview_cols].head(3), width='stretch')
670670

671-
if st.button("🔽 Generate Download Package", type="primary", use_container_width=True, key="generate_download_btn"):
671+
if st.button("🔽 Generate Download Package", type="primary", width='stretch', key="generate_download_btn"):
672672
with st.spinner("Creating ZIP package..."):
673673
zip_buffer = create_filtered_zip(
674674
sorted_df, structures_data, df,
@@ -686,7 +686,7 @@ def display_results():
686686
data=st.session_state['download_zip'],
687687
file_name=f"best_{st.session_state['download_count']}_structures.zip",
688688
mime="application/zip",
689-
use_container_width=True,
689+
width='stretch',
690690
key="download_zip_btn",
691691
type = 'primary'
692692
)

0 commit comments

Comments
 (0)