Commit Graph

3951 Commits

Author SHA1 Message Date
Brian Kelley
4c1ea25fda Fix a hang when trying to read mols from a directory not a file on linux (#2983)
* Fix a hang when trying to read mols from a directory not a file on linux

* thrown an exception at construction time

* clarify the readme

* update release notes

* Refactor the stream opening and checking code to a common method

Co-authored-by: Brian Kelley <bkelley@relaytx.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2020-03-09 15:27:58 +01:00
guillaume godin
34e96e2048 Atom Features (#2988)
* Atom Features

* remove back_push

* Revert "remove back_push"

This reverts commit f430524ced.

* Revert "Atom Features"

This reverts commit e9e98c82cc.

* correct version

* add Cmake

* few fix v1

* additional tests

* fix function name remove test.h file

* reomve test.h
2020-03-09 15:25:14 +01:00
Dan N
3b6dfb0343 Enable larger ring matches in SMARTS expressions (#2981)
Although these are probably nonsense, I've seen some pretty
big [r#] expressions in SMARTS expressions. In particular, for
SMARTS generated for toolkits that don't have the range
extension, people do this to mean "in rings bigger than 6" or
whatever:

   [r7,r8,r9,r10
2020-03-07 15:09:38 +01:00
Greg Landrum
fe745cfc04 ScaffoldNetwork rearrangements (#2985)
* backup

* rearrange the network to make it cleaner

- GenericBond scaffolds are now directly connected to the corresponding Generic scaffold
- Attachment points are no longer removed from Generic (or GenericBond) scaffolds

* remove dead code
2020-03-06 13:51:38 +01:00
Greg Landrum
494c28de18 add add_hs() and remove_hs() to JS wrappers (#2986) 2020-03-05 15:27:48 +01:00
Brian Kelley
f518805f1f Remove redudant (and case sensitive) files 2020-03-05 09:17:27 -05:00
Brian Kelley
4c0a99f2ad Add multithreaded pattern/fp generator (#2973)
* Add threaded pattern generator to help speed up library creation

* Add size to FPHolderBase

* Add more complete python wrapper, fix leak in doctest

* Add basic usage test for addPatterns, fix I/O leak

* Add basic test for trusted smiles

* Actually add the new code

* Export addPatterns on windows

* Try fixing the cartridge build

* Change pattern_factory to PatternFactory

* Change boost::ref to std::ref
2020-03-04 09:41:03 -05:00
Greg Landrum
f616b504e2 fix a typo in the scaffold network wrappers and add some tests (#2982) 2020-03-04 09:22:32 -05:00
Greg Landrum
55f0099257 Merge branch 'master' of https://github.com/rdkit/rdkit 2020-03-04 12:42:46 +01:00
Greg Landrum
54229e2a4e Merge branch 'MorseAtomFingerprint' of https://github.com/thegodone/rdkit into MorseAtomFingerprint 2020-03-04 12:35:32 +01:00
guillaume godin
3ff8eaaf85 Update test1.cpp
adding Morse Atom Fingerprint test
2020-03-04 12:24:22 +01:00
Greg Landrum
e5b387fa41 Merge branch 'master' into MorseAtomFingerprint 2020-03-04 11:53:45 +01:00
Ric
14b80eca8b Fix build without boost serialization. (#2972)
* fix build, test

* add new test file

* rename scaffold pickling test
2020-03-04 04:52:43 -05:00
guillaume godin
013642b74f Update testMolDescriptors.py
add python testcase Morse Atom Fingerprint
2020-03-04 09:42:35 +01:00
guillaume godin
74bb9d7aa1 Update MorganFingerprints.cpp
fix the redundantEnv
2020-03-04 09:34:21 +01:00
guillaume godin
f9b15a40d8 Update MorganFingerprints.cpp
fix line split
2020-03-04 06:05:55 +01:00
Brian Kelley
96353c3a8b Add BCUT 2D descriptors (#2957)
* [WIP] Add BCUT 2D descriptors

* Use the standard RDKit license

* Add Check for EIGEN3

* Add vector param, fix some formatting, remove debug print

* Add make_burden function, optimize symmetric eigenvalues

* Add some tests, finalize API

* Make the python API return tuples

* Updates docs

* Remove unused variable

* Fixed up C++ tests

* Remove std::pair wrapper, don't build BCUT when missing EIGEN

* Add bigger test case for BCUTs

* Accidentally removed the wrong code
2020-02-23 16:09:36 +01:00
Brian Kelley
310bb21ea8 Don't switch locales unless really necessary (float/double) (#2958) 2020-02-19 07:44:50 -05:00
Greg Landrum
6f9ba35826 Tune the tautomer scoring (#2959)
* tautomer scoring tweaks
doc updates
expose tautomer score to Python

* fix leaks in tests
2020-02-19 07:38:04 -05:00
Greg Landrum
41d1f762f5 Fixes #2948 (#2950) 2020-02-19 07:31:43 -05:00
Greg Landrum
915471a079 Fix a problem with aromatic heteroatom tautomer enumeration (#2952)
* update transforms to enforce neutral nitrogens when doing the aromatic neteroatom transforms

* formatting, add a test

* remove unused #include
2020-02-13 06:35:01 +01:00
Steven Kearnes
40b9828fd9 Avoid data race warning in SmilesParse.cpp (#2946)
* Avoid data race in SmilesParse.cpp

Avoid data race in SmilesParse.cpp for SMILES and SMARTS

* More informative comments

* Fix line width
2020-02-12 04:57:45 +01:00
Greg Landrum
ced45aceb4 Fixes #2936 (#2938)
* fix some bad argument checking

* Fixes #2936
2020-02-11 08:27:42 -05:00
Greg Landrum
f3587ea4d0 Add a scaffold network implementation (#2911)
* backup

* backup

* backup

* getting close to v0.1

* switch to using node indices

* add pruning and flattening

* support multiple mols

* example notebook

* backup

* initial commit
Just includes the basic API and flatten

* add the pruning step

* add removeAttachmentPoints()

* add makeScaffoldGeneric()

* improve compilation speed by adding catch_main.cpp

* add getMolFragments()

* doc cleanup

* actually add the network building code

* first pass at python wrapper

* allow edges to be nicely converted to strings

* get node counts working

* backup python notebook

* switch example notebook to use wrapped C++ code

* add BRICS fragmentation option

* fix a bug with removing attachment points to aromatic heteroatoms

* add provisional attachment point merger to notebook

* fix a bug with includeScaffoldsWithAttachments=false

* backup of efforts to get this working on windows

* backup of efforts to get this working on windows

* does not work. backup

* Fix a substructure crash on Windows

* re-enable tests

* adjust to the new BRICS form

* in-code documentation

* more doc updates

* reformat

* change the string output format for edges

* remove old python implementation

* remove obsolete test

* include a generic scaffold for the pruned structure too

* default to keepOnlyFirstFragment=false with BRICS params

* bug in removal of attachment points from generic scaffolds

* more testing

* support working from std::shared_ptr as well as boost::shared_ptr

* more testing

* disable debug printing

* use memo-ization in getMolFragments() to avoid duplicate work

* add SWIG wrapper and basic testing

* add define for RDK_USE_BOOST_SERIALIZATION

* add serialization at the C++ level

* add a string ctor for a scaffold networks

* add pickle support on the python side

* formatting

* remove old notebook

* move the fantastically useful iterable_convertor to RDBoost/Wrap.h

* expose parameter constructor with std::vector<std::string>

* add scaffoldnetwork to documentation
2020-02-11 08:21:01 -05:00
Greg Landrum
3160c46af4 Fixes #2929 (#2934) 2020-02-05 16:51:51 +01:00
Greg Landrum
1830767d5d Fix a couple residual problems created by #2899 (#2935) 2020-02-05 16:32:08 +01:00
Ric
9188c70a64 Override what() in exceptions (Addresses #2920) (#2928)
* add overrides for what()

* translation fot KeyErrorException; update tests

* Switch all exceptions to `const char *` as a return type from message() (#4)

* switch return type of message() from std::string to const char *

* adjust one test to the new return type from message()
remove unnecessary verbosity from some tests

* fix cartridge build: update call to message().c_str()

* rebase agains master; fix another issue in cartridge build

* add deprecation note for message() and getMessage()

* amend Release notes

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2020-02-05 08:20:17 +01:00
Greg Landrum
a2767d9f7d Allow custom post-match filters for substructure matching (#2927)
* backup, does not work

* working on the C++ side

* backup

* fix the API

* document the new functionality

* improve that example

* final bit of cleanup

* switch to std::function
2020-02-04 11:22:38 -05:00
Greg Landrum
a7874672bc Merge branch 'feat/github2829' of https://github.com/greglandrum/rdkit into greglandrum-feat/github2829
# Conflicts:
#	Code/GraphMol/AdjustQuery.cpp
#	Code/GraphMol/FileParsers/file_parsers_catch.cpp
#	Code/GraphMol/MolOps.h
#	Code/GraphMol/catch_graphmol.cpp
2020-02-04 02:42:31 +01:00
Greg Landrum
abadada1a2 Parse and handle the stereoCare or STBOX flags in CTABs (#2917)
* get fileparsers catch tests building faster
should use this same approach across all of the catch2 tests

* Fixes #2916

* support parsing of STBOX for atoms and bonds in v3K mol files
add molStereoCare to common_properties

STBOX is translated to the molStereoCare property

* add stereocare support to adjustQueryProperties
make building the catch2 tests faster for the GraphMol package

* copy in AdjustQueryParameters JSON parsing from adapter.cpp
(That still needs to be ported to use the new code)

* get the cartridge using the new parsing code

* update test to reflect new parser behavior

* add a v2000 test

* changes in response to review
2020-02-03 15:55:57 -05:00
Greg Landrum
a0dd56ddee remove the MRV_IMPLICIT_H groups after processing them 2020-02-02 06:12:40 +01:00
Greg Landrum
1cea3800c4 Fixes #2829 2020-01-30 16:56:18 +01:00
Greg Landrum
b2e8cad444 Merge remote-tracking branch 'origin' into feat/github2829 2020-01-30 15:23:01 +01:00
Greg Landrum
9991c5247a cleanup of the SMILES/SMARTS parsing and writing code (#2912)
* first cleanup

* next round of changes. all tests pass

* Fixes #2909

* Fixes #2910

* further cleanup

* some cleanup/refactoring of the Dict class

* remove now extraneous calls to hasProp() before clearProp()

* minor refactoring of RDProps.h

* Switch from using our own version of round() to std::round()

* replace some boost::math stuff with the equivalents from std::

* cleanups in SmartsWrite

* refactor out a bunch of duplicated code

* fix an instance of undefined behavior

* changes in response to review
2020-01-29 15:13:39 +01:00
Greg Landrum
e9c9c3f969 add a v2000 test 2020-01-29 15:06:48 +01:00
Greg Landrum
b18d984098 update test to reflect new parser behavior 2020-01-29 14:45:59 +01:00
Greg Landrum
acbaf2f674 get the cartridge using the new parsing code 2020-01-29 14:33:18 +01:00
Greg Landrum
6069f65a90 copy in AdjustQueryParameters JSON parsing from adapter.cpp
(That still needs to be ported to use the new code)
2020-01-29 13:52:26 +01:00
Greg Landrum
b946956375 add stereocare support to adjustQueryProperties
make building the catch2 tests faster for the GraphMol package
2020-01-29 11:22:58 +01:00
Greg Landrum
c873ce9535 support parsing of STBOX for atoms and bonds in v3K mol files
add molStereoCare to common_properties

STBOX is translated to the molStereoCare property
2020-01-29 09:51:23 +01:00
Greg Landrum
a1e9a4528d Fixes #2916 2020-01-29 08:54:05 +01:00
Greg Landrum
098a41fd29 get fileparsers catch tests building faster
should use this same approach across all of the catch2 tests
2020-01-29 08:22:19 +01:00
Greg Landrum
3851380800 Remove bogus URFLib library (#2900)
* a couple of URF building cleanups

* java wrapper build cleanups

* no longer need URF.cpp
2020-01-28 08:52:58 -05:00
Brian Kelley
68e8f10b95 Fixes #2510 (#2907)
* Fixes #2510

* Changes in response to review

* Use CoordsAsDouble, rev version

* Confs->coords in documentation

* conformations->coordinate
2020-01-28 05:07:31 +01:00
Greg Landrum
7e2ccecc8d Fixes #2895 (#2906)
* Fixes #2895

* typo fix
2020-01-26 07:41:51 -05:00
Greg Landrum
d41752d558 run clang-tidy with readability-braces-around-statements (#2899)
* run clang-tidy with readability-braces-around-statements
clang-format the results
clean up all the parts that clang-tidy-8 broke

* fix problem on windows
2020-01-25 14:19:32 +01:00
Greg Landrum
fb3cad523e Fixes #2896 (#2903) 2020-01-25 06:34:29 +01:00
Greg Landrum
0ac7fa5165 java wrapper build cleanups (#2901) 2020-01-23 16:27:46 -05:00
jones-gareth
eb289cd13c Fix to allow multistructure images in Java/C# and use MCS for c# wrapper (#2898) 2020-01-23 09:03:09 +01:00
Brian Kelley
4d028b2aec Fix redundancy in RandomSampleAllBBs (#2893)
* Fix issue brought up with PVS studio, add better docs

* Fix doc string
2020-01-22 15:11:28 +01:00