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

The JSON at input/input.json was detected to be an AlphaFold 3 JSON since the top-level is not a list. #1049

Closed
liang2508 opened this issue Dec 20, 2024 · 5 comments

Comments

@liang2508
Copy link

Hi, when I run run_alphafold.py, there is an error below:

ValueError: Failed to load fold input from input/input.json. The JSON at input/input.json was detected to be an AlphaFold 3 JSON since the top-level is not a list.

Here is my json file:
input.json

It seems that there is no problem in my json file, and I don't know where is the problem. Thank you for your kind reply.

@Augustin-Zidek
Copy link
Collaborator

Hi, there are multiple problems with the input format (please refer to the input format documentation at https://github.com/google-deepmind/alphafold3/blob/main/docs/input.md):

  1. The unpairedMsa for chain A must be in the A3M format, i.e. >query\nPVLSCGEWQLMKTAYIAKQRQISFVKSHFSRQAAGLKAF and the pairedMsa must be set to "" and templates to [].
  2. The templates for chain B are invalid -- the mmCIF is not set. I recommend just setting it to [] to have that chain folded template-free, or not setting that field at all to get them filled in by the data pipeline.
  3. There are bonds between polymer entities, which AlphaFold 3 doesn't currently support.

The error with more details is actually reported above the error you posted (ValueError: Failed to load fold input from input/input.json.).

Also note that this repository is for AlphaFold 2, the right place to report issues with AlphaFold 3 is in https://github.com/google-deepmind/alphafold3/issues.

@liang2508
Copy link
Author

Thank you very much for your kind reply. Could you give me an example.json. It seems that there is still the same problem after I changed the input.json according to your reply and the documentation.

I am sorry for bothering you again and thank your for your reply.

@Augustin-Zidek
Copy link
Collaborator

I recommend trying with this one:

{
  "name": "2PV7",
  "sequences": [
    {
      "protein": {
        "id": ["A", "B"],
        "sequence": "GMRESYANENQFGFKTINSDIHKIVIVGGYGKLGGLFARYLRASGYPISILDREDWAVAESILANADVVIVSVPINLTLETIERLKPYLTENMLLADLTSVKREPLAKMLEVHTGAVLGLHPMFGADIASMAKQVVVRCDGRFPERYEWLLEQIQIWGAKIYQTNATEHDHNMTYIQALRHFSTFANGLHLSKQPINLANLLALSSPIYRLELAMIGRLFAQDAELYADIIMDKSENLAVIETLKQTYDEALTFFENNDRQGFIDAFHKVRDWFGDYSEQFLKESRQLLQQANDLKQG"
      }
    }
  ],
  "modelSeeds": [1],
  "dialect": "alphafold3",
  "version": 1
}

After running AlphaFold (you can run with --run_inference=false to run just the data pipeline), you can then inspect the 2pv7_data.json which will contain the input JSON with the unpairedMsa, pairedMsa and templates added by the data pipeline. That should provide a good example.

@liang2508
Copy link
Author

Thank you for your reply. It seems that there is new problem occur. Here is the ouput and error below:

I1229 21:17:41.418295 132230210729792 xla_bridge.py:895] Unable to initialize backend 'rocm': module 'jaxlib.xla_extension' has no attribute 'GpuAllocatorConfig'
I1229 21:17:41.419580 132230210729792 xla_bridge.py:895] Unable to initialize backend 'tpu': INTERNAL: Failed to open libtpu.so: libtpu.so: cannot open shared object file: No such file or directory
Running AlphaFold 3. Please note that standard AlphaFold 3 model parameters are
only available under terms of use provided at
https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md.
If you do not agree to these terms and are using AlphaFold 3 derived model
parameters, cancel execution of AlphaFold 3 inference with CTRL-C, and do not
use the model parameters.
Found local devices: [CudaDevice(id=0), CudaDevice(id=1), CudaDevice(id=2), CudaDevice(id=3)]
Building model from scratch...
Processing fold inputs.
I1229 21:17:41.444947 132230210729792 folding_input.py:1200] Detected input/2pv7_data.json is an AlphaFold 3 JSON since the top-level is not a list.
Processing fold input #1
Processing fold input 2PV7
Checking we can load the model parameters...
2024-12-29 21:17:42.988085: W external/xla/xla/service/gpu/nvptx_compiler.cc:930] The NVIDIA driver's CUDA version is 12.2 which is older than the PTX compiler version 12.6.85. Because the driver is older than the PTX compiler version, XLA is disabling parallel compilation, which may slow down compilation. You should update your NVIDIA driver or use the NVIDIA-provided CUDA forward compatibility packages.
Running data pipeline...
Processing chain A
I1229 21:17:52.579420 132230210729792 pipeline.py:81] Getting protein MSAs for sequence GMRESYANENQFGFKTINSDIHKIVIVGGYGKLGGLFARYLRASGYPISILDREDWAVAESILANADVVIVSVPINLTLETIERLKPYLTENMLLADLTSVKREPLAKMLEVHTGAVLGLHPMFGADIASMAKQVVVRCDGRFPERYEWLLEQIQIWGAKIYQTNATEHDHNMTYIQALRHFSTFANGLHLSKQPINLANLLALSSPIYRLELAMIGRLFAQDAELYADIIMDKSENLAVIETLKQTYDEALTFFENNDRQGFIDAFHKVRDWFGDYSEQFLKESRQLLQQANDLKQG
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

I am sorry for bothering you again and thank your for your reply.

@Augustin-Zidek
Copy link
Collaborator

What was the exact JSON you ran with? Also, do you have more details for the error -- could you post the full stack trace?

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