Hi everyone,
I am having trouble using a mol property value to define highlighted atoms when generating an image. Starting from the beginning, I have defined a variable highlight_atom_numbers as a tuple: >>> type(highlight_atom_numbers) >>> <class 'tuple'> And set a mol property to this value: mol.SetProp("highlight_atom_numbers",str(highlight_atom_numbers)) I then tried to create a 2D image of the molecule with the “highlight_atom_numbers” highlighted: img=Draw.MolsToGridImage( act_mols, molsPerRow=4, subImgSize=(200,200), legends=[x.GetProp("_Name") for x in act_mols], highlightAtoms=[literal_eval(x.GetProp("highlight_atom_numbers")) for x in act_mols] ) Which generates the following error message: TypeError: Boost.Python.function() got multiple values for keyword argument 'highlightAtoms' The literal_eval function should return a single tuple and not multiple values. Anyone have any ideas for getting this to work? Thanks. - Konrad PS: I have tried googling for a solution, for example: Stack Overflow: TypeError got multiple values for keyword argument and tried the suggestions there, but that did not help.
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss