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

Error when overwriting new interactions #86

Closed
i2nico opened this issue Oct 18, 2022 · 1 comment · Fixed by #128
Closed

Error when overwriting new interactions #86

i2nico opened this issue Oct 18, 2022 · 1 comment · Fixed by #128
Labels
bug Something isn't working

Comments

@i2nico
Copy link

i2nico commented Oct 18, 2022

Hello,

I followed the instructions within the section "How-to" and tried to change some interaction parameters, however, I received an AttributeError. In particular, this one:
AttributeError: Can't get attribute 'Hydrophobic' on <module 'main' (built-in)>

As far as I understood this problem is related to: Multiprocessing example giving AttributeError

Indeed, if I create a module file and import the modified interaction classes it works. Another workaround which worked for me is to limit the amount of processes:

fp.run(universe.trajectory, lig, prot, n_jobs=1)

Edit: Might be possible that this error message is not visible in Jupyter Notebooks. In my case the error message was printed to the console.

Best wishes

@cbouy cbouy added the bug Something isn't working label Oct 22, 2022
@cbouy
Copy link
Member

cbouy commented Oct 22, 2022

Hi @i2nico and thanks for reporting the issue and sharing a workaround!

Unfortunately I don't think there's an easy fix for this, apart from using a different multiprocessing library.
In the future I have plans to make customizing interactions a bit easier (through a YAML file or a dictionary), so I might try to implement this feature in such a way that it solves the issue you've described. But I can't give any timeline or guarantee for now.

Best,
Cédric

This issue was closed.
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

Successfully merging a pull request may close this issue.

2 participants