`graphein.protein.edges.distance.add_distance_threshold` should allow computing distance by "any to any" atomistic even with "residue" granularity set #342
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
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.
Is there a clean way to do this?