Open apayne97 opened 5 months ago
I made a gist to demonstrate where the problem arises - in #692 by changing the sdf_string_to_oemol
function, I (accidentally) made it so that to_oemol()
returns None instead of returning an OEGraphMol if the ligand is empty.
If we like returning an empty OEMol
I can make Ligand.to_oemol()
or sdf_string_to_oemol
do that.
Incidentally, this is the cause of all these warnings:
Warning: OECreateInChI: InChI only supports molecules with between 1 and 1023 atoms! (note: large molecule support is experimental)
https://gist.github.com/apayne97/8d2c8a13f6045ad5da3bea13d04aa262
@hmacdope made a quickfix to have sdf_string_to_oemol
return an empty OEMol in #1001
this is a fun one, here's the error:
So a change I made in #692 to add type checking for set_SD_data: https://github.com/choderalab/asapdiscovery/blob/9f73bb2d99b60176a7b7ff754aa08fc78bdb40e9/asapdiscovery-data/asapdiscovery/data/backend/openeye.py#L855-L858
Is making a separate problem appear, which is that when we load in complexes and pass them to the
prep
object, we never actually confirm that they have ligands: https://github.com/choderalab/asapdiscovery/blob/9f73bb2d99b60176a7b7ff754aa08fc78bdb40e9/asapdiscovery-workflows/asapdiscovery/workflows/docking_workflows/cross_docking.py#L130-L156So when we try to get their
hash
in here: https://github.com/choderalab/asapdiscovery/blob/9f73bb2d99b60176a7b7ff754aa08fc78bdb40e9/asapdiscovery-modeling/asapdiscovery/modeling/protein_prep.py#L76-L80There's not actually a ligand there
Question
Complex
es to not have a Ligand (by allowing None types in the set_SD_data function) or (B) check to make sure that aComplex
actually has a ligand in it?