This skill covers geometric calculations on protein structures: measuring distances, angles, and dihedrals; finding neighbor atoms; superimposing structures; calculating RMSD; and computing solvent accessible surface area (SASA).
pip install biopython numpyTell your AI agent what you want to do:
- "Measure the distance between residue 50 CA and residue 100 CA"
- "Calculate the RMSD between these two structures"
- "Find all residues within 5 Angstroms of the ligand"
"What is the distance between these two atoms?"
"Create a CA-CA distance matrix for chain A"
"Find the closest residue to the ligand"
"Calculate the phi/psi angles for all residues"
"What is the N-CA-C bond angle in residue 42?"
"Calculate chi1 angles for all aromatic residues"
"Superimpose these two structures and calculate RMSD"
"Align the mobile structure onto the reference"
"What is the RMSD between these NMR models?"
"Find all atoms within 4A of the active site"
"List residue contacts within the protein"
"Which residues are in contact with chain B?"
"Calculate the solvent accessible surface area"
"Which residues are buried vs exposed?"
"What is the SASA of chain A?"
- Parse structure files
- Extract requested atoms/coordinates
- Perform geometric calculations
- For superimposition: find optimal rotation/translation
- Return measurements with appropriate units
| Function | Purpose |
|---|---|
atom1 - atom2 |
Distance between atoms |
calc_angle() |
Angle between 3 atoms |
calc_dihedral() |
Dihedral angle (4 atoms) |
NeighborSearch |
Find atoms within radius |
Superimposer |
Structural alignment + RMSD |
CEAligner |
Align dissimilar structures |
ShrakeRupley |
Solvent accessible surface area |
- Atom subtraction returns distance directly:
distance = atom1 - atom2 - Use
get_vector()for angle/dihedral calculations, notcoord - NeighborSearch levels: A=atom, R=residue, C=chain for contact finding
- Superimposer requires equal-length atom lists
- CEAligner works for structures with different sequences
- RMSD units are always Angstroms