ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/owl/trunk/testPdb.java
Revision: 127
Committed: Wed May 9 14:54:02 2007 UTC (17 years, 4 months ago) by duarte
File size: 1130 byte(s)
Log Message:
Implemented read of pdb data from pdb file.
FIXED BUG in dumping of pdb file. Was missing end of line in atom lines
Added more tests in testPdb

Line User Rev File contents
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     }