Perl Code For A Beginner...At Least A Start Would Be Really Helpful..Thank You.
3
0
Entering edit mode
13.0 years ago
Stacy ▴ 10

First iterate through the PDB file

For each PDB file in list  
Read each atom
  If it is a Donor or Acceptor, store in list

For each Donor
  For each Acceptor
     If there is an H-bond, store Atom IDs and labels of the D/A pair in H-bond list

For each H-bond
  For each other H-bond
     If the nodes of two different bonds are in the same
     residue, add a "covalent" bond to list

For each Bond
  Add both bonded nodes to hash of unique nodes
perl pdb parsing protein homework • 3.1k views
ADD COMMENT
0
Entering edit mode

Hey! You just described the algorithm you want to use in pseudo-code. From here you only need to translate all the "for each" into a "for(...)" in perl, "if"s into "if (...)", etc.

ADD REPLY
0
Entering edit mode

If it just was that easy ;) Of course the perlcode for e.g. "If there is an H-bond" involves parsing the PDB file. I believe there were several questions about PDB parsing here, but I don't know if any solved this problem.

ADD REPLY
0
Entering edit mode

You are right, Michael. After the question has now been reformatted, it is clear that some parts -- such as "if there is an H-bond" -- are not as trivial as I first thought. I did not spot that beforehand.

ADD REPLY
5
Entering edit mode
13.0 years ago
Neilfws 49k

Whoever gave you this assignment does not understand PDB files very well. A PDB file contains information about the coordinates of atoms in a molecule. It contains no information about donors, acceptors or H-bonds. H-bonds are inferred by calculation, which examines the position of donors and acceptors to determine whether they lie within an acceptable distance of one another.

As WoA suggests in their answer, software is available for H-bond prediction. Two commonly-used tools for this task are DSSP and STRIDE. You may be able to obtain these from the web as standalone programs, or else they are included in some web servers.

Both tools generate delimited output which is quite easy to parse; STRIDE output is somewhat simpler and more straightforward. There are also modules in the Bioperl package that can be used to write parsers; they are named Bio::Structure::SecStr::DSSP::Res and Bio::Structure::SecStr::STRIDE::Res.

ADD COMMENT
4
Entering edit mode
13.0 years ago
Woa ★ 2.9k

I would suggest first predict H-bonds using some software like this and then parse the resulting file

ADD COMMENT
0
Entering edit mode
13.0 years ago

If you working with just proteins - convert the files into mol2 file and you will have all the information needed, but if you want to calculate the H-bonds between the ligand - it will be tricky.

Try Bio3D.

ADD COMMENT
0
Entering edit mode

Just to mention...The h-bond donors and acceptors are clearly defined thru the pdb atom types

ADD REPLY

Login before adding your answer.

Traffic: 2378 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6