-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: How to setup the files for the example run ? #8
Comments
Hi @satvikkg, thanks! Glad the environment setup was painless. Thanks for the super clear description of what you ran! The issue is that you shouldn't make this modification:
because SLURM reads So just undo your change to the output line in
and start again. Make sure to delete the Hope that works and let me know if you have any more issues! |
So I reverted the changes I had previously done and this time I ran it in the /a3fe/a3fe/data/example_run_dir folder where I have the bound free input test.py files This is the error I got: |
Sorry this still isn't working. It looks like the issue is here:
before running Could you please:
I will then update the code to use Thanks. |
Hi, great job on the package. I had no issues in setting up the environment. I was finding it hard to execute the example test run.
Here are the steps that I followed. Please let me know how to set it up correctly.
Step 1: I created a folder/directory called as test and inside the test folder I created a new folder called as input.
Step 2: I copied the contents of a3fe/a3fe/data/example_run_dir/input into the test/input folder.
Step 3: I modified the run_somd.sh file as follows:
#!/bin/bash
SBATCH -o=somd-array-gpu-%A.%a.out # I uncommented this line and added = after -o
#SBATCH -p RTXA6000
#SBATCH -n 1
#SBATCH --time 24:00:00
#SBATCH --gres=gpu:0
Step 4: I created a test.py file in the test folder with the following code:
import a3fe as a3
calc = a3.Calculation(ensemble_size=5)
calc.setup()
calc.get_optimal_lam_vals()
calc.run(adaptive=False, runtime = 5) # Run non-adaptively for 5 ns per replicate
calc.wait()
calc.set_equilibration_time(1) # Discard the first ns of simulation time
calc.analyse()
calc.save()
Step 5: I ran the python file using python3 test.py
This is the error log:
INFO - 2024-10-25 09:50:18,779 - Calculation_0 - Found all required input files for preparation stage parameterised
INFO - 2024-10-25 09:50:18,781 - Calculation_0 - Modifying/ creating legs
INFO - 2024-10-25 09:50:18,781 - Calculation_0 - Setting up bound leg...
INFO - 2024-10-25 09:50:18,782 - Leg (type = BOUND)_1 - Found all required input files for preparation stage parameterised
INFO - 2024-10-25 09:50:18,784 - Leg (type = BOUND)_1 - Setting up leg...
INFO - 2024-10-25 09:50:18,784 - Leg (type = BOUND)_1 - Creating stage input directories...
INFO - 2024-10-25 09:50:18,785 - Leg (type = BOUND)_1 - Solvating input structure. Submitting through SLURM...
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /testrun/test.py:3 in │
│ │
│ 1 import a3fe as a3 │
│ 2 calc = a3.Calculation(ensemble_size=5) │
│ ❱ 3 calc.setup() │
│ 4 calc.get_optimal_lam_vals() │
│ 5 calc.run(adaptive=False, runtime = 5) # Run non-adaptively for 5 ns per replicate │
│ 6 calc.wait() │
│ │
│ /opt/conda/envs/a3fe/lib/python3.12/site-packages/a3fe/run/calculation.py:201 in setup │
│ │
│ 198 │ │ │ │ stream_log_level=self.stream_log_level, │
│ 199 │ │ │ ) │
│ 200 │ │ │ self.legs.append(leg) │
│ ❱ 201 │ │ │ leg.setup(configs[leg_type]) │
│ 202 │ │ │
│ 203 │ │ # Save the state │
│ 204 │ │ self.setup_complete = True │
│ │
│ /opt/conda/envs/a3fe/lib/python3.12/site-packages/a3fe/run/leg.py:229 in setup │
│ │
│ 226 │ │ if self.prep_stage == _PreparationStage.STRUCTURES_ONLY: │
│ 227 │ │ │ self.parameterise_input(slurm=cfg.slurm) │
│ 228 │ │ if self.prep_stage == _PreparationStage.PARAMETERISED: │
│ ❱ 229 │ │ │ self.solvate_input(slurm=cfg.slurm) # This also adds ions │
│ 230 │ │ if self.prep_stage == _PreparationStage.SOLVATED: │
│ 231 │ │ │ system = self.minimise_input(slurm=cfg.slurm) │
│ 232 │ │ if self.prep_stage == _PreparationStage.MINIMISED: │
│ │
│ /opt/conda/envs/a3fe/lib/python3.12/site-packages/a3fe/run/leg.py:465 in solvate_input │
│ │
│ 462 │ │ │ │ fn = _system_prep.slurm_solvate_free │
│ 463 │ │ │ else: │
│ 464 │ │ │ │ raise ValueError("Invalid leg type.") │
│ ❱ 465 │ │ │ self._run_slurm(fn, wait=True, run_dir=self.input_dir, job_name=job_name) │
│ 466 │ │ │ │
│ 467 │ │ │ # Check that the required input files have been produced, since slurm can fa │
│ 468 │ │ │ for file in _PreparationStage.SOLVATED.get_simulation_input_files( │
│ │
│ /opt/conda/envs/a3fe/lib/python3.12/site-packages/a3fe/run/leg.py:883 in _run_slurm │
│ │
│ 880 │ │ │ f"{run_dir}", │
│ 881 │ │ │ f"{run_dir}/{job_name}.sh", │
│ 882 │ │ ] # The virtual queue adds sbatch │
│ ❱ 883 │ │ slurm_file_base = _get_slurm_file_base(slurm_file) │
│ 884 │ │ job = self.virtual_queue.submit(cmd_list, slurm_file_base=slurm_file_base) │
│ 885 │ │ self._logger.info(f"Submitted job {job}") │
│ 886 │ │ self.jobs.append(job) │
│ │
│ /opt/conda/envs/a3fe/lib/python3.12/site-packages/a3fe/read/_process_slurm_files.py:37 in │
│ get_slurm_file_base │
│ │
│ 34 │ │ │ │ │ │ return _os.path.join(base_dir, slurm_pattern) │
│ 35 │ │
│ 36 │ # We haven't returned - raise an error │
│ ❱ 37 │ raise RuntimeError(f"Could not find slurm output file name in {slurm_file}") │
│ 38 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
RuntimeError: Could not find slurm output file name in /testrun/input/solvate_bound.sh
I would really appreciate if you could let me know how to use a3fe correctly. Thanks !
The text was updated successfully, but these errors were encountered: