{"id":1231,"date":"2013-10-06T23:11:54","date_gmt":"2013-10-06T22:11:54","guid":{"rendered":"http:\/\/www.blopig.com\/blog\/?p=1231"},"modified":"2014-02-06T07:37:09","modified_gmt":"2014-02-06T07:37:09","slug":"get-pdb-intermolecular-protein-contacts-and-interface-residues","status":"publish","type":"post","link":"https:\/\/www.blopig.com\/blog\/2013\/10\/get-pdb-intermolecular-protein-contacts-and-interface-residues\/","title":{"rendered":"Get PDB intermolecular protein contacts and interface residues"},"content":{"rendered":"<p><code><\/code> Very often in Struc Bio it is necessary to determine the contacts between two molecules. Most of us in the group have written a snippet of code to compute precisely that or they have adapted the <a title=\"Biopython\" href=\"http:\/\/biopython.org\/wiki\/Main_Page\">Biopython<\/a> functionality or one of the tools in <a title=\"pdbtools\" href=\"https:\/\/code.google.com\/p\/pdb-tools\/\">pdbtools<\/a>. The piece of code written in Python presented here is a Biopython variety that gives you the intermolecular contacts and it annotates the interface neighborhood. An example of the program output is given in the Figure below:<\/p>\n<div id=\"attachment_1232\" style=\"width: 310px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2013\/10\/Untitled-drawing-1.png?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" aria-describedby=\"caption-attachment-1232\" loading=\"lazy\" class=\"wp-image-1232   \" title=\"Contact and Interface annotation\" alt=\"The complex between an antibody and an antigen is shown on the left without the annotation. On the right it is shown with intermolecular contacts annotated in red (4.5A distance) and the interface neighborhood shown in green (10A away from any contact residue).\" src=\"https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2013\/10\/Untitled-drawing-1.png?resize=300%2C225&#038;ssl=1\" width=\"300\" height=\"225\" srcset=\"https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2013\/10\/Untitled-drawing-1.png?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2013\/10\/Untitled-drawing-1.png?resize=624%2C468&amp;ssl=1 624w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2013\/10\/Untitled-drawing-1.png?w=960&amp;ssl=1 960w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1232\" class=\"wp-caption-text\">The complex between an antibody and an antigen is shown on the left without the annotation. On the right it is shown with intermolecular contacts annotated in red (4.5A distance) and the interface neighborhood shown in green (10A away from any contact residue).<\/p><\/div>\n<p><strong style=\"line-height: 1.714285714;font-size: 1rem\">Download<\/strong><\/p>\n<p>You can download it from <a title=\"GetContacts.py\" href=\"http:\/\/www.stats.ox.ac.uk\/~krawczyk\/GetContacts.zip\">here<\/a>. There are three files inside:<\/p>\n<ol>\n<li><span style=\"line-height: 14px\">GetInterfaces.py &#8211; the main source\/runnable file<\/span><\/li>\n<li>README.txt &#8211; instructions, very similar to this post (quite a lot copy\/pasted)<\/li>\n<li>1A2Y.pdb &#8211; the PDB file used in the example to practice on.<\/li>\n<\/ol>\n<p><strong>Requirements:<\/strong><\/p>\n<p>You need <a title=\"Biopython\" href=\"http:\/\/biopython.org\/wiki\/Main_Page\">Biopython<\/a>. (if you are from OPIG or any other Bioinformatics group, most likely it is already installed on your machine). You can download it from\u00a0<a title=\"Download Biopython\" href=\"http:\/\/biopython.org\/wiki\/Download\">here<\/a>.<\/p>\n<p><strong>How to use it?<\/strong><\/p>\n<p>As the bare minimum, you need to provide the structure of the pdb(s) and the chains that you want to examine contacts in.<\/p>\n<p>Input options:<\/p>\n<ul>\n<li><span style=\"line-height: 1.714285714;font-size: 1rem\"><em>&#8211;f1<\/em> : first pdb file [<strong>Required<\/strong>]<\/span><\/li>\n<li><span style=\"line-height: 1.714285714;font-size: 1rem\"><em>&#8211;f2<\/em> : second pdb file (if the contacts are to be calculated in the same molecule, just submit the same pdb in both cases) [<strong>Required<\/strong>]<\/span><\/li>\n<li><span style=\"line-height: 1.714285714;font-size: 1rem\"><em>&#8211;c1<\/em> : Chains to be used for the first molecule [<strong>Required<\/strong>]<\/span><\/li>\n<li><span style=\"line-height: 1.714285714;font-size: 1rem\"><em>&#8211;c2<\/em> : Chains to be used for the second molecule [<strong>Required<\/strong>]<\/span><\/li>\n<li><span style=\"line-height: 1.714285714;font-size: 1rem\"><em>&#8211;c<\/em> : contact cutoff for intermolecular contacts (Optional, set to 4.5A if not supplied on input)\u00a0<\/span><\/li>\n<li><span style=\"line-height: 1.714285714;font-size: 1rem\"><em>&#8211;i<\/em> : interface neighbor cutoff for intramolecular neighborhood of the contacting interface (Optional, set to 10.0A if not supplied on input). Set this option to zero (0.0) if you only want to get the intermolecular contacts in the interface, without the interface neighborhood.<\/span><\/li>\n<li><span style=\"line-height: 1.714285714;font-size: 1rem\"><em>&#8211;jobid<\/em> : name for the output folder (Set to out_&lt;random number&gt; if not supplied on input)<\/span><\/li>\n<\/ul>\n<p>An example which you can just copy paste and run when in the same directory as the python script:<\/p>\n<p><code>python GetInterfaces.py --f1 1A2Y.pdb --f2 1A2Y.pdb --c1 AB --c2 C --c 4.5 --i 10.0 --jobid example_output<\/code><\/p>\n<p>Above command will calculate the contacts between antibody in 1a2y (chains A and B) and the antigen (chain C). The contact distance was defined as 4.5A and the interface distance was defined as 10A. All the output files are saved in the folder out_example_output.<\/p>\n<p><strong>Output<\/strong><\/p>\n<p>Output folder is placed in the current directory. If you specify the output folder name (&#8211;jobid) it will be saved under the name &#8216;out_[whateveryoutyped]&#8217;, otherwise it will be &#8216;out_[randomgeneratednumber]&#8217;. The program tells you at the end where it saved all the files.<\/p>\n<p>Input options:<\/p>\n<ul>\n<li><span style=\"line-height: 1.714285714;font-size: 1rem\"><em>molecule_1.pdb<\/em> &#8211; the first supplied molecule with b-factor fields of contacts set to 100 and interface neighborhood set to 50<\/span><\/li>\n<li><span style=\"line-height: 1.714285714;font-size: 1rem\"><em>molecule_2.pdb<\/em> &#8211; the second supplied molecule with b-factor fields of contacts set to 100 and interface neighborhood set to 50<\/span><\/li>\n<li><span style=\"line-height: 1.714285714;font-size: 1rem\"><em>molecule_1.txt<\/em> &#8211; whitespace delimited file specifying the contacts and interface neighborhood in the second molecule in the format: [chain] [residue id] [contact &#8216;C&#8217; or interface residues &#8216;I&#8217;]<\/span><\/li>\n<li><span style=\"line-height: 1.714285714;font-size: 1rem\"><em>molecule_2.txt<\/em> &#8211; whitespace delimited file specifying the contacts and interface neighborhood in the second molecule in the format: [chain] [residue id] [contact &#8216;C&#8217; or interface residues &#8216;I&#8217;]<\/span><\/li>\n<li><span style=\"line-height: 1.714285714;font-size: 1rem\"><em>molecule_1_constrained.pdb<\/em> &#8211; the first molecule, which is constrained only to the residues in the interface.<\/span><\/li>\n<li><span style=\"line-height: 1.714285714;font-size: 1rem\"><em>molecule_2_constrained.pdb<\/em> &#8211; the second molecule, which is constrained only to the residues in the interface.<\/span><\/li>\n<li><span style=\"line-height: 1.714285714;font-size: 1rem\"><em>parameters.txt<\/em> &#8211; the contact distance and neighborhood distance used for the particular run.<\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Very often in Struc Bio it is necessary to determine the contacts between two molecules. Most of us in the group have written a snippet of code to compute precisely that or they have adapted the Biopython functionality or one of the tools in pdbtools. The piece of code written in Python presented here is [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","wikipediapreview_detectlinks":true,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"ngg_post_thumbnail":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[29,14],"tags":[],"ppma_author":[482],"class_list":["post-1231","post","type-post","status-publish","format-standard","hentry","category-code","category-howto"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"authors":[{"term_id":482,"user_id":4,"is_guest":0,"slug":"konrad","display_name":"Konrad Krawczyk","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/fdb224fe7b0775e3c9a6956ae2a5ffd7c35ab8ce3ff99c5f6e0a51d45557cdd6?s=96&d=mm&r=g","author_category":"","user_url":"","last_name":"Scientist","first_name":"Lucky","job_title":"","description":""}],"_links":{"self":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts\/1231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/comments?post=1231"}],"version-history":[{"count":18,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts\/1231\/revisions"}],"predecessor-version":[{"id":1610,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts\/1231\/revisions\/1610"}],"wp:attachment":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/media?parent=1231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/categories?post=1231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/tags?post=1231"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=1231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}