[Openchemistry-developers] Avogadro2 RPC?

Patrick Avery psavery at buffalo.edu
Thu May 25 23:06:26 EDT 2017


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.

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.

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:

Mac-mini:~ patrick$ ls $TMPDIR/avogadro

ls: /var/folders/90/6dyftwnx3jz5q4qwr79yb9f00000gp/T//avogadro: No such
file or directory


But when I am running the binary that I compiled:

Mac-mini:prefix patrick$ ls $TMPDIR/avogadro

*/var/folders/90/6dyftwnx3jz5q4qwr79yb9f00000gp/T//avogadro*

it's there. So I'm not sure why the binary on the website isn't producing
it, then.

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.

Thanks,
Patrick

On Thu, May 25, 2017 at 7:41 PM, Marcus D. Hanwell <
marcus.hanwell at kitware.com> wrote:

> On Thu, May 25, 2017 at 7:22 PM, Patrick Avery <psavery at buffalo.edu>
> wrote:
>
>>
>> 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).
>>
>
> 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 ;-)
>
>>
>> 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.
>>
>
> 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.
>
>>
>> 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".
>>
>> 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.
>
> 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.
>
> 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.
>
> Marcus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/openchemistry-developers/attachments/20170525/df582788/attachment.html>


More information about the Openchemistry-developers mailing list