diff --git a/setup_databases.sh b/setup_databases.sh index 7c4e8256..40c71a6f 100755 --- a/setup_databases.sh +++ b/setup_databases.sh @@ -26,6 +26,11 @@ fi downloadFile() { URL="$1" OUTPUT="$2" + # Check if the file already exists and is greater than 0 bytes (to avoid using partially downloaded files) + if [ -s "$OUTPUT" ]; then + echo "$OUTPUT exists and is not empty. Skipping download." + return 0 + fi set +e for i in $STRATEGY; do case "$i" in @@ -46,6 +51,7 @@ downloadFile() { fail "Could not download $URL to $OUTPUT" } + # Make MMseqs2 merge the databases to avoid spamming the folder with files export MMSEQS_FORCE_MERGE=1 @@ -98,4 +104,4 @@ if [ ! -f PDB_MMCIF_READY ]; then rsync -rlpt -v -z --delete --port=${PDB_PORT} ${PDB_SERVER}/data/structures/divided/mmCIF/ pdb/divided rsync -rlpt -v -z --delete --port=${PDB_PORT} ${PDB_SERVER}/data/structures/obsolete/mmCIF/ pdb/obsolete touch PDB_MMCIF_READY -fi \ No newline at end of file +fi