- implement get_v2Kmolblock() in MinimalLib
- add the possibility to specify the MDL version preference as a get_molblock() forceMDLVersion JSON parameter, which is ignored by get_v3Kmolblock() and get_v2Kmolblock()
- changes in response to review
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* 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>
- str_to_c() should check the ptr returned by malloc for non-nullness before using it
- change has_coords() mol_pkl parameter to const
- use assert.equal in JS tests where possible
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* make sure that loggers can be enabled, disabled, captured and tee'd from MinimalLib without issues
* changes in response to review
* change in response to review
---------
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* - renamed getParamsFromJSON() to updateSmilesWriteParamsFromJSON() and moved it from the anonymous namespace to the RDKit namespace such that it is publicly available
- implemented updateCXSmilesFieldsAndRestoreBondDirOptionFromJSON()
- added CFFI and JS tests
- get_smiles(), get_smarts(), get_cxsmiles() and get_cxsmarts() are now available in MinimalLib in both CFFI and JS layers and they can be passed JSON parameters
- CFFI get_qmol() now returns NULL if it fails to generate a RWMol rather than returning the "Error!" const char[] string, for consistency with what get_mol() and get_rxn() do. This was documented in release notes
* suggestions
---------
Co-authored-by: ptosco <paolo.tosco@novartis.com>
Co-authored-by: greg landrum <greg.landrum@gmail.com>
1. tee: the log is captured in a buffer but also sent to the native output channel
2. capture: the log is captured in a buffer without being sent to the native output channel
- removed duplicate logging_needs_init and needs_init atomic bool variables from cffiwrapper.cpp and consolidated them into a static LoggingFlag d_loggingNeedsInit class variable
- added relevant C and JS tests
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* - expose [sg]etUseLegacyStereo()
- In MolToSmiles() doIsomericSmiles should default to true as in C++ and Python
- added missing parameters to MolToSmiles() and MolToMolBlock()
- added SmilesWriteParams MolToSmiles() overload
- added and updated Java tests
* - changes in response to review
- exposed the same functionality also in MinimalLib and CFFI and added tests
---------
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
- removed details from get_maccs_fp calls since there are no adjustable parameters
- exposed get_maccs_fp to JS
- added tests and adjusted existing ones since some deprecated functions were removed and do not need testing anymore
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
* update AvalonTools to version 2.0.1
* Improvements to 2D depiction and alignment/RMSD calculation
- Refactored the straightenDepiction code which is now much simpler and more readable and supports a minimizeRotation parameter
- added C++, Python and JS tests for the new minimizeRotation parameter
- refactored tests to use CalcRMS rather than an internal implementation to compute RMS deviations
- Removed duplicated code in CalcRMS() and getBestRMS() and made their APIs consistent with respect to supported parameters
IMPORTANT NOTE: for backwards compatibility I set the CalcRMS() default for the new symmetrizeConjugatedTerminalGroups
to false as this parameter was not originally supported. @greg: I would be very much in favor of setting this to true instead
if you agree, even though it might change results for existing scripts, as I think it is a much more sensible default.
- Improved documentation to clarify the difference between CalcRMS() and getBestRMS()
- Added unit tests for CalcRMS() as there was none previously
- Added tests for the additional CalcRMS() and getBestRMS() parameters
- Added a new getBestAlignmentTransform() function
- The CFFI function set_2d_coords_aligned() now returns the matching atoms similarly to the C++, Python and JS counterparts
IMPORTANT NOTE: this required an API change for the additional char ** parameter used to return the match.
Existing code using set_2d_coords_aligned() will fail to compile and will require a last NULL parameter to be added to compile again
- Removed duplicated code between CFFI set_2d_coords_aligned() and JS generate_aligned_coords()
- Added has_2d_coords() to the CFFI library
- generate_aligned_coords() now supports JSON parameters and the previous versions are deprecated
- set_2d_coords_aligned() and generate_aligned_coords() both support an alignOnly parameter (which defaults to false).
If set to true, rather than re-generating a fresh 2D layout around templateMol, the existing coordinates (if any) are simply aligned
to the provided templateMol. If the molecule has no coordinates, a set of 2D coordinates is generated independently of templateMol
and then aligned to the provided templateMol
- avoid that when acceptFailure is false set_2d_coords_aligned() and generate_aligned_coords() overwrite existing coordinates
* - explicitly link testDepictor to MolAlign library
* - add MolAlign dependency to testDepictor (rather than to the catch test as in the previous commit)
- add a couple of tweaks
* suppress compiler warnings (1st pass)
* warnings: 2nd pass
* warnings: 3rd pass
* - alignOnly mode should also support allowRGroups
* - fixed C++ build
- added tests for allowRGroups+alignOnly combination
* changes in response to review
* added an entry to backward incompatible changes regarding set_2d_coords_aligned()
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
* - exposed reaction drawing in MinimalLib
- fixed a typo in the error message "JSON doesn't contain 'atoms' field, or it is not an array"
- replaced RapidJson HasMember() with FindMember() to avoid a duplicate lookup in case the member exists and can be accessed
- some cosmetic style changes (avoid multiple variable declarations on a single line, use curly bracket also for one-liner if clauses, use auto where possible)
- capitalized "greg Landrum" to "Greg Landrum" (well deserved)
- exposed other FPs in addition to Morgan and Pattern FPs in MinimalLib
- added relevant tests
* - update CXSMARTS test in MinimalLib
* Changes in response to review:
- exposed reaction drawing functionality to CFFI and added relevant tests
- refactored fingerprint code to use JSON details and deprecated the Morgan/pattern fingerprint functions that used multiple parameters
- all fingerprints are now exposed to both JS and CFFI with no code duplication
- fixed a potential crash bug in the CFFI library where calling get_morgan_fp(), get_rdkit_fp() or get_pattern_fp with a NULL mol_pkl would result in dereferencing a nullptr
* removed debugging printouts committed accidentally
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
* Remove accidentally tracked files and unset x flag
* Ignore ComicNeue
* Unify test tag to `reader`
* Trivial destructors
* Bump CMAKE_CXX_STANDARD to 14 (#4165)
* set all source code files to have native line endings
* normalized all source code line endings
Co-authored-by: Paolo Tosco <paolo.tosco@novartis.com>
* hello world works
* more
* more
minimallib needs to be tested
* parse substructure parameters from JSON
* add substruct search and parameters
* add descriptors
* register more descriptors
* fingerprints, first pass
* stop outputting tiny coord vals
* support generating 2d coords
* coordgen testing
* return nulls
* initial 3d support; add/removeHs; cleanup
* Embedding parameters from JSON
* update
* pattern fp, fps as bytes
* use json to configure MFP
* use json to configure rdkit and pattern fps
* aligned 2d coords
* parsing options
* options for writers
* rename remove_hs
* get this working on windows (kind of)
* silence some msvc warnings
* cmake updates
* update python tests
* add the CFFI code to CI builds
* cleanup line ending mess?
* a couple small fixes
* make this work with URF
* support coordMap in the 3D coordinate generation
* updates in response to review