| 1 |
--- |
| 2 |
layout: post |
| 3 |
title: "Moorhen" |
| 4 |
date: Sun 16 Apr 20:20:01 GMT 2023 |
| 5 |
--- |
| 6 |
|
| 7 |
Moorhen is "Coot on the Web"! |
| 8 |
|
| 9 |
Q: OK, so why "Moorhen"? |
| 10 |
|
| 11 |
A: Althought "WebCoot" may have been a more obvious name for the project, we decided that "Moorhen" would |
| 12 |
more fairly reflect that this project is the work of more than just me. The "meta" of the name is mean to be |
| 13 |
interpretted as "quite like (a) Coot internally, but a bit different on the outside." |
| 14 |
|
| 15 |
The Moorhen project is being developed, at the moment, by Filomeno |
| 16 |
Rodriguez Sanchez, Stuart McNichollas, Martin Noble and me. |
| 17 |
|
| 18 |
Q: So... what is Moorhen? |
| 19 |
|
| 20 |
A: Moorhen is, at least at the moment, Coot in the web browser. There is no server! |
| 21 |
(Other that the trivial server that sends the app to your web browser.) All the computation is done in |
| 22 |
the browser. |
| 23 |
|
| 24 |
Q: OK, go on. |
| 25 |
|
| 26 |
A: Moorhen is made possible (or tractable) by [WebAssembly](https://webassembly.org/). WebAssembly is a |
| 27 |
binary format designed to work on a virtual machine (inside your web browser). |
| 28 |
|
| 29 |
Q: OK, how does that help? |
| 30 |
|
| 31 |
A: From the beginning, Coot has had architecture that separated the comutational libraries from the |
| 32 |
display. In 2022, this was concretized into a full-Coot like interface (in that the molecules are refered to |
| 33 |
by index) but without using the GUI (which is complex and heavyweight, requiring Gtk+ and OpenGL). |
| 34 |
This interface is called [libcootapi](https://pemsley.github.io/coot/blog/2023/02/26/libcootapi.html). |
| 35 |
|
| 36 |
In retrospect this division was not as clean and precise as it might have been - in particular the |
| 37 |
real-space refinement has an intimate and intricate interface between the computational components and the |
| 38 |
part of the program that actually draws the molecules. The use of multi-threading made this interface more |
| 39 |
complex still. |
| 40 |
|
| 41 |
Nevertheless, I was able to create an interface that encapsulated a good deal of _Coot_ functionality. |
| 42 |
|
| 43 |
Because it has been divorced from the standard GUI, **libcootapi** is available for additional/alternative |
| 44 |
interfaces. Naturally, one of those is Python. With additional interface functions, another is Blender |
| 45 |
(Coot+Blender will have its own blog post later). |
| 46 |
|
| 47 |
Q: OK, I want to try it. |
| 48 |
|
| 49 |
A: You can try Moorhen at [moorhen.org](https://moorhen.org). |
| 50 |
|