Skip to content

Commit

Permalink
Merge pull request #202 from timodonnell/setup-tweaks
Browse files Browse the repository at this point in the history
Minor fixes in setup scripts
  • Loading branch information
gahdritz committed Aug 12, 2022
2 parents 7ea9c9e + 19bce21 commit 4d513bb
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ python3 run_pretrained_openfold.py \
--jackhmmer_binary_path lib/conda/envs/openfold_venv/bin/jackhmmer \
--hhblits_binary_path lib/conda/envs/openfold_venv/bin/hhblits \
--hhsearch_binary_path lib/conda/envs/openfold_venv/bin/hhsearch \
--kalign_binary_path lib/conda/envs/openfold_venv/bin/kalign
--config_preset "model_1_ptm"
--kalign_binary_path lib/conda/envs/openfold_venv/bin/kalign \
--config_preset "model_1_ptm" \
--openfold_checkpoint_path openfold/resources/openfold_params/finetuning_ptm_2.pt
```

Expand Down
6 changes: 3 additions & 3 deletions openfold/np/residue_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -1121,10 +1121,10 @@ def _make_rigid_transformation_4x4(ex, ey, translation):
# and an array with (restype, atomtype, coord) for the atom positions
# and compute affine transformation matrices (4,4) from one rigid group to the
# previous group
restype_atom37_to_rigid_group = np.zeros([21, 37], dtype=np.int)
restype_atom37_to_rigid_group = np.zeros([21, 37], dtype=int)
restype_atom37_mask = np.zeros([21, 37], dtype=np.float32)
restype_atom37_rigid_group_positions = np.zeros([21, 37, 3], dtype=np.float32)
restype_atom14_to_rigid_group = np.zeros([21, 14], dtype=np.int)
restype_atom14_to_rigid_group = np.zeros([21, 14], dtype=int)
restype_atom14_mask = np.zeros([21, 14], dtype=np.float32)
restype_atom14_rigid_group_positions = np.zeros([21, 14, 3], dtype=np.float32)
restype_rigid_group_default_frame = np.zeros([21, 8, 4, 4], dtype=np.float32)
Expand Down Expand Up @@ -1280,7 +1280,7 @@ def make_atom14_dists_bounds(

restype_atom14_ambiguous_atoms = np.zeros((21, 14), dtype=np.float32)
restype_atom14_ambiguous_atoms_swap_idx = np.tile(
np.arange(14, dtype=np.int), (21, 1)
np.arange(14, dtype=int), (21, 1)
)


Expand Down
2 changes: 1 addition & 1 deletion scripts/download_colabfold_envdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ SOURCE_URL="http://wwwuser.gwdg.de/~compbiol/colabfold/colabfold_envdb_202108.ta
BASENAME=$(basename "${SOURCE_URL}")

mkdir --parents "${ROOT_DIR}"
aria2c "${SOURCE_URL}" --dir="${ROOT_DIR}" -x 4
aria2c "${SOURCE_URL}" --dir="${ROOT_DIR}" -x 4 --check-certificate=false
2 changes: 1 addition & 1 deletion scripts/download_pdb70.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ SOURCE_URL="http://wwwuser.gwdg.de/~compbiol/data/hhsuite/databases/hhsuite_dbs/
BASENAME=$(basename "${SOURCE_URL}")

mkdir --parents "${ROOT_DIR}"
aria2c "${SOURCE_URL}" --dir="${ROOT_DIR}"
aria2c "${SOURCE_URL}" --dir="${ROOT_DIR}" --check-certificate=false
tar --extract --verbose --file="${ROOT_DIR}/${BASENAME}" \
--directory="${ROOT_DIR}"
rm "${ROOT_DIR}/${BASENAME}"
3 changes: 2 additions & 1 deletion scripts/download_uniref30.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ SOURCE_URL="http://wwwuser.gwdg.de/~compbiol/colabfold/uniref30_2103.tar.gz"
BASENAME=$(basename "${SOURCE_URL}")

mkdir --parents "${ROOT_DIR}"
aria2c "${SOURCE_URL}" --dir="${ROOT_DIR}" -x 4
aria2c "${SOURCE_URL}" --dir="${ROOT_DIR}" -x 4 --check-certificate=false
gunzip "${ROOT_DIR}/${BASENAME}"
2 changes: 1 addition & 1 deletion scripts/install_third_party_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pushd lib/conda/envs/$ENV_NAME/lib/python3.7/site-packages/ \
&& popd

# Download folding resources
wget -q -P openfold/resources \
wget --no-check-certificate -P openfold/resources \
https://git.scicore.unibas.ch/schwede/openstructure/-/raw/7102c63615b64735c4941278d92b554ec94415f8/modules/mol/alg/src/stereo_chemical_props.txt

# Certain tests need access to this file
Expand Down
7 changes: 5 additions & 2 deletions scripts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,16 @@ def get_nvidia_cc():
result = cuda.cuInit(0)
if result != CUDA_SUCCESS:
cuda.cuGetErrorString(result, ctypes.byref(error_str))
return None, error_str.value.decode()
if error_str.value:
return None, error_str.value.decode()
else:
return None, "Unknown error: cuInit returned %d" % result
result = cuda.cuDeviceGetCount(ctypes.byref(nGpus))
if result != CUDA_SUCCESS:
cuda.cuGetErrorString(result, ctypes.byref(error_str))
return None, error_str.value.decode()

if(nGpus.value < 1):
if nGpus.value < 1:
return None, "No GPUs detected"

result = cuda.cuDeviceGet(ctypes.byref(device), 0)
Expand Down

0 comments on commit 4d513bb

Please sign in to comment.