Skip to content

Commit e6df557

Browse files
committed
Update crystal-contacts.md
1 parent 8fbb185 commit e6df557

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

structure/crystal-contacts.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,17 @@ The algorithm to find all unique interfaces in the crystal works roughly like th
4444

4545
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.
4646

47+
## Clustering the interfaces
48+
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:
49+
50+
```java
51+
List<StructureInterfaceCluster> clusters = interfaces.getClusters();
52+
for (StructureInterfaceCluster cluster:clusters) {
53+
System.out.print("Cluster "+cluster.getId()+" members: ");
54+
for (StructureInterface member:cluster.getMembers()) {
55+
System.out.print(member.getId()+" ");
56+
}
57+
System.out.println();
58+
}
59+
```
4760

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