Yes you are right. I was thinking also in having the option to pass only one chain (or a subset of chains). That's easy to do, we could implement constructors for that.<br><br>But, keep in mind that the treating of models remains as before: we only load one model at a time. If one wants several models then you need to instantiate several PdbAsymUnit objects each with all chains for each model.<br>
<br>Jose<br><br><br><br><div class="gmail_quote">On 30 March 2011 10:18, Henning Stehr <span dir="ltr"><<a href="mailto:h.stehr@gmail.com">h.stehr@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><span style="font-size: 10pt; font-family: Arial; font-weight: normal;">Hi Jose,<br><br>That's very cool. Much better than before. Cheers for that!<br><br>One question: For proteins with many chains, this may increase the memory consumption quite a bit, won't it? Would it be possible to (optionally) do 'lazy loading' of chains, i.e. Only load them to memory when they are needed? This way we could also load multi-model pdbs 'lazily' without eating up all memory.<br>
<br>Cheers,<br>Henning</span><br><br><hr><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From: </span><span style="font-size: 10pt; font-family: Tahoma; font-weight: normal;">Jose M. Duarte <<a href="mailto:jose.m.duarte@gmail.com" target="_blank">jose.m.duarte@gmail.com</a>></span><br>
<span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">Sent: </span><span style="font-size: 10pt; font-family: Tahoma; font-weight: normal;">Mittwoch, 30. März 2011 09:42</span><br><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">To: </span><span style="font-size: 10pt; font-family: Tahoma; font-weight: normal;"><a href="mailto:owl-devel@bioinformatics.org" target="_blank">owl-devel@bioinformatics.org</a></span><br>
<span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">Subject: </span><span style="font-size: 10pt; font-family: Tahoma; font-weight: normal;">[Owl-devel] Interface change in owl</span><br><br>Good morning all<br>
<br>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.<br>
<br>We used to load PDB data one chain at a time with this kind of construction:<br><br>- for pdb file<br><br>Pdb pdb = new PdbfilePdb("/path/mypdbfile.pdb");<br>pdb.load("A");<br><br>- for cif file<br>
<br>Pdb pdb = new CiffilePdb("/path/myciffile.cif");<br>pdb.load("A");<br><br>- for pdbase<br><br>Pdb pdb = new PdbasePdb("1abc",new MySQLConnection(),"pdbase");<br>pdb.load("A");<br>
<br><br>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:<br>
<br>- for pdb file or cif file<br><br>PdbAsymUnit pdb = new PdbAsymUnit("/path/myfile.pdb-or-.cif");<br>PdbChain chain = pdb.getChain("A");<br><br>- for pdbase<br><br>PdbAsymUnit pdb = new PdbAsymUnit("1abc",new MySQLConnection(),"pdbase");<br>
PdbChain chain = pdb.getChain("A");<br><br>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.<br>
<br>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.<br>
<br>Cheers<br><br>Jose<br><br></div></blockquote></div><br>