bjing2016 / alphaflow

AlphaFold Meets Flow Matching for Generating Protein Ensembles
MIT License
343 stars 46 forks source link

TypeError: __init__() missing 2 required positional arguments: 'opm_first' and 'fuse_projection_weights' #2

Closed BLEACH366 closed 7 months ago

BLEACH366 commented 7 months ago

Hello,I put weights, csv and a3m in folders (Especially, a3m in /cluster/home/xxx/alphaflow/splits/6DS0_A/a3m/6DS0_A.a3m), and run following code:

python predict.py --mode alphafold --input_csv /cluster/home/xxx/alphaflow/splits/6DS0_test.csv --msa_dir /cluster/home/xxx/alphaflow/splits --weights /cluster/home/xxx/alphaflow/splits/alphaflow_pdb_base_202402.pt --samples 200 --outpdb /cluster/home/xxx/alphaflow/splits/output --self_cond --resample

then I meet the error:

2024-02-22 13:45:48,506 [node83:61063] [INFO] Loading the model
Traceback (most recent call last):
  File "/cluster/home/xxx/alphaflow/predict.py", line 132, in <module>
    main()
  File "/cluster/home/xxx/.conda/envs/alphaflow/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "/cluster/home/xxx/alphaflow/predict.py", line 78, in main
    model = model_class(**ckpt['hyper_parameters'], training=False)
  File "/cluster/home/xxx/alphaflow/alphaflow/model/wrapper.py", line 496, in __init__
    self.model = AlphaFold(config,
  File "/cluster/home/xxx/alphaflow/alphaflow/model/alphafold.py", line 73, in __init__
    self.extra_msa_stack = ExtraMSAStack(
TypeError: __init__() missing 2 required positional arguments: 'opm_first' and 'fuse_projection_weights'

Could you offer me some help to solve it? Thanks.

bjing2016 commented 7 months ago

This looks like an OpenFold version mismatch --- did you install OpenFold with the command provided in the README, or some other way?

BLEACH366 commented 7 months ago

Yes, I did it as in the README:

pip install 'openfold @ git+https://github.com/aqlaboratory/openfold.git@5484c38'

and get openfold 2.0.0, is this version right?

bjing2016 commented 7 months ago

Ah, the commit is wrong; it should be pip install 'openfold @ git+https://github.com/aqlaboratory/openfold.git@103d037' The README has been updated.

BLEACH366 commented 7 months ago

Ok, I change the openfold version and it works. Thanks