forlilab / Meeko

Interfacing RDKit and AutoDock
GNU Lesser General Public License v2.1
192 stars 48 forks source link

.sdf of only clusters leads #38

Closed eneas77 closed 1 year ago

eneas77 commented 1 year ago

Hi,

After working for so long with AD4/AD-GPU, i appreciate the possibility Meeko brings of transforming the dreadful .dlg files into .sdf However, it is pretty much a dead end if the clustering information is not exported as well in some way...

A more appealing alternative would be to retrieve the sdf of only clusters leads, together with full energetic terms, cluster population and docking run number.

Hope it inspires you...

E77

diogomart commented 1 year ago

A tiny piece of this - storing some of the energies - has been implemented meanwhile. We didn't yet implement getting only the cluster leads. But I agree it is inspiring... :-)


from rdkit import Chem
import json

for mol in Chem.SDMolSupplier("docked.sdf"):
    data = json.loads(mol.GetProp("meeko"))
    print(data)

{'free_energy': -6.663, 'intermolecular_energy': -7.154, 'internal_energy': -2.099}
{'free_energy': -6.566, 'intermolecular_energy': -7.048, 'internal_energy': -2.099}
{'free_energy': -6.4, 'intermolecular_energy': -7.401, 'internal_energy': -1.566}
{'free_energy': -6.177, 'intermolecular_energy': -7.189, 'internal_energy': -1.536}
{'free_energy': -5.977, 'intermolecular_energy': -6.506, 'internal_energy': -2.001}
diogomart commented 1 year ago

Exporting an SDF of only cluster leads implemented in 27938b3b15efe3f139cd2194ce3737f2310d664d

diogomart commented 1 year ago

Forgot to expose the option in the command line script mk_export.py, option is -c or --only_cluster_leads. Commit: https://github.com/forlilab/Meeko/commit/439ebee51c83cb58595fcbf8fb8bfc5c83b98eb3