* extra SSS match functions for atoms/bonds
initial implementation and testing
* add baseline to test
* add a functor for matching atom coords
* support the extra checks in python
* refactor the way the python callbacks are handled
* test tolerances
* expose the AtomCoordsMatcher to python
* allow the extra checks to override the default matching
---------
Co-authored-by: = <=>
* use std::span for substruct match callbacks
This removes a copy from every evaluation of potential matches
* some cleanup/modernization
* some modernization
* deprecate chiralAtomCompat
* small optimization
* remove naked pointers
* improve new_timings.py script
* changes suggested in review
* response to review
* response to review
* Fixes#6017
* a bit of cleanup work
* remove unused variable
* change in response to review
switch to using std::max(maxMatches,maxRecursiveMatches)
* test the case where maxSubstructMatches<maxMatches
* revert duplicate chunk in release notes
* replace deprecated ifdefs
This one gets rid of USE_BUILTIN_POPCNT and RDK_THREADSAFE_SS
use RDK_OPTIMIZE_POPCNT or RDK_BUILD_THREADSAFE_SSS instead
* get rid of BUILD_COORDGEN_SUPPORT from ROMol.i
* fix a stupid typo
* update release notes
* backup commit
This is mabye heading in the right direction and at least passes the basic tests which are there.
* some progress
* more tests and refactoring
* additional aliases
add carboaryl
* add CYC and ACY
* add ABC
* add AHC
* CBC and AOX
* add CHC and HAR
* add CXX
* cleanup: remove a bunch of nullptrs
* initial tagging support
* remove atom labels/sgroups after using them
* docs
* start handing writing
NOTE: this does not currently work: the generic code needs to move out of SubstructSearch
* move the generic groups to their own library
Signed-off-by: greg landrum <greg.landrum@gmail.com>
* make sure the generic groups end up in ctabs
* add forgotten CMakeLists.txt
* fix includes
* expose this stuff to Python
* CYC needs to initialize rings
* renaming
* add docs
* change in response to review
* - fix non-threaded *nix builds that currently fail because
boost flyweight introduces a dependency on pthreads
- make sure that mutexes and futures are only used when
RDK_BUILD_THREADSAFE_SSS is ON
- fix SubstructMatch failing test when RDK_BUILD_THREADSAFE_SSS is OFF
due to misplaced #ifdef's
- rename RDK_TEST_MULTITHREADED to RDK_THREADSAFE_SSS in inchi.cpp
(which is not a test)
* - the limitexternal Linux build is now single-threaded so we make
sure single-threaded builds do not break in the future
(suggestion from Greg)
* reverted unnecessary change to Code/GraphMol/FileParsers/testMultithreadedMolSupplier.cpp
Co-authored-by: Paolo Tosco <paolo.tosco@novartis.com>
* make sure that ResonanceMolSupplier subtructure matches are uniquified consistently
* Fixes github #4311 (#4312)
* a bit of simple refactoring
* Fixes#4311
- adds getValenceContrib() to QueryBond
- adds hasBondTypeQuery() and hasComplexBondTypeQuery() to QueryOps namespace
- atoms with complex bond type queries now have explict and implicit valences of 0
- adds tests for the above
* add a test
* Support using SubstructMatchParameters in RGD (#4318)
* support substructure search parameters in RGD.
Still needs testing/verification of the enhanced stereo stuff
* test enhanced stereo
* add support to python wrapper
unfortunately some python reformatting got mixed in there.
* addressed comments in review
Co-authored-by: Paolo Tosco <paolo.tosco@novartis.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Most tests working
* All tests working
* Fixed tests after merge with master
* Create header and implementations for RCore
* Updated comments
* Removed old code
* DLL export for MolMatchFinalCheckFunctor
* Information line for failing Mac test
* Log replace core behaviour
* Ordering fix for OSX
* Possible fuzzer fix
* Removed debug output
* Fix unmatched user R group bug
* Code review changes
* Bug fix and ChemTransforms test
* remove include from headers
* update implementation files
* completely remove BOOST_FOREACH (#7)
* convert those changes to use auto
* get rid of all usage of BOOST_FOREACH
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* do not throw in desctructor
* remove unused var; reserve
* provide operator= for DiscreteValueVect
* provide operator= for SparseIntVect
* remove unknown 'omp' #pragmas; refactor loop
* remove unused var
* remove unused variables
* give EmbeddedAtom a default constructor & early exit on self assignç
* handle unused vars/args
* catch exception by ref
* address unused args
* fix signed type comparison; refactor extra checks
* remove unused variable
* suppress switch fallthtough warning
* handle signed type comparison
* handle signed type comparison
* potentially uninitialized vars
* fix abs() of bool
* unused vars in catch statements
* remove unused variables
* python::list returns will be copied
* give ValidationMethod constructor & virtual destructor
* remove extra semicolon
* Test only commit for using enhanced stereo in substructure search
Adds some test cases to demonstrate what I'm planning.
When the test cases fail, the messages look like this:
-------------------------------------------------------------------------------
Enhanced stereochemistry
AND and OR match their enantiomer
-------------------------------------------------------------------------------
/Users/wandschn/Documents/src/rdkit/Code/GraphMol/Substruct/catch_tests.cpp:216
...............................................................................
/Users/wandschn/Documents/src/rdkit/Code/GraphMol/Substruct/catch_tests.cpp:218: FAILED:
CHECK_THAT( *opposite_mol, IsSubstructOf(*mol_and, ps) )
with expansion:
CC[C@@H](F)[C@@H](C)O is not a substructure of CC[C@H](F)[C@H](C)O |&1:2,4|
/Users/wandschn/Documents/src/rdkit/Code/GraphMol/Substruct/catch_tests.cpp:219: FAILED:
CHECK_THAT( *opposite_mol, IsSubstructOf(*mol_or, ps) )
with expansion:
CC[C@@H](F)[C@@H](C)O is not a substructure of CC[C@H](F)[C@H](C)O |o1:2,4|
* rename parameter to include q and m to reduce my confusion
* Don't keep recreating a map
This map is the same in every loop. And actually, the desired
information is slightly different than what was formerly stored
in the map.
* Fix tests after our discussion.
Also adds more exciting tests of disastereomers and structures
with multiple stereo groups.
* Use enhanced stereochemistry in substructure searching
Allows use of enhaced stereochemistry in substructure searching
if `SubstructMatchParameters.useEnhancedStereo` is set.
The matching rules are pretty obnoxious, but a synopsis is:
* An achiral query/substructure matches everything, because it
means "ignore chirality".
* An absolute query matches AND or OR, because they both include
the molecule with an absolute center
* An query with an OR matches either an OR or an AND, because
AND is more molecules.
* add info about matching to the documentation
* expose extended stereo matching option to python
* Some updates/tweaks to the documentation of enhanced stereochemistry
especially about searching.
* Code review comments.
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* 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
* 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
* forward doIsomericSmiles
* added test for #2565
* fix for my snippet
* update test with Greg's comments
* add braces for readability to MolMatchFinalCheckFunctor
* small refactors: abstract label checking, while/size, final check
* merge loops reading order of bonds -- all tests pass
* fix chiral-lead fragments, allow frags w. degree < 3
* add new test, update old
* add test, update old
* fix (inocuous) bug with ranks assignment in MolToSmarts
* start SMARTS with first non-chiral atom
* use smart pointers in test
* reenable doIsomericSmiles
* update patch for #2594
* remove faulty fragments matching
* review tests, remove wrong flip
* first pass at adding a SubstructMatchParameter struct
* start moving the rest of the backend to use the parameters
* backend at least mostly moved over
* add aromaticMatchesConjugated
add tests
* switch over the MolBundle too
Add templates to reduce duplicated code
* support older compilers
let's see if it works...
* add SubstructMatchParameters to Python wrapper
* remove some deprecations and warnings
* damn compilers
* parameter support for bundles in python wrapper
* add the parameters to the java wrappers
* response to review
* boost::thread mostly gone... still need to get rid of once
everything compiles
* replace boost::call_once
* remove link-time dependency on boost::thread
* first pass at using async
* switch to using async everywhere
* 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
* very basics
* add the version to get all matches
* better exceptions, including tests
* documentation and actually add the test code
* responses to review
* add cis and trans to bond stereo
* compiles, does not work
* tests all pass
* Whitespace cleanup to recent changes.
* C++ test case for Bond::setStereo using Bond::STEREOCIS and Bond::STEREOTRANS
* Adding a PRECONDITION to Bond::setStereo to make sure the stereo atoms
are already specified if CIS or TRANS is being specified.
E/Z is technically defined by the topology of the molecule so the
stereo atoms are redundant (easier to understand and use!), but
ultimately redundant with the graph. However, CIS and TRANS is _only_
defined in this usage as the orientation of the atoms in the
getStereoAtoms vector.
* Exposing Bond::setStereo to Python and adding test cases to make sure
it can be used to set CIS/TRANS stereochemistry.
* verify substructure matching works
* Adding Bond::setStereoAtoms to C++ Bond class.
This allows setting the atoms to be considered for CIS or TRANS
directly without a much more costly determination of ranking that E/Z
requires.
* Wrap Bond::SetStereoAtoms into python with a new type of test case.
* docs
enumeration is only carried out when the user asks for a structure
or when the user explicitly request that calling the enumerate()
member function. This makes object creation fast and enables
calling getNumConjGrps(), getBondConjGrpIdx() and getAtomConjGrpIdx()
member function without incurring in the cost of necessarily
enumerating resonance structures
- fixed some int/unsigned int inconsistencies
- now bonds and atoms with do not belong to conjugated groups
get a -1 index
- added a few Python wrappers
- added a few tests
- removed unused variables from Code/GraphMol/ForceFieldHelpers/MMFF/Builder.cpp
- fixed ResonanceMolSupplier Java wrappers which were really broken
- added threading support to the ResonanceMolSupplier-enabled
SubstructMatch() and relevant tests
- modified/removed some code in O3AAlignMolecules.cpp which doesn't
seem necessary anymore
- modified Code/GraphMol/CMakeLists.txt to allow building
on Windows
as conjugated like their oxygen analogs
- fixed an issue with large numbers of resonance structures exceeding
the unsigned int allowance
- implemented the uniquify feature properly
- uniquify now defaults to false when using the ResonanceMolSupplier-
enabled SubstructMatch() version
- the concept of 'laziness' is now clearer
- TODO:
* remove some debugging info
* move classes from .h to .cpp
* SWIG wrappers
* improve resonance structure sorting for degenerate resonance
structures
I will do all of the above ASAP