kartograf icon indicating copy to clipboard operation
kartograf copied to clipboard

[Branch: Expanding For Multistates] - Value Error - Setting an array with a sequence (Greedy Algorithm)

Open Nengeldir opened this issue 5 months ago • 4 comments

Describe the bug When trying to suggest_multistate_mappings for an array of components. It automatically tries the new greedy algorithm. On two different systems, we've encountered the following bug

image

-> Setting an array element with a sequence for array a1_d.

It works if we set greedy to false.

To Reproduce Steps to reproduce the behavior:

  1. Switch to "expanding for multistates" branch
  2. Trying out the following code snippet

`from kartograf import KartografAtomMapper, SmallMoleculeComponent from rdkit import Chem

mapper = KartografAtomMapper()

ligands = [mol for mol in Chem.SDMolSupplier('set_A.sdf')] components = [SmallMoleculeComponent(mol) for mol in ligands] print(components) mapping = mapper.suggest_multistate_mapping(components, greedy=False)

import json

with open('mapping.json', 'w') as f: json.dump(mapping, f)`

  1. We used for set_A following sdf file set_A.txt

  2. Run

Expected behavior Should provide a mapping for all ligands

Desktop (please complete the following information):

  • OS: Ubuntu
  • Version: newest version of Kartograf

If I can or should provide with any further information, let me know. Thank you very much for providing such helpful modules!

Nengeldir avatar Mar 01 '24 13:03 Nengeldir