-
Notifications
You must be signed in to change notification settings - Fork 2
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
Alchemical ion improvements #52
Conversation
I don't think this automatically keeps the charge neutral. If i pass a system with a charge difference of 1 without specifying |
That should just be a warning that it doesn't match the specified value. Since the user hasn't set anything in this case (the default is zero) it should still create the ion. Do you not see anything else in the log, e.g. |
No, you're right, it's not automatically updating. Will debug. |
I was using the wrong variable for the charge difference in one of the conditionals. Should hopefully work now. For example, if the actual charge difference is 1 but I specify 3, then I see:
But if I don't specify anything I get:
|
Yes, it works now.
This, as far as I can tell, makes it impossible to run without an alchemical ion in systems with a charge difference, which could be an issue. |
Ah yes, I need to think of the best way of checking that the value isn't default. And the user has explicitly set it to zero. This might be tricky, since I can imagine input coming from the command-line, YAML file, etc. We'd need to make sure not to write a default value to the YAML, since if it was re-read then it would appear as having been set, etc. |
I'll also add some checks for sensible numbers for the charge difference, e.g. so that it doesn't exceed the number of water molecules. (Not that they should be doing that anyway.) |
Just defaulting to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good 👍
(I'm just finding a system to test this on locally.)