Skip to content

Commit 817a56d

Browse files
committed
New tutorial on contact maps
1 parent 764bea3 commit 817a56d

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

structure/contact-map.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Finding contacts within a protein chain: contact maps
2+
3+
Contacts are a useful tool to analyse protein structures. It simplifies the 3-Dimensional view of the structures into a 2-Dimensional set of contacts between its atoms or its residues. The representation of the contacts in a matrix is known as the contact map. Many protein structure analysis and prediction efforts are done by using contacts, see for instance
4+
5+
## Getting the contact map of a protein chain
6+
7+
This code snippet will produce the set of contacts between all C alpha atoms for chain A of PDB entry [1SMT](http://www.rcsb.org/pdb/explore.do?structureId=1SMT):
8+
9+
```java
10+
AtomCache cache = new AtomCache();
11+
StructureIO.setAtomCache(cache);
12+
13+
Structure structure = StructureIO.getStructure("1SMT");
14+
15+
Chain chain = structure.getChainByPDB("A");
16+
17+
// we want contacts between Calpha atoms only
18+
String[] atoms = {" CA "};
19+
// the distance cutoff we use is 8A
20+
AtomContactSet contacts = StructureTools.getAtomsInContact(chain, atoms, 8.0);
21+
22+
System.out.println("Total number of CA-CA contacts: "+contacts.size());
23+
24+
25+
```
26+
27+
The algorithm to find the contacts uses geometric hashing without need to calculate a full distance matrix, thus it scales nicely.
28+
29+
## Getting the contacts between two protein chains
30+
31+
One can also find the contacting atoms between two protein chains. For instance the following code finds the contacts between the first 2 chains of PDB entry [1SMT](http://www.rcsb.org/pdb/explore.do?structureId=1SMT):
32+
33+
```java
34+
AtomCache cache = new AtomCache();
35+
StructureIO.setAtomCache(cache);
36+
37+
Structure structure = StructureIO.getStructure("1SMT");
38+
39+
AtomContactSet contacts = StructureTools.getAtomsInContact(structure.getChain(0), structure.getChain(1), 5, false);
40+
41+
System.out.println("Total number of atom contacts: "+contacts.size());
42+
43+
// the list of atom contacts can be reduced to a list of contacts between groups:
44+
GroupContactSet groupContacts = new GroupContactSet(contacts);
45+
```
46+
47+
48+
See [DemoContacts](https://github.com/biojava/biojava/blob/master/biojava3-structure/src/main/java/demo/DemoContacts.java) for a fully working demo of the example above.
49+
50+

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy