1 |
duarte |
125 |
import java.io.IOException; |
2 |
|
|
|
3 |
|
|
import proteinstructure.Graph; |
4 |
|
|
import proteinstructure.Pdb; |
5 |
|
|
import proteinstructure.PdbaseAcCodeNotFoundError; |
6 |
|
|
import proteinstructure.PdbaseInconsistencyError; |
7 |
|
|
public class testPdb { |
8 |
|
|
|
9 |
|
|
/** |
10 |
|
|
* Test class for classes in aglappe.proteinstructure package (Pdb, Graph, AA, Contact) |
11 |
|
|
* Loads structure data from db and calculates graph dumping contacts to file |
12 |
|
|
*/ |
13 |
|
|
|
14 |
|
|
public static void main(String[] args) throws IOException, PdbaseInconsistencyError, PdbaseAcCodeNotFoundError{ |
15 |
|
|
System.out.println("loading structure"); |
16 |
duarte |
127 |
Pdb pdb = new Pdb("1bxy","A"); |
17 |
|
|
System.out.println("dumping structure to pdb file"); |
18 |
|
|
pdb.dump2pdbfile("testpdb.txt"); |
19 |
duarte |
125 |
System.out.println("getting graph"); |
20 |
|
|
Graph graph = pdb.get_graph("Ca", 8.0); |
21 |
|
|
System.out.println("dumping contacts to file"); |
22 |
|
|
graph.write_contacts_to_file("test.txt"); |
23 |
|
|
|
24 |
duarte |
127 |
System.out.println("reading from dumped pdb file"); |
25 |
|
|
Pdb pdb2 = new Pdb("testpdb.txt"); |
26 |
|
|
System.out.println("getting graph"); |
27 |
|
|
Graph graph2 = pdb2.get_graph("Ca", 8.0); |
28 |
|
|
System.out.println("dumping contacts to file"); |
29 |
|
|
graph2.write_contacts_to_file("test2.txt"); |
30 |
duarte |
125 |
} |
31 |
|
|
|
32 |
|
|
} |