Commit Graph

19 Commits

Author SHA1 Message Date
Greg Landrum
70dadbb21f Fixes #4260 (#4267) 2021-06-21 09:52:11 -04:00
Greg Landrum
f5a54af475 A collection of MolStandardize improvements (#4118)
* Swap to using a data structure for default normalization parameters

* bring the default fragment data into the code too

* cleanup

* add reionizer parameters via data

change fragment parse failures to ValueErrorExceptions

* tautomer parameters in the code

* got a little over-enthusiastic in that last cleanup

* use boost::flyweight to cache normalization and charge data params

* a bit more cleanup

* support reading params from JSON

* fragments from JSON
single-call for fragment removal

* add a one-liner for the canonical tautomer

* quick refactor

* Fixes #4115

* complete the parents

* docs

* move the definitions to a namespace and make them const

* see if switching to c++14 fixes the CI compile problems with g++ 5.5

* somewhat uglier way of solving the initalizer list problem
2021-05-19 09:11:23 +02:00
Greg Landrum
158fe71ff2 Add some MolStandardize functionality to the CFFI library (#4062)
* support CleanupParameters from JSON

* add standardization to cffi

* remove a bunch of repeated code from the new stuff
2021-04-22 05:23:25 +02:00
Paolo Tosco
f1119f3980 Make MetalDisconnector more robust against metallorganics (#3465)
* Make MetalDisconnector more robust against metallorganics

* - fixed misbehavior with radicals
- added tests
- code cleanup

* - fixed MetalDisconnector with dative bonds
- removed pointless test
2020-10-13 04:41:18 +02:00
shrey183
8ea1ac6112 [GSoC-2020] Generalized and Multithreaded File Reader (#3363)
* fixed issue #2965

* added test case for issue #2965

* fixed formatting and added comment.

* update

* General Reader files

* removed dependency on boost filesystems

* removed class

* clang-format

* added-comments

* further-cleanup

* added clang-formatting

* braces-for-if-else

* changed error messages, added option for windows file path

* fixed getFileName function

* cleanup

* option for filename without path

* further-cleanup

* added tests for determineFileFormat

* cleanup, const arguments for validate function

* init

* cleanup

* cleanup

* clang-format does not work for CMake

* added RDK_TEST_MULTITHREADED option

* add-flag

* cleanup

* Delete ConcurrentQueue.h

This PR deals with the Generalized File Reader.

* Delete testConcurrentQueue.cpp

This PR deals with the Generalized File Reader.

* no change

* concurrent queue

* print values

* Single Producer Multiple Consumer works

* cleanup

* Producer Consumer Example

* update queue methods and tests

* cleanup

* test

* fixed tests

* cleanup, updated tests

* Delete ProducerConsumer.h

* Delete testProducerConsumer.cpp

* cleanup

* futher cleanup

* changes based on feedback

* make queue non copyable

* psuedocode

* possible implementation

* untested implementation

* change class to typename

* basic-setup

* need to fix segfault

* need to fix blocking

* need to fix blocking

* need to fix blocking

* fix indentation

* one possibility

* without lambda function

* possible fix with some test cases

* performance tests

* added support for record id and item text

* cleanup

* cleanup

* fixed memory leak and added methods with tests for getting last id and item text

* cleanup

* added more test cases with different smi files

* cleanup

* SD mol supplier

* modified the parsing for SDMolSupplier

* cleanup

* cleanup

* new file for testing

* added support for reading molecule properties with tests

* thread-safe logging and exception handling

* cleanup

* without thread safe logging

* cleanup

* cleanup, modified MultithreadedSmilesMolSupplier

* cleanup, made reader and writer functions private

* move O2.sdf

* basic python wrapper with tests

* cleanup, added new methods for python wrappers

* made changes suggested by Andrew

* file and compression formats are case-insensitive

* cannot open files with gzstream

* cleanup

* possible fix for opening compressed streams (SMILES)

* removed seekg() and tellg() methods from multithreadeded suppliers

* cleanup

* test cases for python wrappers

* some wrapper cleanup

* cleanup, removed unused functions

* update the MT tests so that they actually do some work
also includes some cleanup here

* cleanup

* remove iterator_next header include

* added support for multithreaded readers

* use getNumThreadsToUse for multithreaded suppliers

* fixed documentation for multithreaded python wrappers

* commented performance test

* first draft of final evaluation report

* removed inline variables

* first draft getting started in python

* fixed typos in getting started in python

* fixed typos

* fix documentation tests

* fixed documentation tests

* added links to important files and PR

* added perfomance results

* first version of wrappers with compressed streams

* getting rid of streambuf stream method

* modified General File Reader

* make this work when building in non-threads mode

* rename a test

* rename a function in the python API

* rearrange the python test a bit

* disable the stream-based constructors in Python

* mark the multithreaded classes as experimental

Co-authored-by: greg landrum <greg.landrum@gmail.com>
2020-10-09 04:31:05 +02:00
Eisuke Kawashima
be9349b3bb Correct TEST_CASE tags for Catch2 (#3069)
https://github.com/catchorg/Catch2/blob/v2.1.2/docs/test-cases-and-sections.md#tags
2020-04-08 15:43:38 +02:00
Manan Goel
f3a6db2a02 This commit fixes the bug "segmenation fault/core dump when chargePar… (#3029)
* This commit fixes the bug "segmenation fault/core dump when chargeParent is run with skip_standardize set to true" mentioned in #2970

* Fixed memory leaks in MolStandardize and deleted variables which aren't required
2020-03-24 07:48:38 +01:00
shrey183
00c6a7e370 Possible fix for issue #2965 (#3001)
* fixed issue #2965

* added test case for issue #2965

* fixed formatting and added comment.
2020-03-14 14:28:17 +01:00
Greg Landrum
f2841ecf42 Fixes #2792 (#2793) 2019-11-20 16:26:35 +01:00
Greg Landrum
c09fb2f3f4 fragments need to match bond counts too (#2768) 2019-11-14 13:57:22 +01:00
Greg Landrum
cb55f6b979 Fixes #2749 (#2750)
* Switch to using numTotalHs() instead of numExplicitHs()

* Fixes #2749

* changes in response to review
2019-10-31 07:24:34 -04:00
Greg Landrum
02cff7dfe4 Fix #2722 and #2721 (#2723)
* Fixes #2722

* Fixes and tests #2721
2019-10-17 11:35:32 -04:00
Greg Landrum
b87c629e10 fix a problem with normalize, ringinfo, and fragments (#2685) 2019-10-03 15:28:33 +02:00
Greg Landrum
7ffd863c9b A collection of bug fixes (#2608)
* Fixes #2602

* Fixes #2605

* Remove vestigial isEarlyAtom() definition in Kekulize.cpp

* Fixes #2606

* Fixes #2607

adds allowed valence 2 for Sn and Pb

* Fixes #2610

* update in response to review
2019-08-15 04:53:23 +02:00
Greg Landrum
3ce2016039 Fixes #2452 (#2507) 2019-06-24 23:07:19 -04:00
Greg Landrum
d0c8c3cf8f Fixes #2411 and #2414 (#2412)
* clang-tidy-7 pass

* Fixes #2411

* Fixes #2414
2019-04-19 21:51:41 -04:00
Greg Landrum
941d7abb5f Fixes #2392 (#2393)
* Fixes #2392

* update release notes
2019-04-06 07:16:55 -04:00
Greg Landrum
1d01874678 improvements to the Uncharge functionality (#2374)
* modify the uncharger to be use a canonical atom ordering

* add doCanonical cleanup parameter
make canonical ordering the default
document the change

* Add neutralization of additonal negative groups (not just acids).
This may not be the right thing to do.

* expose the new parameter to python

* changes in response to review
2019-03-29 21:02:55 -04:00
Greg Landrum
55fb9034a6 Add a skip_all_if_match option to the FragmentRemover (#2338)
* add SKIP_IF_ALL_MATCH argument to FragmentRemover
    Refactor FragmentRemover::remove() to make it more efficient

* implement and test SKIP_IF_ALL_MATCH

* expose the extra option to Python

* add info to logger
2019-03-14 09:32:08 -04:00