diff --git a/functions/DAlphaBall.gcc b/functions/DAlphaBall.gcc old mode 100644 new mode 100755 diff --git a/functions/dssp b/functions/dssp old mode 100644 new mode 100755 diff --git a/install_bindcraft.sh b/install_bindcraft.sh old mode 100644 new mode 100755 index 89bc7de..4b9d92f --- a/install_bindcraft.sh +++ b/install_bindcraft.sh @@ -46,26 +46,19 @@ SECONDS=0 # set paths needed for installation and check for conda installation install_dir=$(pwd) -CONDA_BASE=$(conda info --base 2>/dev/null) || { echo -e "Error: conda is not installed or cannot be initialised."; exit 1; } -echo -e "Conda is installed at: $CONDA_BASE" +env_name="BindCraft" ### BindCraft install begin, create base environment echo -e "Installing BindCraft environment\n" -$pkg_manager create --name BindCraft python=3.10 -y || { echo -e "Error: Failed to create BindCraft conda environment"; exit 1; } -conda env list | grep -w 'BindCraft' >/dev/null 2>&1 || { echo -e "Error: Conda environment 'BindCraft' does not exist after creation."; exit 1; } - -# Load newly created BindCraft environment -echo -e "Loading BindCraft environment\n" -source ${CONDA_BASE}/bin/activate ${CONDA_BASE}/envs/BindCraft || { echo -e "Error: Failed to activate the BindCraft environment."; exit 1; } -[ "$CONDA_DEFAULT_ENV" = "BindCraft" ] || { echo -e "Error: The BindCraft environment is not active."; exit 1; } -echo -e "BindCraft environment activated at ${CONDA_BASE}/envs/BindCraft" +${pkg_manager} create --name $env_name python=3.10 -y || { echo -e "Error: Failed to create BindCraft conda environment"; exit 1; } +${pkg_manager} env list | grep -w $env_name >/dev/null 2>&1 || { echo -e "Error: Conda environment '${env_name}' does not exist after creation."; exit 1; } # install required conda packages -echo -e "Instaling conda requirements\n" +echo -e "Installing conda requirements\n" if [ -n "$cuda" ]; then - CONDA_OVERRIDE_CUDA="$cuda" $pkg_manager install pip pandas matplotlib numpy"<2.0.0" biopython scipy pdbfixer seaborn libgfortran5 tqdm jupyter ffmpeg pyrosetta fsspec py3dmol chex dm-haiku flax"<0.10.0" dm-tree joblib ml-collections immutabledict optax jaxlib=*=*cuda* jax cuda-nvcc cudnn -c conda-forge -c nvidia --channel https://conda.graylab.jhu.edu -y || { echo -e "Error: Failed to install conda packages."; exit 1; } + CONDA_OVERRIDE_CUDA="$cuda" $pkg_manager install --name ${env_name} pip pandas matplotlib numpy"<2.0.0" biopython scipy pdbfixer seaborn libgfortran5 tqdm jupyter ffmpeg pyrosetta fsspec py3dmol chex dm-haiku flax"<0.10.0" dm-tree joblib ml-collections immutabledict optax jaxlib=*=*cuda* jax cuda-nvcc cudnn -c conda-forge -c nvidia --channel https://conda.graylab.jhu.edu -y || { echo -e "Error: Failed to install conda packages."; exit 1; } else - $pkg_manager install pip pandas matplotlib numpy"<2.0.0" biopython scipy pdbfixer seaborn libgfortran5 tqdm jupyter ffmpeg pyrosetta fsspec py3dmol chex dm-haiku flax"<0.10.0" dm-tree joblib ml-collections immutabledict optax jaxlib jax cuda-nvcc cudnn -c conda-forge -c nvidia --channel https://conda.graylab.jhu.edu -y || { echo -e "Error: Failed to install conda packages."; exit 1; } + $pkg_manager install --name ${env_name} pip pandas matplotlib numpy"<2.0.0" biopython scipy pdbfixer seaborn libgfortran5 tqdm jupyter ffmpeg pyrosetta fsspec py3dmol chex dm-haiku flax"<0.10.0" dm-tree joblib ml-collections immutabledict optax jaxlib jax cuda-nvcc cudnn -c conda-forge -c nvidia --channel https://conda.graylab.jhu.edu -y || { echo -e "Error: Failed to install conda packages."; exit 1; } fi # make sure all required packages were installed @@ -74,7 +67,7 @@ missing_packages=() # Check each package for pkg in "${required_packages[@]}"; do - conda list "$pkg" | grep -w "$pkg" >/dev/null 2>&1 || missing_packages+=("$pkg") + ${pkg_manager} list --name "$env_name" | grep -w "$pkg" >/dev/null 2>&1 || missing_packages+=("$pkg") done # If any packages are missing, output error and exit @@ -86,10 +79,10 @@ if [ ${#missing_packages[@]} -ne 0 ]; then exit 1 fi -# install ColabDesign +# Install ColabDesign echo -e "Installing ColabDesign\n" -pip3 install git+https://github.com/sokrypton/ColabDesign.git --no-deps || { echo -e "Error: Failed to install ColabDesign"; exit 1; } -python -c "import colabdesign" >/dev/null 2>&1 || { echo -e "Error: colabdesign module not found after installation"; exit 1; } +$pkg_manager run --name ${env_name} pip3 install git+https://github.com/sokrypton/ColabDesign.git --no-deps || { echo -e "Error: Failed to install ColabDesign"; exit 1; } +$pkg_manager run --name ${env_name} python -c "import colabdesign" >/dev/null 2>&1 || { echo -e "Error: colabdesign module not found after installation"; exit 1; } # AlphaFold2 weights echo -e "Downloading AlphaFold2 model weights \n" @@ -128,4 +121,4 @@ t=$SECONDS echo -e "Successfully finished BindCraft installation!\n" echo -e "Activate environment using command: \"$pkg_manager activate BindCraft\"" echo -e "\n" -echo -e "Installation took $(($t / 3600)) hours, $((($t / 60) % 60)) minutes and $(($t % 60)) seconds." \ No newline at end of file +echo -e "Installation took $(($t / 3600)) hours, $((($t / 60) % 60)) minutes and $(($t % 60)) seconds."