[Owl-devel] Interface change in owl

Jose M. Duarte jose.m.duarte at gmail.com
Wed Mar 30 03:42:04 EDT 2011

Good morning all

I am about to commit some important changes to owl. Basically the main way
of loading PDB data is changing to make things more consistent. Together
with that I've done some refactoring hoping to aid consistency again.

We used to load PDB data one chain at a time with this kind of construction:

- for pdb file

Pdb pdb = new PdbfilePdb("/path/mypdbfile.pdb");

- for cif file

Pdb pdb = new CiffilePdb("/path/myciffile.cif");

- for pdbase

Pdb pdb = new PdbasePdb("1abc",new MySQLConnection(),"pdbase");

Now this changes to a hopefully less cumbersome approach. The recently added
PdbAsymUnit class will be able to load full PDBs at once with all their
chains. One can then use that or simply take a chain from it. At the same
time Pdb is now called PdbChain. So this is how you would do the above now:

- for pdb file or cif file

PdbAsymUnit pdb = new PdbAsymUnit("/path/myfile.pdb-or-.cif");
PdbChain chain = pdb.getChain("A");

- for pdbase

PdbAsymUnit pdb = new PdbAsymUnit("1abc",new MySQLConnection(),"pdbase");
PdbChain chain = pdb.getChain("A");

With this the PdbfilePdb, CiffilePdb and PdbasePdb classes that were
subclasses of Pdb are now standalone parser classes and are hidden from the
user. One needs to use only PdbAsymUnit for a whole asymmetric unit (i.e. a
whole PDB structure) and then PdbChain for single chains within it.

Hope this makes things easier. All code we had in owl and cmview has been
changed accordingly. If you want to access the code before this change then
you'll need to check out the last tag owl-1.9.3 instead of the trunk.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.bioinformatics.org/pipermail/owl-devel/attachments/20110330/16e1670a/attachment.html>

More information about the Owl-devel mailing list