Commit Graph

24 Commits

Author SHA1 Message Date
Greg Landrum
f0cf0b0f20 Fixes #4789 (#4790) 2021-12-13 14:15:26 +01:00
Greg Landrum
df72c241c5 Improve test coverage and some bug fixes (#4536)
* test getIdOfEntryWithBitId()

* remove unused functions

* improve bv tests in python wrapper

* more UniformGrid tests

* improve deprotect coverage

* improve abbreviations coverage

* add operator!= to DeprotectData

* more testing for adjustQueryProperties

* fix a copy-paste bug

* copy-paste bug

* more testing

* more testing

* more testing

* fix an edge case bug in getValenceContrib

* more bond tests

* add operator!= to StereoInfo
tests StereoInfo::operator==

* make some internal functions testable

* more testing

* minor code cleanup

* fix some bad caching behavior in getDistanceMat() and get3DDistanceMat()

testing

* test FixeMolSizeMolBundle() copy ctor

* deprecate BalabanJ

* more testing

* testing

* mods to get things working for windows DLL builds
(don't bother running some of the tests there)

* fix a typo
2021-09-26 07:45:06 +02:00
greg landrum
a068a18a53 all tests now passing 2020-12-08 15:39:45 +01:00
jones-gareth
aa4d5dc22c Fixes for aromatic bond fuzzy queries (#3328)
* C# wrapper for fragmentMolOnBonds

* Fix failing tautomer query test

* Fix ChemTransforms.i

* SmartsWriter fix
2020-08-10 05:00:19 +02:00
Greg Landrum
f14f8a60de Expanded support for CXSMILES features (#3292)
* move replaceAtomWithQueryAtom() and completeMolQueries() to QueryOps namespace

* support ring bonds from cxsmiles

* add a test that is still failing

* update nonHydrogenDegree query, add SMARTS extension for that

* some cleanup

* unsaturation and substitution count

* fix typo in test

* update expected result

* add linknodes

* add variable attachment points

* improve documentation of supported cxsmiles features

* clarifying the docs

* support leaving out the outer atoms in LN specs
2020-07-25 05:06:08 +02:00
Greg Landrum
1630540ef0 Add cxsmiles query atoms to CTAB parsers and writers (#3261)
* allow CXSMILES generic query atoms to be parsed from mol;
need more tests here

* remove vestigial directory

* Add d_queryType to Query
This opens up additional flexibility with customizing the way queries are handled
Also includes some assorted cleanups in the Query directory

* remove the MolFileSymbol hack added in #3235
We don't need it anymore

* Add support for additional ChemAxon extensions and document them

Signed-off-by: greg landrum <greg.landrum@gmail.com>

* bump pickle version

* add an additional test
2020-07-03 12:51:19 -04:00
Greg Landrum
b55376f284 Adds more options to adjustQueryProperties (#3235)
* add documentation

* backup

* first pass at 5-rings working

* add a static method to initialize an empty parameter object

* expose static method to python

* additional testing

* support the single bond adjustments

* cleanup

* preserve the symbol used in the query from a CTAB

* support the way the MDL code adjusts five-ring aromaticity in query rings

* in-code documentation

* while we're at it, cleanup the way Q and A atoms are handled in the v3k parser

* changes in response to review

* make this C++14 again.

* change in response to review
2020-06-22 09:17:50 -04: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
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
879a40d9ee Fixes #1943 (#1954) 2018-07-16 10:27:08 -04:00
Greg Landrum
ba12d98ad0 Removes ATOM/BOND_SPTR in boost::graph in favor of raw pointers (#1713)
* Removes ATOM/BOND_SPTR in boost::graph in favor of raw pointers

* Actually delete atoms and bonds...

* RWMol::clear now calls destroy to handle atom/bond deletion

* Changes broken Atom lookup for windows/gcc

* Adds tests for running with valgrind

* Adds test designed for valgrind and molecule deletions

* Removes RNG, actually tests bond deletions

* update swig wrappers

* deal with most recent changes on the main branch
2018-01-07 14:19:47 -05:00
Greg Landrum
87786c08b5 Merge branch 'master' into modern_cxx
# Conflicts:
#	.travis.yml
#	Code/GraphMol/FileParsers/MolFileParser.cpp
#	Code/GraphMol/FileParsers/MolFileStereochem.cpp
#	Code/GraphMol/ForceFieldHelpers/UFF/testUFFHelpers.cpp
#	Code/GraphMol/MolAlign/testMolAlign.cpp
#	Code/GraphMol/MolDraw2D/MolDraw2D.cpp
#	Code/GraphMol/MolDraw2D/Wrap/rdMolDraw2D.cpp
#	Code/GraphMol/QueryOps.cpp
#	Code/GraphMol/ROMol.cpp
#	Code/GraphMol/SmilesParse/test.cpp
#	Code/GraphMol/Trajectory/Trajectory.cpp
#	Code/GraphMol/Wrap/Atom.cpp
#	Code/GraphMol/Wrap/Bond.cpp
#	Code/GraphMol/new_canon.cpp
#	Code/RDGeneral/testDict.cpp
#	Code/SimDivPickers/Wrap/MaxMinPicker.cpp
2017-10-05 05:58:38 +02:00
Greg Landrum
db89172bf8 handle the heavy-atom degree queries differently (#1560)
* handle the heavy-atom degree queries differently

* Fixes #1563

* add a test for the heavy atom degree option

* Support (and test) adjustHeavyDegree in the cartridge too.

* test results
2017-09-12 16:10:15 -04:00
Greg Landrum
67bc7a647c merge on master; modernization needs to be repeated 2017-09-05 17:09:50 +02:00
Greg Landrum
62150f7d80 Squashed commit of the following:
commit 7f7b5268a62eecd260027e0918abbdf62b100034
Merge: 90e9fd3 6dd173d
Author: Greg Landrum <greg.landrum@gmail.com>
Date:   Tue Aug 8 01:19:15 2017 +0200

    merge back to master

commit 6dd173dec6
Merge: 45a94bd e11ad49
Author: Brian Kelley <fustigator@gmail.com>
Date:   Thu Aug 3 07:54:26 2017 -0400

    Merge pull request #8 from greglandrum/dev/rgroup-decomposition

    support using generic iterators in ctor;

commit e11ad49068
Author: Greg Landrum <greg.landrum@gmail.com>
Date:   Tue Aug 1 06:29:52 2017 +0200

    move notebooks to docs

commit 606c03c28f
Author: Greg Landrum <greg.landrum@gmail.com>
Date:   Thu Jul 27 05:13:13 2017 +0200

    support using generic iterators in ctor;
    general comment: this is a useful pattern that we could use elsewhere

commit 45a94bd663
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Wed Jul 26 13:30:23 2017 -0400

    Updates notebooks

commit 8f78ba97d3
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Wed Jul 26 09:00:42 2017 -0400

    Updates notebooks

commit 44728803ae
Merge: d67409d 4d0b00d
Author: Brian Kelley <fustigator@gmail.com>
Date:   Wed Jul 26 08:53:11 2017 -0400

    Merge pull request #7 from greglandrum/dev/rgroup-decomposition

    clean up a couple leaks and some compiler warnings

commit 4d0b00dd2e
Author: Greg Landrum <greg.landrum@gmail.com>
Date:   Wed Jul 26 07:47:56 2017 +0200

    clean up a couple leaks and some compiler warnings

commit d67409da0c
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Tue Jul 25 11:43:14 2017 -0400

    Makes the scoring system more sane

commit 1b5181dc2f
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Tue Jul 25 10:55:33 2017 -0400

    Finalizes enums

commit 7e9ee61556
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Tue Jul 25 10:55:18 2017 -0400

    Fixes constructor botched in the last commit

commit aed2a201bf
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Mon Jul 24 18:22:42 2017 -0400

    Cleans up some code

commit 95e82a1398
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Mon Jul 24 18:14:31 2017 -0400

    Removes unused variable

commit 0b1ed09316
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Mon Jul 24 18:14:23 2017 -0400

    Slight optimization by combining two loops

commit ed3340a516
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Mon Jul 24 13:53:06 2017 -0400

    Fixes post increments in for loops

commit 25b1678a58
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Mon Jul 24 13:52:53 2017 -0400

    Fixes memory leak and doesn’t call SmartsToMol twice

commit 86c8c42688
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Mon Jul 24 13:52:32 2017 -0400

    Adds header guards

commit b043e38d3a
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Mon Jul 24 13:52:25 2017 -0400

    Removes unused variable

commit 631aa77153
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Tue Jul 11 08:10:39 2017 -0400

    Fixes typo in filename

commit d6e0dc753a
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Mon Jul 10 14:48:04 2017 -0400

    Fixes c++11 style enums

commit b9a31eae9a
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Mon Jul 10 14:00:04 2017 -0400

    Adds RGroupDecomposition attempt
2017-08-08 01:23:49 +02:00
Brian Kelley
6a76fc9381 Dev/add update props api (#1479)
* Adds RDProps updateProps API point

* AdjustQuery now copies over original atom data to the query ato

* Preserves existing data on the replacing atom

* Exposes preserveProps to Python replaceAtom/Bond
2017-07-10 04:38:59 +02:00
Brian Kelley
b76af93513 Dev/add update props api (#1479)
* Adds RDProps updateProps API point

* AdjustQuery now copies over original atom data to the query ato

* Preserves existing data on the replacing atom

* Exposes preserveProps to Python replaceAtom/Bond
2017-07-10 04:36:12 +02:00
Greg Landrum
7c0bb0b743 clang-tidy output 2017-04-22 17:09:24 +02:00
Greg Landrum
1b946794f0 replaceBond and generic atoms and bonds in adjustQueryProperties() (#1141)
* first pass at RWMol::replaceBond()

* get ready for the changes

* rename some options
add bond options (not doing anything with them yet)
update tests to reflect new options

* backup

* re-enable the rest of the tests
2016-11-04 12:41:06 +01:00
Brian Kelley
659ac6cb27 Adds aromatization and reaction options to AdjustQuery (#965)
* Adds aromatization and reaction options to AdjustQuery

 aromatizeIfPossible - checks kekulized queries for
    aromatic compatibility
 adds IGNORE_MAPPED and IGNORE_ATTACHEDRGROUPS options
  to adjustDegree

* Missed return false.

* Removes IGNOREATTACHEDRGROUPS
2016-06-29 05:09:30 +02:00
Greg Landrum
d63f44cc0c Add cartridge support for adjustQueryProperties() (#949)
* backup commit

* Change the names and meanings of MolOps::AdjustQueryWhichFlags
What was there before was not flexible enough and was extremely confusing. This should clear that up.

NOTE: this does break backwards compatibility with code that uses this enum, but given that this is new and has not been
widely promoted, I suspect it should not affect that many people. The default behavior of MolOps::adjustQueryProperties()
remains the same.

* adjust to the new AdjustQueryWhichFlags

* add mol_adjust_query_properties tests to the cartridge
2016-06-21 14:38:32 -04:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Greg Landrum
8596c6f9ad add support for converting dummies to queries 2015-08-22 05:43:42 +02:00
Greg Landrum
a7383e7861 first pass at #567 2015-08-21 16:45:00 +02:00