From 3848a338d7a67b2fbd3ad95719432d136d42d24c Mon Sep 17 00:00:00 2001 From: s8weber Date: Sun, 27 Oct 2024 13:13:58 -0400 Subject: [PATCH 1/2] - fix dockerfile to a versioned miniconda and python version - bump rdkit version to resolve undefined symbol _ZN5boost9iostreams4zlib8deflatedE - add some missing params to docker example json - add example docker json with multithreading enabled --- docker/Dockerfile | 42 +++++++------------ .../examples/sample_autogrow_docker_json.json | 10 ++++- ...e_autogrow_docker_json_multithreading.json | 40 ++++++++++++++++++ 3 files changed, 64 insertions(+), 28 deletions(-) create mode 100755 docker/examples/sample_autogrow_docker_json_multithreading.json diff --git a/docker/Dockerfile b/docker/Dockerfile index 008dea7b..975a1348 100755 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -4,42 +4,33 @@ FROM ubuntu:18.04 MAINTAINER Jacob Durrant # Install programs through apt-get -RUN apt-get -yqq update -RUN apt-get -fyqq install -RUN apt-get -yqq install wget -RUN apt-get -yqq update -RUN apt-get -yqq install openbabel -RUN apt-get -yqq install zip -# RUN apt-get -yqq install git +RUN apt update +RUN apt -y install wget openbabel zip bzip2 -# Install python -RUN apt-get -yqq install bzip2 -RUN wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -RUN chmod -R a+rwx Miniconda3-latest-Linux-x86_64.sh -RUN ./Miniconda3-latest-Linux-x86_64.sh -b -RUN rm ./Miniconda3-latest-Linux-x86_64.sh +# Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py38_23.11.0-2-Linux-x86_64.sh +RUN chmod -R a+rwx Miniconda3-py38_23.11.0-2-Linux-x86_64.sh +RUN ./Miniconda3-py38_23.11.0-2-Linux-x86_64.sh -b RUN echo "alias python=/root/miniconda3/bin/python" >> /root/.bashrc RUN echo "alias conda=/root/miniconda3/bin/conda" >> /root/.bashrc RUN echo "alias pip=/root/miniconda3/bin/pip" >> /root/.bashrc - # Get python dependencies -RUN /root/miniconda3/bin/conda install -y -c conda-forge rdkit rdkit=2020.03.1 -RUN /root/miniconda3/bin/conda install -y numpy numpy=1.18.1 -RUN /root/miniconda3/bin/conda install -y scipy scipy=1.4.1 +#RUN /root/miniconda3/bin/conda install -y -c conda-forge rdkit rdkit=2020.03.1 +RUN /root/miniconda3/bin/conda install -y -c conda-forge rdkit=2020.09.4 +RUN /root/miniconda3/bin/conda install -y numpy=1.18.1 scipy=1.4.1 RUN /root/miniconda3/bin/pip install matplotlib==3.2.1 RUN /root/miniconda3/bin/pip install func_timeout==4.3.5 -# Install mgltools -RUN wget http://mgltools.scripps.edu/downloads/downloads/tars/releases/REL1.5.6/mgltools_x86_64Linux2_1.5.6.tar.gz +# Install mgltools source: http://mgltools.scripps.edu +RUN wget https://ccsb.scripps.edu/download/548/ -O ./mgltools_x86_64Linux2_1.5.6.tar.gz RUN tar xvfz *.tar.gz RUN rm *.tar.gz -RUN cd /mgltool*/ && \ - ./install.sh -# RUN echo "alias python=/mgltools*/bin/pythonsh" >> /root/.bashrc +# NOTE: autogrow_in_docker.py is hardcoded to /mgltools_x86_64Linux2_1.5.6 +RUN cd /mgltools_x86_64Linux2_1.5.6 && ./install.sh -# Copy over autogrow files -RUN mkdir /autogrow4/ +# Copy over autogrow source files +RUN mkdir -p /autogrow4 ADD ./autogrow4 /autogrow4 # Copy over User files for AutoGrow Run @@ -55,7 +46,6 @@ RUN chmod -R a+rwx /autogrow/run_autogrow_in_container_windows.bash # Make directories for mounted host file systems RUN mkdir /Outputfolder - RUN ls autogrow4 ENTRYPOINT ["bash", "/autogrow/run_autogrow_in_container.bash"] @@ -63,4 +53,4 @@ ENTRYPOINT ["bash", "/autogrow/run_autogrow_in_container.bash"] # ENTRYPOINT ["bash", "/autogrow/run_autogrow_in_container_windows.bash"] -# ENTRYPOINT ["bash"] \ No newline at end of file +# ENTRYPOINT ["bash"] diff --git a/docker/examples/sample_autogrow_docker_json.json b/docker/examples/sample_autogrow_docker_json.json index e55424c6..178f7ee4 100755 --- a/docker/examples/sample_autogrow_docker_json.json +++ b/docker/examples/sample_autogrow_docker_json.json @@ -30,5 +30,11 @@ "scoring_choice": "VINA", "dock_choice": "QuickVina2Docking", "debug_mode": false, - "rxn_library": "all_rxns" -} \ No newline at end of file + "rxn_library": "all_rxns", + "conversion_choice": "MGLToolsConversion", + "prepare_ligand4.py": "", + "prepare_receptor4.py": "", + "mgl_python": "", + "multithread_mode": "serial", + "number_of_processors": 1 +} diff --git a/docker/examples/sample_autogrow_docker_json_multithreading.json b/docker/examples/sample_autogrow_docker_json_multithreading.json new file mode 100755 index 00000000..2319b104 --- /dev/null +++ b/docker/examples/sample_autogrow_docker_json_multithreading.json @@ -0,0 +1,40 @@ +{ + "filename_of_receptor": "../tutorial/PARP/4r6eA_PARP1_prepared.pdb", + "center_x": -70.76, + "center_y": 21.82, + "center_z": 28.33, + "size_x": 25.0, + "size_y": 16.0, + "size_z": 25.0, + "source_compound_file": "../source_compounds/naphthalene_smiles.smi", + "root_output_folder": "./Outputfolder/", + "number_of_mutants_first_generation": 10, + "number_of_crossovers_first_generation": 10, + "number_of_mutants": 10, + "number_of_crossovers": 10, + "number_elitism_advance_from_previous_gen": 10, + "top_mols_to_seed_next_generation": 7, + "diversity_mols_to_seed_first_generation": 7, + "diversity_seed_depreciation_per_gen": 0, + "num_generations": 3, + "number_of_processors": -1, + "selector_choice": "Rank_Selector", + "max_variants_per_compound": 1, + "filter_source_compounds": false, + "use_docked_source_compounds": false, + "LipinskiLenientFilter": true, + "docking_exhaustiveness": 1, + "start_a_new_run": true, + "generate_plot": true, + "rescore_lig_efficiency": true, + "scoring_choice": "VINA", + "dock_choice": "QuickVina2Docking", + "debug_mode": false, + "rxn_library": "all_rxns", + "conversion_choice": "MGLToolsConversion", + "prepare_ligand4.py": "", + "prepare_receptor4.py": "", + "mgl_python": "", + "multithread_mode": "multithreading", + "number_of_processors": 8 +} From b4096f83c723fbec71be4be4837762f63646d4bc Mon Sep 17 00:00:00 2001 From: s8weber Date: Wed, 30 Oct 2024 15:59:11 -0400 Subject: [PATCH 2/2] prevent fails if params missing --- autogrow/config/config_mgltools.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autogrow/config/config_mgltools.py b/autogrow/config/config_mgltools.py index 2900433d..b9081c51 100644 --- a/autogrow/config/config_mgltools.py +++ b/autogrow/config/config_mgltools.py @@ -6,7 +6,7 @@ def config_mgltools(params: dict): return # find other mgltools-related scripts - if params["prepare_ligand4.py"] == "": + if params.get("prepare_ligand4.py", "") == "": params["prepare_ligand4.py"] = ( params["mgltools_directory"] + "MGLToolsPckgs" @@ -17,7 +17,7 @@ def config_mgltools(params: dict): + os.sep + "prepare_ligand4.py" ) - if params["prepare_receptor4.py"] == "": + if params.get("prepare_receptor4.py", "") == "": params["prepare_receptor4.py"] = ( params["mgltools_directory"] + "MGLToolsPckgs" @@ -28,7 +28,7 @@ def config_mgltools(params: dict): + os.sep + "prepare_receptor4.py" ) - if params["mgl_python"] == "": + if params.get("mgl_python", "") == "": params["mgl_python"] = ( params["mgltools_directory"] + "bin" + os.sep + "pythonsh" - ) \ No newline at end of file + )