<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Hi<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Can you explain the parent child relationship in Bio.PDB. <o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>I’m asking as what I’m reading here seems to be the opposite way round to how it is defined in the mmCIF dictionary. <o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Thanks<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>John<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>PDBe <o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> Biopython <biopython-bounces+jmb=ebi.ac.uk@mailman.open-bio.org> <b>On Behalf Of </b>Lenna Peterson<br><b>Sent:</b> 05 September 2019 13:51<br><b>To:</b> Peter Cock <p.j.a.cock@googlemail.com><br><b>Cc:</b> Biopython Mailing List <biopython@mailman.open-bio.org><br><b>Subject:</b> Re: [Biopython] Atom inheritance from Entity<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>That's my vote - more in keeping with LSP.<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Lenna<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Thu, Sep 5, 2019, 06:41 Peter Cock <<a href="mailto:p.j.a.cock@googlemail.com">p.j.a.cock@googlemail.com</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><p class=MsoNormal>Maybe there should be an additional top level base class (for all<br>entities including Atoms), and define Entity a subclass of this (for<br>entities with children)?<br><br>Would this help with defining the interface (even if Atom has its own<br>implementations of those methods)?<br><br>Peter<br><br>On Thu, Sep 5, 2019 at 12:07 AM João Rodrigues<br><<a href="mailto:j.p.g.l.m.rodrigues@gmail.com" target="_blank">j.p.g.l.m.rodrigues@gmail.com</a>> wrote:<br>><br>> Wouldn't it be weird for an Atom to have a get_children method? I'm somewhat more fine with a None attribute than a useless method.<br>><br>> A quarta, 4/09/2019, 09:08, Spencer Bliven <<a href="mailto:spencer.bliven@gmail.com" target="_blank">spencer.bliven@gmail.com</a>> escreveu:<br>>><br>>> Entity also provides methods for managing ids, transforming atoms, etc. My preference would be for everything to inherit from Entity and just have 0 children. This is also consistent with Structure, which is an Entity with 'None' parent.<br>>><br>>> -Spencer<br>>><br>>><br>>> On 4 September 2019 at 08:02:19, João Rodrigues (<a href="mailto:j.p.g.l.m.rodrigues@gmail.com" target="_blank">j.p.g.l.m.rodrigues@gmail.com</a>) wrote:<br>>><br>>> Hi Spencer,<br>>><br>>> Something that bugged me in the past as well. It would be nicer to have everyone inherit from a single point, but since Atoms don't have children, it would be confusing to have these methods there. My understanding is that Entity only exists to provide methods to handle iteration over children objects. It's a compromise?<br>>><br>>> Thanks for the efforts in typing the module!<br>>><br>>> João<br>>><br>>> Spencer Bliven <<a href="mailto:spencer.bliven@gmail.com" target="_blank">spencer.bliven@gmail.com</a>> escreveu no dia terça, 3/09/2019 à(s) 22:53:<br>>>><br>>>> I was wondering why Atom doesn't inherit from Entity. It doesn't have children, but it seems like it would be more consistent to have the whole Structure stack inherit from a single point. Is anyone aware of the history there?<br>>>><br>>>> I ask because I'm trying to add type annotations to Bio.PDB, and mypy flagged a number of places where my initial 'Entity' type conflicted with Atoms. We can certainly get around this by accepting either Entity or Atom, but I'm not sure that was intended.<br>>>><br>>>> -Spencer<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" target="_blank">https://mailman.open-bio.org/mailman/listinfo/biopython</a><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" target="_blank">https://mailman.open-bio.org/mailman/listinfo/biopython</a><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" target="_blank">https://mailman.open-bio.org/mailman/listinfo/biopython</a><o:p></o:p></p></blockquote></div></div></body></html>