Skip to content

Commit

Permalink
v1.1.0 of main script update
Browse files Browse the repository at this point in the history
  • Loading branch information
shadmehr-gh authored May 17, 2024
1 parent 25f2eda commit 3cce708
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions zinc_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def download_molecule(zinc_id, zinc_version, zinc_file_type):
if response.status_code == 200:
with open(file_path, "wb") as f:
f.write(response.content)
print(Fore.GREEN + f"Downloaded {zinc_id}.{zinc_file_type}" + Fore.RESET)
else:
print(Fore.RED + f"Failed to download {zinc_id}.{zinc_file_type}" + Fore.RESET)
except requests.exceptions.RequestException as e:
Expand Down Expand Up @@ -70,7 +69,7 @@ def zinc_merger(zinc_file_type, zinc_id_list):
except Exception as e:
print(Fore.RED + f"Error while merging {zinc_id}.{zinc_file_type}: {e}" + Fore.RESET)

print(Fore.GREEN + "All molecules merged successfully" + Fore.RESET)
print(Fore.GREEN + "All molecules merged successfully\n" + Fore.RESET)

def main():
print(Fore.BLUE + "\n****************************************************")
Expand Down Expand Up @@ -115,6 +114,8 @@ def main():
print(Fore.RED + f"Error: {e}" + Fore.RESET)

print("****************************************************\n")
print(Fore.GREEN + "Download job finished." + Fore.RESET)
print("****************************************************\n")

if merge_bool == "yes":
zinc_merger(zinc_file_type, zinc_id_list)
Expand Down

0 comments on commit 3cce708

Please sign in to comment.