* c++20 builds working
* get MolStandardize building with clang19
* get FMCS building with clang-19
* set cxx version to c++20
* remove a few more compiler warnings
* bump min boost version, CI cleanup
* boost 1.81 is not available from conda-forge
* remove unused constants
* bump linux version for CI
* remove another unused variable
* fix (hopefully) cartridge CI builds
* simplify cartridge environment
* try postgresql14 in CI
* start the postgresql service
* change the columns used in the pandastools nbtest
* remove missed merge conflict artifact
* get github4823 test to pass with numpy 2.2
* remove a compiler warning/error with g++13
* Use distances on all valid paths rather than just shortest distance.
* Optimise BondPaths.
* Optimise BondPaths.
* Hash coded for the bond paths.
* Faster find all paths.
* Build in gcc working.
* Comment.
* Remove debugging code.
* Update GettingStartedInPython.rst.
* Now need to split the clique and keep the largest fragment.
Lots of warnings about how slow this is.
Split out long tests.
* Back out a lot of changes. Remove the distance check with singleLargestFrag when building modular product.
* Tidy code.
Update docstrings.
Add explanation to GettingStartedInPython.rst.
* Fix single fragment test.
* Response to review.
---------
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
* get SynthonSpace.cpp to build also when RDK_USE_BOOST_SERIALIZATION is
not defined
* test should not fail when RDK_USE_BOOST_SERIALIZATION is not defined
* avoid a segfault in CoordGen when a double bond has stereo spec but no stereo atoms
* changes in response to review
---------
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* Speed up GetProp Python keyerrors
A common pattern _in Python_ for checking for the presence or
absence of a key is:
try:
return mol.GetProp('mykey')
except KeyError:
return None
Shockingly, this is really slow with boost python objects! I was
recently profiling a workflow and 90% of the time or more was
spent in failed GetProp calls (mostly on bonds, some on atoms
or mols).
I sped up the workflow by protecting the calls using HasProp. But
I think this is a silly trap we've set for our users.
The problem comes because boost::python uses a C++ exception to
indicate that there is already a Python exception set. In C++,
exceptions are slow - they require unrolling a stack. In Python,
exceptions are about the same speed as any other control flow!
This commit speeds up GetProp failures by circumventing the
boost throw_exception_already_set() mechanism.
In my testing, this speeds up failed GetProp substantially:
* Factor of 1000x on Mac
* Factor of 40x on Linux
* Update typed GetXXXProp to bypass boost exceptions
Based on PR #8372
Updates the typed GetIntProp, GetDoubleProp, etc to bypass C++
exceptions in access. This speeds up missing key errors
significantly - for instance, calling mol. GetIntProp with a
missing prop 100,000 times:
Before: 28s
After: 0.05s
* bump min linux runtime in CI to ubuntu 22.04
bump min boost version
some other minor cleanup
* boost version -> 1.82
* change postgresql install
* Update linux_build_cartridge.yml
* Update linux_build.yml
* Update linux_build.yml
* Update linux_build_cartridge.yml
* Update linux_build.yml
* Update linux_build.yml
* Update azure-pipelines.yml
* trigger CI run
* please build
---------
Co-authored-by: = <=>
* refactor the code to determine whether or not an atom is in brackets
* move the definition of isMetal to QueryOps
* atoms bound to metals in SMILES should always be in square brackets
Implementation and some test updates
needs confirmation that all of tests run
* basic tests pass
* java tests pass
* update js tests
* doc updates
* Update Code/GraphMol/catch_graphmol.cpp
Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com>
* Update Code/GraphMol/SmilesParse/test.cpp
Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com>
* finish fixing tests
* bump yaehmop version to allow compilation to work
---------
Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com>
* Ignore invalid chirality labels when reading MAE inputs
For a host of reasons, inputs chirality labels can be invalid as we try
to read an input MAE file or buffer. This can be annoying for situations
when we have other means of calculating the stereochemistry information,
so we should try to ignore bad labels and let the user deal with the
"bad" stereochemistry.
* remove stereo bond label changes
* Remove debugging code
* restore whitespace
* remove redundant &
* don't clear all stereo when we see invalid chirality labels
* use catch2 generators for test
* replace some requires with check
* Fix default wiggly bond writing behaviour in CXSMILES writer (#8348)
When writing CXSMILES outpupts with the RestoreBondDirOptionClear
argument, which is enabled by default, we fail to write wiggly bond
information. I traced the issue to us clearing said information on the relevant
bonds during the pre-processing stage, so I fixed fixed the issue by
removing the that logic for wiggly bonds.
* address review comments
* Attempt at completeRingsOnly in mces
* changed option name and added a test
* code review
* check aromaticity and bond type matches before checking ring equivalencies
* update if statement
* typo
* Function for converting text to db file.
* Do search looping first on reactions, then on fragments.
* Add lowMem mode so reactions are only read from database as required.
* Move fragment fingerprint generation out of the inner loop.
* Put positions of SynthonSets directly in DB file so no need to read the file on initialisation.
* Update test binary file.
* Fix SynthonSpace.summarise() for new loMem mode.
* Extra bits in Python wrapper.
* Correct docstring.
* Compute pattern fingerprints ahead of search.
* Put Synthons into hitsets.
* First stage of re-factoring SynthonSpace. Synthons are highly duplicated in the SynthonSets, so are held centrally in a pool in SynthonSpace and just the pointers kept in the SynthonSets. The same Synthon, identified by SMILES string, can have multiple IDs in the SynthonSets so the ID is now held by the SynthonSet not the Synthon.
* Second stage - moved the synthon FPs into the Synthon as well.
* New binary file format.
* Tidying and fix because Synthons are shared across SynthonSets.
* Use shorter fingerprints for synthons.
* Don't exit with a bad file.
* Back out the fingeprint folding which made things worse.
Don't copy the synthon molecules into the hit sets, just take a pointer.
Put the fragments into the corresponding hit set, useful for debugging.
* Change way hit names are made to the manner preferred by Enamine.
* Only generate query connector regions once.
* Do some of the connector region checking by SMILES.
* Move where it gets the connector combinations so it's not done unnecessarily often.
* Fix tests.
* Don't make molecules for the connector combinations, a bitset is plenty.
* Make a pool of fragment fingerprints to reduce the number in total.
Use an upper bound on the Tanimoto Coeff to reduce need for full calculation.
* Fix splitMolecule, which wasn't producing all possible fragments.
* Take out old code.
* Back to using unique_ptr for fragments.
Abolish maxBondSplits option. Use the maximum number of synthons in the space to control the splitting.
* Don't fold the reaction connector region fps into 1.
* Streamline connector combinations in substructure search.
* Re-factor fragment fingerprint generation prior to multi-threading.
* Make checkConnectorRegions return false when it should.
Tweak AllProbeBitsMatch.cpp.
* Fix Python wrapper of text file reader.
* More complex query shenanigans - amino acid this time.
* More complex query shenanigans - amino acid this time.
* Tidy.
* Fix binary DB read bug.
New Idorsia space file.
* Correct/improve function documentation.
* Tidying up.
* Remove stray include.
* Fix CI Tests.
* Plug memory leak.
Revise python timeout test.
* Simplify way synthon searchMols are created. Previous method gave incorrect results sometimes hence new test.
* Update idorsia space file.
* Update idorsia test result.
* Update idorsia test result.
* Changes after first review.
* Move getFormattedNumProducts to general function.
* Stash working version with maps and mutex.
* Working with sorted vectors rather than maps.
Reading Text DB presumably slow.
* Split out MemoryMappedFileReader.cpp.
* Fix ReadDBFile in Python wrapper.
* Streamline tests.
* Include filesystem.
* Replace many uses of std::map with sorted std::vector.
* Use more auto.
* Threaded build hits.
* Threaded search.
* Don't chunk threaded buildAllHits.
* Allow for different results in random sampling.
* Threaded splitMolecule.
Fix bug - apply removeQueryAtoms to all frags, not just one per unique SMILES.
Do largest fragment heuristic up front so as not to repeat on each thread.
* Streamline Python tests.
* Separate out time-consuming tests.
* Add Rascal similarity searching.
* Add extended queries.
* Make extended queries honour maxHits correctly.
* Extra extended query test.
* Hide really long tests on local files.
* Remove local test.
* Make random tests less strict.
Attempt to fix build issues.
* Attempt to fix build issues.
* Response to review.
* Fix no-threads version.
* Re-move re-formatting.
* Add move semantics to MemoryMappedFileReader.
* Move c'tor needs size as well.
---------
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
* Fixes#7983
move the call to cleanupAtropisomerStereoGroups() into assignStereochemistry()
* Additional tests from @susanhleung in #8323
* more testing
* changes in response to review
* changes for review
* add sanitize and removeHs options to mol_from_ctab
* bump version to 4.7.0
add update script
fix a bug in the 4.4.0 - 4.5.0 update script
* document the new arguments
Should add argument names to all cartridge functions in a future PR
* fix a mistake
* response to review
* response to review
---------
Co-authored-by: Greg Landrum <glandrum@ethz.ch>
* first pass, does not pass all tests
* add an option to control the new behavior
* add that to the python wrapper too
Fixes#8304
* Update Code/GraphMol/MolOps.h
Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com>
* undo some extra comment reformatting
* typo
Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com>
---------
Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com>
* allow cleanupOrganometallics to work with carbon
* do not use cleanupOrganometallics with mol2
* fix handling of C atoms in cleanupOrganometallics
* add test for #8312
* Update Code/GraphMol/MolOps.cpp
Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
---------
Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
* Option to use standard atom colours under highlights.
* Update hash codes for catch_tests.cpp.
* Update hash codes for test1.cpp and rxn_test1.cpp.
---------
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
* try adding a CI job to build the minimallib docker image
* update
* try simplification
* path
* path
* re-enable the other ci builds
remove the obsolete .yml file