Skip to content

Commit 2376728

Browse files
committed
Update asa.md
1 parent 41047d9 commit 2376728

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

structure/asa.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,36 @@
11
# Calculating Accessible Surface Areas
22

3+
BioJava can also do calculation of Accessible Surface Areas (ASA) through an implementation of the rolling ball algorithm of Shrake and Rupley [Shrake 1973].
4+
5+
This code will do the ASA calculation and output the values per residue and the total:
6+
```java
7+
AtomCache cache = new AtomCache();
8+
cache.setUseMmCif(true);
9+
10+
StructureIO.setAtomCache(cache);
11+
12+
Structure structure = StructureIO.getStructure("1smt");
13+
14+
AsaCalculator asaCalc = new AsaCalculator(structure,
15+
AsaCalculator.DEFAULT_PROBE_SIZE,
16+
1000, 1, false);
17+
18+
GroupAsa[] groupAsas = asaCalc.getGroupAsas();
19+
20+
double tot = 0;
21+
22+
for (GroupAsa groupAsa: groupAsas) {
23+
System.out.printf("%1s\t%5s\t%3s\t%6.2f\n",
24+
groupAsa.getGroup().getChainId(),
25+
groupAsa.getGroup().getResidueNumber(),
26+
groupAsa.getGroup().getPDBName(),
27+
groupAsa.getAsaU());
28+
tot+=groupAsa.getAsaU();
29+
}
30+
31+
System.out.printf("Total area: %9.2f\n",tot);
32+
33+
```
34+
See [DemoAsa](https://github.com/biojava/biojava/blob/master/biojava3-structure/src/main/java/demo/DemoAsa.java) for a fully working demo.
35+
36+
[Shrake 1973]: http://www.sciencedirect.com/science/article/pii/0022283673900119

0 commit comments

Comments
 (0)