Skip to content

Commit

Permalink
try to fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Dhouioui committed Oct 11, 2024
1 parent 88f99b6 commit 1df9735
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions python-libraries/nanover-omni/src/nanover/omni/UI.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
import subprocess
import sys
# Function to check if a package is installed
def check_and_install(package):
try:
__import__(package)
except ImportError:
subprocess.check_call([sys.executable, "-m", "pip", "install", package])

# Check and install gradio
check_and_install("gradio")

import gradio as gr

imd_runner = None
def run_simulation(simulation_type, input_files, trajectory_files, state_file, verbosity, show_progression, server_name,
port, simulation_fps, frame_interval, force_interval, start_paused, include_velocities,
include_forces, record_stats, stats_file, stats_fps, record_trajectory,
Expand Down Expand Up @@ -43,11 +31,10 @@ def run_simulation(simulation_type, input_files, trajectory_files, state_file, v
:return: a string with the simulation type and settings
'''
from nanover.omni import OmniRunner
from nanover.omni.playback import PlaybackSimulation
from nanover.omni.openmm import OpenMMSimulation
from nanover.omni.record import record_from_server
imd_runner = None
from omni import OmniRunner
from playback import PlaybackSimulation
from openmm import OpenMMSimulation
from .record import record_from_server
global imd_runner

# Initialize simulation files list
Expand Down

0 comments on commit 1df9735

Please sign in to comment.