Commit a606d215 authored by JinyuanSun's avatar JinyuanSun
Browse files

add button to hide Mol*

parent d48f1622
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -259,7 +259,7 @@ class ChatmolFN:
                    # st.
                    return res_df.to_string()
            else:
                time.sleep(5)
                time.sleep(15)
        # save_best_docking_result(docking_code, complex_file_path)
        # concate_ligand_to_receptor(complex_file_path, protein_pdb_file_path, complex_file_path)
        # log = get_docking_result(docking_code)
+52 −40
Original line number Diff line number Diff line
@@ -207,6 +207,16 @@ if "messages" not in st.session_state or st.session_state.messages == []:
        st.session_state.messages[0]["content"] += " Do not show details of function callings. Make sure you use correct file path all the time."

chatcol, displaycol = st.columns([1, 1])

# button_1, button_2 = st.columns([1, 1])
if st.sidebar.button("Show Mol*"):
    chatcol, displaycol = st.columns([1, 1])
    st.session_state['molstar'] = True

if st.sidebar.button("Hide Mol*"):
    st.session_state['molstar'] = False
    _, chatcol, _ = st.columns([1, 3, 1])

with chatcol:
    for message in st.session_state.messages:
        try:
@@ -460,7 +470,9 @@ if uploaded_file:

    cfn.VIEW_DICTS[pdb_id] = view


if "molstar" in st.session_state and st.session_state["molstar"] == False:
    pass
else:
    with displaycol:
        container = st.container()
        with container: