ANSWER WITH MATLAB CODE The B-factor of atoms in protein structures deposited in the PDBdatabase (ww

MATLAB CODE The B-factor of atoms in protein structures deposited in the PDBdatabase ( describes the displacement of each atom fromits average location. The atoms on the surface of proteins tend tobe more mobile and as a result have large B-factor values, whereasthose in the core of the protein are restricted and have smallerB-factor values. Write a function
pdb_bfactor that takes a fourletter PDB identifier and returns the average B factor of all ofthe CA (alpha carbon) atoms. Your function should download the pdbfile from website, e.g., if the PDB id “1crn” is given asinput, your function should download the protein file from . You can use the websave()function to write the contents of a webpage into a file. Note that each of the PDB ATOM entry lines is formatted such thatthe characters 13-16, 31-38, 39-46, 47-54, and 61-66 contain theatom type (e.g., “CA”, ignoring any spaces), the x,y,z coordinates,and the B-factor of an atom, respectively. You only need toconsider the lines that start with the word “ATOM” and have theatom type “CA”. A suggested outline of the steps you would follow in pdb_factor isgiven below. Let X be the input PDB identifier (e.g., having value”1crn”). Using the websave() function, download the pdb file from the weband save it to X.pdb file. Use string concatenation to constructthe filename (You need to put together the value of X and the fileextension ‘.pdb’). Open the X.pdb file for reading using fopen(). Read the file line by line, using a while loop. If a line begins with “ATOM” and has “CA” as the atom type, addits b-factor to a vector named bfactors. After the while loop processes all of the lines, close the fileusing fclose(). Return the average of the bfactors as output argument. THE CORRECT ANSWER WILL RETURN THE FOLLOWING OUTPUT EXACTLY: >> pdb_bfactor(‘1ubq’)ans = 10.5837 Attached

Looking for a similar assignment? Get help from our qualified experts!

"Our Prices Start at $9.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!":

Order a Similar Paper Order a Different Paper