[chimerax-users] Running ChimeraX and a REPL

Tom Mulvaney thomas.mulvaney at cssb-hamburg.de
Thu Oct 21 04:00:12 PDT 2021


Hi all,

I'm wondering if anyone has any experience running ChimeraX with either a standard REPL or IPython REPL?

ChimeraX already has a 'shell' tool that allows interacting with ChimeraX through a Python REPL which I've found invaluable for testing out ideas and poking around in ChimeraX in general.

It would be really nice though if I could send Python code directly from my IDE to be evaluated.  In order to make this work, it would be great if ChimeraX could be run from a terminal and provide a Python (or preferably IPython) REPL.  As it stands, I've managed to nearly make this work with the following script:

  import IPython.terminal.embed
  IPython.terminal.embed.embed()

I then run:

  ChimeraX --script repl.py

After typing, `%gui qt5`, the ChimeraX GUI appears.  

I can then interact with the REPL directly from the comfort of Emacs and evaluate things - but! - the main 3D view does not end up being displayed.

Does anyone know how to get the REPL and 3D stuff to work side-by-side?


Kind regards,

Tom



More information about the ChimeraX-users mailing list