* implement consistency check
* add more consistency checks
* check direction consistency accross double bond
* clean up directions for non-stereo bonds
* fix counts for second from atom dirs; add check
* handle inconconsistent bond dirs
* add more tests, pubchem cases, and update existing
* drop statics
* fix typo
* make sourceBond arg const
* fix consistency check
* add a test
* change stereo bond canonicalization
* update canonicalization watch test with fixed cases
* make canonicalization test stricter (compare CIP codes)
* add reverse symmetry condition
* rewrite double bond canonicalization code
* update tests
* fix multiline comment
* update java tests
* update python test
* nix switchBondDir (unused)
* fix and rename flipBondDir
* refactor comment
* fix shadowed var name, casting
* fix neighbor sorting
* make seen_bonds a vector
* abstract setDirectionFromNeighboringBond
* handle both sides of the bond have directions
* move getNeighboringStereoBond
* check seen_bonds after popping connectedBondsQ
* use references for arguments
* add release note
* add example required by Dan
* add example requested by Dan
* move test to catch2
* fix one broken test
* make some stuff constexpr
* refactor some checks involving exceptions
* replace CHECK_INVARIANT
* replace CHECK_INVARIANT
* clean up commented out debug logging
* initialize var
* remove redundant REQUIRE_MSG
* Do not reset the ringInfo information when adding bonds
This call was inconsistent (for example, the version of addBond() in ROMol did not do it)
and is unnecessary since the standard assumption is molecules need
to be re-sanitized after adding atoms and bonds
* response to review
clear the property cache on atoms after adding a bond.
* add a property cache update to the reaction runner
* add something to the release notes
* Add getMolFrags test
confirm bond-only stereogroups are preserved during fragmenation
* Update molopstest.cpp
* Prevent deletion of stereogroups
Prevent removeAtomFromGroups from deleting stereogroups that have bonds but no atoms
* Fixes#8379
* check in some working tests
* test passes
* test passes
* test passes
* test passes
* test passes
* ensure that the invariants flush the streams on failure
* tests pass
* test passes
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* tests pass
* Fixes#8391
* tests pass
* fix a test with legacy
not clear why this was not causing problems before
* make a test work
* Fixes#8396
* gcc builds work
* fingerprint tests pass
* mention backwards incompatible change
* fix a problem with FindMolChiralCenters
* more testing details
* enable the test status output
* Fixes#8432
fix a bug in double-bond stereo handling for template matching
* all depictor tests pass
* use the new-stereo chiral ranks in the depiction code
* always assign new-stereo chiral ranks
* make _ChiralAtomRank a computed property
This is analogous to _CIPRank
* tweak to the way the atom ordering is computed for 2D coordinate generation
* update two expected results
* backup
* response to review
* tests pass
* tests pass
---------
Co-authored-by: = <=>
* Add overloads of getMolFrags and getMolFragsWithQuery that fill in using std::unique_ptr rather than boost::shared_ptr.
* Response to review - do things in unique_ptrs from the outset rather than raw pointers.
---------
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
* change valence model to use isolobal analogy
Remove support for five-coordinate C+ and, by analogy, five-coordinate N+2
Removes support for charge states that take atoms past the end of the periodic table
i.e. [Lv-4] is no longer supported
* update the tests for that
* remove valence state of 6 for Al
* fix representation of phosphate in the mol2 parser
this is a correction of what was done during #5973
* cleanup the exceptions for P, S, As, and Se
* drop valence states:
Si 6, P 7, As 7
* a couple of additional changes from #7397
* update java tests
* fix an inconsistency: Rb now supports valence -1
* documentation
* - replace operator[] with at() for bounds check
- extract some code into a function to avoid duplication
- use TAB as separator throughout in the periodic table data for consistency
* removing the .at() usage
We know that these vectors aren't empty, so there's no need for the bounds check.
---------
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* New tests for speical query atoms and atropisomers
* fixed error, and used unique_ptrs
* Removed test that makes GraphMol depend on GenericGroups
* More to remove GraphMol dependency on GenericGroups
- Switched from dynamic to static allocation for an instance of `MCSParameters`
- Switched to using `auto` where possible
- Added a few `CHECK_INVARIANT` where appropriate before dereferencing pointers
- Moved some inline comments to the previous line to improve readability
- Added a early check for `CompleteRingsOnly` in `checkBondRingMatch()` to improve computational efficiency
- Removed `RingMatchTableSet` entirely as 1) it is unnecessary since its functionality is already provided by `RingInfo` 2) it abused the `userData` pointer. This allows cleaning up and simplifying the code, particularly the Python wrappers which had a significant amount of added complexity to support it
- Removed all the code that was deprecated several releases ago
- Reimplemented ringFusionCheck() from scratch to address several bug reports; also switched from std::set to boost::dynamic_bitset for better efficiency
- Replaced boost::tie with boost::make_iterator_range
- Modernized `for` loops where possible
- Removed entirely the QueryRings structure as its functionality is already available in RingInfo
- Removed entirely the _DFS() function since the same algorithm can be implemented in a simpler and more efficient way using RingInfo (from 2m28.441s to 2m9.859s for the same task)
- Replaced std::vector<bool> with boost::dynamic_bitset
- Replaced C-style casts with C++ casts
- Replaced some size_t with unsigned int
- Refactored checkIfRingsAreClosed() such that checkNoLoneRingAtoms() is not needed anymore
- Added a test for slow runtimes with CompleteRingsOnly
- Setting Timeout to 0 means no timeout, as it should be
- Removed unused `steps` variable from `MaximumCommonSubgraph::growSeeds`
- Storing both Atom and Bond pointers and their indices on Seed and MCS data structures is time-consuming and a potential source of incons
istencies; storing pointers is sufficient
- Promoted `MaximumCommonSubgraph::match` from `private` to `public`
- `NewBonds` was declared `mutable`, but `Seed::fillNewBonds()` was incorrectly declared as `non-const`, which caused the need for an ugly
(and unnecessary) `const_cast`.
I have now removed the `const_cast` and correctly declared functions that alter `NewBonds` as `const`, since `NewBonds` is explicitly `mut
able`
- Removed some useless random scoping that was peppering the MCS code
- Removed a significant amount of duplicate code from the Python wrappers by inheriting from a base `PyMCSWrapper` class
- Fixed#6082
- Fixed#5510
- Fixed#5457
- Fixed#5440
- Fixed#5411
- Fixed#3965
- Fixed#6578
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* fixes#4721
* - store in RingInfo the index of the ring(s) each atom and bond belongs to rather tham just their size
- expand the RingInfo API with a few useful methods
- identify rings that are certainly aliphatic upfront
- avoid unnecessary copying atomRings when RingInfo is already initialized
* - code modernization and cleanup
- better handling of dummies in aromatic rings
- exposed atomMembers() and bondMembers()
- added several tests
* - avoid order dependency on rings
- added test for the above
* changes in response to review
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
* 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
* 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
* MolFragmenter: fix a leak when exceptions are thrown
* DistGeomHelpers: fix leaks when exceptions are thrown
* SubstructLibrary: fix usage of invalid memory
* clear up leaks found during ASAN testing
* Make sure that added R-groups have non-zero coordinates
* - renamed setHydrogenCoords to setTerminalAtomCoords (and parameters accordingly)
- switched from ROMol* to RoMol& to remove a PRECONDITION
- documented the newly exposed C++ function
- added a Python wrapper
- added C++ and Python tests
* fixed conflicts and added a test
* Update Code/GraphMol/RGroupDecomposition/testRGroupDecomp.cpp
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Update Code/GraphMol/RGroupDecomposition/testRGroupDecomp.cpp
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Update Code/GraphMol/MolOps.h
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Update Code/GraphMol/Wrap/MolOps.cpp
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* changes in response to review
Co-authored-by: Paolo Tosco <paolo.tosco@novartis.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* backup
* simple first pass, passes all tests
* cleanup a bunch of existing uses
* ensure that we can safely add atoms/bonds while in edit mode
* add context manager on python side
* handle exceptions properly in those
* changes in response to review
- switched to using std::vector<int> instead of std::list<int> for _ErGAtomTypes property
- added RegisterListConverter<std::vector<unsigned int>>
Co-authored-by: Paolo Tosco <paolo.tosco@novartis.com>
* 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>
* Add better support for isotopic Hs to removeHs() and addHs()
* simplify the new code to add Hs back
* Changes in response to review
* revert FindCairo.cmake that I pushed by mistake (grrr)
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* run clang-tidy with modernize-use-default-member-init
* results from modernize-use-emplace
* one uniform initialization per line
otherwise SWIG is unhappy
Co-authored-by: Brian Kelley <fustigator@gmail.com>
* 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
* add the ring decomposer lib (temporarily?)
* simplify makefile
* very basics work
* backup
* basics working
* builds and basic tests pass
* get this building again
* expose the ring families
* add tests on the python side
* make the pywrapper for this optional
* remove some extra bits
* cleanup
* switch to using RDL as an external project
* make sure this still works if we do not use the URF code
* remove BUILD_ALWAYS
* fix linkage of Java wrapper and cartridge (hopefully)
* fix cmake for wrappers (hopefully)
* forgot a semicolon
* try to force URF lib to build first
* improve memory management and interface
* fix dependency specifier
* make pointer initialization explicit
This may not be necessary, but it feels safer.
* not pleasing and needs to be cleaned up
but it builds
* not pleasing and needs to be cleaned up
but it builds
* cleanup in preparation for merging
* cleanup in preparation for merging
* switch to rareylab repo
* fix updated copyright date
* Fix updated copyright date
* switch to a specific library tag
Co-Authored-By: Florian Flachsenberg <flachsenberg@zbh.uni-hamburg.de>
* change in response to review
* Issue #2403: Speed up SSSR symmetrization
For my horrible example molecule (a highly symmetric
nanotube with 2400 atoms and > 1000 rings), this speeds up
symmetrizeSSSR() from 5s to about 0.002s. findSSSR() takes
another .4s or so.
* Refactor after Ricardo's suggestions
* Greg's review comments. use std::vector
* unused vars in bison parser cleanup
* initialization order in TopologicalTorsionGenerator
* unused params in SLN bison
* sln flex unused params
* throwing destructor in TDTWriter
* signed comparison in substructmethods
* unused input param in smiles/smarts bison
* unused ms param in sln bison
* signed comparison in FingerprintGenerator
* store return of fscanf in StructCheckerOptions
* unreferenced var in catch
* uninitialized value in FileParserUtils
* avoid override overload warning in MolDraw2DSVG
* non-final overrides in Validate.h
* unused static var in Avalon
* unused vars in catch blocks
* make AvalonTools avalonSimilarityBits & avalonSSSBits const int
* assert fscanf result in StructCheckerOptions
* not quite done yet
* Fixes#2244
* Fixes#2148
This fixes a few of the knock-on effects of the actual fix.
* Test that we still write SMILES properly
* Fixes#2266 (#2269)
* Fixes#2268 (#2270)
* Improve interactivity of output SVG (#2253)
* Add clickable atoms when tagAtoms() is called
* add python tests
* add class tags for atoms and bonds
* add marker to allow easy insertion of extra text
* 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