zchwang / DeepRMSD-Vina_Optimization

DeepRMSD+Vina is a computational framework that integrates ligand binding pose optimization and screening.
37 stars 10 forks source link

RuntimeError: The expanded size of the tensor #5

Closed Le-Phung-Hien closed 10 months ago

Le-Phung-Hien commented 1 year ago

Hi, trying to use DeepRMSD-Vina for my docking results. However, I keep getting error:

Screenshot (237)

` Start Now ... Receptor: samples/receptor.pdbqt Poses: samples/Poses Receptor parsed Traceback (most recent call last): File "/mnt/d/DeepRMSD-Vina_Optimization-master/scripts/run.py", line 37, in main() File "/mnt/d/DeepRMSD-Vina_Optimization-master/scripts/run.py", line 30, in main run_optimization(rec_fpath=receptor_fpath, File "/mnt/d/DeepRMSD-Vina_Optimization-master/scripts/optimization.py", line 113, in run_optimization ligand = LigandConformation(poses_dpath) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mnt/d/DeepRMSD-Vina_Optimization-master/scripts/conformation_to_xyz.py", line 17, in init self.parse_ligand() File "/mnt/d/DeepRMSD-Vina_Optimization-master/scripts/parse_ligand.py", line 71, in parse_ligand self._get_xyz(num+1, f) File "/mnt/d/DeepRMSD-Vina_Optimization-master/scripts/parse_ligand.py", line 121, in _get_xyz self.lig_all_atoms_xyz[num] = all_xyz


RuntimeError: The expanded size of the tensor (24) must match the existing size (36) at non-singleton dimension 0.  Target sizes: [24, 3].  Tensor sizes: [36, 3]`

This is the samples folder I used to test:

[samples.zip](https://github.com/zchwang/DeepRMSD-Vina_Optimization/files/11765490/samples.zip)

And the .dat file:

`
receptor samples/receptor.pdbqt samples/Poses
`

The .pdbqt files are generated automatically using PyRx

Thank you very much.
Le-Phung-Hien commented 1 year ago

[UPDATED] So that error show up whenever I have more than 1 ligand file in Poses folder... If I just put 1 ligand file inside it still works.

zchwang commented 1 year ago

Hi,

If there is more than one pose file in the poses directory, this error may be caused by inconsistent numbers of atoms or atomic order in different pose files. It is recommended that the pose files in the same poses directory come from the same docking algorithm, so as to ensure consistent atomic order.

Best regards

min0210 commented 3 months ago

HI, Is there any code or way to fix when multiple ligands are in the same directory?