diff --git a/structure/README.md b/structure/README.md index 2f72ff6..e50a1f6 100644 --- a/structure/README.md +++ b/structure/README.md @@ -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) @@ -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: diff --git a/structure/asa.md b/structure/asa.md new file mode 100644 index 0000000..792b044 --- /dev/null +++ b/structure/asa.md @@ -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 diff --git a/structure/crystal-contacts.md b/structure/crystal-contacts.md index 97ba9bb..9dfa1af 100644 --- a/structure/crystal-contacts.md +++ b/structure/crystal-contacts.md @@ -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 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(); + } +```