Skip to content

add get_ligand_network helper functionality to AlchemicalNetwork #525

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

Closed
atravitz opened this issue Apr 8, 2025 · 2 comments
Closed

add get_ligand_network helper functionality to AlchemicalNetwork #525

atravitz opened this issue Apr 8, 2025 · 2 comments

Comments

@atravitz
Copy link
Contributor

atravitz commented Apr 8, 2025

We currently have ligand_network.to_rbfe_alchemical_network() functionality, but no helper for extracting the underlying ligand network from an alchemical network.

This is currently done in some of our downstream scripts as

   edges = []
    for e in alchemical_network.edges:
        edges.append(e.mapping)

    network = LigandNetwork(edges=set(edges))

but it might be useful to add this as an AlchemicalNetwork method.

@dotsdl
Copy link
Member

dotsdl commented Apr 15, 2025

I don't believe it's always the case that an AlchemicalNetwork can translate to a LigandNetwork, as not all AlchemicalNetworks encode RBFEs between ligands. For example, it's possible to have an AlchemicalNetwork that encodes ABFEs, or protein mutations, or all of the above.

It's not clear to me what the expected behavior of this method should be given this.

@IAlibay
Copy link
Member

IAlibay commented Apr 15, 2025

Echoing @dotsdl's comment, this is a bit of a messy situation. LigandNetworks are a convenience for creating AlchemicalNetworks, but they aren't really built to roundtrip to/from AlchemicalNetworks. Indeed as @dotsdl mentions, they aren't really needed for AFEs.

The above code would just return you an empty network for an AFE because all mappings are None.

Ideally we would need to get a set of ligand nodes which we could then add to the network, but we would have to assume that the alchemical species is the ligand (which means assuming Protocol behaviour).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants