Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions structure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ A tutorial for the protein structure modules of [BioJava](http://www.biojava.org

This tutorial is split into several chapters.


Chapter 1 - Quick [Installation](installation.md)

Chapter 2 - [First Steps](firststeps.md)
Expand All @@ -47,13 +48,20 @@ Chapter 9 - [Biological Assemblies](bioassembly.md)

Chapter 10 - [External Databases](externaldb.md) like SCOP & CATH

Chapter 11 - Protein Symmetry
Chapter 11 - [Accessible Surface Areas](asa.md)

Chapter 12 - [Contacts within a chain and between chains](contact-map.md)

Chapter 13 - Finding all interfaces in crystal: [crystal contacts](crystal-contacts.md)

Chapter 14 - Protein Symmetry

Chapter 15 - Bonds

Chapter 12 - Bonds
Chapter 16 - [Special Cases](special.md)

Chapter 13 - [Special Cases](special.md)
Chapter 17 - [Lists](lists.md) of PDB IDs and PDB [status information](lists.md).

Chapter 14 - [Lists](lists.md) of PDB IDs and PDB [status information](lists.md).

### Author:

Expand Down
36 changes: 36 additions & 0 deletions structure/asa.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Calculating Accessible Surface Areas

BioJava can also do calculation of Accessible Surface Areas (ASA) through an implementation of the rolling ball algorithm of Shrake and Rupley [Shrake 1973].

This code will do the ASA calculation and output the values per residue and the total:
```java
AtomCache cache = new AtomCache();
cache.setUseMmCif(true);

StructureIO.setAtomCache(cache);

Structure structure = StructureIO.getStructure("1smt");

AsaCalculator asaCalc = new AsaCalculator(structure,
AsaCalculator.DEFAULT_PROBE_SIZE,
1000, 1, false);

GroupAsa[] groupAsas = asaCalc.getGroupAsas();

double tot = 0;

for (GroupAsa groupAsa: groupAsas) {
System.out.printf("%1s\t%5s\t%3s\t%6.2f\n",
groupAsa.getGroup().getChainId(),
groupAsa.getGroup().getResidueNumber(),
groupAsa.getGroup().getPDBName(),
groupAsa.getAsaU());
tot+=groupAsa.getAsaU();
}

System.out.printf("Total area: %9.2f\n",tot);

```
See [DemoAsa](https://github.com/biojava/biojava/blob/master/biojava3-structure/src/main/java/demo/DemoAsa.java) for a fully working demo.

[Shrake 1973]: http://www.sciencedirect.com/science/article/pii/0022283673900119
13 changes: 13 additions & 0 deletions structure/crystal-contacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,17 @@ The algorithm to find all unique interfaces in the crystal works roughly like th

See [DemoCrystalInterfaces](https://github.com/biojava/biojava/blob/master/biojava3-structure/src/main/java/demo/DemoCrystalInterfaces.java) for a fully working demo of the example above.

## Clustering the interfaces
One can also cluster the interfaces based on their similarity. The similarity is measured through contact overlap: number of common contacts over average number of contact in both chains. The clustering can be done as following:

```java
List<StructureInterfaceCluster> clusters = interfaces.getClusters();
for (StructureInterfaceCluster cluster:clusters) {
System.out.print("Cluster "+cluster.getId()+" members: ");
for (StructureInterface member:cluster.getMembers()) {
System.out.print(member.getId()+" ");
}
System.out.println();
}
```