Files: Amino acid bonds | Matlab Examples

Matlab Tutorials | Examples

Practice 10:

Files: Amino acid bonds

Proteins are made up of amino acids. Every amino acid has one amino group (N), one carboxyl group (C) and one chiral carbon (Cα or CA). The angle between CA-C is called “psi” (ψ) and the angle between N-CA is called “phi” (Φ). Phi and Psi angles range between -180o and 180o.

Given the 3-D space coordinates of N, C, and CA atoms in the from P= [x y z], the following quantities of the protein can be computed:

The operations of the form VT. VU in the above angle formulas represent “dotproducts”, which can be computed by using dot(VT, VU) function in MatLab. You are given a file named “protein.txt”. This file contains the x-y-z coordinates of protein N-CA-C atoms. Our protein is made up of 10 amino acids; so there are 10×3=30 coordinate triplets. The format of the file is as follows:


Write a program that will do the following tasks:

  • Get the names of the input and an output files (and their folders) from the user.
  • Read atom coordinates into three cell arrays, PN, PCA, and PC. Each cell should contain the x, y, and z coordinates of an atom.
  • Calculate the bond vectors for each N-CA, CA-C, and C-N pairs. Determine the average length of each bond type, and write this on the screen, and into the output file.
  • Calculate the phi and psi angles (in degrees) for amino acids of the protein. Write this information in tabular form on the screen, and into the output file.





Leave a Reply

Your email address will not be published. Required fields are marked *