Skip to content

Commit

Permalink
Merge pull request #96 from talagayev/Code_Class_movement_Setup_Sim_2
Browse files Browse the repository at this point in the history
Fix of Amber Path Errors
  • Loading branch information
talagayev authored Aug 15, 2024
2 parents b8ad678 + fd1f111 commit 2c4a16d
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions openmmdl/openmmdl_setup/openmmdlsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def configureFiles():
return showConfigureFiles()
else:
session["spLigName"] = request.form.get("spLigName", "")
FileUploader.save_uploaded_files(request)
FileUploader.save_uploaded_files(uploadedFiles, request)
elif has_files == "no":
simulation_configurator = SetupOptionsConfigurator(session)
simulation_configurator.configureDefaultAmberOptions()
Expand Down Expand Up @@ -196,22 +196,22 @@ def setAmberOptions():
if rcpType == "protRcp":
if "protFile" not in request.files or request.files["protFile"].filename == "":
showAmberOptions()
FileUploader.save_uploaded_files(request)
FileUploader.save_uploaded_files(uploadedFiles, request)
elif rcpType == "dnaRcp":
if "dnaFile" not in request.files or request.files["dnaFile"].filename == "":
showAmberOptions()
FileUploader.save_uploaded_files(request)
FileUploader.save_uploaded_files(uploadedFiles, request)
elif rcpType == "rnaRcp":
if "rnaFile" not in request.files or request.files["rnaFile"].filename == "":
showAmberOptions()
FileUploader.save_uploaded_files(request)
FileUploader.save_uploaded_files(uploadedFiles, request)
elif rcpType == "carboRcp":
if (
"carboFile" not in request.files
or request.files["carboFile"].filename == ""
):
showAmberOptions()
FileUploader.save_uploaded_files(request)
FileUploader.save_uploaded_files(uploadedFiles, request)

######## Ligand ########
session["nmLig"] = (
Expand All @@ -226,7 +226,7 @@ def setAmberOptions():
or request.files["nmLigFile"].filename == ""
):
showAmberOptions()
FileUploader.save_uploaded_files(request)
FileUploader.save_uploaded_files(uploadedFiles, request)

## for special ligand
if session["spLig"]:
Expand All @@ -239,7 +239,7 @@ def setAmberOptions():
or request.files["frcmodFile"].filename == ""
):
showAmberOptions()
FileUploader.save_uploaded_files(request)
FileUploader.save_uploaded_files(uploadedFiles, request)

######## Add Water/Membrane ########

Expand Down Expand Up @@ -483,7 +483,9 @@ def showSimulationOptions():
Renders the page for setting simulation options based on the file type.
"""
file_type = session.get("fileType", "")

simulation_configurator = SetupOptionsConfigurator(session)
simulation_configurator.configure_default_options()

# render buttons based on the fileType
if file_type == "pdb":
return render_template(
Expand Down

0 comments on commit 2c4a16d

Please sign in to comment.