<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Great! I was going to suggest moving that information into the header section somehow as much easier than writing a custom PDB reader, so I'm glad you found some alternative that works.<div class=""><br class=""></div><div class="">--Eric<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jun 8, 2022, at 6:48 AM, Sophie Liu via ChimeraX-users <<a href="mailto:chimerax-users@cgl.ucsf.edu" class="">chimerax-users@cgl.ucsf.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Eric,<div class=""><br class=""></div><div class="">I ended up figuring an alternate implementation, and I can now retrieve the information I want.</div><div class=""><br class=""></div><div class="">Thank you so much for the help/pointers!</div><div class=""><br class=""></div><div class="">Best,</div><div class="">Sophie </div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 7, 2022 at 11:07 PM Sophie Liu <<a href="mailto:sophiel2@andrew.cmu.edu" class="">sophiel2@andrew.cmu.edu</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="auto" class="">Hi Eric,</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">The information really is at the end of the file after “TER†like. </div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Thank you so much for the information. I would really appreciate anymore guidance you can give. </div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">I really just need to be able to access the PDB in its entire text format or in some form that I can iterate through.</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Best,</div><div dir="auto" class="">Sophie</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">On Tue, Jun 7, 2022 at 8:32 PM Eric Pettersen <<a href="mailto:pett@cgl.ucsf.edu" target="_blank" class="">pett@cgl.ucsf.edu</a>> wrote:<br class=""></div><div class=""><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div style="word-wrap:break-word;line-break:after-white-space" class="">Hi Sophie,<div class=""><span style="white-space:pre-wrap" class=""> </span>The normal PDB reader does not preserve the full text of the PDB file as is. In particular, nothing in the "coordinates" section of the file (ATOM records and beyond) is preserved as text -- it is translated into data structures. Lines above the coordinates section are preserved in the 'metadata' attribute of the structure. For a PDB file, the metadata would be a dictionary keyed on record type (<i class="">e.g.</i><span style="font-style:normal" class=""> 'JRNL') with a </span>corresponding value of a list of lines of that record type. So if the information you are looking for is in the header lines then you are good to go. If the the information really is "at the end of the file" like you said, then you would need to implement your own reader that preserves that information. Let me know if you really need that and I will provide further guidance.</div><div class=""><br class=""></div><div class=""><div class="">--Eric</div><div class=""><br class=""></div><div class=""><span style="white-space:pre-wrap" class=""> </span>Eric Pettersen</div><div class=""><span style="white-space:pre-wrap" class=""> </span>UCSF Computer Graphics Lab</div></div><div class=""><br class=""></div><div class=""><div class=""><br class=""><blockquote type="cite" class=""></blockquote></div></div></div><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><div class=""><blockquote type="cite" class=""><div class="">On Jun 7, 2022, at 3:20 PM, Sophie Liu via ChimeraX-users <<a href="mailto:chimerax-users@cgl.ucsf.edu" target="_blank" class="">chimerax-users@cgl.ucsf.edu</a>> wrote:</div><br class=""></blockquote></div></div></div><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><div class=""><blockquote type="cite" class=""><div class=""></div></blockquote></div></div></div><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><div class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class="">Hi,<div class=""><br class=""></div><div class="">My organization has some extra information at the end of a PDB file that I would like to be printed onto the Log Console of ChimeraX. </div><div class=""><br class=""></div><div class="">I am currently writing a bundle to do so by adding a command (however if this is best implemented by overriding the open command for PDB files then I would switch to that).</div><div class=""><br class=""></div><div class="">I am wondering how I can have the bundle work like so:</div><div class="">1. the user types a command call it, "showdata"</div><div class="">2. the bundle would read all Models (that are pdb files) that are being displayed </div><div class="">3. for each model it would read the PDB text file, and say go to indices 200-251 of the string and display that in the Log console</div><div class=""><br class=""></div><div class="">I hope this makes sense. I am mainly struggling on how to access the original PDB text of the model.</div><div class=""><br class=""></div><div class="">Best,</div><div class="">Sophie</div></div></div></blockquote></div></div></div><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><div class=""><blockquote type="cite" class=""><div class="">
_______________________________________________<br class="">ChimeraX-users mailing list<br class=""><a href="mailto:ChimeraX-users@cgl.ucsf.edu" target="_blank" class="">ChimeraX-users@cgl.ucsf.edu</a><br class="">Manage subscription:<br class=""><a href="https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users" target="_blank" class="">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users</a><br class=""></div></blockquote></div><br class=""></div></div></blockquote></div></div>
</blockquote></div>
_______________________________________________<br class="">ChimeraX-users mailing list<br class=""><a href="mailto:ChimeraX-users@cgl.ucsf.edu" class="">ChimeraX-users@cgl.ucsf.edu</a><br class="">Manage subscription:<br class="">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users<br class=""></div></blockquote></div><br class=""></div></body></html>