20 Commits

Author SHA1 Message Date
Greg Landrum
21225e63b3 Move some more tests over to catch2 (#9058)
* move testSubstructMatch to catch2

* modernization

* modernization

* switch to catch2

* modernize

* convert to catch2

* update

* move to catch

* please be quiet

* move to catch2

* changes in response to review

---------

Co-authored-by: = <=>
2026-01-24 07:03:04 +01:00
tadhurst-cdd
14c66817ea added FABS to test for issue #4364 (#9053) 2026-01-19 08:10:15 +01:00
Greg Landrum
dc84967df2 A bunch of modernization of the ShapeHelpers code (#8954)
* modernize testShapeHelpers

* a bunch of modernization of the shape helper code
2025-12-15 15:49:00 -05:00
Greg Landrum
315939f7ae Fix inversion of stereo with canonicalizeConformer (#7878)
* add test for conformer canonicalization inverting stereo

* Fix problem with canonicalizeConformer inverting stereo

* response to review
cleanup
fix the other tests affected by this change
2024-10-10 09:57:39 -04:00
Greg Landrum
7cd73591d8 Fixes #4364 (#4365) 2021-07-27 10:52:05 -07:00
Greg Landrum
a75018fe38 Cleanups and additional tests to improve test coverage (#2852)
* disable builds of the StructChecker code by default

* operator"" _smarts() doesn't need to catch sanitization errors

* remove unused function

* turn back on some tests that shouldn't have been disabled

* Remove unused code from SMARTS parser and simplify a bit

SmilesParseOps::AddFragToMol is now used only from the SMARTS parser, so we can simplify the API

* Removes obsolete special case code for SMARTS

This was relevant when organic atoms in SMARTS queries were stored as two-part queries.

* improve SMARTS testing

make sure we can generate SMARTS from all the examples and then parse that again.

* Fixes #2814

* Fixes #2815

* some additional smarts tests to improve coverage

* test copy ctor and getPos

* remove obsolete test_list files

* include tests for the morgan invariant generators

* more cleanups and coverage improvements

* remove files that were mistakenly added
2020-01-09 16:07:55 -05:00
John Mayfield
76ed536c87 Branch/vf2 optimisations (#2500)
* Remove out_1 and out_2, only need for directed graphs.

* Variable renaming, no other changes.

* Fix a couple things that were forgotten during the rename

* Only one of these counts is updated now.

* Add ifdef to enable/disable VF2Pruning

* Add degree bound check, could be pushed down to the generic VertexCheck predicate.

* The stack knows at each point what was added, by passing these into the Backtrack call the clone allocation can be removed.

* Indent and rename added_node1 to node1.

* Now the clone is removed we can add a member function to handle the recursion cleanly.

* Also make for MatchAll a member function.

* Set lim=0 to mean infinity.

* VF2Plus optimisation, when candidate is in the terminal set select from a mapped neighbours adjacency list.

* Optimisation hint.

* Use a struct for the Pair removing the need for double pointer and heap alloc/delete of the iterators.

* disable pruning by default (it's a bit quicker to not do this)

* update expected test results

The updated VF2 code can return symmetric results in a different order
than we were getting previously. The results are still correct, but they
change some of the downstream things that don't do symmetrization

* update expected java results
2019-06-30 04:49:24 +02:00
Francois Berenger
7ec8ec0bb9 Vdv radii from blue obelisk (#2154)
* updated atomic radii to follow the Blue Obelisk Data Repository

Ubuntu package bodr version 10-1; radii are from file
/usr/share/bodr/elements.xml

* typo

* use 2.0 as default VDW radius instead of 1.7

for elements missing from the Blue Obelisk Data Repository

* Document the atomic_data

* update expected test results

* update java tests

* allow a bit more slop when comparing confs

For cross-platform stability
2019-05-29 09:23:27 +02:00
Ric
a6b26253ff Fix (most of) mem problems (#2123)
* do not use new on loggers

* del pointers in testDistGeom

* Update Dict hasNonPOD status on bulk update

* delete new Dicts in memtest1.cpp

* fixes in MolSuppliers and testFMCS

* PeriodicTable singleton as unique_ptr

* fix EEM_arrays leak

* fix leaks in testPBF

* fix ParamCollection leak in test UFF

* fix leaks in MMFF

* clear prop dict before read in in pickler

* fix leaks in testFreeSASA

* fix leaks in test3D

* modernize Dict.h & SmilesParse.cpp

* fix leaks in testQuery

* fix leaks in testCrystalFF

* fix leaks in cxsmilesTest

* fix leaks in Catalog & mol cat test

* fix leaks in ShapeUtils & tests

* fix leaks in testSubgraphs1

* fix leaks testFingerprintGenerators

* fix leaks in Catalog/FilterCatalog

* fix leaks in graphmolqueryTest

* these changes reduce bison parse leaks

* fixed leaks in testChirality.cpp

* fix leaks + 2 tests in testMolWriter

* fix 4m leaks in substructLibraryTest

* small improvements to molTautomerTest; still leaks

* fix leaks in testRGroupDecomp

* fix leaks in test; parser still leaks

* fix leaks in itertest

* fix 4m leaks in testDepictor

* fixes in smatest; still leaking due to parser

* fixes in testSLNParse; still leaking due to parser

* flex/bison: always add atoms with ownership; smarts error cleanup

* fix leaks in testReaction

* fix leaks in testSubstructMatch

* fix leaks in resMolSupplierTest

* fix leaks in testChemTransforms + bug in ChemTransforms

* fix leaks in testPickler

* fix leaks in testMolTransform

* fix leaks in testFragCatalog

* fix leak in testSLNParse. Still leaks due to Smiles

* fixed most leaks in testMolSupplier

* pre bison fix

* fix some atom & bond parse problems; others still fail

* bison smiles & smarts, atoms & bonds more or less fixed

* fix leaks in molopstest.cpp

* fix leaks in testFingerprints, MACCS.cpp & AtomPairs.cpp

* fix leaks in moldraw2Dtest1

* fix leaks in testDescriptors

* fix leaks in testInchi

* fix leaks in testUFFForceFieldHelpers

* fix leaks in hanoiTest & new_canon.h

* fix leaks in testMMFFForceField

* fix leaks in graphmolTest1

* fix leaks in testMMFFForceFieldHelpers

* fix leaks in testDistGeomHelpers

* fix leaks in testMolAlign

* initialize occupancy & temp facto with default values

* fix leak in TautomerTransform

* updated suppressions

* fix testStructChecker

* fix logging & py tests

* fix TautomerTransform class/struct issue

* remove misplaced delete in testSLNParse

* deinit in testAvalonLib1

* fix Avalon-triggered(?) bug in StructChecker/Pattern.cpp

* fix random testMolWriter/Supplier fails

- diversify output file names to avoid clashing.
- unify Writers close/destruct behavior.
- flushing/closing in tests.

* use reset in FFs Params.cpp

* comments on testMMFFForceField

* unrequired 'if's added to mol suppliers

* correct cast in FilterCatalog.h

* use unique_ptr in MACCS Patterns

* remove unrequred if in new_canon

* update & move suppressions
2018-10-29 14:33:26 +00:00
Paolo Tosco
f7c888844d moved test.h from RDBoost to RDGeneral for consistency with export.h (#2074) 2018-10-11 17:35:23 -04:00
Paolo Tosco
c08ea49bda - enable building DLLs on Windows (#1861)
* - enable building DLLs on Windows

* - export.h and test.h are now auto-generated by CMake
2018-05-16 08:42:41 +02:00
susanhleung
1743ced5a5 add Tversky index calculation for shapes (#1777)
* trying to add shape tversky

* alpha and beta no defaults, added more tverskyIndex tests to testGrid

* corrections to GridUtils.h and ShapeUtils.cpp

* corrections to GridUtils.h
2018-03-24 08:33:30 +01:00
Greg Landrum
915cf08faa run clang-format with c++-11 style over that 2017-04-22 17:19:10 +02:00
Greg Landrum
7c0bb0b743 clang-tidy output 2017-04-22 17:09:24 +02:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Brian Kelley
210f2951e0 Silences warnings in tests 2015-10-18 21:20:11 -04:00
Greg Landrum
f3fbef45c5 update copyright statements 2010-09-26 17:04:37 +00:00
Greg Landrum
a3e6cb057e this is a mass of cleanup stuff; mostly line endings 2008-07-07 13:21:24 +00:00
Greg Landrum
5d03333c22 setup svn keywords (should have done this before import... grn) 2006-05-06 22:54:39 +00:00
Greg Landrum
75a79b6327 initial import 2006-05-06 22:20:08 +00:00