Question
Write a script called atomcoordinates that will accept the name of a PDB le as its only command line argument. Given this PDB le, it
Write a script called atomcoordinates that will accept the name of a PDB le as its only command line argument. Given this PDB le, it will nd all lines that start with the word ATOM and will display, for each line that it nds, a line of output containing the atom's serial number and coordinates. For example, a line in the PDB le that looks like this: ATOM 18 CB GLN A 3 83.556 52.126 45.080 1.00 26.06 C would result in the following output line being displayed: 18 83.556 52.126 45.080 because the atom's serial number is 18 and its coordinates are 83.556, 52.126, and 45.080. How do you know where this information is? In a PDB le, the data is in specic columns. In particular, the atom's serial number is always in columns 7 through 11, and the three coordinates start in column 31 and end in column 54. Therefore, your script has to extract the serial number and the coordinates from these columns and display them. Your job is to decide which lters can achieve this. This will take some research. Figure out which lters will work the best. Error checking: Your script must check that it has at least one command line argument, and that it is a le that it can read. It must display a message if either of these is not true. It is a UNIX SHELL SCRIPT
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started