Skip to content

Commit

Permalink
Update for super
Browse files Browse the repository at this point in the history
  • Loading branch information
jackzzs committed Nov 25, 2023
1 parent 5e43964 commit cc938bf
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 29 deletions.
3 changes: 2 additions & 1 deletion Docking/ProgressiveDocking/activation_script.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
echo Activating virtual environment
source ~/.bashrc
conda activate app-deepdocking-gui-remote
conda activate app-deepdocking-gui-remote
module load omega
2 changes: 1 addition & 1 deletion Docking/ProgressiveDocking/phase_4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if [ $? != 0 ]; then
fi

echo "Creating simple jobs"
python simple_job_models.py -n_it $1 -time 00-04:00 -file_path $file_path/$project_name -nhp $num_hyperparameters -titr $5 -n_mol $num_molec --save_path $save_path --percent_first_mols $7 --percent_last_mols $8
python simple_job_models.py -n_it $1 -file_path $file_path/$project_name -nhp $num_hyperparameters -titr $5 -n_mol $num_molec --save_path $save_path --percent_first_mols $7 --percent_last_mols $8

# Executes all the files that were created in the simple_jobs directory
echo "Running simple jobs"
Expand Down
3 changes: 1 addition & 2 deletions Docking/ProgressiveDocking/prepare_ligands_ad.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash
#SBATCH --job-name=prepare
#SBATCH --time=04:00:00
#SBATCH --output=slurm-phase_2-%x.%j.out
#SBATCH --error=slurm-phase_2-%x.%j.err

Expand Down Expand Up @@ -31,7 +30,7 @@ cp $name'.'sdf $fld'/'
cd $fld
python $script_path'/'split_sdf.py $name'.'sdf
rm $name'.'sdf
obabel -isdf *sdf -opdbqt -m
find . -type f -name '*.sdf' | xargs -d '\n' -n 10000 -P 24 bash -c 'obabel -isdf "$@" -opdbqt -m;' command
wait $!
rm *sdf

Expand Down
22 changes: 0 additions & 22 deletions Docking/ProgressiveDocking/simple_job_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def print(*args, **kwargs):

parser = argparse.ArgumentParser()
parser.add_argument('-n_it','--iteration_no',required=True)
parser.add_argument('-time','--time',required=True)
parser.add_argument('-file_path','--file_path',required=True)
parser.add_argument('-nhp','--number_of_hyp',required=True)
parser.add_argument('-titr','--total_iterations',required=True)
Expand All @@ -49,26 +48,6 @@ def print(*args, **kwargs):
nhp = int(io_args.number_of_hyp)
titr = int(io_args.total_iterations)


# Handle the time
# We pass the min training time (4 hours usually) and lerp between the min and max times using the ratio
# current_iteration/max_iterations
time_model = io_args.time
# Initial date time
date_time = time_model
# Convert max time (20 hours) to seconds
max_seconds = 20*60*60 # 20 hours in seconds
# Convert min time to seconds
converted_seconds = datetime_string_to_seconds(date_time)
# Lerp between the the min and max seconds
lerp_seconds = int(lerp(converted_seconds, max_seconds, n_it/titr))
# Convert back to datetime
h, m, s = seconds_to_datetime(lerp_seconds)
# Format our date time
new_time = f"00-{h}:{m}"
print("Generated Time: ", new_time)


num_molec = int(io_args.number_mol)
percent_first_mols = float(io_args.percent_first_mols)
percent_last_mols = float(io_args.percent_last_mols)
Expand Down Expand Up @@ -234,7 +213,6 @@ def print(*args, **kwargs):
ref.write('#SBATCH --cpus-per-task=1\n')
ref.write('#SBATCH --job-name=phase_4\n')
ref.write('#SBATCH --mem=0 # memory per node\n')
ref.write('#SBATCH --time='+new_time+' # time (DD-HH:MM)\n')
ref.write("#SBATCH --output=slurm-phase_4-%x.%j.out\n")
ref.write("#SBATCH --error=slurm-phase_4-%x.%j.err\n")
ref.write('\n')
Expand Down
3 changes: 0 additions & 3 deletions Docking/ProgressiveDocking/simple_job_predictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
for f in glob.glob(SAVE_PATH + '/iteration_' + str(n_it) + '/simple_job_predictions/*'):
os.remove(f)

time = '0-10:30'

# temp = []
part_files = []

Expand All @@ -51,7 +49,6 @@
ref.write('#SBATCH --cpus-per-task=1\n')
ref.write('#SBATCH --job-name=phase_5\n')
ref.write('#SBATCH --mem=0 # memory per node\n')
ref.write('#SBATCH --time=' + time + ' # time (DD-HH:MM)\n')
ref.write("#SBATCH --output=slurm-phase_5-%x.%j.out\n")
ref.write("#SBATCH --error=slurm-phase_5-%x.%j.err\n")
ref.write('\n')
Expand Down

0 comments on commit cc938bf

Please sign in to comment.