Closed weitinging closed 6 months ago
The size "21" seems like the prob of 21 amino acids, see https://github.com/chq1155/ProteinMPNN/blob/2d2bccc7301d1369d95e53fd6d0d77c03dd785b3/protein_mpnn_utils.py#L1113C27-L1113C30. I guess you have received the wrong return value.
Sorry for my mistake, and now I could successfully construct structure embeddings. Thank you for your reply.
I'm getting the following RuntimeError when trying to run 'python structure_embeddings/preprocess.py'.
Traceback (most recent call last): File "structure_embeddings/preprocess.py", line 316, in <module> write_pyd() File "structure_embeddings/preprocess.py", line 312, in write_pyd record = process_mpnn_embedding_fn(record) File "structure_embeddings/preprocess.py", line 167, in process_mpnn_embedding_fn sample["mpnn_emb"] = mpnn_emb1.view(-1, 1152).cpu() RuntimeError: shape '[-1, 1152]' is invalid for input of size 49896
The issue seems to stem from the dimensions of
mpnn_emb1
. For the fileFast-PETase.pdb
, the dimension ofmpnn_emb11
is torch.Size([1, 264, 21]).mpnn_emb1
concatenates the output of 9 models, resulting in a dimension of torch.Size([1, 264, 189]). The error arises when executingsample["mpnn_emb"] = mpnn_emb1.view(-1, 1152).cpu()
, as the dimension is not an integral multiple of 1152.