You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_modify_forces reads as if nobody's ever used it with a different barostat. I suppose other barostats may have different function signatures so there's more bookkeeping needed to replace this line
I don't think it's strictly needed, I read it as if we don't pass a barostat instance to the SystemGenerator initializer then it wouldn't add a barostat. That probably means that you need to add the barostat yourself after instantiating it and creating the system. Maybe that's the workaround.
That said, I think it would be convenient for the method to accept different classes/types of barostats there.
Activity
mattwthompson commentedon Oct 20, 2025
_modify_forcesreads as if nobody's ever used it with a different barostat. I suppose other barostats may have different function signatures so there's more bookkeeping needed to replace this lineopenmmforcefields/openmmforcefields/generators/system_generators.py
Line 324 in 839f225
with something like
barostat = self.barostat.__class__(*args)but that shouldn't be too hard?(Why do we need to remake a new barostat instance here, anyway?)
hannahbaumann commentedon Oct 20, 2025
I'm also not sure why we need to remake the barostat here. If it's not necessary, that would of course be easiest!
I wonder if something like this could work?
ijpulidos commentedon Oct 21, 2025
I don't think it's strictly needed, I read it as if we don't pass a barostat instance to the
SystemGeneratorinitializer then it wouldn't add a barostat. That probably means that you need to add the barostat yourself after instantiating it and creating the system. Maybe that's the workaround.That said, I think it would be convenient for the method to accept different classes/types of barostats there.
mattwthompson commentedon Nov 7, 2025
Assuming we can close this as the PR is merged