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

Assignment Help:

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');  

and  

>> [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.


Related Discussions:- Write a function that will read the atoms for a protein

Help pagination of oracle reports when printed from browser, Oracle 11G Rep...

Oracle 11G Reports We are troubleshooting the pagination of Oracle reports when printed from a browser. We need help determining the issue and correcting within the report ou

Programming (problem solving), develop a pseudocode algorithm to determine ...

develop a pseudocode algorithm to determine the total amount of extra cost changed to the organizers for expenses accurednduring the workshop. the code is to be written for an unde

Prolog assignment, I have constantly been emailing to get the task i had pa...

I have constantly been emailing to get the task i had paid for to be done correctly but no replies from anyone. Not even one acknowledging my emails. Been phoning all the way from

Define call by value - computer programming, Define Call by value - Compute...

Define Call by value - Computer Programming? Functions are raise by writing their name and an appropriate list of arguments within parenthesis. Usually these arguments are in t

Create xml document to save calendar information, Prepare an XML document t...

Prepare an XML document that contains calendar information such as the following text describes: The calendar is owned by a person (e.g. John Smith) and has a few paragraphs tha

Create hijara game application, Assignment is to create hijara game on any ...

Assignment is to create hijara game on any plate form, you can use any plate form you like or easy to you. For instance let's say you can use visual studio, game studio (Prefer to

Program to find the largest value in an array, 1. Write out a detailed plan...

1. Write out a detailed plan for a program to find the largest value in an array that is smaller than a ceiling C. For example, suppose the array has the values {4, 14, 11, 100, 6}

Sorting the file seqential order, write a program to sort the file sequenti...

write a program to sort the file sequential order and store on magnetic tape and print sorted tape as the output of the program.

Shell script to combine 2 files horizontally and vertically, Normal 0 ...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Random number generator guessing game, The GuessingGame class contains a sk...

The GuessingGame class contains a skeleton for a program to play a guessing game with the user. The program should randomly generate an integer between 1 and 10 and then ask the us

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd