Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Nengeldir opened this issue Mar 1, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@Nengeldir
Copy link

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!

@eruijsena
Copy link

I think this is due to an expired deprecation in numpy 1.24.

If you change your version back to 1.23.x it should work (it did for me).

@RiesBen
Copy link
Contributor

RiesBen commented Mar 27, 2024

Hi @Nengeldir , sorry I just saw your issue, is this still a problem? :)

@Nengeldir
Copy link
Author

Nengeldir commented Mar 27, 2024

Hi @RiesBen,
Thanks for your reply, well yes it works if I do not use the greedy option and/or change to a older version of numpy. :)

@RiesBen
Copy link
Contributor

RiesBen commented Mar 27, 2024

oh ok, I will try to make it work with newer numpy versions soon. :)

@RiesBen RiesBen self-assigned this Mar 27, 2024
@RiesBen RiesBen added the bug Something isn't working label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants