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

Api in c#, i what to know how setcapture() api work in c#

i what to know how setcapture() api work in c#

Shell script to generate the series 1+x + x2+ x3+….+xn, Normal 0 ...

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

Program 3, An apartment complex has several apartments to rent. The apartme...

An apartment complex has several apartments to rent. The apartments are all similar, and all rent for $750 per month. Currently, all units are occupied. The management, being in bu

Need support in mobile app using angularjs and cordova, Need support in Mob...

Need support in Mobile app using AngularJS, Cordova (PhoneGap), Ionicframework We need an experienced front-end developer with a obsession for performance in mobile environment.

Prolog predicate to remove nth element, Write a Prolog predicate remove_nth...

Write a Prolog predicate remove_nth(N,L1,L2) that is true if list L2 is just list L1 with its Nth element removed. If L1 does not have an Nth element then the predicate should fail

Difference between MOV and MOVS, 2. TEST & AND TEST is like CMP, it is used...

2. TEST & AND TEST is like CMP, it is used for conditional statement, and doesn’t save the answer. AND is logical multiplication. 3. INS & IN IN is used for data transfer from I/O

Visual basic.net, how to create a screen for messages for a data transmissi...

how to create a screen for messages for a data transmission system

Explain the use of sync and fsck, Problem 1 Define the architecture of ...

Problem 1 Define the architecture of UNIX operating system with appropriate diagram Problem 2 Define the term inter-process communication. What are several approaches t

Explain the comma operator- computer programming, Explain the Comma Operato...

Explain the Comma Operator- Computer Programming? The comma has two utilization and the most common use is as a parameter separator for data types and function parameter lists. H

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