forlilab / Meeko

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

mk_export embeds information in string #138

Open mattholc opened 1 month ago

mattholc commented 1 month ago

If you create a mol from an sdf generated by mk_export, it has only the property 'meeko' which contains a dictionary of docking information ('is_sidechain', 'free_energy', etc) formatted as a string. It would be preferable to expose direct access to the properties through rdkit molprops.

mol.GetProp('meeko') '{"is_sidechain": [false], "free_energy": -8.3, "intermolecular_energy": -12.48, "internal_energy": -8.1, "cluster_size": 13, "cluster_id": 4, "rank_in_cluster": 1}'

type(mol.GetProp('meeko')) <class 'str'>

diogomart commented 1 month ago

I think the only reason to wrap the data in a json str was to prevent future name collisions. We might have a mixture of energies in the future from QM, scrubber, pka prediction, and so on. Could also use the name of the property to that end. Not sure if one way is better than the other. Currently, you can pass that string to json.loads() to get the dict.