From 8fbb185af5e9a3150d8ffd8842935f3947804748 Mon Sep 17 00:00:00 2001 From: Jose Manuel Duarte Date: Tue, 9 Dec 2014 09:53:27 +0100 Subject: [PATCH 1/6] Linking to new chapters --- structure/README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/structure/README.md b/structure/README.md index 2f72ff6..d058c66 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,18 @@ Chapter 9 - [Biological Assemblies](bioassembly.md) Chapter 10 - [External Databases](externaldb.md) like SCOP & CATH -Chapter 11 - Protein Symmetry +Chapter 11 - [Contacts within a chain and between chains](contact-map.md) + +Chapter 12 - Finding all interfaces in crystal: [crystal contacts](crystal-contacts.md) + +Chapter 13 - Protein Symmetry + +Chapter 14 - Bonds -Chapter 12 - Bonds +Chapter 15 - [Special Cases](special.md) -Chapter 13 - [Special Cases](special.md) +Chapter 16 - [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: From e6df557832ec2b142b40a2105eaaedbb3698b5e8 Mon Sep 17 00:00:00 2001 From: Jose Manuel Duarte Date: Tue, 9 Dec 2014 10:01:40 +0100 Subject: [PATCH 2/6] Update crystal-contacts.md --- structure/crystal-contacts.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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(); + } +``` From e79d329a2bc193883b7a38478b19ebb570b0fae9 Mon Sep 17 00:00:00 2001 From: Jose Manuel Duarte Date: Tue, 9 Dec 2014 10:03:31 +0100 Subject: [PATCH 3/6] Update README.md --- structure/README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/structure/README.md b/structure/README.md index d058c66..e50a1f6 100644 --- a/structure/README.md +++ b/structure/README.md @@ -48,17 +48,19 @@ Chapter 9 - [Biological Assemblies](bioassembly.md) Chapter 10 - [External Databases](externaldb.md) like SCOP & CATH -Chapter 11 - [Contacts within a chain and between chains](contact-map.md) +Chapter 11 - [Accessible Surface Areas](asa.md) -Chapter 12 - Finding all interfaces in crystal: [crystal contacts](crystal-contacts.md) +Chapter 12 - [Contacts within a chain and between chains](contact-map.md) -Chapter 13 - Protein Symmetry +Chapter 13 - Finding all interfaces in crystal: [crystal contacts](crystal-contacts.md) -Chapter 14 - Bonds +Chapter 14 - Protein Symmetry -Chapter 15 - [Special Cases](special.md) +Chapter 15 - Bonds -Chapter 16 - [Lists](lists.md) of PDB IDs and PDB [status information](lists.md). +Chapter 16 - [Special Cases](special.md) + +Chapter 17 - [Lists](lists.md) of PDB IDs and PDB [status information](lists.md). ### Author: From 41047d9006b6499ee1270d4ed8b0952f2fe585ff Mon Sep 17 00:00:00 2001 From: Jose Manuel Duarte Date: Tue, 9 Dec 2014 10:06:19 +0100 Subject: [PATCH 4/6] Adding asa chapter --- structure/asa.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 structure/asa.md diff --git a/structure/asa.md b/structure/asa.md new file mode 100644 index 0000000..4471dde --- /dev/null +++ b/structure/asa.md @@ -0,0 +1,2 @@ +# Calculating Accessible Surface Areas + From 2376728a0d316c2116d2608b80908676876a63e0 Mon Sep 17 00:00:00 2001 From: Jose Manuel Duarte Date: Tue, 9 Dec 2014 10:29:25 +0100 Subject: [PATCH 5/6] Update asa.md --- structure/asa.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/structure/asa.md b/structure/asa.md index 4471dde..2c2dea7 100644 --- a/structure/asa.md +++ b/structure/asa.md @@ -1,2 +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 From ef803d34b92683e006812b10950de7f9fd8dd463 Mon Sep 17 00:00:00 2001 From: Jose Manuel Duarte Date: Tue, 9 Dec 2014 10:30:06 +0100 Subject: [PATCH 6/6] Update asa.md --- structure/asa.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structure/asa.md b/structure/asa.md index 2c2dea7..792b044 100644 --- a/structure/asa.md +++ b/structure/asa.md @@ -4,7 +4,7 @@ BioJava can also do calculation of Accessible Surface Areas (ASA) through an imp This code will do the ASA calculation and output the values per residue and the total: ```java - AtomCache cache = new AtomCache(); + AtomCache cache = new AtomCache(); cache.setUseMmCif(true); StructureIO.setAtomCache(cache);