1 |
import java.io.File; |
2 |
|
3 |
import proteinstructure.Pdb; |
4 |
import proteinstructure.PdbasePdb; |
5 |
import proteinstructure.TemplateList; |
6 |
import tools.MySQLConnection; |
7 |
|
8 |
/** |
9 |
* Executable class to calculate volumes and surfaces for a list of pdb codes |
10 |
* using the calc-volume and calc-surface programs |
11 |
* @author duarte |
12 |
* |
13 |
*/ |
14 |
public class calcVolsAndSurfs { |
15 |
|
16 |
|
17 |
private static final String LIST = "/project/StruPPi/jose/optimal_reconstruction/model_pdbs.txt"; |
18 |
private static final String CALCSURF_EXE = "/project/StruPPi/Software/libproteingeometry-2.3.1/bin/calc-surface"; |
19 |
private static final String CALCVOL_EXE = "/project/StruPPi/Software/libproteingeometry-2.3.1/bin/calc-volume"; |
20 |
|
21 |
public static void main(String[] args) throws Exception { |
22 |
|
23 |
MySQLConnection conn = new MySQLConnection(); |
24 |
|
25 |
String[] pdbIds = TemplateList.readIdsListFile(new File(LIST)); |
26 |
|
27 |
for (String pdbId:pdbIds) { |
28 |
System.out.print(pdbId+"\t"); |
29 |
String pdbCode = pdbId.substring(0,4); |
30 |
String pdbChainCode = pdbId.substring(4,5); |
31 |
Pdb pdb = new PdbasePdb(pdbCode, "pdbase", conn); |
32 |
pdb.load(pdbChainCode); |
33 |
System.out.printf("%10.3f\t",pdb.calcVolume(CALCVOL_EXE, "")); |
34 |
System.out.printf("%10.3f\n",pdb.calcSurface(CALCSURF_EXE, "")); |
35 |
} |
36 |
|
37 |
|
38 |
} |
39 |
|
40 |
} |