Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Dhouioui committed Oct 11, 2024
1 parent 1df9735 commit 19fc3f0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python-libraries/nanover-omni/src/nanover/omni/UI.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def run_simulation(simulation_type, input_files, trajectory_files, state_file, v
from omni import OmniRunner
from playback import PlaybackSimulation
from openmm import OpenMMSimulation
from .record import record_from_server
from record import record_from_server
global imd_runner

# Initialize simulation files list
Expand Down Expand Up @@ -73,7 +73,8 @@ def stop_simulation():
global imd_runner
try:
# Attempt to close the simulation runner
imd_runner.close()
if imd_runner is not None:
imd_runner.close()
except NameError as e:
return e
return "Simulation stopped!"
Expand Down Expand Up @@ -157,4 +158,4 @@ def toggle_visibility(choice):
# Launch the Gradio interface
if __name__ == "__main__":
ui = create_ui()
ui.launch()
ui.launch()

0 comments on commit 19fc3f0

Please sign in to comment.