Commit Graph

4769 Commits

Author SHA1 Message Date
David Cosgrove
facb15f703 Github5899 (#5912)
* Fixed typo in comment.

* Fixed tests that were failing on Raspberry pi.  Highlight rectangle corners coming out in different orders.

* Tidy up a bit.

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2023-01-03 05:50:04 +00:00
Greg Landrum
fd44d72fb7 Fixes #5849 (#5861)
* Fixes #5849
This may not be the best fix since it adds another step to canonicalization

* more test cases

* update docs
2022-12-28 20:10:13 +00:00
Greg Landrum
a96f3ac4b4 FingerprintGenerator refactoring (#5748)
* add FingerprintFuncArguments() to simplify things

* getFingerprintHelper() also uses FingerprintFuncArguments

* port atompairs and tts to use new code

* not working yet

* all tests pass

* move the includeChirality flag to the global arguments
ensure stereochemistry is assigned when calculating fingerprints using chirality (#1993)

* migrate legacy morgan fp code to use generators

* refactoring the way bit info is handled

* all tests pass

* all tests pass

* expose getArguments()

* rename getArguments->getOptions

* copyright updates

* update a test

* remove template from FingerprintArguments
some other refactoring and cleanup

* hopefully fix the windows dll builds

* partial docs update

* improve docs and API

* more docs

* more docs

* a bit of modernization

* more doc tweaks

* changes in response to review
2022-12-28 17:40:13 +00:00
Greg Landrum
286cb21302 Allow unrecognized atom types when strictParsing=False (#5891)
We should just read them in as dummies instead of throwing an exception.
A bit of light refactoring to accompany that
2022-12-28 08:25:34 -05:00
Greg Landrum
14211b4faa clear MDL Rgroup labels from core atoms when we aren't using them (#5904) 2022-12-28 08:25:08 -05:00
Greg Landrum
aaded67a2a Fixes #5894 (#5898) 2022-12-25 17:44:05 +00:00
gedeck
3f3bc3b5a1 Fix documentation example for KeyFromPropHolder (#5886)
The example for KeyFromPropHolder in the documentation here:

https://www.rdkit.org/docs/source/rdkit.Chem.rdSubstructLibrary.html

doesn't render the example correctly. I don't know if the extra new line fixes it, but it looks like that is the only difference to the previous code blocks.
2022-12-20 07:06:29 +01:00
Greg Landrum
e322928028 swap boost::tuple to std::tuple (#5851) 2022-12-16 16:01:19 +01:00
Greg Landrum
cba7ecf3a4 Fixes #5785 (#5871)
* make the test for how to write valences more robust w.r.t. unsanitized molecules

* Fixes #5785
2022-12-16 16:00:30 +01:00
Greg Landrum
9886db08c0 fixes #5827 (#5873)
* fixes #5827

* changes in response to review
2022-12-16 06:36:28 +01:00
Greg Landrum
0e4921670b Fixes #5863 (#5870)
we make the code more robust in cases where we can not wedge bonds
2022-12-16 05:39:38 +01:00
Gareth Jones
0d68b2f50b Bug/github5613 (#5735)
* Undo change to master

* Fixed typo in tests

* Undo change to master

* Initial development and test

* Sort of working tests

* Copy corodinates to new core

* Clear stereochemistry on core atoms with unlabelled rgroups

* Fixed typo in tests

* Undo change to master

* Fixed typo in tests

* Undo change to master

* Fixed typo in tests

* Undo change to master

* Continuing development

* Updated development

* Fixed Chirality Issues

* All tests working

* Remove some unused code

* Fixed typo in tests

* Undo change to master

* Fixed typo in tests

* Undo change to master

* Fixed typo in tests

* Undo change to master

* Working tests

* Tidy test code

* Adjust catch_rgd for stereochemistry in output cores

* Build ring info in output cores

* Fix Mac OS bug

* Fix for MCS and onlyMatchAtRGroups

* Brian's optimization suggestion

* Fix core group coordinate bug

* Test for replaceCore and multiple core bonds to chiral atom

* Fixed typo in tests

* Undo change to master

* Fixed typo in tests

* Undo change to master

* Fixed typo in tests

* Undo change to master

* Fixed typo in tests

* Undo change to master

* Fixed typo in tests

* Undo change to master

* Fixed typo in tests

* Undo change to master

* Update Code/GraphMol/RGroupDecomposition/RGroupDecompParams.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/RGroupDecomposition/RGroupDecompParams.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Changes in response to Greg's code review

* R group stereo bond attachment fix

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2022-12-16 05:36:49 +01:00
Eloy Félix
fde09f5f47 Fix #5810 in V2000 mol files. (#5864)
* fix #5810 for V2000

* fix #5810 for V2000

* fix #5810 for V2000

* fix #5810 for V2000

* fix test molfile indentation
2022-12-14 14:58:04 +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
38cfc168b6 - allow building PgSQL RPM and DEB packages by setting the correct DESTDIR path (#5836)
at build stage and creating intermediate directories as needed
2022-12-12 06:19:58 +01:00
Greg Landrum
aa336f3faf Get the wrappers working with SWIG 4.0 (#5795)
* extend the allowed valences of the alkali earths
make it possible to have preferred and arbitrary valence states (I thought this already worked)

* backup

* maybe needed

* copy in some swig3 files;
at this point the tests all work

* remove SWIG version lock

* changes in response to review
2022-12-10 07:13:55 +01:00
tadhurst-cdd
309ea55d16 Add a timeout protection for CIP calculations (#5772)
* Add a timeout protection for CIP calculations

Authored-by: Tad Hurst <tad.hurst@collaborativedrug.com>

* Update Code/GraphMol/CIPLabeler/CIPLabeler.h

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/CIPLabeler/CIPLabeler.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/CIPLabeler/catch_tests.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/CIPLabeler/catch_tests.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/CIPLabeler/CIPLabeler.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* changes as per PR review by Greg Landrum

* Update Code/GraphMol/CIPLabeler/CIPLabeler.h

Co-authored-by: Ric <ricrogz@users.noreply.github.com>

* Added python wrapper for CIP interation error message

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
Co-authored-by: Ric <ricrogz@users.noreply.github.com>
2022-12-09 05:28:38 +01:00
Greg Landrum
2c16e09796 Fixes #5718 (#5825)
* add test

* Fixes #5718
2022-12-02 14:58:32 +01:00
Greg Landrum
ff6451447a Fixes #5784 (#5817)
catch kekulization errors during the tautomer enumeration
I have tested this on ~100K ChEMBL molecules and encountered
no further problems.
2022-12-01 17:11:50 +01:00
Greg Landrum
f37abdd75c Fixes #5810 (#5811)
* Fixes #5810

* expand the test
2022-12-01 17:11:00 +01:00
Paolo Tosco
64da27eab2 Remove dependency on MSVC runtime DLL in MinGW builds as it is not needed anymore (#5800)
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2022-12-01 17:10:08 +01:00
Paolo Tosco
c94a47bbd3 Enable get_molblock(details_json) from MinimalLib (#5806)
* - enable get_molblock(details_json) from MinimalLib as it is already enabled in CFFI
- enable useMolBlockWedging on get_molblock() in both CFFI and JS MinimalLib
- add tests

* - expose also addChiralHs

Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2022-11-29 17:37:34 +01:00
David Cosgrove
9657cc6d53 Draw type of SGroups (STY) in picture. (#5775)
* Draw type of SGroups (STY) in picture.

* Move drawBottomLabel from lambda to anonymous namespace.

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2022-11-26 17:30:00 +01:00
Paolo Tosco
af8c5a0e76 Expose getMolFrags in CFFI and MinimalLib (#5774) 2022-11-25 18:59:09 +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
Greg Landrum
b817f29eb8 extend the allowed valences of the alkali earths (#5786)
make it possible to have preferred and arbitrary valence states (I thought this already worked)
2022-11-25 04:50:36 +01:00
David Cosgrove
4b0a61de27 Fix right-pointing last bracket in SGroup. (#5776)
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2022-11-24 16:52:12 +01:00
Rocco Moretti
5281d55a3d Fix LocaleSwitcher on Windows when RDK_BUILD_THREADSAFE_SSS not set (#5783) 2022-11-23 17:01:04 +01:00
Greg Landrum
adfdeca511 Fix #5683 (#5773)
* Fixes #5683
more testing required

* add explicit test for issue

* minor refactoring

* add forgotten file
2022-11-18 16:23:35 +01:00
Brian Kelley
6d10f90a8b Add wavy stereo bond support to cdxml (#5755)
* Add wavy stereo bonds

* Add wavy single bonds

* Single bonds have bond stereo stripped

Co-authored-by: Brian Kelley <bkelley@relaytx.com>
2022-11-17 04:58:46 +01:00
Greg Landrum
2640819383 Fixes #5763 (#5764)
* Fixes #5763

* another test
2022-11-16 08:29:44 -05:00
Greg Landrum
cfe512ea47 Fixes #5704 (#5705)
* Fixes #5704

* update expected java results
2022-11-14 16:59:26 +01:00
Paolo Tosco
739b417dfe Enable additional parameters in prepareAndDrawMolecule() and expose them to CFFI/MinimalLib (#5731)
* - extend prepareAndDrawMolecule() with missing optional parameters already supported by prepareMolForDrawing()
- enable useMolBlockWedging, wedgeBonds, addChiralHs, forceCoords, wavyBonds in CFFI/MinimalLib
- add relevant CFFI and JS unit tests

* Replace AllProps with a smaller subset

* make sure we pickle properties Python-side

* changes in response to review

Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2022-11-08 11:50:09 +01:00
Greg Landrum
776441c064 add includeRedundantEnvironments support to GetMorganGenerator (#5732)
* add includeRedundantEnvironments support to GetMorganGenerator
This is connected with the discussion #5665

* Update MorganGenerator.h
2022-11-07 17:49:40 +01:00
Greg Landrum
c757b5b5c0 honor allowNontetrahedralChiralty when reading/writing SMILES (#5728)
information about non-tetrahedral stereo was being read and written from SMILES even when the global flag was disabled,
this fixes that
2022-11-07 04:59:51 +01:00
Paolo Tosco
e84a0a2948 - replaced the Freetype::Freetype IMPORTED target with the standard pair of FREETYPE_INCLUDE_DIRS/FREETYPE_LIBRARIES vars (thus consolidating the mechanism that was already used my emscripten builds). (#5730)
This allows to specify them as -D flags on the CMake line giving a bit more flexibility.

Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2022-11-07 04:45:15 +01:00
Paolo Tosco
e319617243 - added missing #include that caused the emscripten build to break (#5729)
- 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>
2022-11-07 04:41:58 +01:00
Ric
8b368c2847 Fixes bond index parsing for w/c/t/ctu labels in CXSMILES/CXSMARTS (#5722)
* fix issue

* add a test

* address review comments

* fix var name
2022-11-04 22:28:55 +01:00
Brian Kelley
da55ed2943 Fixes #5677 (#5714)
* Fixes #5677

* Response to review

* Fix bad push

Co-authored-by: Brian Kelley <bkelley@relaytx.com>
2022-11-04 06:19:08 +01:00
Greg Landrum
340ced152f stop building catch_main when tests are disabled (#5697)
This was causing problems for the conda-forge builds and is extra work anyway
2022-11-03 16:32:46 +01:00
Greg Landrum
812568eb29 Fixes #5692 (#5706)
We're still limited by using an int as the molecule index in the API;
fixing that is a minor API break
2022-11-02 09:32:54 -04:00
Greg Landrum
6372a7b201 Do deprecations for the 2023.03 release (#5675)
* remove SmilesParserParams::useLegacyStereo

* MinimalLib JS deprecations

* PandasTools deprecations

* update release notes
2022-11-01 13:29:58 +01:00
Greg Landrum
1f4584b2ca run clang_format (#5676) 2022-11-01 04:14:26 +01:00
Eloy Félix
72e524c775 add MACCS fp to the MinimalLib (#5707)
* add maccs fp to the minilib

* maccs fit in 21 bytes
2022-10-31 06:46:07 +01:00
Paolo Tosco
744bdb3355 windows.h header should be lowercase to avoid issues when (#5712)
cross-compiling on Linux
2022-10-31 06:43:57 +01:00
Mosè Giordano
c985ccf2bd Use correct _WIN32 macro for checking Windows target (#5710)
The correct macro to identify Windows target is `_WIN32`, not `WIN32`: https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170#microsoft-specific-predefined-macros.  Besides, according to C standard, compilers can't predefine macros without leading underscore (or two if the the first letter is lowercase).
2022-10-31 06:42:31 +01:00
Paolo Tosco
268ef03198 we want to use _putenv_s also in MinGW builds (#5711) 2022-10-31 06:40:09 +01:00
Ric
0f5578df43 Add a Python Context Manager for SetPreferCoordGen (#5693)
* add context manager

* add tests

* restore tests

* Revert "restore tests"

This reverts commit 2bb8842087.
2022-10-31 04:35:49 +01:00
Michael Banck
f416456768 Compile clang bytecode with -std=c++17 (#5685) (#5708) 2022-10-31 04:33:17 +01:00
Gareth Jones
fd1972a4a6 Fix R Goups in matching core are poorly positioned (#5684)
* Fixed typo in tests

* Undo change to master

* Undo change to master

* Recalculate core dummy positions for hydrogen only r groups

* Undo change to master

* Fixed typo in tests

* Undo change to master

* Greg's code review changes
2022-10-30 07:11:28 +01:00