Skip to content
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

graphein.protein.edges.distance.add_distance_threshold should allow computing distance by "any to any" atomistic even with "residue" granularity set #342

Open
kamurani opened this issue Sep 13, 2023 · 0 comments

Comments

@kamurani
Copy link
Contributor

I'm wondering if there's a way to create a graph using residue granularity (i.e. coords from the alpha-carbon; applying node features per in-sequence residue of the protein etc.) but use distance threshold edges (i.e. add_distance_threshold) that do NOT use the alpha-carbon coordinates only.

I would like to create an edge between nodes (residues) if ANY of their constituent atoms are within the threshold distance of eachother.

new_edge_funcs = {"edge_construction_functions": [
    partial(
    add_distance_threshold, long_interaction_threshold=LONG_INTERACTION_THRESHOLD, threshold=NODE_DISTANCE_THRESHOLD)
]}
config = ProteinGraphConfig(
    granularity="CA",
    **new_edge_funcs,
)
# Edge construction function relies on alpha carbon coordinates alone and won't create edges between certain nodes

Is there a clean way to do this?

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

1 participant