* iterators for random-access MolSuppliers
add optional caching to SDMolSupplier
* add support to SmilesMolSupplier too
There is a lot of duplicate code between the random-access suppliers that would be worth trying to remove
but at the moment it looks like it would require multiple inheritance, and I think we want to avoid that
* add input iterators for ForwardSDMolSupplier()
* throw when calling begin() on a used supplier
* switch to use the spaceship operator
* init() should reset the mol cache
* Make SDMolSupplier and SmilesMolSupplier safe for multi-threaded reads
* add benchmarking
* add TDTMolSupplier support
improved testing
add benchmarks for parallel iteration
optional TBB support
* better const handling, add reverse iterators
doesn't look like const_iterator is possible since getting data from the underlyng supplier object is non-const
* improve docs
more usings
add reverse iterator to TDTMolSupplier
* tests only try execution::par when it is there
* fix typo
* more testing/demo
* remove accidentally added files
* review changes
* add default ctors
* disable a false-positive compiler warning
it is stupid to have to do this
---------
Co-authored-by: = <=>
* Fixes#9068
* fix a problem with empty labels in s-group parsing
* fix empty column names in smiles suppliers
* add the check to setPODVal()
---------
Co-authored-by: = <=>
* cleanup of stereogroups and wedges for non-chiral sites
* fixed testShapeHelpers for Arm64 build
* reorg the tests a bit
* rename and document option
* add to the python wrappers
---------
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* added flag to allow chiral settings on Atoms with 2 hydrogens for SCSR treatment
* added parameter to allow chiral 2Hs on template mols in SCSR parser
* fixed testShapeHelpers for arm64 build
* Remove checking for two Hs in chiral atom in atomChiralTypeFromBondDirPseudo3D
* removal of flag for allow2Hs
* remove setup.bat file
* atropisomer bond atoms are checked explicitly for SP2 hybridization
before, we checked only on totalDegree = 2 or 3,
but this causes false positives for something like a chiral sulfoxide
since the S is tetrahedral (sp3) but has only 3 substituents.
the hybridization code relies on totalDegree,
but modified to include and making sure to include conjugation
so while this is more expensive per molecule, it is closer to intent
Closes#8973
* assert we got no warnings on sulfinamides
* cleanup
* bring back degree based check, quick pass so that we don't run expensive calc on all mols with wedge bonds
* bring conformer back
* fix a bug in copySelectedAtomsAndBonds()
we need to clear computed properties on the atoms here
* prune back the atom properties written to CXSMILES
* update minimallib tests
* added new attributes for scsr template as per BIOVIA doc 2003
* changed to allow any attributes for an SCSR Template def
* removed unneeded defs for TEMPLATE attribute names
* fix scsr parsing for non-template SUP groups
* Rempoved two tests not related to this PR
* Update Code/GraphMol/FileParsers/SCSRMolFileParser.cpp
added the constexpr as suggested
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* changed constrexpr to const for std:string
---------
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* ChemDraw Document and read/write support for the RDKit
* Add missing test file
* Rev chemdraw version
* Rev chemdraw version
* Rev chemdraw version for g++11
* Update CMakeLists.txt
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Build chemdraw from an external CMake file
* Remove unused platform bigendian check
* Revert changes to constants, remove unused ones
* Keep the original constant names
* Remove __main__ section
* Use as much of the ChemDraw CMakeList as possible
* Skip installing expat
* Rev chemdraw version to fix windows issue
* Don't install expat, set the appropriate CHEMDRAW_BUILD definition
* resolve windows builds
* Fix minimal lib builds
* Move ChemDraw document to private header
* Move utility functions to ChemDraw namespace
* Move ChemDraw to v2 unique ptr api namespace
* Make class enum
* Switch to camelCase
* Response to review
* Move ChemDrawToDocument to ChemDraw namespace
* Update External/ChemDraw/Wrap/rdChemDraw.cpp
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Fix typo
* Update External/ChemDraw/Wrap/rdChemDraw.cpp
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Add better documentation
* Rev chemdraw version
---------
Co-authored-by: Brian Kelley <bkelley@glysade.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* ChemDraw Document and read/write support for the RDKit
* Add missing test file
* Rev chemdraw version
* Rev chemdraw version
* Rev chemdraw version for g++11
* Update CMakeLists.txt
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Build chemdraw from an external CMake file
* Remove unused platform bigendian check
* Revert changes to constants, remove unused ones
* Keep the original constant names
* Remove __main__ section
* Use as much of the ChemDraw CMakeList as possible
* Skip installing expat
* Rev chemdraw version to fix windows issue
* Don't install expat, set the appropriate CHEMDRAW_BUILD definition
* resolve windows builds
* Fix minimal lib builds
* Move ChemDraw document to private header
* Move utility functions to ChemDraw namespace
* Move ChemDraw to v2 unique ptr api namespace
* Make class enum
* Switch to camelCase
* Response to review
* Move ChemDrawToDocument to ChemDraw namespace
* Update External/ChemDraw/Wrap/rdChemDraw.cpp
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Fix typo
* Update External/ChemDraw/Wrap/rdChemDraw.cpp
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Add better documentation
---------
Co-authored-by: Brian Kelley <bkelley@glysade.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* feed dummy perpendicular point for cross product to prevent zero error in normalization during atropisomer chirality, fixes#8602
* remove debug log
* move test, and check that no bonds
* Parsing SCSR
* add scsrol to mol
* removed bad include file
* loosen distGeom test slightly
* add wrap test for SCSRMol
* Add test for scsr in python
* tests added for scsr and strict parsing removed
* remove extra stuff
* More fully specified use of SCSRMol for PR CI build
* Added flags for SCSR expansion to not include any leaving groups
* Added MolFromScsrParams to Wrap for python
* added SCSRMol destructor
* Added two tests for RNA macromols, and fixed a bug they revealed
* Added new tests abd expected files
* changes as per PR review
* SCSR Chnages for leaving groups
* fixed testScsr.py
* hydrogen bond treatment
* in SCSR expand, allow Hbond to be autoatically detected
* changes as per code review
* Adding new test file
* chages for SCSR contructors, destructors for CI build
* fixed pyton for SCSR hydrogen bond modes, and added tests
* Added new test files
* fixed edge case for SCSR
* fix checksum for inchi
* consistent capitalization of SCSR throughout
* switch to enum class
* make things shorter
* simplify
* get rid of the ATTCHORD class
* New section for SCSR in RDKit_book
* addeed section to RDKit_Book
* SCSRMol is no longer exposed in Python
* fix leak in MolFromSCSRFile()
light refactoring
* expose MolFromSCSRFile() to python
make the MolFromSCSR functions work with default args
a bit more testing
* removed C++ access to SCSRMol
* CXMsiles now ouputs hbonds, fix to template matching, and a few other things
* Addl fix for bad aromaticity in Hbond rings
* Test files needed
* Test files needed
* try to fix a CI build errors
* CI error fix
* Added missing test file
* CMake version - for CI build
* remove full file compoarison from macromol test file
* accidental change to debug restored to release
* Code review changes
* As per PR review
---------
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* 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
* atropisomer handling added
* fixed non-used variables, linking directives
* BOOST LIB start/stop fixes, linking fix
* Fixes for RDKIT CI errors
* minimalLib fix
* changed vector<enum> for java builds
* check for extra chars in CIP labeling
* removed wrong deprecated message
* fix ostrstream output error?
* restored _ChiralAtomRank to lowercase first letter
* changes for merged master
* Fixed catch label for new Catch package
* update expected psql results
* get swig wrappers building
* restore MolFileStereochem to FileParsers
* fix java wrapper for reapplyMolBlockWedging
* test changes
* some suggestions
* move a couple functions out of Bond
* Merge branch 'master' into pr/atropisomers2
* merged master
* Renamed setStereoanyFromSquiggleBond
* atropisomers in cdxml, rationalize atrop wedging, stereoGroups in drawMol
* Merge branch 'master' into pr/specialQueries
* changes from previous PR
* Iclude false chiral
* rigorous enhnced stereo canoncalization
* Added more tests and clenup
* removed commented out code
* corrected init of SmilesWriteParams
* added MolFileStereoChem.h to the header files
* Renamed Rxn parser to MrvBlockToChemicalReaction
* To make catch2 work, and match the checksum
* Fixed Structchecker errors
* fix CI for DetermineBonds catch test
* error in catch_test for CI
* Allow custom smileWriteParams in GetMolLayers
* misnamed entry point
* ReactionFromMrvString change name
* remove adding writeParams to GetMolLayers
* make rigorous enhanced stereo the default, and fix tests
* only one abs group no longer needs Rigorous Enhanced treatment
* changed string_view to string in catch test
* Canonicalize Enhnaced Stereo only resturne unique smiles
* Now allows or and and groups together
* internal routines inside detail scope
* fix test error
* changed string back to string_view and fixed a CHECK
* Fixes for PR review tests
* Fix RDKit_Book.rst failure on build test
* fix xqm sql test
* updated expected files for cxsmiles_test
* Fixed removal of atom attrs
* Fixed tests after merge of master
* More efficient version of Stereo Groups Canonicalization
* Fixes for ctests
* removed debug code
* readded cipLabel test
* fix generalizedSubstruct/catch_tests.cpp error
* hueristics to improve speed
* Rationaized control of abs groups
* removed unused routine
* added rigorous stereo group treatment to test
* some suggested changes
* Changes per PR review and removed some changes to smiles
* Fixed CI errors
* changes per PR review
* more PR review vhanges and cleanup
* Fixed PSql PKL change
* changes as per PR review
* Restored error type for bad mols for canonicalizeStereoGroups and added a test
* Merge master and fix test in MolDraw2D
* Fix for randomize test error and other PR review comments
* Removed unsued variable to fix mac CI
* do not force aromatization in canonicalizeStereoGroups
* changes as per PR review
---------
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* Fixes#7306
Do not cross bonds which were previously aromatic
* revert one of the test changes
* change in response to review
---------
Co-authored-by: Riccardo Vianello <riccardo.vianello@gmail.com>
* prefer wedging ring bonds for atropisomers
* update expected results
* handle 3D as well
* prefer wedging to larger rings
wedging bonds in 5 rings make later attempts at improving kekulization very difficult
update expected results
* extend those changes to 3D
* update tests for those changes
* avoid wedging atropisomers if possible
response to review
* Include macrocycles in atropisomer calculation
Previously, atropisomeric bonds were sanitized away if they were part of a "ring bond", which happens in macrocyclic systems.
None of the existing test cases fail if that sanitization check is removed.
The sanitization step is removed to support biaryls that are part of a larger macrocyclic system.
A set of test cases is included that cover potential macrocyclic atropisomeric systems
* Remove unmentioned files
* Keep ring check, and narrow it to when bond is in as many rings as atoms
* exclude atropisomer bonds if in rings < 8 atoms
Co-authored-by: tadhurst-cdd <112502803+tadhurst-cdd@users.noreply.github.com>
* Clarify macrocycle behavior in RDKit book
* fix typo
---------
Co-authored-by: tadhurst-cdd <112502803+tadhurst-cdd@users.noreply.github.com>
* fragmentatin of mol loses any sgroups
* removed unneeded test
* Fixes#7071
* simplification. tests do not pass
* Changed test for sgroup retention as per PR review
* Fix testing errors
* attempt to get CI windows to build
* removed files incorrectly committed, and removed code no longer needed
---------
Co-authored-by: greg landrum <greg.landrum@gmail.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
* atropisomer handling added
* fixed non-used variables, linking directives
* BOOST LIB start/stop fixes, linking fix
* Fixes for RDKIT CI errors
* minimalLib fix
* changed vector<enum> for java builds
* check for extra chars in CIP labeling
* removed wrong deprecated message
* fix ostrstream output error?
* restored _ChiralAtomRank to lowercase first letter
* changes for merged master
* Fixed catch label for new Catch package
* update expected psql results
* get swig wrappers building
* restore MolFileStereochem to FileParsers
* fix java wrapper for reapplyMolBlockWedging
* some suggestions
* move a couple functions out of Bond
* Merge branch 'master' into pr/atropisomers2
* merged master
* Renamed setStereoanyFromSquiggleBond
* atropisomers in cdxml, rationalize atrop wedging, stereoGroups in drawMol
* fix for CI build
* attempt to fix java build in CI
* attempt to fix java build in CI #2
* New routine to remove non-explicit 3D-geneated chirality
* changed to use pair for atrop atoms and related bonds
* Changes as per PR reviews
* PR review respnses
* PR review reponse - more
* Fix merge from master
* fixing java ci after merge
* Updated the help doc for atripisomers
* update the atropisomer docs
* improve the images
* add the source CXSMILES
---------
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* Add support for Marvin files
* And MRV lib to the Java wrapper
* And MRV lib to the Java wrapper
* Removed use of void * in MarvinParser.cpp and MarvinParser.h
* Changes as per code review from Greg
* Changes for PR review - many virtual methods
* changes as per Jonathan's comments
* some suggested changes
* PR review changes and fixed unit tests
* after merge, changes to make it run
* More PR review changes
* removed unneeded std::move()s · rdkit/rdkit@b4b8b9a · GitHub
* More PR review changes
* fix a compile error
* more defensive programming
* reorder
* final? PR review updates
* Erata
---------
Co-authored-by: Tad Hurst <tad.hurst@collaborativedrug.com>
Co-authored-by: greg landrum <greg.landrum@gmail.com>
Co-authored-by: tadhurst-cdd <112502803+tadhurst-cdd@users.noreply.github.com>
* Add support for dative bonds in MOL files
Dative bonds cannot be read in mol files V2000.
(really not supposed to be, but some software systems put them in there anyway)
* Add documentation about dative bonds in V2000
* suggestion from review
---------
Co-authored-by: Tad Hurst <tad.hurst@collaborativedrug.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Added xyz2mol file parser and tests
* deleted some comments
* Delete file parser
* Delete file parser test
* Revert "Localb"
* adding all files again
* adding file parser and test
* Updated empty string check
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Updated atom initialization
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Allow zero-atom molecule object
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* file parser improvements and added 0-atom mol test
* added xyz block parser and other fixes
* Added the DetermineBonds library with atomic connectivity determination
* atomic connectivity updates including EHT methhod addition
* incorporated more suggestions
* adding buggy version of determine bond ordering
* added documentation for determineBonds() use
* fixed unfavorable oxygen bond ordering
* suggested updates
* additional error checking and added determine bond ordering radical testing
* divided test files into categories
* added determineBonds() combining connectivity and bond ordering
* edited determineBonds.h documentation, added readme
* small grammar fixes
* more tiny fixes
* one less letter
* another typo fix
* make the xyz2mol functionality optional
* enable that for the CI builds
* Update CMakeLists.txt
Co-authored-by: Sreya Gogineni <74024376+gosreya@users.noreply.github.com>
* array to vector
* get windows DLL builds working
* rename determineBondOrder -> determineBondOrders
* run clang-format
* add python wrappers
rename determineBondOrder->determineBondOrders
* expose XYZ parsers to python
* changes in response to review
Co-authored-by: Sreya Gogineni <gosreya@gmail.edu>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Improved regex whitespace handling
Change was made in the parseEnhancedStereo function
* Files for Github #5165 test case
Both files use enhanced stereochemistry, but differ in whitespace content
* Test case for Github Issue #5165
Catches whitespace parsing error
* Improves test case check
Makes test case more specific, less prone to potential invalid access to container
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Improves test case check
Makes test case more specific, less prone to potential invalid access to container
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Update test case "Github #5165"
Add 'require(mol)' to confirm valid molecule before additional testing
* Cleans up test for Issue #5165
* Cleans up test for Issue #5165
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* fixed issue #2965
* added test case for issue #2965
* fixed formatting and added comment.
* update
* General Reader files
* removed dependency on boost filesystems
* removed class
* clang-format
* added-comments
* further-cleanup
* added clang-formatting
* braces-for-if-else
* changed error messages, added option for windows file path
* fixed getFileName function
* cleanup
* option for filename without path
* further-cleanup
* added tests for determineFileFormat
* cleanup, const arguments for validate function
* init
* cleanup
* cleanup
* clang-format does not work for CMake
* added RDK_TEST_MULTITHREADED option
* add-flag
* cleanup
* Delete ConcurrentQueue.h
This PR deals with the Generalized File Reader.
* Delete testConcurrentQueue.cpp
This PR deals with the Generalized File Reader.
* no change
* concurrent queue
* print values
* Single Producer Multiple Consumer works
* cleanup
* Producer Consumer Example
* update queue methods and tests
* cleanup
* test
* fixed tests
* cleanup, updated tests
* Delete ProducerConsumer.h
* Delete testProducerConsumer.cpp
* cleanup
* futher cleanup
* changes based on feedback
* make queue non copyable
* psuedocode
* possible implementation
* untested implementation
* change class to typename
* basic-setup
* need to fix segfault
* need to fix blocking
* need to fix blocking
* need to fix blocking
* fix indentation
* one possibility
* without lambda function
* possible fix with some test cases
* performance tests
* added support for record id and item text
* cleanup
* cleanup
* fixed memory leak and added methods with tests for getting last id and item text
* cleanup
* added more test cases with different smi files
* cleanup
* SD mol supplier
* modified the parsing for SDMolSupplier
* cleanup
* cleanup
* new file for testing
* added support for reading molecule properties with tests
* thread-safe logging and exception handling
* cleanup
* without thread safe logging
* cleanup
* cleanup, modified MultithreadedSmilesMolSupplier
* cleanup, made reader and writer functions private
* move O2.sdf
* basic python wrapper with tests
* cleanup, added new methods for python wrappers
* made changes suggested by Andrew
* file and compression formats are case-insensitive
* cannot open files with gzstream
* cleanup
* possible fix for opening compressed streams (SMILES)
* removed seekg() and tellg() methods from multithreadeded suppliers
* cleanup
* test cases for python wrappers
* some wrapper cleanup
* cleanup, removed unused functions
* update the MT tests so that they actually do some work
also includes some cleanup here
* cleanup
* remove iterator_next header include
* added support for multithreaded readers
* use getNumThreadsToUse for multithreaded suppliers
* fixed documentation for multithreaded python wrappers
* commented performance test
* first draft of final evaluation report
* removed inline variables
* first draft getting started in python
* fixed typos in getting started in python
* fixed typos
* fix documentation tests
* fixed documentation tests
* added links to important files and PR
* added perfomance results
* first version of wrappers with compressed streams
* getting rid of streambuf stream method
* modified General File Reader
* make this work when building in non-threads mode
* rename a test
* rename a function in the python API
* rearrange the python test a bit
* disable the stream-based constructors in Python
* mark the multithreaded classes as experimental
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* reader stub. Navigates the file successfullly
* works
* works
* read out all metadata, not just ours
* first pass at reading out molecules
* support mol blocks too
* add python wrapper for parser
* add direct writer
* get rid of multiple definitions in PNParser.h
* update from code review
* robustification
* handle reading compressed metadata
* support compressing metadata too
* reorder arguments to make this more consistent
* add writers to python wrappers
* forgotten file
* add pickle support
* explicit zlib dependency
* get windows builds working
at least with conda boost+zlib
* switch to using boost::iostreams to do the compression/decompression
* switch to using a vector of string pairs to store the metadata
need this so that we can contain "duplicate" keys
* add metadata output to MolDraw2DCairo
still need python test
* add a python test
* initial work at reading/writing reactions from PNGs
refactor the ReactionParser.h header a bit
* cleanup debug messages
* reaction PNG support -> python
* ReactionPickler no longer includes all ProductTemplate props
* handle metadata at the MolDraw2D level
Currently only supported by MolDraw2DCairo, it's worth extending this to SVG too
* support reading multiple molecules from a png
* support multiple molecules from files and in python
* stop duplicating tags with multiple molecules
* update to get windll builds working
this change should be propagated to more cmakelists.txt files
* make sure the metadata ends up in the notebook
* make sure PNGs in the notebook also have metadata
efficiency improvements for some notebook bits (i.e stop going PNG->Image->PNG)
* no need to pretend that we might be using PIL anymore
* documentation
* update docs to show new functionality
* not sure why the doctests failed on linux
* still trying to diagnose those failures
* protect doctests in case python interpreters are being re-used
* switch tags
* the wrapped functions to read png data from files weren't working
* <sigh>... windows dlls
* 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
* SGroups with more than one attachment point are now properly parsed
Thanks to Roger S for the example and fix.
* Update Code/GraphMol/FileParsers/file_parsers_catch.cpp
Co-Authored-By: Ric <ricrogz@users.noreply.github.com>
Co-authored-by: Ric <ricrogz@users.noreply.github.com>
* Implementation of SGroups
* remove sample files test
* update gitignore with test outputs
* fix RevisionModifier
* re-enable tests
* backup commit; things seem to work so far
* some refactoring; obvious s group tests pass now
* more refactoring
* everything now out of the public API
* not sure why this was still in there
* rename functions; all tests now pass
* remove getNextFreeSGroupId; readd comment in copy SGroups
* clang-format
* squash-merge current master
* squash merge master
* Address comments on PR
- Update to current master.
- Move SGroup parse time checks to SGroupChecks namespace.
- Store SGroups in ROMOl as vector<SGroups>.
- SGroup methods return referenes instead of pointers.
- Use atom/bond/sgroup indexes for properties instead of pointers.
- Have SGroups inherit from RDProps; move properties to RDProps.
- Remove trivial/unused methods.
- Add a link to the SD specification atop SGroup.h
* Fixes#2225
* A bit of extra cleanup
* forgotten file
* Make this thread safe and add support for v3K mol blocks
* add the file
* update expected results
* does not yet really work
* tests pass
* store the info about the attachment points in case we want to use it later.
* add a couple more tests; changes in response to review