Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken links for lingads download #3

Open
CarlosCaris opened this issue Nov 28, 2024 · 0 comments
Open

Broken links for lingads download #3

CarlosCaris opened this issue Nov 28, 2024 · 0 comments

Comments

@CarlosCaris
Copy link

In the EC_class_ligands_search_pc.ipynb there is a variable called baseUrl = "https://files.rcsb.org/ligands/download/", which is broken. Searching on the source website the new base url should be "https://files.rcsb.org/ligands/" and the construction of the download string could be as forme as follows:

baseUrl = "https://files.rcsb.org/ligands/"

for ChemID in molResultL:
    first_part_url = ChemID[0]
    second_part_url = ChemID
    cFile = f"{ChemID}_ideal.mol2"
    cFileUrl = baseUrl + first_part_url + "/" + second_part_url + "/" + cFile
    cFileLocal = "ligands/" + cFile
    response = requests.get(cFileUrl)
    with open(cFileLocal, "w+") as file:
        file.write(response.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant