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

Chain Index returns NoneType #41

Open
JoshuaEPSamuel opened this issue Dec 6, 2024 · 0 comments
Open

Chain Index returns NoneType #41

JoshuaEPSamuel opened this issue Dec 6, 2024 · 0 comments

Comments

@JoshuaEPSamuel
Copy link

I've been trying to run a test using the esmflow_md_templates_base_202402 model, but it is having issues writing the output to a PDB. This has been the case whether I run the splits/atlast_test.csv or my own test input. Seems to be an issue in the Openfold library

Traceback (most recent call last):
  File "/home/josh/github_repos/alphaflow/predict.py", line 133, in <module>
    main()
  File "/home/josh/miniconda3/envs/openfold_env/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "/home/josh/github_repos/alphaflow/predict.py", line 127, in main
    f.write(protein.prots_to_pdb(result))
  File "/home/josh/github_repos/alphaflow/alphaflow/utils/protein.py", line 163, in prots_to_pdb
    prot = to_pdb(prot)
  File "/home/josh/github_repos/alphaflow/openfold/np/protein.py", line 341, in to_pdb
    chain_index = prot.chain_index.astype(np.int32)
AttributeError: 'NoneType' object has no attribute 'astype'

Here it seems to show that the chain_index attribute in the Protein class is Optional and can be None:
https://github.com/aqlaboratory/openfold/blob/23cf2f6107bf5753cfb12ce05895d66f2135d9cd/openfold/np/protein.py#L68C1-L69C45

However, most of the lines calling chain_index in the function to_pdb() break if chain_index does not exist/is None

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