moorhen 0.20.0-alpha.1 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +169 -0
  2. package/moorhen.js +2 -2
  3. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,169 @@
1
+ # Moorhen
2
+ [![NPM Version](https://badge.fury.io/js/moorhen.svg?style=flat)](https://npmjs.org/package/moorhen)
3
+ [![Inline docs](https://github.com/moorhen-coot/moorhen/actions/workflows/nightly-tests.yml/badge.svg)](https://github.com/moorhen-coot/Moorhen/actions/workflows/nightly-tests.yml)
4
+ [![Inline docs](https://github.com/moorhen-coot/MoorhenOrgBuild/actions/workflows/build-and-deploy.yml/badge.svg)](https://moorhen.org)
5
+ [![Inline docs](https://github.com/moorhen-coot/moorhen/actions/workflows/js-documentation.yml/badge.svg)](https://moorhen-coot.github.io/Moorhen/)
6
+ [![Inline docs](https://github.com/moorhen-coot/wiki/actions/workflows/jekyll.yml/badge.svg)](https://moorhen-coot.github.io/wiki/)
7
+
8
+ Moorhen is a web browser molecular graphics program based on the Coot desktop program.
9
+ It is developed by compiling some [CCP4](https://www.ccp4.ac.uk/) libraries and programs, [Coot](https://www2.mrc-lmb.cam.ac.uk/personal/pemsley/coot/) and their dependencies to Web Assembly and then combining with a React user interface.
10
+
11
+ The emscripten suite of tools is required to do the
12
+ compilation.
13
+
14
+ The sources of CCP4, Coot, Privateer, FFTW, and GSL are not included. They are downloaded and (possibly) patched by the build process of this project.
15
+
16
+ The following libraries/programs are compiled to Web Assembly:
17
+ * libccp4 (8.0.0)
18
+ * clipper ('gemmi' branch)
19
+ * ssm (1.4.0)
20
+ * mmdb2 (2.0.22)
21
+ * gemmi 0.7.0
22
+ * Coot 1.1.15
23
+ * fftw 2.1.5
24
+ * gsl 2.7.1
25
+ * Boost 1.86.0
26
+ * glm 0.9.9.8
27
+ * RDKit 2024\_09\_3
28
+ * Freetype
29
+
30
+ Moorhen is available to use at [https://moorhen.org](https://moorhen.org).
31
+
32
+ Further information can be found in our [wiki pages](https://moorhen-coot.github.io/wiki/) and our [dev. docs](https://moorhen-coot.github.io/Moorhen/).
33
+
34
+ ## **Binaries**
35
+
36
+ Binaries are available on the releases page. Please read the instructions there before using.
37
+
38
+ ## **Compilation instructions**
39
+
40
+ **Requirements**
41
+
42
+ * A Bourne-like shell
43
+ * git
44
+ * curl
45
+ * patch
46
+ * ninja
47
+ * meson
48
+ * cmake
49
+ * flex
50
+ * bison
51
+ * A *native* C++ compiler. (This is required for part of the `boost` build system).
52
+ * `autoconf`,`autotools`
53
+ * `libtool`
54
+ * emsdk/emscripten (Steps 1 and 2 below)
55
+ \
56
+ \
57
+ Most of these (except emscripten) can be installed by somelike like `sudo apt install git cmake curl patch meson ninja-build autoconf automake libtool flex bison g++` on a Debian like system. All of these should be available through Homebrew or Ports on macOS.
58
+ \
59
+ \
60
+ Moorhen should build on any reasonably recent version of macOS (Intel or Arm64) and any reasonly recent Linux distribution (x86\_64 or aarch64). Tested on Ubuntu 22.04 x86\_64, Raspberry Pi OS Bookworm/Debian 12 on Pi5, macOS Monteray and Sonama and others.
61
+
62
+ 1. Install emscripten (following [https://emscripten.org/docs/getting_started/downloads.html](https://emscripten.org/docs/getting_started/downloads.html)):
63
+ `git clone https://github.com/emscripten-core/emsdk.git`
64
+ `cd emsdk`
65
+ `git pull`
66
+ `./emsdk install latest`
67
+ `./emsdk activate latest`
68
+ (Moorhen is known to build successfully with emscripten version 4.0.7, the 15th April 2025 release.)
69
+
70
+ 2. Each time you want to use emscripten:
71
+ `source ./emsdk_env.sh`
72
+
73
+ 3. Get the source:
74
+ `git clone --recurse-submodules https://github.com/moorhen-coot/Moorhen.git`
75
+ `cd Moorhen`
76
+
77
+ 4. Build gsl, Boost, RDKIt, Coot, the CCP4 libraries and examples:
78
+ <br>In this branch, it is intended that you do the build in the source directory.
79
+ <br/>After first checkout you should run the following to build the 32-bit and 64-bit WebAssembly versions of Moorhen:
80
+ `./moorhen_build.sh`
81
+ `./moorhen_build.sh --64bit`
82
+ This should build all dependencies and then `Moorhen`.
83
+
84
+ **It is important to build both versions at the moment.**
85
+
86
+ 6. To run the Moorhen molecular graphics application:
87
+ `cd baby-gru`
88
+ `npm start`
89
+ And then point a web browser at `http://localhost:5173/` .
90
+
91
+ ## **Updating**
92
+
93
+ When you wish to update the application from this git repository and the `Coot` git repository, do the following steps:
94
+ 1. `git pull`
95
+ 2. `git submodule update -f --remote --merge`
96
+ 3. `cd checkout/coot-1.0`
97
+ 4. `git pull`
98
+ 5. `cd ../..`
99
+ 6. `./moorhen_build.sh moorhen`
100
+ 7. `./moorhen_build.sh --64bit moorhen`
101
+
102
+ ![Moorhen](wasm_src_frontend/baby_gru.png)
103
+ *The Moorhen application*
104
+
105
+ ## **What else can do with the compiled libraries?**
106
+
107
+ See `coot/moorhen-wrappers.cc` to see use of `EMSCRIPTEN_BINDINGS` to expose Coot methods to the web browser.
108
+
109
+ Any program you write, which uses the *subset* of Coot, Clipper, code which this project compiles to WASM, can
110
+ itself be compiled to WASM and used within node or Web Browser. Studying the examples should show you to do I/O, which is
111
+ different in the 2 cases. If you require more classes or methods from the libraries to be exposed to JavaScript, then changes need to be made to
112
+ `coot/moorhen-wrappers.cc`. This should only be necessary for browser usage - in node your whole program can be written in C++.
113
+
114
+ ## **References**
115
+
116
+ * Emscripten
117
+ * [https://emscripten.org/](https://emscripten.org/)
118
+ * [Emscripten: An LLVM-to-JavaScript Compiler](https://github.com/emscripten-core/emscripten/blob/main/docs/paper.pdf)
119
+ * Coot
120
+ * P. Emsley; B. Lohkamp; W.G. Scott; Cowtan (2010). *Features and Development of Coot*, Acta Crystallographica. **D66 (4)** p486–501.
121
+ * Privateer
122
+ * Agirre, J., Iglesias-Fernández, J., Rovira, C., Davies, G.J., Wilson, K.S. and Cowtan, K.D., (2015), *Privateer: software for the conformational validation of carbohydrate structures*, Nature Structural and Molecular Biology **22(11)**, p.833.
123
+ * Bagdonas, H., Ungar, D. and Agirre, J., (2020), *Leveraging glycomics data in glycoprotein 3D structure validation with Privateer*, Beilstein Journal of Organic Chemistry, **16(1)**, p2523-2533.
124
+ * Clipper
125
+ * Cowtan K (2003), *The Clipper C++ libraries for X‐ray crystallography*, IUCr Comput Comm Newslett **2**, p4–9
126
+ * CCP4
127
+ * Winn MD, Ballard CC, Cowtan KD, Dodson EJ, Emsley P, Evans PR, Keegan RM, Krissinel EB, Leslie AGW, McCoy A, McNicholas SJ, Murshudov GN, Pannu NS, Potterton EA, Powell HR, Read RJ, Vagin A, Wilson KS (2011), *Overview of the CCP4 suite and current developments*, Acta Cryst **D67**, p235–242.
128
+ * Gemmi
129
+ * [https://github.com/project-gemmi/gemmi](https://github.com/project-gemmi/gemmi)
130
+ * Gesamt
131
+ * Krissinel E. (2012), *Enhanced fold recognition using efficient short fragment clustering*, Journal of molecular biochemistry, **1(2)**, p76–85.
132
+ * ProSMART
133
+ * R.A. Nicholls, M. Fischer, S. McNicholas and G.N. Murshudov (2014) *Conformation-Independent Structural Comparison of Macromolecules with ProSMART.* Acta Cryst. **D70**, p2487-2499.
134
+ * GSL
135
+ * M. Galassi et al, GNU Scientific Library Reference Manual (3rd Ed.), ISBN 0954612078
136
+ * https://www.gnu.org/software/gsl/
137
+ * FFTW
138
+ * Frigo, Matteo and Johnson, Steven G. (2005), *The Design and Implementation of FFTW3*, Proceedings of the IEEE **93(2)**, p216-231.
139
+ * RDKit
140
+ * RDKit: Open-source cheminformatics [https://www.rdkit.org](https://www.rdkit.org)
141
+ * Boost
142
+ * Boost C++ libraries [https://www.boost.org/users/license.html](https://www.boost.org/users/license.html)
143
+ * GLM
144
+ * Open GL Mathematics [https://github.com/g-truc/glm](https://github.com/g-truc/glm)
145
+ * Eigen C++ Template Library
146
+ * Eigen: a c++ linear algebra library. [Libraries for scientific computing](http://www.association-aristote.fr/doku.php/public:seminaires:seminaire-2013-05-15). Ecole Polytechnique, May 15th, 2013
147
+ * Freetype
148
+ * FreeType is a freely available software library to render fonts. [https://www.freetype.org](https://www.freetype.org)
149
+ * Igraph
150
+ * Csardi G, Nepusz T (2006). *“The igraph software package for complex network research.”* InterJournal, Complex Systems, 1695. [https://igraph.org](https://igraph.org).
151
+ * Csárdi G, Nepusz T, Traag V, Horvát S, Zanini F, Noom D, Müller K (2024). *igraph: Network Analysis and Visualization in R.* [https://doi.org/10.5281/zenodo.7682609](https://doi.org/10.5281/zenodo.7682609), R package version 2.1.1, [https://CRAN.R-project.org/package=igraph](https://CRAN.R-project.org/package=igraph) .
152
+ * JsonCPP
153
+ * [https://github.com/open-source-parsers/jsoncpp](https://github.com/open-source-parsers/jsoncpp)
154
+ * Libpng
155
+ * [https://github.com/pnggroup/libpng](https://github.com/pnggroup/libpng)
156
+ * libsigcplusplus
157
+ * [https://libsigcplusplus.github.io/libsigcplusplus/](https://libsigcplusplus.github.io/libsigcplusplus/)
158
+ * Privateer
159
+ * The Web app: Dialpuri, J. S., Bagdonas, H., Schofield, L. C., Pham, P. T., Holland, L., Bond, P. S., Sánchez Rodríguez, F., McNicholas, S. J. & Agirre, J. (2024). *Online carbohydrate 3D structure validation with the Privateer web app.* Acta Cryst. **F80**, 30-35.
160
+ * General Privateer citation (old): Agirre, J., Iglesias-Fernández, J., Rovira, C., Davies, G.J., Wilson, K.S. and Cowtan, K.D., 2015. *Privateer: software for the conformational validation of carbohydrate structures.* Nature Structural and Molecular Biology, **22(11)**, p.833.
161
+ * Glycomics powered validation: Bagdonas, H., Ungar, D. and Agirre, J., 2020. *Leveraging glycomics data in glycoprotein 3D structure validation with Privateer.* Beilstein Journal of Organic Chemistry, **16(1)**, 2523-2533.
162
+ * Theory behind Privateer: Agirre, J., 2017. *Strategies for carbohydrate model building, refinement and validation.* Acta Crystallographica Section D, **73(2)**, pp.171-186.
163
+ * Torsional analyses: Dialpuri, J. S., Bagdonas, H., Atanasova, M., Schofield, L. C., Hekkelman, M. L., Joosten, R. P. & Agirre, J., 2023. *Analysis and validation of overall N-glycan conformation in Privateer.* Acta Crystallographica Section D, **79**, 462-472.
164
+ * Zlib
165
+ * Adler, Mark (22 January 2024). "[Zlib-announce](https://madler.net/pipermail/zlib-announce_madler.net/2024/000015.html) zlib 1.3.1 released". Retrieved 23 January 2024.
166
+ * PubChem
167
+ * Kim S, Chen J, Cheng T, Gindulyte A, He J, He S, Li Q, Shoemaker BA, Thiessen PA, Yu B, Zaslavsky L, Zhang J, Bolton EE. PubChem 2023 update. Nucleic Acids Res. 2023 Jan 6;51(D1):D1373-D1380. [https://doi.org/10.1093/nar/gkac956](https://doi.org/10.1093/nar/gkac956). PMID: 36305812
168
+ * SMILES
169
+ * Weininger, David *SMILES, a chemical language and information system. 1. Introduction to methodology and encoding rules* Journal of Chemical Information and Computer Sciences **28(1)**, p31-36 (1988) [https://doi.org/10.1021/ci00057a005](https://doi.org/10.1021/ci00057a005)