mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
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`
This commit is contained in:
committed by
greg landrum
parent
0563b59bba
commit
4b44e41544
@@ -75,6 +75,7 @@ option(RDK_BUILD_MINIMAL_LIB_RXN "build support for reactions into MinimalLib" O
|
||||
option(RDK_BUILD_MINIMAL_LIB_SUBSTRUCTLIBRARY "build support for SubstructLibrary into MinimalLib" ON )
|
||||
option(RDK_BUILD_MINIMAL_LIB_MCS "build support for MCS into MinimalLib" OFF )
|
||||
option(RDK_BUILD_MINIMAL_LIB_MOLZIP "build support for molzip into MinimalLib" OFF )
|
||||
option(RDK_BUILD_MINIMAL_LIB_MMPA "build support for MMPA into MinimalLib" OFF )
|
||||
option(RDK_BUILD_LONG_RUNNING_TESTS "build longer running tests" OFF )
|
||||
|
||||
set(RDK_BOOST_VERSION "1.81.0")
|
||||
|
||||
@@ -67,7 +67,9 @@ RUN emcmake cmake -DRDK_BUILD_FREETYPE_SUPPORT=ON -DRDK_BUILD_MINIMAL_LIB=ON \
|
||||
-DRDK_BUILD_PYTHON_WRAPPERS=OFF -DRDK_BUILD_CPP_TESTS=OFF -DRDK_BUILD_INCHI_SUPPORT=ON \
|
||||
-DRDK_USE_BOOST_SERIALIZATION=OFF -DRDK_OPTIMIZE_POPCNT=OFF -DRDK_BUILD_THREADSAFE_SSS=OFF \
|
||||
-DRDK_BUILD_DESCRIPTORS3D=OFF -DRDK_TEST_MULTITHREADED=OFF \
|
||||
-DRDK_BUILD_MAEPARSER_SUPPORT=OFF -DRDK_BUILD_COORDGEN_SUPPORT=ON \
|
||||
-DRDK_BUILD_CHEMDRAW_SUPPORT=OFF -DRDK_BUILD_MAEPARSER_SUPPORT=OFF -DRDK_BUILD_COORDGEN_SUPPORT=ON \
|
||||
-DRDK_BUILD_MINIMAL_LIB_MCS=ON -DRDK_BUILD_MINIMAL_LIB_MOLZIP=ON \
|
||||
-DRDK_BUILD_MINIMAL_LIB_MMPA=ON \
|
||||
-DBoost_DIR=/opt/boost/lib/cmake/Boost-${BOOST_DOT_VERSION} \
|
||||
-Dboost_headers_DIR=/opt/boost/lib/cmake/boost_headers-${BOOST_DOT_VERSION} \
|
||||
-DRDK_BUILD_SLN_SUPPORT=OFF -DRDK_USE_BOOST_IOSTREAMS=OFF \
|
||||
|
||||
@@ -452,8 +452,8 @@ emscripten::val get_mmpa_frags_helper(const JSMolBase &self,
|
||||
unsigned int maxCutBonds) {
|
||||
auto obj = emscripten::val::object();
|
||||
auto pairs = self.get_mmpa_frags(minCuts, maxCuts, maxCutBonds);
|
||||
obj.set("cores", pairs.first);
|
||||
obj.set("sidechains", pairs.second);
|
||||
obj.set("cores", emscripten::val(pairs.first, emscripten::allow_raw_pointers()));
|
||||
obj.set("sidechains", emscripten::val(pairs.second, emscripten::allow_raw_pointers()));
|
||||
return obj;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -890,7 +890,7 @@ std::string get_mcs_as_json(const JSMolList &molList,
|
||||
if (!mcsResult.DegenerateSmartsQueryMolDict.empty()) {
|
||||
bj::array smartsArray;
|
||||
for (const auto &pair : mcsResult.DegenerateSmartsQueryMolDict) {
|
||||
smartsArray.push_back(pair.first);
|
||||
smartsArray.emplace_back(pair.first);
|
||||
}
|
||||
bjSmarts = smartsArray;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user