ex_protein_peptide_interface

ex_protein_peptide_interface finds atomic contacts between a receptor and a peptide found in an input PDB file. Its output provides: protein residue name and ID, protein chain ID, peptide protein name and ID, peptide chain ID, minimum distance between the residues, e.g.

ILE 36 A ARG 104 X 5.92977 LEU 44 A ARG 104 X 5.92685 LEU 44 A LEU 108 X 5.57779 GLU 45 A THR 102 X 6.81994

USAGE:
ex_protein_peptide_interface 1dt7.pdb  7.0

where 1dt7.pdb id an input file and 7.0 - contact distance in Angstroms

Keywords:

Categories:

  • core::data::structural::Structure

Input files:

Output files:

Program source:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include <iostream>
#include <map>

#include <core/data/io/Pdb.hh>
#include <core/data/structural/structure_selectors.hh>

#include <utils/exit.hh>

std::string program_info = R"(

ex_protein_peptide_interface finds  atomic contacts between a receptor and a peptide found in an input PDB file.
Its output provides: protein residue name and ID, protein chain ID, peptide protein name and ID,
peptide chain ID, minimum distance between the residues, e.g.

ILE   36 A  ARG  104 X 5.92977
LEU   44 A  ARG  104 X 5.92685
LEU   44 A  LEU  108 X 5.57779
GLU   45 A  THR  102 X 6.81994

USAGE:
    ex_protein_peptide_interface 1dt7.pdb  7.0

where 1dt7.pdb id an input file and 7.0 - contact distance in Angstroms

)";

unsigned int MAX_PEPTIDE_LENGTH = 35;
unsigned int MIN_PROTEIN_LENGTH = 40;

/** @brief Finds contacts atomic contacts between a receptor and a peptide.
 *  *
 * CATEGORIES: core::data::structural::Structure
 * KEYWORDS: PDB input; contact map; peptide; iterators
 */
int main(const int argc, const char* argv[]) {

  if (argc < 3) utils::exit_OK_with_message(program_info); // --- complain about missing program parameter

  using namespace core::data::io;
  Pdb reader(argv[1], all_true(is_not_water,is_not_alternative,is_not_hydrogen)); // --- file name (PDB format, may be gzip-ped)

  core::data::structural::Structure_SP strctr = reader.create_structure(0);
  core::data::structural::IsAA is_aa_tester;
  core::data::structural::Structure_SP sub_strctr = strctr;// = strctr->clone(is_aa_tester);

  double cutoff = utils::from_string<double>(argv[2]); // The third parameter is the contact distance (in Angstroms)

  for (auto protein_chain_sp: *strctr) { // --- protein_chain_sp is a shared pointer to a chain
    if (protein_chain_sp->size() < MIN_PROTEIN_LENGTH) continue;
    for (auto i_residue_sp: *protein_chain_sp) { // --- i_residue_sp is a shared pointer to a residue
      for (auto peptide_chain_sp: *strctr) {
        if (peptide_chain_sp->size() > MAX_PEPTIDE_LENGTH) continue;
        for (auto j_residue_sp: *peptide_chain_sp) {
          double d = (i_residue_sp)->min_distance(j_residue_sp);
          if (d < cutoff)
            std::cout << (*i_residue_sp) << " " << (*i_residue_sp).owner()->id() << " " << (*j_residue_sp) << " "
                      << (*j_residue_sp).owner()->id()
                      << " " << d << "\n";
        }
      }
    }
  }
}
../_images/file_icon.png