utilities
Utilities for the PDB2PQR software suite.
Code author: Todd Dolinsky
Code author: Yong Huang
Code author: Nathan Baker
- pdb2pqr.utilities.analyze_connectivity(map_, key)[source]
Analyze the connectivity of a given map using the key value.
- pdb2pqr.utilities.angle(coords1, coords2, coords3)[source]
Get the angle between three coordinates.
- pdb2pqr.utilities.cross(coords1, coords2)[source]
Find the cross-product of one 3-dimensional point with another.
- pdb2pqr.utilities.dihedral(coords1, coords2, coords3, coords4)[source]
Calculate the dihedral angle from four atoms’ coordinates.
- Parameters:
- Returns:
the angle (in degrees)
- Return type:
- pdb2pqr.utilities.distance(coords1, coords2)[source]
Calculate the distance between two coordinates.
- pdb2pqr.utilities.dot(coords1, coords2)[source]
Find the dot-product of one 3-dimensional point with another.
- pdb2pqr.utilities.noninteger_charge(charge, error_tol=0.001) str [source]
Test whether a charge is an integer.
- pdb2pqr.utilities.shortest_path(graph, start, end, path=[])[source]
Find the shortest path between two nodes.
Uses recursion to find the shortest path from one node to another in an unweighted graph. Adapted from http://www.python.org/doc/essays/graphs.html
- Parameters:
graph (dict) – a mapping of the graph to analyze, of the form {0: [1,2], 1:[3,4], …} . Each key has a list of edges.
start (str) – the ID of the key to start the analysis from
end (str) – the ID of the key to end the analysis
path (list) – optional argument used during the recursive step to keep the current path up to that point
- Returns:
list of the shortest path or
None
if start and end are not connected- Return type: