<div dir="ltr"><div>Barry,<br></div><div><br></div><div>The shell tool is under Tools -> General on the ChimeraX menu.
There's some API documentation online here: <a href="https://www.cgl.ucsf.edu/chimerax/docs/devel/index.html">https://www.cgl.ucsf.edu/chimerax/docs/devel/index.html</a>.</div><div><br></div><div>Models should also have an 'opened_data_format' attribute with info about which file parser was used (e.g. <a href="http://model.opened_data_format.name">model.opened_data_format.name</a>). This could be one way to limit models to only PDB or whatever you'd be able to support. <br></div><div><br></div><div>Tony<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 19, 2023 at 12:57 PM BARRY E DEZONIA via ChimeraX-users <<a href="mailto:chimerax-users@cgl.ucsf.edu">chimerax-users@cgl.ucsf.edu</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 class="msg-263679172433795410">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks Tom,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
How do you invoke this python shell? A quick google search turns up nothing. The command line in the chimerax app does not allow tab completion. I've tried running 'chimerax --nogui' from the command line and that gives me a shell but no tab completion is possible
there either.<br>
</div>
<div id="m_-6419325199671734922appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="m_-6419325199671734922divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Thomas Mulvaney <<a href="mailto:thomas.mulvaney@cssb-hamburg.de" target="_blank">thomas.mulvaney@cssb-hamburg.de</a>><br>
<b>Sent:</b> Wednesday, April 19, 2023 1:36 PM<br>
<b>To:</b> BARRY E DEZONIA <<a href="mailto:barry.dezonia@wisc.edu" target="_blank">barry.dezonia@wisc.edu</a>><br>
<b>Cc:</b> <a href="mailto:chimerax-users@cgl.ucsf.edu" target="_blank">chimerax-users@cgl.ucsf.edu</a> <<a href="mailto:chimerax-users@cgl.ucsf.edu" target="_blank">chimerax-users@cgl.ucsf.edu</a>><br>
<b>Subject:</b> Re: [chimerax-users] Hopefully simple plugin development question</font>
<div> </div>
</div>
<div>
<div>Hi Barry,</div>
<div><br>
</div>
<div>The list of current models the user is viewing is in the `session.models` variable.</div>
<div><br>
</div>
<div>Assuming the user has only one PDB file open, you can just do `session.models[0].filename` which will return the path to the PDB file they opened.</div>
<div><br>
</div>
<div>I've discovered most of the functionality I needed by poking around in the Python Shell that ships with ChimeraX and hitting tab to find out the attributes and methods that objects have.</div>
<div><br>
</div>
<div>Hope that helps,</div>
<div><br>
</div>
<div>Tom</div>
<div>
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>—<br>
Tom Mulvaney<br>
PhD Student <br>
Centre for Structural Systems Biology (CSSB)<br>
Research Group of Prof. Dr. Maya Topf<br>
c/o DESY, Building 15<br>
Notkestraße 85, 22607 Hamburg<br>
Germany</div>
</div>
</div>
<div><br>
<blockquote type="cite">
<div>On 19. Apr 2023, at 20:05, BARRY E DEZONIA via ChimeraX-users <<a href="mailto:chimerax-users@cgl.ucsf.edu" target="_blank">chimerax-users@cgl.ucsf.edu</a>> wrote:</div>
<br>
<div>
<div style="font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">
Hello,</div>
<div style="font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">
<br>
</div>
<div style="font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">
I am looking at writing a plugin for chimerax that takes a pdb and runs some python code that will calc some stuff hand stuff to other programs. I know how to do this. What I want to know is how to find the current model's name / associated pdb filename from
my plugin. Imagine my plugin really is just a "Run" button that looks up the current model, generates the associated pdb filename, and passes that name to my python script. Can someone tell me how in a chimerax plugin I can make the call that will give me
the pdb filename I want? I've read much of the developer docs and could not find what I was looking for.<br>
</div>
<span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">_______________________________________________</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">ChimeraX-users
mailing list</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<a href="mailto:ChimeraX-users@cgl.ucsf.edu" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">ChimeraX-users@cgl.ucsf.edu</a><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">Manage
subscription:</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<a href="https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users</a></div>
</blockquote>
</div>
<br>
</div>
</div>
_______________________________________________<br>
ChimeraX-users mailing list<br>
<a href="mailto:ChimeraX-users@cgl.ucsf.edu" target="_blank">ChimeraX-users@cgl.ucsf.edu</a><br>
Manage subscription:<br>
<a href="https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users" rel="noreferrer" target="_blank">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users</a><br>
</div></blockquote></div>