ProteinDesignLab / protpardelle

Diffusion-based all-atom protein generative model.
MIT License
160 stars 14 forks source link

RuntimeError:size of tensor in conditional design #3

Open DaHenz opened 1 year ago

DaHenz commented 1 year ago

Hi, many thanks for the great and creative program. Follow the instructions, the unconditional work is smoothly finished. But the conditional design met an issue like the following: /home/sliu/anaconda3/envs/delle/bin/python draw_samples.py --input_pdb my_pdb.pdb --resample_idxs 0-25,70-80 Namespace(input_pdb='my_pdb.pdb', maxlen=60, minlen=50, model_checkpoint='checkpoints', modeldir=None, modelepoch=None, mpnnpath='checkpoints/minimpnn_state_dict.pth', num_lens=None, param=None, parampath=None, paramval=None, perlen=2, resample_idxs='0-25,70-80', steplen=5, targetdir='.', type='allatom') Warning: when sampling conditionally, the input pdb length (373 residues) is used automatically for the sampling lengths. Base directory: . Samples saved to: ./samples Model loaded from checkpoints/allatom_state_dict.pth Beginning sampling for 23-10-21-01-46-31... Traceback (most recent call last): File "draw_samples.py", line 356, in <module> main() File "draw_samples.py", line 333, in main sampling_time = draw_and_save_samples( File "draw_samples.py", line 58, in draw_and_save_samples aux = sampling.draw_allatom_samples( File "/home/sliu/Tools/protpardelle/sampling.py", line 157, in draw_allatom_samples aux = model.sample( File "/home/sliu/Tools/protpardelle/models.py", line 561, in sample gt_atom_mask = utils.atom37_mask_from_aatype(gt_aatype, seq_mask) File "/home/sliu/Tools/protpardelle/core/utils.py", line 98, in atom37_mask_from_aatype atom_mask *= seq_mask[..., None] RuntimeError: The size of tensor a (373) must match the size of tensor b (50) at non-singleton dimension 1

No matter how I change the input pdbs or the arguments, always the same error occurs. Hope anyone can help with this!

zhkim216 commented 5 months ago

Hello DaHenz, Sorry for replying late and thank you for your interest in our model! We're currently updating the code and will fix this issue soon, maybe in this week :)

satyabikash commented 3 months ago

is this issue resolved ? I'm still facing the same issue ?