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

Fix total charge #38

Merged
merged 4 commits into from
Nov 18, 2024
Merged

Fix total charge #38

merged 4 commits into from
Nov 18, 2024

Conversation

lohedges
Copy link
Contributor

This PR supersedes #37, implementing the fix in a way that doesn't break the API and works with both the sander and OpenMM interfaces. The user can now specify the charge of the QM region using the qm_charge kwarg via the constructor of an EMLE model, or via the forward method at runtime. Within the forward method the non-default value will be used, meaning that the user can set once via the constructor and leave the forward kwarg unset (OpenMM interface) or leave the constructor value unset and use the forward method kwarg at runtime (sander interface). I've also reworked the code to make it compatible with TorchScript, i.e. adding type hints to the forward methods so that it knows qm_charge is an int.

@lohedges lohedges requested a review from kzinovjev November 18, 2024 10:23
@lohedges lohedges added the bug Something isn't working label Nov 18, 2024
@lohedges lohedges merged commit 1268c7f into main Nov 18, 2024
5 checks passed
@lohedges lohedges deleted the fix_total_charge branch November 18, 2024 11:54
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 this pull request may close these issues.

2 participants