Spaces:
Running
Running
Update qsar_core_streamlit.py
Browse files562 unmodified lines563564565566567568569106 unmodified lines67667767867968068124 unmodified lines70670770870971071197 unmodified lines809810811812813814815816817818819820149 unmodified lines970971972973974975562 unmodified linesdef convert_structure_to_pdb(input_path: Path, output_path: Path, timeout=300):if input_path.suffix.lower() == ".pdb":shutil.copy2(input_path, output_path)return output_pathif not ensure_command("obabel"):106 unmodified linesnum_modes,vina_timeout,prep_timeout,):ligand_name = ligand_source.name if ligand_kind == "file" else ligand_source["name"]ligand_dir = batch_dir / safe_filename(Path(ligand_name).stem)24 unmodified lines"--size_z", str(size[2]),"--exhaustiveness", str(exhaustiveness),"--num_modes", str(num_modes),"--out", str(docked_pdbqt),]97 unmodified lineswith st.sidebar:st.header("Run settings")exhaustiveness = st.slider("Exhaustiveness", 4, 24, 6, 2)num_modes = st.slider("Number of poses", 1, 10, 3, 1)prep_timeout = st.number_input("Preparation timeout per step (seconds)", min_value=60, max_value=1800, value=300, step=60)vina_timeout = st.number_input("Vina timeout per ligand (seconds)", min_value=120, max_value=7200, value=900, step=120)st.warning("For many ligands, use exhaustiveness 4–6 and poses 3.")if st.button("Clear all inputs and results"):reset_all()149 unmodified linesnum_modes=num_modes,vina_timeout=vina_timeout,prep_timeout=prep_timeout,)records.append(record)562 unmodified lines563564565566567568569570106 unmodified lines67767867968068168268324 unmodified lines70870971071171271371497 unmodified lines812813814815816817818819820821822823824149 unmodified lines974975976977978979980562 unmodified linesdef convert_structure_to_pdb(input_path: Path, output_path: Path, timeout=300):if input_path.suffix.lower() == ".pdb":if input_path.resolve() != output_path.resolve():shutil.copy2(input_path, output_path)return output_pathif not ensure_command("obabel"):106 unmodified linesnum_modes,vina_timeout,prep_timeout,cpu_threads,):ligand_name = ligand_source.name if ligand_kind == "file" else ligand_source["name"]ligand_dir = batch_dir / safe_filename(Path(ligand_name).stem)24 unmodified lines"--size_z", str(size[2]),"--exhaustiveness", str(exhaustiveness),"--num_modes", str(num_modes),"--cpu", str(cpu_threads),"--out", str(docked_pdbqt),]97 unmodified lineswith st.sidebar:st.header("Run settings")exhaustiveness = st.slider("Exhaustiveness", 1, 24, 4, 1)num_modes = st.slider("Number of poses", 1, 10, 3, 1)prep_timeout = st.number_input("Preparation timeout per step (seconds)", min_value=60, max_value=1800, value=240, step=60)vina_timeout = st.number_input("Vina timeout per ligand (seconds)", min_value=120, max_value=7200, value=480, step=120)cpu_threads = st.slider("CPU threads for Vina", 1, 8, 2, 1)st.warning("Fast/stable default: exhaustiveness 4, poses 3. For poor network, dock fewer ligands per run and download ZIP immediately.")if st.button("Clear all inputs and results"):reset_all()149 unmodified linesnum_modes=num_modes,vina_timeout=vina_timeout,prep_timeout=prep_timeout,cpu_threads=cpu_threads,)records.append(record)
qsar_core_streamlit.py+10-5