29 Commits

Author SHA1 Message Date
Greg Landrum
e4f199389b swap zlib download to use github (#9123) 2026-02-19 12:12:36 +01:00
Paul Pillot
b952b740d3 Cannot build JS bindings with MCS option enabled. (#9110)
* Cannot push_back std::string to boost json array

`boost::json::array.push_back` expects a `value`

* prefer emplace_back to avoid casting

* Ensure every MINIMAL_LIB option is tested in CI

Also remove Chemdraw support from the compilation. This does not change the final size of the output (not exported anyways) but it reduces the compilation time by 1 min (-10% on my local machine)

* Expose MMPA with other options

* Fix MMPA compilation: Implicitly binding raw pointers is illegal

Applying same pattern as in `get_frags_helper`
2026-02-13 14:54:48 +01:00
Paolo Tosco
053a0283f7 Patch RapidJSON to make sure it builds on all platforms (#8818)
* patch RapidJSON to make sure it builds on all platforms

* remove unnecessary sed command from Docker recipe

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-09-26 05:28:46 +02:00
Paolo Tosco
9c7ffb33e9 Expose reading/writing PNG metadata to CFFI and MinimalLib (#8381)
* get SynthonSpace.cpp to build also when RDK_USE_BOOST_SERIALIZATION is
not defined

* test should not fail when RDK_USE_BOOST_SERIALIZATION is not defined

* - expose reading/writing PNG metadata to CFFI and MinimalLib
- add relevant CFFI and MinimalLib unit tests
- add RDK_USE_BOOST_PROGRAM_OPTIONS CMake option
- enable using standalone zlib in the absence of boost::iostreams for parsing PNG files
- enable linking against maeparser in the absence of boost::iostreams also on Windows
- enable building RDKit in the absence of boost::program_options

* add check for boost::program_options

* change size_t into std::uint64_t in SearchResults for consistency with doTheSearch() which uses std::uint64_t

* change size_t into std::uint64_t in SearchResults for consistency with
SynthonSpaceSearcher::doTheSearch()

* set CMake policy to allow YAeHMOP to require a version which is not
actually supported

* reverted External/YAeHMOP/CMakeLists.txt to master version

* check if Windows build will work

* fix build

* configure zlib install location

* build zlib dependency

* include zlib header directory

* explicitly set PropertyFlags.AllProps so the test does not fail on
static builds

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-07-23 17:10:38 +02:00
Paolo Tosco
f7a3bfe4e2 replace incorrect Freetype cmake flags with correct ones (#8543)
Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-05-25 14:55:55 +02:00
Paolo Tosco
6533bbfaa2 Add missing default values to docker-compose configuration (#8544)
* add missing default values to docker-compose configuration

* remove unnecessary network settings

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-05-24 07:29:06 +02:00
Paolo Tosco
e87dc6ee0f Consolidate MinimalLib Dockerfiles to avoid code duplication (#8412)
* Consolidate MinimalLib Dockerfiles to avoid code duplication
Remove Dockerfile_legacy_browsers since IE11 is not used anymore

* add project name to docker-compose YAML files

* add projectName to azure pipelines DockerCompose section

* updated scripts/build_rdkit.js and Dockerfiles to enable end-to-end
builds

* changes in response to review

* - remove unused docker-compose file
- update azure-pipelines.yml

* fix service dependency

* CI build should copy_from_local

* docs update, make it work for local builds, minimize git clone

* - changes in response to review
- added an option to build from the local source tree to
  scripts/build_rdkitjs.sh

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
Co-authored-by: greg landrum <greg.landrum@gmail.com>
2025-04-28 08:57:30 +02:00
Greg Landrum
cfffa8db4d try adding a CI job to build the minimallib docker image (#8290)
* try adding a CI job to build the minimallib docker image

* update

* try simplification

* path

* path

* re-enable the other ci builds
remove the obsolete .yml file
2025-02-21 09:44:31 +01:00
Paolo Tosco
932208d46a revert default to JavaScript-based exceptions (#8270)
Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-02-14 13:16:05 +01:00
Paolo Tosco
cdeeb2c270 Restore functionality of the MinimalLib Dockerfile
- fetch boost sources from archives.boost.io
- build in /src rather than in /opt
- build freetype from source with -fwasm-exceptions support as the emscripten port on GitHub is outdated and archived
- build RDKit with -fwasm-exceptions support as performance is significantly better than with DISABLE_EXCEPTION_CATCHING=0

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-02-13 08:34:06 +01:00
Paolo Tosco
b5d4b54d20 - patch RapidJSON 1.1.0 release backporting a fix from the master branch to avoid a compilation error on newer compilers (fix #7485) (#7550)
- update MinimalLib Dockerfile to Debian Bookworm and patch RapidJSON in case someone wants to build an older release (fix #7530)

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2024-06-23 06:59:52 +02:00
Paolo Tosco
b8908f3117 - added a few optional configurable parameters to the MinimalLib Dockerfiles (all have defaults) (#7182)
- updated Boost to version 1.84.0
- removed obsolete ./emsdk update-tags which was triggering a warning during the build
- WORKDIR should always be absolute, so changed build to $RDBASE/build
- updated the Dockerfile_legacy_browsers help text

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2024-02-24 06:43:25 +01:00
Greg Landrum
8892fb160a Fix minimal build, allow building without boost::serialization (#6932)
* make sure that we can build without boost iostreams or seralization

adds some "private" variables on the python side to check for these compilation flags

* get out minimal cmake version correct

* get minimallib js building

installs an up-to-date cmake
also updates the version of boost being used for the minimallib
adds extra argument to allow the repo to be specified
2023-11-23 05:57:05 +01:00
Paolo Tosco
9a3e9b3d9c - Add appropriate compiler flags such that MinimalLib builds also when using clang version >=15 (#6490)
- Use the nodejs version bundled with emscripten to run tests since the one in Ubuntu is ancient and does not support recent wasm features

Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2023-06-24 07:47:50 +02:00
Paolo Tosco
79037b767f Enable building MinimalLib as a plain JS file for usage in legacy/headless browsers (#5999)
* - fix indentation
- fix regex check (which currently always fails)

* wip

* - added clearMolBlockWedgingInfo()
- added invertMolBlockWedgingInfo()
- MinimalLib::generate_aligned_coords() now inverts stereochemistry if a rigid-body alignment transformation caused chiality inversion
- MinimalLib::generate_aligned_coords() now clears stereochemistry if coordinates changed
- added JSMol::clear_prop() to the already existing JSMol::get_prop() and JSMol::set_prop()
- renamed commonchem to rdkitjson in JS unit test
- added relevant unit tests

* fixed mistake in logic

* - added add_hs_in_place() and remove_hs_in_place() to the JS MinmalLib
- added relevant tests

* - removed check for existence of a property ahead of clearing it as it is not necessary; updated the clearProp docstring to reflect this
- updated the MolFileStereochem.h docstrings based on review comments and fixed a typo
- fixed two (legitimate) compiler warnings as get_molblock() and get_v3kmolblock() should return nullptr and not a pointer to an empty string; added tests for this as there was none
- in MinimalLib/common.h, moved the check of whether a molecule has undergone a flip around the Z axis to a function in the anonymous namespace
- in MinimalLib/common.h, added logic to preserve original wedging (and eventually invert it) also when alignOnly is set to false, in case the wedging is all within the constrained scaffold
- added thourough testing of the wedging logic on both CFFI and JS sides

* - added equality operator to CXXAtomIter and CXXBondIter classes such that they can used with implicit loop STL algorithms
- added relevant unit tests

* fix Windows build

* - enable building MinimalLib as a plain JS file for usage in legacy/headless browsers
- support alternative way to draw an ellipse on legacy canvas without ellipse support
- update tests.js to test both the standard and the legacy version of MinimalLib
- update demo.html to work with both versions of the library and automatically select one based on browser support of WebAssembly
- fix a regression in demo.html caused by a change in signature of generate_aligned_coords

* reverted most changes

* changes in response to review

* restored demo.html
added a comment to Dockerfile_legacy_browsers explaining how to test in a legacy browser

Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2023-01-27 10:28:48 +01:00
Paolo Tosco
161b65a469 - restore latest emsdk (#5857)
- set emsdk path for freetype
- add compilation flag to enable building with latest clang compilers

Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2022-12-12 06:21:58 +01:00
Paolo Tosco
6a3e1f0d12 addresses #5792 (#5793)
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2022-11-25 10:53:52 +01:00
Paolo Tosco
b1d1e642bf remove unnecessary flags that would be ignored anyway (#5587)
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2022-09-25 05:42:08 +02:00
Michel Moreau
c7abf207c7 fix bin command for node in minimallib Dockerfile (#5349)
replace prepublish script with prepublishOnly script ref: https://docs.npmjs.com/cli/v8/using-npm/scripts\#prepare-and-prepublish
2022-06-06 06:24:20 +02:00
Greg Landrum
7a54912765 update boost download location in Dockerfile (#4094) 2021-04-30 05:57:26 +02:00
Michel Moreau
55b8ab9b76 Making RDKit minimallib (JS lib) available through the npm package manager (#4086)
* Npm publishing files - v1 in progress

* refactor .gitignore and package.json

* 2021.3.1-beta.0

* edit readme

* 2021.3.1-beta.1

* first version of read me and small tweak to docker build

* rdkit spelling uniform in readme

* 2021.3.1-beta.2

* update TOC

* add file to .gitignore

* 2021.3.1-beta.3

* add additional comment

* add back real readme

* add release tag example

* edit comment in git ignore

* add a link to unpkg.com

* 2021.3.1-beta.4

* final tweak to readme

* 2021.3.1-beta.5

* fix typo

* 2021.3.1-beta.6

* additional edits to README.md

* 2021.3.1-beta.7

* last minor readme edit

* 2021.3.1-beta.8

* add badges

* 2021.3.1-beta.9

* point homepage to minimallib readme

* 2021.3.1-beta.10

* 2021.3.1-beta.11

* make the js file the entry point

* 2021.3.1-beta.12

* fix release without dist

* 2021.3.1-beta.13

* add license badge to readme

* 2021.3.1-beta.14

* apply all reviews

getting started html file is now official demo
use npm version with --no-git-tag-version
use placeholder for version in npm package
add new line in all files
edit description and authors in package.json

* update live demo to be the getting started page

* add logging of version in readme example

* apply new set of review

fix author field for good
add back demo.html
edit readme accordingly
edit dockerfile to include GettingStarted.html in dist

* include proper getting started file in build

* edit publish process based on new PLACEHOLDER version

* update version in readme

* update toc

* add back placeholder

* remove ugly readme warning
2021-04-29 08:24:23 +02:00
Paolo Tosco
e4d872f0b5 Use MODULARIZE and EXPORT_NAME (#3570)
* Use MODULARIZE and EXPORT_NAME

* updated Dockerfile

* wip

* updated demo.html
2020-11-24 05:15:18 +01:00
Greg Landrum
d47650ba85 update minimallib python requirements to python3 (#3449) 2020-09-30 07:24:33 +02:00
Greg Landrum
0b438197c7 Add MolDraw2DJS (#3376)
* backup, does not work

* backup

* baby steps

* basics are now working

* more progress

* add substructure highlighting

* get the FT stuff working too

* get the FT stuff working too

* empirical corrections to dashed bonds

* enable coordgen support

* change min font size

* support dashed lines

* some cleanup

* support all MolDraw2D options when parsing from JSON

* parse MolDraw2D options from JSON

* show stereogroup labels when they are present

* switch to using the new CIP labels in minilib

* update demo to show controlling options

* move all the JS code into jswrapper.cpp
pass the canvas itself instead of the id to the JS functions
introduce offset

* remove extra emscripten load

* cleanup debugging stuff

* update freetype tests

* update non-freetype tests

* changes in response to review
2020-08-31 17:09:16 -04:00
Greg Landrum
ab94eada8b update MinimalLib Dockerfile (#3357)
to get it working again with the recent MAEParser changes
2020-08-24 14:22:56 +02:00
Greg Landrum
a951abfac5 Fixes #3267 (#3284)
* make RDStreams work when RDK_USE_BOOST_IOSTREAMS is OFF

* indicate when the tests finish

* works. needs to be edited before final PR

* dockerfile for the stepwise commit

* typo

* Update Dockerfile
2020-07-11 13:42:32 +02:00
Eliane Briand
a9066a55dc Rename RDK_OPTIMIZE_NATIVE to RDK_OPTIMIZE_POPCNT as suggested in #916 (#2865) 2020-01-09 10:07:44 +01:00
Greg Landrum
022c933cd0 Improvements to JS wrappers (#2751)
* update tests and dockerfile

* make the demo look at least a little bit better

* explicitly use fastcomp, not upstream
2019-11-11 13:15:03 +01:00
Greg Landrum
ca206fcce6 Add minimal JavaScript wrapper (#2444)
* not really working from cmake, but can be compiled by hand

* now a cmake build works

* add a bunch of new stuff

* lots of changes

* demo

* substructure highlighting (crude) and descriptors

* include amw

* update

* cleanup

* add first fingerprint

* add tests

* add fp

* make the new stuff optional

* add Dockerfile

* add a readme

* switch to using JSON for complex return values
2019-06-06 08:45:21 +02:00