openfe
openfe copied to clipboard
move get components functionality?
Currently we have the get_components functionality in the openmm_utils [sub]package. But it seems that this functionality is not really related to openmm. Rather, it is related to gufe, as far as I can tell.
I think it could be something that gufe could provide, see https://github.com/OpenFreeEnergy/gufe/issues/251
But in any case, it doesn't seem like something that should be in the openmm_utils space.
Yeah it's a bit of an odd one - the way get_components currently work is very Protocol specific (particularly the expectation that ProteinComponent is a single component).
I think there's a distinction we have to make with some of the tooling in openmm_utils where it's not all "this is there because it's needed to set up an openmm system" but "this is there because it's a re-usable method that is shared between several openmm-using protocols".
Maybe there should be some kind of "protocol_utils" module instead?
The problem with generalising a function like this is the more it is shared the less flexible it becomes. It's a 10 line function, that doesn't really do anything complicated, I think it's fine for that to get duplicated.
I agree, it's not a very complicated function and not much of a concern to be deduplicated. But it's convenient and I expect most (if not all) protocols to use this functionality at some point. The convenience to have it in something like gufe is that we could rely on it and not have to manually track upstream changes (i.e. if the ChemicalSystem or its components changes), for every protocol.