<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi,</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);">
With your helpful hints, I have a version of Jalview interacting with ChimeraX in the same way it can already with Chimera, over the REST interface.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Functionality includes loading structures, aligning, colouring, raising labels on structure on mouseover in Jalview, and exchange of residue features/attributes.</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);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">I have just one interaction not working yet: highlighting residues in Jalview when a selection is made in ChimeraX.</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;"> - Jalview starts listening for ChimeraX selections with (e.g.)</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
<p style="margin: 0px; font: 12px Menlo; margin: 0px">  info notify start selection jalview prefix SelectionChanged url
<a href="http://localhost:49981/jalview/chimera1">http://localhost:49981/jalview/chimera1</a></p>
<p style="margin: 0px; font: 12px Menlo; margin: 0px"></p>
</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px"> - user makes a selection in ChimeraX</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px"> - ChimeraX sends GET?chimerax_notification=</span><span style="font-family: Menlo; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal;">SelectionChangedselection+changed</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px"> - Jalview send 'i</span><span style="font-family: Menlo; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal;">nfo selection level residue'</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px"> - no response / timeout; ChimeraX log reports 'broken pipe error'</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px"><br>
</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px"><span>Exception happened during processing of request from ('127.0.0.1', 50714)<br>
</span>
<div>Traceback (most recent call last):<br>
</div>
<div>File "/Applications/ChimeraX_Daily.app/.../socketserver.py", line 316, in _handle_request_noblock<br>
</div>
<div>self.process_request(request, client_address)<br>
</div>
<div>File "/Applications/ChimeraX_Daily.app/.../socketserver.py", line 347, in process_request<br>
</div>
<div>self.finish_request(request, client_address)<br>
</div>
<div>File "/Applications/ChimeraX_Daily.app/.../socketserver.py", line 360, in finish_request<br>
</div>
<div>self.RequestHandlerClass(request, client_address, self)<br>
</div>
<div>File "/Applications/ChimeraX_Daily.app/.../socketserver.py", line 720, in __init__<br>
</div>
<div>self.handle()<br>
</div>
<div>File "/Applications/ChimeraX_Daily.app/.../http/server.py", line 426, in handle<br>
</div>
<div>self.handle_one_request()<br>
</div>
<div>File "/Applications/ChimeraX_Daily.app/.../http/server.py", line 414, in handle_one_request<br>
</div>
<div>method()<br>
</div>
<div>File "/Applications/ChimeraX_Daily.app/.../site-packages/chimerax/rest_server/server.py", line 97, in do_GET<br>
</div>
<div>self._run(args)<br>
</div>
<div>File "/Applications/ChimeraX_Daily.app/.../site-packages/chimerax/rest_server/server.py", line 174, in _run<br>
</div>
<div>self.wfile.write(data)<br>
</div>
<div>File "/Applications/ChimeraX_Daily.app/.../socketserver.py", line 799, in write<br>
</div>
<div>self._sock.sendall(b)<br>
</div>
<span>BrokenPipeError: [Errno 32] Broken pipe</span><br>
</span></div>
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
NB this is all before a response has been sent to the 'SelectionChanged' message.</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
Any idea what the problem is here please?</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
Do I need to reply to the first message before sending another?</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
The same mechanism does work ok with Chimera.</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);">
Thanks,</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);">
Mungo</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);">
p.s. <span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">I noticed the 'listinfo' <span style="font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255); display: inline !important">command (</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255); display: inline !important">undocumented)</span>
 seems to behave like 'info'. Should I continue to use 'list' or switch to 'info'?</span>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<ul>
