<div dir="ltr"><div>For anyone interested in this thread on developing a single large array of atom coordinates for chains in Bio/PDB, please have a look at <a href="https://github.com/biopython/biopython/pull/3774">https://github.com/biopython/biopython/pull/3774</a> . The atom array part wasn't the goal of my work, just came out in developing the internal <-> XYZ coordinate code to work better with NumPy - so please just consider it as a sample implementation. <br></div><div><br></div><div>In this work buildAtomArray() runs when calculating internal coordinates (dihedral angles) or has to be explicitly called, but after that the Atom coordinates are views into the larger array. This means existing code should be unaffected, while additional code can work with the atom array or not.</div><div><br></div><div>See <a href="https://github.com/rob-miller/rtm-biopython-scripts">https://github.com/rob-miller/rtm-biopython-scripts</a> for sample code.</div><div><br></div><div>rob miller.</div><div><br> </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 22, 2019 at 11:41 PM Patrick Kunzmann <<a href="mailto:padix.kleber@gmail.com">padix.kleber@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Hello Joao,<br>
</p>
<p>sounds like a good idea. How do I join the 3DSIG Slack workspace?</p>
<p>Best regards,</p>
<p>Patrick Kunzmann<br>
</p>
<p><br>
</p>
<div>On 16.10.19 19:54, João Rodrigues
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi Patrick,</div>
<div><br>
</div>
<div>Thank you again for bringing this up. I do agree with you
that this is a necessity.</div>
<div><br>
</div>
<div>When Bio.PDB first showed up, there were not so many Python
libraries out there for molecular structures. Now there are a
few, so we should think carefully about what features we want
to offer - not to overlap with others and duplicate efforts.
My opinion is that BioPython is very good at generally
handling structures, allowing you do change fields, select
bits, etc, and do very simple calculations like distances or
superimpositions. At the CodeFest in Basel, we talked that it
would be awesome to have a selection language built-in
bioptyhon to allow us to do something like `mol.select("chain
A").write("chain_A.pdb")`. This also requires an overhaul of
the data structures we use to store atomic data.</div>
<div><br>
</div>
<div>I have some time in the next few months I could spare to
work on this. Interfacing with Biotite would be interesting as
well (as well as with other packages). I'll start a #biopython
channel at the 3DSIG slack so that we can coordinate efforts.
How does this sound?</div>
<div><br>
</div>
<div>Cheers and again, thanks for bringing this up!</div>
<div><br>
</div>
<div>Joao<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Patrick Kunzmann <<a href="mailto:padix.kleber@gmail.com" target="_blank">padix.kleber@gmail.com</a>>
escreveu no dia quarta, 16/10/2019 à(s) 09:38:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello
Biopythoneers,<br>
<br>
at the BOSC this year we talked about overhauling the Bio.PDB
module. <br>
The problem is that currently the atom coordinates are stored
in a <br>
separate NumPy array for each atom. This design prevents
efficient <br>
computation of all kinds of analyses (distances, angles, <br>
superimpositions, etc.). One proposed possible solution to
this problem, <br>
we talked about, was to put the coordinates of the entire
structure in <br>
one NumPy array, and let the Atom, Residue, Chain and
Structure objects <br>
point to positions in this array. The benefit of this approach
is that <br>
functions could be directly applied onto the entire array,
harnessing <br>
the power of vectorization.<br>
<br>
For the analysis we could adapt the vectorized functions from
the Python <br>
package Biotite, a project I am currently working on <br>
(<a href="https://www.biotite-python.org/apidoc/biotite.structure.html" rel="noreferrer" target="_blank">https://www.biotite-python.org/apidoc/biotite.structure.html</a>).
Usually, <br>
these functions already accept the coordinates as NumPy array,
so I <br>
think only a few tweaks would be necessary for every function.<br>
<br>
However, we would require one person or a small team who makes
the <br>
effort to implement the new structure types and adapts the
analysis <br>
functions. I could offer a pair of helping hands in the
adaption of the <br>
analysis functions, but I don't have the time for anything
more.<br>
<br>
So the question is: Is there anyone out there, who is willing
to do this <br>
work? Alternatively, I would propose to write a 'bridge'
package between <br>
Biopython and Biotite, that converts the Biopython structure <br>
representation into the representation in Biotite and vice
versa. I <br>
think, this solution is less elegant but would also require
less effort.<br>
<br>
Best regards<br>
<br>
Patrick Kunzmann<br>
<br>
_______________________________________________<br>
Biopython mailing list - <a href="mailto:Biopython@mailman.open-bio.org" target="_blank">Biopython@mailman.open-bio.org</a><br>
<a href="https://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">https://mailman.open-bio.org/mailman/listinfo/biopython</a><br>
</blockquote>
</div>
</blockquote>
</div>
_______________________________________________<br>
Biopython mailing list - <a href="mailto:Biopython@mailman.open-bio.org" target="_blank">Biopython@mailman.open-bio.org</a><br>
<a href="https://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">https://mailman.open-bio.org/mailman/listinfo/biopython</a></blockquote></div>