3
$\begingroup$

What data structure is used in representing protein structures in computers so that we can apply algorithms?

Matrix or Graph or tree?

P.S. I am absolutely new to Bioinformatics.

$\endgroup$
5
  • 1
    $\begingroup$ the same was asked on SO: stackoverflow.com/questions/68452847/… $\endgroup$
    – marcin
    Jul 20 at 10:59
  • $\begingroup$ This is too vague to answer. A small compound can be represented with a string (SMILES, no 3D data though), a matrix (mol file) or a graph network object (eg. a RDKit Chem object), yet some methods return matrices (e.g. distance). The same goes for a protein... $\endgroup$ Jul 20 at 14:55
  • $\begingroup$ @MatteoFerla, what more info do u need to make this question clearer? $\endgroup$
    – user366312
    Jul 20 at 15:04
  • $\begingroup$ You kind of have answered the question in the questions. Both matrix and graph are used to represent structures in memory, but they have different uses. Some algorithms will use one or the other. A PDB, CIF, etc. file is basically a matrix presentation. But a major pressure for a graph network is if they do not operate in cartesian space (x,y,z) but torsion/dihedral space (d,φ,ψ). $\endgroup$ Jul 20 at 16:20
  • 1
    $\begingroup$ Why has this been closed? There is no community vote for doing so. Please stop closing threads based on personal opinion of a single person. It is toxic, especially as OP clearly indicates that they're new. Rather give suggestions on what to add to make it a more precise question. $\endgroup$
    – ATpoint
    Jul 21 at 12:04
3
$\begingroup$

comments from above fleshed out.

Both: A graph network is a handy way to represent a molecule, but a matrix makes for fast maths.

A graph network is a list of nodes (atoms), a list of edges, the connections between nodes and a list of properties associated with the nodes (symbol, name, index, residue index, residue number, chain, coordinates etc.) and occasionally a list of those of the edges (single, double etc.).

A protein is a big molecule. Same rules apply. A small compound can be represented with a string, i.e. SMILES, which is a form of graph network even if it looks nothing like one. SMILES

In a mol file and its sdf/mol2 derivatives, a tabular representation is used to store coordinates (properties) of the atoms of the small molecule (top part below), while the connectivity has an edge-node relationship, i.e. are edges. Note that the index of the properties in the first block is the id of the atom.

     RDKit          3D

 12 12  0  0  0  0  0  0  0  0999 V2000
   -5.5310   24.4560   -8.2060 O   0  0  0  0  0  0  0  0  0  0  0  0
    0.9560   21.4190   -7.6300 O   0  0  0  0  0  0  0  0  0  0  0  0
   -5.4170   23.9250   -6.8750 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.2770   19.3290   -8.7330 O   0  0  0  0  0  0  0  0  0  0  0  0
   -3.9460   23.5670   -6.5510 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.3270   19.7590   -6.4400 O   0  0  0  0  0  0  0  0  0  0  0  0
   -3.4590   22.5590   -7.5870 N   0  0  0  0  0  0  0  0  0  0  0  0
   -3.5890   23.1360   -8.9920 C   0  0  0  0  0  0  0  0  0  0  0  0
   -5.0600   23.5190   -9.2240 C   0  0  0  0  0  0  0  0  0  0  0  0
   -2.0390   22.1150   -7.2780 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.6090   21.0030   -8.2230 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.0430   20.3530   -7.7350 S   0  0  1  0  0  0  0  0  0  0  0  0
  1  3  1  0
  1  9  1  0
  3  5  1  0
  9  8  1  0
 12  2  1  1
 12  4  1  0
 12  6  1  0
 12 11  1  0
  5  7  1  0
  7  8  1  0
  7 10  1  0
 10 11  1  0
M  END

A PDB, CIF, etc. file is the same. It has a per-atom tabular representation of the properties, with an optional connectivity part (CONECT entries) for non-standard residues (not AAs and DNA).

Now when these are loaded into memory, they become an array of atoms and bonds, each with their properties —graph network.

However, the coordinates within get often converted into a matrix for speedy operations. For example to calculate an atom to atom distance matrix, converting the coordinates with the array of atoms to a matrix can be very easily be converted into a distance matrix via simple matrix calculations.

So both matrix representations and graph network representations are used.

For 3D visualisation, a pre-existing library is used and bonds and atoms become primitive shapes, whose splines may be connected to each other (in knots/vertices) or simply the bonds shapes clip through the atoms. That is there is not graph relationship.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.