kartograf
kartograf copied to clipboard
[Branch: Expanding For Multistates] - Value Error - Setting an array with a sequence (Greedy Algorithm)
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
-> 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:
- Switch to "expanding for multistates" branch
- 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)`
-
We used for set_A following sdf file set_A.txt
-
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!