Open IAlibay opened 2 months ago
Some thoughts after going through the SetupUnit
code. We should probably rename this issue accordingly, more in terms of refactoring the SetupUnit to work for different protocols.
Ideally we would benefit from having reusable units and components in the protocols that can be shared between protocols that have some kind of similarity. It should be possible for the protein mutation protocol to share the setup unit with the current nonequilibrium cycling protocol. This involves a set of changes, from a first look at the code:
ProteinMapping
instead of relying onLigandAtomMapping
. Alternatively, maybe we should consider using a more general mapping for both? openmmforcefields
objects doesn't really support this. I don't think we can afford changing openmmforcefields
API. So we would probably need to write some utility functionality to deal with this.After discussion with @IAlibay , some things are clearer now.
* Related to the previous issue. Infer alchemical components from mapping. I believe it should be possible to get the alchemical components from the mapping objects, without having to know if we want to transform a specific type of component, I think the mapping already has that information.
This was done this way to support the absolute FE protocol, which wouldn't have mappings at all. We should use the readily available get_alchemical_components
from the openfe
system creation module.
* I think we need a way to somehow map between resids in topology with components, such that it is easy to extract resids from alchemical components and/or mappings.
This was an oversight on my part, we already have that from the comp_resids
dictionary in the current setup unit.
Currently this will only work for small molecules.