<div dir="ltr"><div><div><div><div><div>Actually, for Windows, it looks like it might be working - partly at least. The same code I wrote for communicating through the RPC on Mac and Linux kind of works. As in, it seems that some messages get through, but not all. I might need to play around with it some and see if I can get the communication working consistently. <br><br>I used the program "pipelist" to check if the avogadro server is being created, and it looks like it indeed is. I haven't tried compiling Avogadro2 on Windows myself yet, though.<br><br></div><div>For Mac, however, my own compiled Avogadro2 generates the server correctly, but the mac binary on the website does not. I have been able to check it multiple ways - including seeing if my program can communicate with the server. When the server gets created, it is placed in $TMPDIR. So if I type "ls $TMPDIR/avogadro", I can check to see if it exists. When I am running the binary from the website, this is what happens:<br></div><div><br><div dir="ltr"><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Mac-mini:~ patrick$ ls $TMPDIR/avogadro</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">ls: /var/folders/90/<wbr>6dyftwnx3jz5q4qwr79yb9f00000gp<wbr>/T//avogadro: No such file or directory</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p></div></div>But when I am running the binary that I compiled:<br><br><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Mac-mini:prefix patrick$ ls $TMPDIR/avogadro</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">
</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(52,189,38)"><span style="font-variant-ligatures:no-common-ligatures"><b>/var/folders/90/<wbr>6dyftwnx3jz5q4qwr79yb9f00000gp<wbr>/T//avogadro</b></span></p></div><div><br></div>it's there. So I'm not sure why the binary on the website isn't producing it, then.<br><br></div>Anyways, I'm going to keep looking at the Windows one for now. And I'll work on making some markdown documentation soon as well - since I know how to do it for sure on Linux at least.<br><br></div>Thanks,<br></div>Patrick<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 25, 2017 at 7:41 PM, Marcus D. Hanwell <span dir="ltr"><<a href="mailto:marcus.hanwell@kitware.com" target="_blank">marcus.hanwell@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Thu, May 25, 2017 at 7:22 PM, Patrick Avery <span dir="ltr"><<a href="mailto:psavery@buffalo.edu" target="_blank">psavery@buffalo.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><br></div>I was able to meet (in person) and speak with Geoff yesterday. I think we are both on the same page that we'd like to see the RPC features in Avogadro2 be available in the binaries (and perhaps some documentation so that other programmers can more easily use it as well).<br></div></div></div></div></div></blockquote><div><br></div></span><div>Patrick, that sounds good. There was never an intentional removal of the RPC procedure from the binaries, and I have been on this page for quite a few years already ;-) </div><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><br></div>It is attractive because it would allow programmers working on any kind of molecular code to use Avogadro2 for the rendering of their molecules/crystals without having to link with Avogadro2 during compilation. It also allows for the rendering to be easily optional for users (if the user wants to render molecules with that program, they can download and start up Avogadro2; and if they don't want to render molecules, they don't have to do anything). I think this would certainly increase the number of people who use Avogadro2.<br></div></div></div></div></blockquote><div><br></div></span><div>Agreed, that is why I wanted to add some RPC capabilities, and think that it is an important feature. This is why we worked on the RPC stuff, and I have some ideas of doing this from a Python-based project. </div><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><br></div>I'm willing to help clean it up and write some documentation for it. So I was just wondering: what kinds of changes (if any) do you think need to be made to get the RPC features as a part of the released binaries? And where would the documentation go? I could write a "how to get your program to render molecules with Avogadro2 RPC".<br><br></div></div></div></blockquote></span><div>There isn't a great deal I am aware of, we could add an option to disable the feature at runtime, but I think it is reasonable to enable it by default. I will make sure the new binaries have the feature enabled (and am not certain why this wasn't enabled last time). The local sockets mean that only the local user can remote control Avogadro 2.</div><div><br></div><div>In the first instance for documentation you could add a markdown file, or put something on the wiki. I have always hated the assumption that you must link to C++ to use it, and would like to promote more local services like this. Did you confirm this was not working on Windows and macOS? Windows has always been a little finicky as it uses a different API than macOS and Linux, but these are based on QLocalSocket.</div><div><br></div><div>Hope that helps, and like I said more than happy to ensure the next release features the RPC server, it reuses what was build for MoleQueue, so I will see if I can find any issues in that.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Marcus</div></font></span></div><br></div></div>
</blockquote></div><br></div>