API Documentation¶
This page details the api documentation for graphpro:
Graph Generation¶
A generator can be obtain from a specific library and return a graph generator.
- graphpro.md_analisys(u: Universe, name: str = '')[source]¶
- This helper connects MDAnalysis with Graphpro, returning a
generator that builds a graph representation from a static 3D graph structure or a trajectory.
- Parameters
u : MDAnalysis univererse name: protein name for reference
Default: empty string
Then a graph generator can be used:
- class graphpro.graphgen.ContactMap(cutoff, chain=None)[source]¶
Illustrates the spatial proximity between amino acids in a protein structure.
- class graphpro.graphgen.GraphProGenerator(ag, trajectory=None, name='')[source]¶
Graph Pro Generator
Generate both a graph or a graph colection from a structure of a trajectory.
Graph¶
The graph class is the core class of the library.
- class graphpro.graph.Graph(name: str, adjacency: array, positions: array, res_map: dict[int, dict], metadata: ProteinMetadata = None)[source]¶
Graph provides a representation of a graph and required helpers.
- communities() list[tuple[float, list[set]]][source]¶
Perform Girvan Newman communinity detection returning the list of communities. The algorithm is perform all the way until no more edges are left to be removed.
- get_node_by_resid(resid: int) int[source]¶
Returns the node number using the residue id, None if the residue id is not known
- node_attr_add(node_id: int, attribute_name: str, attribute: any)[source]¶
Adds a specific attribute to a noode in the graph
- plot(figsize: tuple[int, int] = (8, 10), communities: list[set[int]] = [], show=True) None[source]¶
Plot the graph represention in 3D using residue positions.