Write a function that will read the atoms for a protein, Programming Languages

Write a function readPDBfile('filename') that will read the atoms for a protein stored in a PDB file, whose name is provided as an input to the function (note that this name should be a string; i.e., specified in quotes). For this part, you should save your function in an m-file called readPDBfile.m. The function declaration should be

function [anum, aname, resno, coords] = readPDBfile(infile);

From the above declaration, you'll notice that your function should have four outputs. These output variables represent the following:

anum: An n×1 column vector with the serial number for each atom as integers

aname: An n×4 string array with the 4-letter atom uppercase name for each atom

resno: An n×1 vector with a residue sequence number for each atom as integers

coords: An n×3 matrix with xyz coordinates (in angstroms) for each atom as doubles In the above, 'n' stands for the number of atoms (or ATOM commands) in the .PDB file.

What to submit: Your m-file containing code for the readPDBfile function. I will run and test this on real data, so test and make sure your function works (i.e., by calling this function on the two provided PDB files, and making sure your output looks fine). In other words, for this part, once you've written your readPDBfile() function, you would call it from the command line as follows:

>> [anum, aname, resno, coords] = readPDBfile('1GFL-pdb.txt');  


>> [anum, aname, resno, coords] = readPDBfile('7HVP-pdb.txt');  

For each case, you should visually inspect the output variables (double-click on the variables in the MATLAB Workspace window), and make sure that the values for these variables are the same as the ones stored in the respective PDB files.   

Note: For the above two lines to work,  the provided PDB  files must be in the same folder as your readPDBfile.m MATLAB m-file. Alternatively, you could provide the full path to the PDB file when calling the function; e.g., readPDBfile('e:/code/data/a7/1GFL-pdb.txt');  

Note: You can double-click to open and manually inspect the PDB files.

Posted Date: 4/2/2013 1:58:19 AM | Location : United States

Related Discussions:- Write a function that will read the atoms for a protein, Assignment Help, Ask Question on Write a function that will read the atoms for a protein, Get Answer, Expert's Help, Write a function that will read the atoms for a protein Discussions

Write discussion on Write a function that will read the atoms for a protein
Your posts are moderated
Related Questions

Characteristics of procedure-oriented programming: Emphasis is on doing things (algorithms). Large programs are divided into smaller programs known as functions.

Overview You will write a loadable kernel module. If you have an idea which you can convince me is a good idea that can not be done as a module, but only via direct modificatio

The first task is to extend the  NeoPhoneBookEntry and  NeoPhoneBook classes to accommodate for  four additional contact  details:  Ringtone,  Vibration Pattern,  Led Pattern  and

W.A.S.S to display all the files in a specified directory in the following format: File  size in K        Date   Protection    Owner Program echo -e "Enter dir : \c" read di

i have to make a program that encrypt a text to numbers, i don''t know what is wrong in my code, the example of what i need: text: hi >> number: 17 23

Programming Project Specification: IRC or Internet Relay Chat is an application that lets multiple users communicate via text messages with each other in common "virtual" rooms.

Implement a two-dimensional table in Prolog. Your program will contain: An insert_entry predicate that takes a table, row, column and an entry and inserts the entry at the g

1 Triple Eigenvalue with 3 Linearly Independent Eigenvectors In this case we will have the eigenvalue l with the three linearly independent eigenvectors  ?h 1 , ?h 2 and  ?h

We need Advancement in Existing PhoneGap Application We need a PhoneGap expert to aid us extend an existing PhoneGap application. The app works pulls data from a new website (de