affinity did not run
I have a huge ligand (158 C, 43 O, 46 N, 6 S). When I ran it, it gave me the affinity. I increased 1 or 2 Carbon atoms to the ligand by adding C or CC at the end of the SMILE format, and it gave me the affinity file. However, when I increased it by 3 more Carbon atoms by adding CCC at the end of the SMILE format, it did not run and gave the error below. Is it because Boltz2 has a limited number of atoms in the ligands?
/miniconda3/envs/boltz2/lib/python3.11/site-packages/pytorch_lightning/trainer/connectors/logger_connector/logger_connector.py:76: Starting from v1.9.0, tensorboardX has been removed as a dependency of the pytorch_lightn> Running structure prediction for 1 input. /miniconda3/envs/boltz2/lib/python3.11/site-packages/pytorch_lightning/utilities/migration/utils.py:56: The loaded checkpoint was produced with Lightning v2.5.0.post0, which is newer than your current Lightning version: v2.> You are using a CUDA device ('NVIDIA H100 PCIe') that has Tensor Cores. To properly utilize them, you should set torch.set_float32_matmul_precision('medium' | 'high')` which will trade-off precision for performance. For more details, re>
LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0]
SLURM auto-requeueing enabled. Setting signal handlers.
^MPredicting: | | 0/? [00:00<?, ?it/s]^MPredicting: 0%| | 0/1 [00:00<?, ?it/s]^MPredicting DataLoader 0: 0%| | 0/1 [00:00<?, ?it/s]^MPredicting DataLoader 0: 100%|██████████| 1/1 [00:13<00:00, 0.07it/s]Num>
^MPredicting DataLoader 0: 100%|██████████| 1/1 [00:13<00:00, 0.07it/s]
Predicting property: affinity
Checking input data for affinity. Running affinity prediction for 1 input. /miniconda3/envs/boltz2/lib/python3.11/site-packages/pytorch_lightning/utilities/migration/utils.py:56: The loaded checkpoint was produced with Lightning v2.5.0.post0, which is newer than your current Lightning version: v2.> LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0] SLURM auto-requeueing enabled. Setting signal handlers. Traceback (most recent call last): File /miniconda3/envs/boltz2/lib/python3.11/site-packages/boltz/data/module/inferencev2.py", line 277, in getitem features = self.featurizer.process( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/miniconda3/envs/boltz2/lib/python3.11/site-packages/boltz/data/feature/featurizerv2.py", line 2260, in process atom_features = process_atom_features( ^^^^^^^^^^^^^^^^^^^^^^ File "/miniconda3/envs/boltz2/lib/python3.11/site-packages/boltz/data/feature/featurizerv2.py", line 1407, in process_atom_features t_center = torch.Tensor(disto_coords_ensemble[:, e_idx, :]) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ IndexError: too many indices for array: array is 1-dimensional, but 3 were indexed
Hi @nguyenbinhchem, thank you for pointing this out. Yes, there is a limit above which the code currently crashes, we'll work on fixing this. But in general the model should not be used for any ligand much above ~50 heavy atoms (cutoff during training), much above that, I would expect the results to be very unreliable.
Thank you very much @gcorso, for your reply. I would want to use Boltz into protein-peptide prediction, where the peptide has non-natural amino acids, and hence, I got more heavy atoms than 50.
Unfortunately, Boltz-2 has not really been trained or tested to predict affinity in this setting so I cannot really comment on its expected performance. However, we are definitely working on integrating this in future versions of the model!