bjing2016 / alphaflow

AlphaFold Meets Flow Matching for Generating Protein Ensembles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The size of tensor a (184) must match the size of tensor b (183) at non-singleton dimension 1

cmwilson252 opened this issue · comments

I have pasted the error below. I am attempting to use the AlphaFlow MD + Template model and I am using this model + sequence:

https://alphafold.ebi.ac.uk/entry/A0A2P6NC61

predict.py 133
main()

_contextlib.py 115 decorate_context
return func(*args, **kwargs)

predict.py 119 main
prots = model.inference(batch, as_protein=True, noisy_first=args.noisy_first,

wrapper.py 374 inference
output = self.model(batch, prev_outputs=prev_outputs)

module.py 1532 _wrapped_call_impl
return self._call_impl(*args, **kwargs)

module.py 1541 _call_impl
return forward_call(*args, **kwargs)

alphafold.py 240 forward
extra_pseudo_beta = pseudo_beta_fn(batch['aatype'], batch['extra_all_atom_positions'], None)

feats.py 38 pseudo_beta_fn
pseudo_beta = torch.where(

RuntimeError:
The size of tensor a (184) must match the size of tensor b (183) at non-singleton dimension 1
[!!] 2024-05-15 16:55:47,353 Command 'source activate AlphaFlow; python alphaflow/predict.py --mode alphafold --input_csv alphaflow_input.csv --msa_dir AlphaFlow_MSA_Results --weights alphaflow/alphaflow_md_templates_base_202402.pt --samples 10 --outpdb upload/ --templates_dir alphaflow_template' returned non-zero exit status 1. (main.py:252)

This suggests that there is a mismatch between the sequence read from the template PDB file and the sequence entry in the input CSV, or the query sequence for the MSA. Could you check that these sequences are all the same length (and the same)?