<li><br>
</li></ul>
</div>
</div>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<span id="ms-rterangepaste-start"></span><a href="" style="font-family:Times"><img width="1" height="2" alt="Email signature" src="https://www.dundee.ac.uk/media/dundeewebsite/emailsignature/tiny.png"></a>
<table border="0" cellpadding="0" cellspacing="0" style="font-family:Times; border-collapse:collapse; border-width:0px">
<tbody>
<tr>
<td colspan="4" height="10"> </td>
</tr>
<tr>
<td style="font-size:10px; width:73px!important; max-width:73px!important"><a href="http://uod.ac.uk/sig-home" rel="nofollow"><img width="73" height="73" alt="University of Dundee shield logo" style="display:block" src="https://www.dundee.ac.uk/media/dundeewebsite/themes/brandnewhope/img/university-of-dundee-email-favicon.png"></a></td>
<td style="width:12px"> </td>
<td class="uod-03" style="border-left:1px solid rgb(67,101,226); width:11px"> </td>
<td width="430">
<p style="margin-top: 0px; margin-bottom: 0px;font-size:13px; color:rgb(67,101,226); line-height:20px; font-family:Calibri,sans-serif">
<strong style="letter-spacing:1.2px; font-size:14px">Mungo Carstairs</strong><br>
Jalview Computational Scientist</p>
<p style="margin-top: 0px; margin-bottom: 0px;font-size:13px; color:rgb(67,101,226); line-height:20px; font-family:Calibri,sans-serif">
The Barton Group<br>
Division of Computational Biology</p>
<p style="margin-top: 0px; margin-bottom: 0px;font-size:13px; color:rgb(67,101,226); line-height:20px; font-family:Calibri,sans-serif">
School of Life Sciences</p>
<p style="margin-top: 0px; margin-bottom: 0px;font-size:13px; color:rgb(67,101,226); line-height:20px; font-family:Calibri,sans-serif">
University of Dundee, Dundee, Scotland, UK</p>
<p style="margin-top: 0px; margin-bottom: 0px;font-size:13px; color:rgb(67,101,226); line-height:20px; font-family:Calibri,sans-serif">
<a href="http://www.jalview.org" class="OWAAutoLink">www.jalview.org</a></p>
<p style="margin-top: 0px; margin-bottom: 0px;font-size:13px; color:rgb(67,101,226); line-height:20px; font-family:Calibri,sans-serif">
<a href="http://www.compbio.dundee.ac.uk" class="OWAAutoLink">www.compbio.dundee.ac.uk</a> <br>
<a href="mailto:g.m.carstairs@dundee.ac.uk" style="text-decoration:none; color:rgb(67,101,226)">g.m.carstairs@dundee.ac.uk</a></p>
</td>
</tr>
<tr>
<td colspan="4" height="10"></td>
</tr>
<tr>
<td colspan="4"><span style="font-size:12px; color:rgb(67,101,226); line-height:20px; font-family:Calibri,sans-serif"><a href="http://uod.ac.uk/sig-fb"><img width="35" height="35" alt="University of Dundee Facebook" style="max-width:32px; margin-right:8px; height:auto!important" src="https://www.dundee.ac.uk/media/dundeewebsite/themes/brandnewhope/img/baxter-blue-facebook.png"></a> <a href="http://uod.ac.uk/sig-tw" alt="University of Dundee Twitter"><img width="35" height="35" alt="University of Dundee Twitter" style="max-width:32px; margin-right:8px; height:auto!important" src="https://www.dundee.ac.uk/media/dundeewebsite/themes/brandnewhope/img/baxter-blue-twitter.png"></a> <a href="http://uod.ac.uk/sig-li"><img width="35" height="35" alt="University of Dundee LinkedIn" style="max-width:32px; margin-right:8px; height:auto!important" src="https://www.dundee.ac.uk/media/dundeewebsite/themes/brandnewhope/img/baxter-blue-linkedin.png"></a> <a href="http://uod.ac.uk/sig-yt"><img width="35" height="35" alt="University of Dundee YouTube" style="max-width:32px; margin-right:8px; height:auto!important" src="https://www.dundee.ac.uk/media/dundeewebsite/themes/brandnewhope/img/baxter-blue-youtube.png"></a> <a href="http://uod.ac.uk/sig-ig"><img width="35" height="35" alt="University of Dundee Instagram" style="max-width:32px; margin-right:8px; height:auto!important" src="https://www.dundee.ac.uk/media/dundeewebsite/themes/brandnewhope/img/baxter-blue-instagram.png"></a> <a href="http://uod.ac.uk/sig-sc"><img width="35" height="35" alt="University of Dundee Snapchat" style="max-width:32px; margin-right:8px; height:auto!important" src="https://www.dundee.ac.uk/media/dundeewebsite/themes/brandnewhope/img/baxter-blue-snapchat.png"></a> </span></td>
</tr>
<tr>
<td colspan="4"><span style="font-size:11px; color:rgb(136,136,136); font-family:Calibri,sans-serif; line-height:12px"><a href="http://uod.ac.uk/sig-strapline" style="text-decoration:none; color:rgb(67,101,226)"><strong>We're Scottish University of the Year
 again!</strong></a><br>
The Times / Sunday Times Good University Guide 2016 and 2017</span></td>
</tr>
</tbody>
</table>
<span id="ms-rterangepaste-end"></span></div>
</div>
<br>
<span style="font-size:10pt;">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</body>
</html>