boltz icon indicating copy to clipboard operation
boltz copied to clipboard

Boltz-2 affinity prediction fails when using a CCD ligand

Open tomgoddard opened this issue 7 months ago • 1 comments

The affinity.yaml example runs without errors with my Boltz 2.0.2 installation (Github SHA faa24790861edfc87dd52555d2bd8ad39a39aa85) and produces correct output but if I replace the SMILES string ligand with a CCD ligand EQT in affinity.yaml the structure prediction including the ligand works but the affinity prediction fails with hundreds of warnings

Cropper failed on affinity with error zero-size array to reduction operation minimum which has no identity. Skipping.

followed by hundreds of tracebacks ending with

RecursionError: maximum recursion depth exceeded

The full input and output is in the attached zip file. The output is in file named "output".

affinity_test2.zip

Boltz 2.0.2 was run using

boltz predict affinity.yaml --use_msa_server >& output

Here is the modified affinity.yaml file:

version: 1  # Optional, defaults to 1
sequences:
  - protein:
      id: A
      sequence: MVTPEGNVSLVDESLLVGVTDEDRAVRSAHQFYERLIGLWAPAVMEAAHELGVFAALAEAPADSGELARRLDCDARAMRVLLDALYAYDVIDRIHDTNGFRYLLSAEARECLLPGTLFSLVGKFMHDINVAWPAWRNLAEVVRHGARDTSGAESPNGIAQEDYESLVGGINFWAPPIVTTLSRKLRASGRSGDATASVLDVGCGTGLYSQLLLREFPRWTATGLDVERIATLANAQALRLGVEERFATRAGDFWRGGWGTGYDLVLFANIFHLQTPASAVRLMRHAAACLAPDGLVAVVDQIVDADREPKTPQDRFALLFAASMTNTGGGDAYTFQEYEEWFTAAGLQRIETLDTPMHRILLARRATEPSAVPEGQASENLYFQ
  - ligand:
      id: B
      ccd: EQT
properties:
  - affinity:
      binder: B

tomgoddard avatar Jun 07 '25 01:06 tomgoddard

Should be fixed in the latest release and on the main branch. Please test and let me know! Make sure to delete your current output folder.

jwohlwend avatar Jun 07 '25 05:06 jwohlwend

Thanks! I tested 3 affinity predictions with CCD ligands and all are working now.

tomgoddard avatar Jun 09 '25 20:06 tomgoddard