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

Closed
CarlosCaris opened this issue Nov 28, 2024 · 2 comments
Closed

Broken links for lingads download #3

CarlosCaris opened this issue Nov 28, 2024 · 2 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)
@janash
Copy link
Owner

janash commented Dec 30, 2024

Hi @CarlosCaris -
Thank you for filing this issue!

Taking a look at this, it actually seems to me that the mol2 file format is no longer supported.

This is the original URL: https://files.rcsb.org/ligands/download/11U_ideal.mol2

Checking the documentation page (https://www.rcsb.org/docs/programmatic-access/file-download-services) - it seems that /download will still work in the URL, but the file extension must be changed to SDF

https://files.rcsb.org/ligands/download/11U_ideal.mol2

I tried removing /download as you suggest, but also got a 404 for that.

@janash
Copy link
Owner

janash commented Dec 30, 2024

Closed by #4

@janash janash closed this as completed Dec 30, 2024
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

2 participants