Commit Graph

4259 Commits

Author SHA1 Message Date
Ric
c9199cf1da Address #2753 (#3750)
* add test export heder to gitignore

* define export macros in separate file

* install new header

* patch GA with the new macros

* fix struct declarations

* fix conformerparser exports

* fix MolSGroupParsing ParseV3000Array export

* fix java wrappers

* export exceptions

* remove duplicated exports

* Build RDGeneral exceptions into lib

* export queries, only for *nix

* fix RingDecomposerLib header manipulation

* fix CIP labeler test issues
2021-02-15 14:29:04 +01:00
Brian Kelley
bd00fda39e Fixes crashes when using bad smiles in the cached smiles holders (#3798)
* Fixes #3797

* Update Code/GraphMol/SubstructLibrary/SubstructLibrary.cpp

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

* Update test to include positive and negative results

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2021-02-15 10:49:19 +01:00
Maximilian Greil
213f537edd Fixes Github issue 1631 (#3782)
* Fix Github issue 1631

* Typo
2021-02-09 13:44:08 +01:00
Greg Landrum
52c83c45f0 Add some more comprehensive R-Group Decomposition tests (#3778)
* start to add some human-readable regression-test like examples for RGD

* small examples from JMedChem

* add helper viewer

* make that generate actual JSON

* use JSON of full output for tests
move JSON generation to RGroupUtils.h

* switch to using JSON from files

* add test notebook

* add jupyter testing to the code

* add nbval to linux test env

* add notebook tests to mac and windows too

* add toJSON for columns too
2021-02-05 10:35:32 +01:00
Ric
bfbb4d2b24 Addresses #3078 (second try) (#3729)
* add test

* default reaction-edge stereo bonds to STEREONONE

* update older test
2021-02-04 17:54:13 +01:00
Eisuke Kawashima
ee31ec96be Replace − (U+2212, MINUS SIGN) with -- (#3777)
Fix #3738
2021-02-04 10:03:21 +01:00
Greg Landrum
be77462ba0 Fixes #3768 (#3770)
* Fixes #3768

* changes in response to review

* re-enable a test
2021-02-01 16:45:39 +01:00
Paolo Tosco
d00dcc29fb Fix RGroupCoreAlignment::NoAlignment not properly matching symmetric RGroups correctly(#3743)
* Improve consistency in R-group tables involviing symmetric groups

* applied clang-format

* much simpler fix

* use equivalent but simpler regex

* changes in response to review

Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2021-01-29 15:55:30 -05:00
Greg Landrum
5715f61f9c Fixes #3216 (#3772) 2021-01-29 13:31:01 -05:00
Paolo Tosco
6373d78744 Fixes #3755 (#3758)
* - fixed VERBOSE_ENUMERATION build
- code cleanup

* - fixes #3755

* changes in response to review
2021-01-27 08:20:25 +01:00
Daniel Paoliello
be5cab546a Include Winsock2.h instead of Windows.h in DebugTrace.h (#3756)
* Include Winsock2.h instead of Windows.h in DebugTrace.h

Including `Winsock2.h` has a number of advantages:
* It is much smaller than `Windows.h`, improving build time.
* It allows rdkit to be used in environments where `WIN32_LEAN_AND_MEAN` is set.
* It is [the recommended way to get `timeval`](https://docs.microsoft.com/en-us/windows/win32/api/winsock/ns-winsock-timeval) (rdkit doesn't actually use `timeGetTime`).

* Fix build break in test code

* Fix test failures
2021-01-26 05:35:43 +01:00
Braxton
2235a790c0 3D MCS - Minimal version, no refactoring (#3749)
* 3D MCS

* Move test data to dedicated directory

* 3D MCS: changes based on code review

* Replace conformer generation code in MCS 3D test with mol blocks
2021-01-26 04:50:05 +01:00
Greg Landrum
eebd114c8b Fixes #3670 (#3753) 2021-01-21 08:24:06 +01:00
jasondbiggs
3438b72c39 Fix comment to match the code in RemoveHsParameters (#3747)
* removeNonimplicit is the opposite of the deprecated option implicitOnly, fix the comment to reflect that.

* fix docstring to match function argument type

Co-authored-by: Jason Biggs <jasonb@wolfram.com>
2021-01-20 16:53:29 +01:00
Paolo Tosco
b78ff8faa6 Fixes #3744 (#3748)
* fixes #3744

* added a unit test

* fix by stopping with the unnecessary copies

Co-authored-by: greg landrum <greg.landrum@gmail.com>
2021-01-20 11:05:07 +01:00
Brian Kelley
5b0f97474f Fixes #3702 (#3725)
Co-authored-by: Brian Kelley <bkelley@relaytx.com>
2021-01-20 06:12:02 +01:00
Greg Landrum
bfe63718ac Support std::shared_ptr returns to Python (#3711)
Fixes #3692
2021-01-20 06:11:28 +01:00
Paolo Tosco
aa6524e148 set strictParsing to false in MinimalLib (#3737) 2021-01-18 08:41:38 +01:00
Ric
1eced4d204 Address Issue 3723 (#3724)
* add fix

* add test

* fix missing explicit Hs

* use getValenceContrib
2021-01-15 16:17:44 +01:00
Kazuya Ujihara
759b7a4b60 fix to add ZLIB_INCLUDE_DIRS for Windows build (#3714) 2021-01-15 05:44:08 +01:00
Maximilian Greil
0aaa703dec Fixes issue 1761 (#3679)
* Issue 1761

* Additional changes

* Latest changes
2021-01-15 05:11:51 +01:00
magattaca
fe2ba0fe1a add D-serine and D-tyrosine (#3683) 2021-01-15 05:10:36 +01:00
Paolo Tosco
4084284ba5 Make better use of strictParsing for SGroups (#3705)
* - eliminate some documentation ambiguity about the role of the strictParsing flag
- fix some inconsistencies between SGroup parsing function prototype declarations and implementations
- add a workaround for accepting malformed V2000 'M  SAP' entries affecting older version of MarvinJS (only if strictParsing is set to false)
- if strictParsing is set to false, malformed V2000/V3000 SGroups are ignored rather than causing the parsing to fail
- fix a couple typos in warnings

* changes in response to review
2021-01-14 10:29:41 +01:00
Steve Roughley
b1fd950eb2 Added getMessage method to exceptions (#3700)
* Added getMessage method to exceptions

* Added test cases to WrapperTests.java

* Corrected typo in test case

* Corrected test case error
2021-01-14 06:53:37 +01:00
Greg Landrum
61d0e04b93 Fix a number of cartridge stability problems (#3720)
* fixes #3687

* Fixes #3688

* fixes #3689

* more testing

* change in response to review
2021-01-14 06:50:51 +01:00
Ric
d0cf7e2fca add header (#3716) 2021-01-12 06:31:16 +01:00
Greg Landrum
46a0af898d Support context managers for mol Suppliers and Writers (#3704)
* Add context managers for writers
Allow calling close() on already closed Writers
Fixes #2217

* add a close method to MolSuppliers

* modernize the way we handle presence/absence of MAEPARSER support

* add context managers to suppliers

* changes in response to review

* some cleanup

* more cleanup
2021-01-11 05:52:57 +01:00
Paolo Tosco
7fc8feee9e Addresses #3693 (#3695)
* addresses #3693

* change in response to review

* applied clang -format

* changes in response to discussion
2021-01-07 18:25:08 +01:00
Dan N
d3761736f5 I think that this is the idiomatic way to control scope for Qt (#3663)
I was looking at some internal examples, and I think that a
context manager is the idiomatic way to control lifetimes
of the QPainter and QImage.
2021-01-07 10:14:44 +01:00
Gareth Jones
fcd72bb953 Add Molbundle search to SWIG (#3698) 2021-01-07 08:53:50 +01:00
Ric
88298d6500 Move MolToSVG() to rdkit.Chem.Draw (Addresses #3694) (#3696)
* move molToSVG

* fix namespace
2021-01-07 08:51:45 +01:00
Gareth Jones
ec5a172886 R group symmetry (#3565)
* Exploration

* Initial work on GA fro Rgroup Symmetry

* GA for rgroup decomp and fingerprint rgroup symmetry scoring

* Continuing development

* Exploration

* Initial work on GA fro Rgroup Symmetry

* GA for rgroup decomp and fingerprint rgroup symmetry scoring

* Continuing development

* Further development

* Continued tweaks

* Function rename

* Continued tweaks

* Bug fix for variance calculation

* Copyright notices. Remove Eigen dependency. RdKit logging.  Clock fix.

* Changes to fix build failures

* Fixes for Windows dynamic DLL build

* Included GA export.h file

* Fixed RGroupDecomp CMakeLists.txt

* Notebooks working, GGroup labelling bug fixed

* Fix windows build.  More options for example GA program

* More bugs found and tests adjusted

* Fixed Python rgroup test

* Trivial change to trigger CI

* OSX java and windows build fixes

* Windows DLL fix

* Fix segmentation error

* proposed change

* Possible fix for segmentation fault

* CR fixes

* CR fixes

* CR fixes

* Recreates molecules from rgroups where possible

Co-authored-by: greg landrum <greg.landrum@gmail.com>
Co-authored-by: Brian Kelley <fustigator@gmail.com>
2021-01-05 09:27:33 -05:00
jasondbiggs
1649029367 Embedder callback (#3668)
* adding a void pointer as a member for the EmbedParameters struct to allow aborting molecule embedder

* revert whitespace chage

* tabs->spaces

* have the callback function receive the iteration number as an argument, for progress monitoring

Co-authored-by: Jason Biggs <jasonb@wolfram.com>
2020-12-29 07:38:11 +01:00
Greg Landrum
6805789c71 add support for generating pattern fps for MolBundles (#3665)
* add support for generating pattern fps for MolBundles

* get python wrappers building
2020-12-29 07:33:09 +01:00
Brian Kelley
cf9ea71384 First pass at MolZip (now with bond stereo!) (#3644)
* First pass at MolZip (sans bond stereo)

* Add support for bond stereo zipping

* Add molzip swig wrappers

* Add simple python wrapper/tests

* Remove smiles round tripping now that fragmentOnBonds is fixed

* Responses to review

* AtomMaps and Isotopes must explicitly be set

* Add molzip single molecule api isotope test

* Add missing %newobject

* Add better python docs, label test

* fix docs add a test for molzip

* Update Code/GraphMol/ChemTransforms/MolFragmenter.cpp

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

* Add missing case breaks

* Add more preconditions, move mark and restore to private functions

* Remove unused and redunddant code

* optimize get_other_atom

* Add single arg molzip test

* Update Code/GraphMol/Wrap/rough_test.py

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

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2020-12-25 05:15:12 +01:00
Greg Landrum
36dea7d737 support enumerating from lists of enumerators (#3664)
support enumerating all supported operations for a molecule
2020-12-25 05:14:46 +01:00
Greg Landrum
2171f5a95d support setting MolDraw2D params using JSON from Python (#3660) 2020-12-22 04:54:36 +01:00
Greg Landrum
53782cc751 Support rendering LinkNodes (#3662)
* break out the LinkNode processing code

* initial version of linknode rendering

* add another test and fix a minor issue

* boost::format

* fix a bad merge
2020-12-21 15:29:17 +01:00
Greg Landrum
7d3ce119e6 Add molecule annotations/notes to MolDraw2D (#3651)
* first basic pass at molecule notes

FIX problem with updating bounding box based on non-centered annotations

* add chiral flags and simplified stereo annotations

* tests

* molecule annotations are the same font size as atom labels
2020-12-21 11:24:17 +01:00
Maximilian Greil
f6c23dc0bd Fix for Github issue 2530 (#3657)
* Github issue 2530

* Fix unittests

* Fix unittests 2

* Fix doctests

* Change name of default method back
2020-12-19 05:49:11 +01:00
Ric
962e699795 restrict Qt linkage to Draw libs (#3659) 2020-12-18 13:20:06 +01:00
Brian Kelley
81481d5c6d BondStereo info lost in FragmentOnBonds() (#3649)
* Fix bondstereo when fragmenting molecules with cis/trans E/Z

* Apply suggestions from code review

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

* Add more tests for bond stereo

* Add test to ensure non-stereo atom bond breaks are preserved

* Remove extraneous test, fix another

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2020-12-18 13:13:47 +01:00
Greg Landrum
72340e33c2 Fixes #3648 (#3654)
* Fixes #3648

Code now builds without either MAEParser or coordgen integration enabled.

* add CI build with minimal dependencies

* remove doctests from the new CI build

they need the cairo support
2020-12-17 09:29:59 -05:00
Greg Landrum
a7c438f870 Fixes #3646 (#3653) 2020-12-17 08:34:15 -05:00
greg landrum
03a43051e6 Merge branch 'greglandrum-feat/bond_query_drawing' 2020-12-17 06:55:15 +01:00
greg landrum
7564a4af8b Merge branch 'feat/bond_query_drawing' of https://github.com/greglandrum/rdkit into greglandrum-feat/bond_query_drawing 2020-12-17 06:43:49 +01:00
Paolo Tosco
be0f5b01f4 fixes #3635 (#3638) 2020-12-17 05:47:13 +01:00
Greg Landrum
df47393045 Fixes #3089 (#3642)
also adds a small test for PDB flavors
2020-12-14 12:34:32 -05:00
Paolo Tosco
5e31c975a2 Fixes a few residual issues with the RGD code (#3606)
* - replaced set with vector for SMILES-based R-group equivalence
- the first GreedyChunk is constituted by chunkSize+1 mols
- labeled R-groups may not be extracted when onlyMatchAtRGroups==false
- labeled geminal R-groups are incorrectly scored
- my attempt to introduce consistency in R-group labeling was buggy
- added a DEBUG pre-processor directive to the tests to make debugging easier
- added a unit test
- fixed unit test results which were inconsistent with the expected behavior

* changes in response to review
2020-12-12 08:52:00 -05:00
greg landrum
21788d285b Merge branch 'feat/noatomlabels' of https://github.com/greglandrum/rdkit into greglandrum-feat/noatomlabels 2020-12-12 12:07:58 +01:00