* this is a fix, but it breaks other tests
* all tests pass.
This undoes the changes made as part of the "fix" for #5466
* update js tests
* response to review
---------
Co-authored-by: = <=>
* check for duplicate atoms/bonds in StereoGroups
* explicit handling of duplicate stereogroup atoms in CTAB and CXSMILES parsers
---------
Co-authored-by: = <=>
* do not write extra separators
* add a test
* update tests
* Update Code/GraphMol/SmilesParse/CXSmilesOps.cpp
---------
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* 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
* When building RDKit as a static library, Ricardo found that the externs aren't
being resolved correctly causing a number of bad std::any casts. This is his
patch (which we apply in the context of the sketcher build) which moves the
definitions up from the types.cpp file, and make them static.
* Use inline keyword to avoid duplication overhead; this still allows the
use of the static keyword to resolve the issue with static libs
https://en.cppreference.com/w/cpp/language/inline.html
* static inline doesn't work in my static builds; inline only does though
* inline constexpr std::string_view
* casting
* inline-constexpr
* add string_view to python converter
* propagate string_view after static types
---------
Co-authored-by: Ric <ricrogz@gmail.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* 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>
* Vulnerability fixes
* Vulnerability fixes
* Move Iterator bounds check to a PRECONDITION for parse_data_sgroup_attr.
* Update MolFileParser.cpp
Remove ill-advised ASCII filter when parsing SDF V3000
* Update MolFileParser.cpp
Remove extra whitespace.
* Squashed commit of the following:
commit 1a1279c137afeca77d4fd68b287a7e36c6bf5c37
Merge: 7d0765c8b 3d2a43470
Author: James Thompson <thompj@google.com>
Date: Wed Dec 18 14:22:29 2024 +0000
Merge branch 'vuln_fix' of https://github.com/thomp-j/rdkit_vuln into vuln_fix
commit 7d0765c8ba2e0be54649613fce2f61545ad5d9d2
Author: James Thompson <thompj@google.com>
Date: Wed Dec 18 14:20:54 2024 +0000
Squashed commit of the following:
commit 5a5902a874109d42cc4a20de535bdca0855c429b
Merge: ec0ff4ee2 3d2a43470
Author: James Thompson <thompj@google.com>
Date: Wed Dec 18 14:18:02 2024 +0000
Remove whitespace
commit 3d2a43470f
Author: thomp-j <58603847+thomp-j@users.noreply.github.com>
Date: Wed Dec 18 09:08:57 2024 -0500
Update MolFileParser.cpp
Remove extra whitespace.
commit a8a718923c
Author: thomp-j <58603847+thomp-j@users.noreply.github.com>
Date: Wed Dec 18 09:08:09 2024 -0500
Update MolFileParser.cpp
Remove ill-advised ASCII filter when parsing SDF V3000
commit 270136d6c0
Author: thomp-j <58603847+thomp-j@users.noreply.github.com>
Date: Wed Dec 18 09:07:05 2024 -0500
Move Iterator bounds check to a PRECONDITION for parse_data_sgroup_attr.
commit ec0ff4ee29e9cca5bbd9591d30f8a96646484ec5
Merge: ca4ed2faa 2d257b119
Author: James Thompson <thompj@google.com>
Date: Wed Dec 18 14:04:30 2024 +0000
Merge branch 'vuln_fix' of https://github.com/thomp-j/rdkit_vuln into vuln_fix
commit ca4ed2faa4219abfd97628d529be3a1fd97048bf
Merge: c11caffbd63123278c
Author: James Thompson <thompj@google.com>
Date: Wed Dec 18 13:59:48 2024 +0000
Merge branch 'vuln_fix' of https://github.com/thomp-j/rdkit_vuln into vuln_fix
commit 2d257b1194
Merge: d4561233474fc77f95
Author: thomp-j <58603847+thomp-j@users.noreply.github.com>
Date: Wed Dec 18 09:03:06 2024 -0500
Merge branch 'rdkit:master' into vuln_fix
commit d456123344
Merge: c11caffbd63123278c
Author: James Thompson <thompj@google.com>
Date: Wed Dec 18 13:59:48 2024 +0000
Merge branch 'vuln_fix' of https://github.com/thomp-j/rdkit_vuln into vuln_fix
commit c11caffbd7
Author: James Thompson <thompj@google.com>
Date: Tue Dec 17 15:26:41 2024 +0000
Vulnerability fixes
commit 74fc77f959
Author: Paolo Tosco <paolo.tosco.mail@gmail.com>
Date: Wed Dec 18 13:40:57 2024 +0100
normalizeDepiction() should always center coordinates on the coordinate centroid, irrespective of the canonicalize parameter (#8107)
* normalizeDepiction() should always center coordinates on the coordinate centroid, irrespective of the canonicalize parameter
* Update Code/GraphMol/Depictor/catch_tests.cpp
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* fix catch test
---------
Co-authored-by: ptosco <paolo.tosco@novartis.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
commit e589f173fd
Author: David Cosgrove <davidacosgroveaz@gmail.com>
Date: Wed Dec 18 04:14:11 2024 +0000
Use endian-aware read/write for length of string. (#8105)
* Use endian-aware read/write for length of string.
* Re-run clang-format.
---------
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
commit ce35b3c25b
Author: David Cosgrove <davidacosgroveaz@gmail.com>
Date: Wed Dec 18 04:12:07 2024 +0000
SynthonSearch synth check (#8109)
* Catch errors when creating products.
* Extra python test.
* Fix formatting.
---------
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
commit 63123278ca
Author: James Thompson <thompj@google.com>
Date: Tue Dec 17 15:26:41 2024 +0000
Vulnerability fixes
commit e640915d4e
Author: Nikitas Rontsis <nrontsis@gmail.com>
Date: Tue Dec 17 15:11:40 2024 +0000
Avoid unnecessary matching (#8111)
commit 5aed3d886b
Author: Greg Landrum <greg.landrum@gmail.com>
Date: Mon Dec 16 16:59:13 2024 +0100
Fixes#8096 (#8104)
* add test
* Fixes#8096
* change in response to review
commit 6dce5d4080
Author: Greg Landrum <greg.landrum@gmail.com>
Date: Sun Dec 15 05:58:20 2024 +0100
Fixes#1670 (#8093)
* add missing descriptors to Lipinski.py
Fixes#1670
* add to descriptor list
commit 3d2a43470f
Author: thomp-j <58603847+thomp-j@users.noreply.github.com>
Date: Wed Dec 18 09:08:57 2024 -0500
Update MolFileParser.cpp
Remove extra whitespace.
commit a8a718923c
Author: thomp-j <58603847+thomp-j@users.noreply.github.com>
Date: Wed Dec 18 09:08:09 2024 -0500
Update MolFileParser.cpp
Remove ill-advised ASCII filter when parsing SDF V3000
commit 270136d6c0
Author: thomp-j <58603847+thomp-j@users.noreply.github.com>
Date: Wed Dec 18 09:07:05 2024 -0500
Move Iterator bounds check to a PRECONDITION for parse_data_sgroup_attr.
commit 2d257b1194
Merge: d4561233474fc77f95
Author: thomp-j <58603847+thomp-j@users.noreply.github.com>
Date: Wed Dec 18 09:03:06 2024 -0500
Merge branch 'rdkit:master' into vuln_fix
commit d456123344
Merge: c11caffbd63123278c
Author: James Thompson <thompj@google.com>
Date: Wed Dec 18 13:59:48 2024 +0000
Merge branch 'vuln_fix' of https://github.com/thomp-j/rdkit_vuln into vuln_fix
commit c11caffbd7
Author: James Thompson <thompj@google.com>
Date: Tue Dec 17 15:26:41 2024 +0000
Vulnerability fixes
commit 74fc77f959
Author: Paolo Tosco <paolo.tosco.mail@gmail.com>
Date: Wed Dec 18 13:40:57 2024 +0100
normalizeDepiction() should always center coordinates on the coordinate centroid, irrespective of the canonicalize parameter (#8107)
* normalizeDepiction() should always center coordinates on the coordinate centroid, irrespective of the canonicalize parameter
* Update Code/GraphMol/Depictor/catch_tests.cpp
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* fix catch test
---------
Co-authored-by: ptosco <paolo.tosco@novartis.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
commit e589f173fd
Author: David Cosgrove <davidacosgroveaz@gmail.com>
Date: Wed Dec 18 04:14:11 2024 +0000
Use endian-aware read/write for length of string. (#8105)
* Use endian-aware read/write for length of string.
* Re-run clang-format.
---------
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
commit ce35b3c25b
Author: David Cosgrove <davidacosgroveaz@gmail.com>
Date: Wed Dec 18 04:12:07 2024 +0000
SynthonSearch synth check (#8109)
* Catch errors when creating products.
* Extra python test.
* Fix formatting.
---------
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
commit 63123278ca
Author: James Thompson <thompj@google.com>
Date: Tue Dec 17 15:26:41 2024 +0000
Vulnerability fixes
commit e640915d4e
Author: Nikitas Rontsis <nrontsis@gmail.com>
Date: Tue Dec 17 15:11:40 2024 +0000
Avoid unnecessary matching (#8111)
commit 5aed3d886b
Author: Greg Landrum <greg.landrum@gmail.com>
Date: Mon Dec 16 16:59:13 2024 +0100
Fixes#8096 (#8104)
* add test
* Fixes#8096
* change in response to review
commit 6dce5d4080
Author: Greg Landrum <greg.landrum@gmail.com>
Date: Sun Dec 15 05:58:20 2024 +0100
Fixes#1670 (#8093)
* add missing descriptors to Lipinski.py
Fixes#1670
* add to descriptor list
commit a4cdf5d21d
Author: Greg Landrum <greg.landrum@gmail.com>
Date: Sun Dec 15 05:58:03 2024 +0100
Fixes#8092 (#8094)
* Fixes#8092
cross-platform file stuff is just soooooo fun
* response to review
* works on windows
commit b7de0585ca
Author: Greg Landrum <greg.landrum@gmail.com>
Date: Sat Dec 14 18:21:55 2024 +0100
Add drawMols3D() and improve documentation for IPythonConsole (#8083)
* Fixes#8082
more docs
* changes in response to review
commit 736e309f10
Author: David Cosgrove <davidacosgroveaz@gmail.com>
Date: Sat Dec 14 17:21:29 2024 +0000
Fix empty results bug. (#8099)
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
commit c90cee9b77
Author: Greg Landrum <greg.landrum@gmail.com>
Date: Sat Dec 14 17:08:43 2024 +0100
Add Molecular Interaction Fields (#7993)
* Add RealValueVect.
* Add UniformRealValueGrid3D
* Add Molecular Interaction Fields (MIFs)
* line endings
* cherry-pick f1bc94a4c8
* format
* Adapt tests for python3.
* Adapt RealValueVector pickling for python3.
* Speed-up of MIF calculations.
* Bugfix in MIFDescriptors.cpp.
* all tests pass
* clean up some memory leaks
* update copyrights
* rename
* rename the library
* complete the rename
* lost file
* another forgotten file
* cleanup
* clang-tidy
* clang-tidy
* windows DLL builds work
* python wrapper and tests cleanup
* convert to catch2 testing
* switch RealValueVect to use std::vector
* remove obsolete friend
* - Replace explicit loops with stdlib implicit equivalents
- Replace explicit types with auto where possible
- Avoid unnecessary copy operations where possible
- Replace raw pointers with exception-safe unique_ptr
- Replace C-style #define with constexpr
- Replace C-style casts with C++ casts
- Replace C-style arrays with std::vector
- Avoid code duplication with templated operators
- Replace VdWaals class taking multiple atom type definitions and force-field name as string parameter with force-field-specific classes deriving from an abstract VdWaals class
- Replace x,y,z doubles with Point3D class where possible
- Removed unused (and untested) DistanceToClosestAtom class
- Renamed some variables and functions for better clarity
- Converted tabs to spaces
- Made the mol parameter in cube read/write functions optional for convenience
- Made the Python wrappers more pythonic (e.g., avoid C++-style passing objects as parameters which are modified in place)
- Implemented alternative Python class constructors using boost::python::make_constructor rather than with external non-class functions
- The Python wrappers taking a sequence of Point3D now take a sequence of sequences, such that the output of Conformer.GetPositions() can be passed
- Made the Python wrapper sequence parsing more robust
- Removed duplicated code from Python wrappers
* - avoid an unnecessary copy
* progress
* works
* more cleanup
* all tests pass
* changes in response to review
---------
Co-authored-by: dfhahn <dfhahn@users.noreply.github.com>
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* Adds error message to parse_data_sgroup_attr PRECONDITION
* Support writing CX extensions in reactions
* fixed merge conflicts
* wip
* Updated for getCXExtensions
* Refactored and deleted extraneous file.
* Updated function signatures
* Updated some tests
* Removed extraneous include from debugging
* Removed comment in reactionwriter.cpp
* Updated some tests with expected strings
* Updated to add logging for linknodes and substance group hierarchies
* Addressed some issues
* updated tests
* Addressed Greg's comments
* Updated for recommendations
---------
Co-authored-by: Rachel Walker <rachel.walker@schrodinger.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* basic code to convert dative to single if we aren't outputting dative to the SMILES
add forms of GetAtomSmiles() and GetBondSmiles() that take SmilesWriteParams
* dative/coordinate bond support when writing CXSMILES
* expose all of that to Python
* remove usage of _doIsoSmiles property
add params to smarts writers
* allow disabling dative bonds in SMARTS
* typo
* add support to the reaction writers
* support params for SMARTS
* removed string_view in favor of string for catch test
* add parsing and generation of atropisomers when coords not present
* changed string_view to string in catch test
* more docs
* reformulation of the docs
* make an error message a little bit more useful
* small optimization
clang-format
* add `BondWedgingParameters` to new function
* changes for CIP test errors
* Updated internal doc to match what it does
* changes per PR review
* removed cout statements in tests
---------
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* removed string_view in favor of string for catch test
* add parsing and generation of atropisomers when coords not present
* changed string_view to string in catch test
* more docs
* reformulation of the docs
* make an error message a little bit more useful
* small optimization
clang-format
* add `BondWedgingParameters` to new function
---------
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* add MolOps::expandAttachmentPoints, along with tests
* support expandAttachmentPoints in the mol file parser
* switch the v2 stuff in the guts of the reaction parser
* add collapseAttachmentPoints()
add addAsQueries option to expandAttachmentPoints()
lots of testing
* an edge case and some cleanup
* add python wrapper for those two functions
* Update Code/GraphMol/FileParsers/FileParsers.h
Co-authored-by: Ric <ricrogz@users.noreply.github.com>
* changes in response to review
- support addCoords in expandAttachmentPoints()
- support the new attachment point stuff to/from CXSMILES
- add MolOps::details::addExplicitAttachmentPoint() and MolOps::details::isAttachmentPoint() utility functions
---------
Co-authored-by: Ric <ricrogz@users.noreply.github.com>
* 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>
* Set squiggle bonds to STEREOANY with stereo atoms
* STEREOANY from squigglebonds is set regardless of sanitization now
* Ensure we have stereo atoms
* Add comment for new behavior
* See if a newer version of cmake works
* rev cmake to a slightly new version
* rev cmake to a slightly older version
* Response to review
* Allow setting of CIS/TRANS in set from squiggle bond
* Fix missing paren
* Add test for the actual enumeration
---------
Co-authored-by: Brian Kelley <bkelley@relaytx.com>
* initial support for wiggly and wedged bonds in cxsmiles
add CX_ALL_BUT_COORDS convenience option to CXSMILES writer
* move ClearSingleBondDirFlags to MolOps
* do a better job of handling the wiggly bonds
* mark 3D conformers from CXSMILES
* remove some extraneous printing
* test wD as well
* remove non-applicable test
* basic tests (not passing) for parsing t/c/ctu
* remove test for unimplemented feature
* basic tests (not passing) for parsing t/c/ctu
* backup
* parsing works
* Fixes#5585
* cleanup, use the constant instead of hardcoding
* write ctu block
* document new cxsmiles additions
* more stereo info in the docs
* changes in response to review
* this passes all tests
Need to still think a bit about whether the "basic writing" test results are actually correct
* happier with those results
* initial support for wiggly and wedged bonds in cxsmiles
add CX_ALL_BUT_COORDS convenience option to CXSMILES writer
* move ClearSingleBondDirFlags to MolOps
* do a better job of handling the wiggly bonds
* mark 3D conformers from CXSMILES
* remove some extraneous printing
* test wD as well
* remove non-applicable test
* basic tests (not passing) for parsing t/c/ctu
* remove test for unimplemented feature
* basic tests (not passing) for parsing t/c/ctu
* backup
* parsing works
* Fixes#5585
* cleanup, use the constant instead of hardcoding
* write ctu block
* document new cxsmiles additions
* more stereo info in the docs
* changes in response to review
* initial support for wiggly and wedged bonds in cxsmiles
add CX_ALL_BUT_COORDS convenience option to CXSMILES writer
* move ClearSingleBondDirFlags to MolOps
* do a better job of handling the wiggly bonds
* mark 3D conformers from CXSMILES
* remove some extraneous printing
* test wD as well
* remove non-applicable test
* basic tests (not passing) for parsing t/c/ctu
* remove test for unimplemented feature
* changes in response to review
* changes in response to review
check for attempt to set the wedging more than once
testing for invalid w blocks
fix a bad comment
* start with some basic tests
these currently fail, of course
* prep work
* minor refactoring and prep work
* get better at handling spaces
* first pass, needs completion and testing
loads more testing required
coordinate bonds don't work at all yet
I'm suspicious about the SGroup hierarchy
* more progress
agents and products are now parsed
more testing added
way more testing needed
* correctly ignore names
test cleanup
* more sgroup improvements and testing
now I think most everything is there and the basics are tested
* all tests pass
* link nodes and variable attachment points
* more cleanup and testing
* changes in response to review
* resolves oss-fuzz #24399
* clean up some undefined behavior
* fix some UB in mergeQueryHs
* be more defensive
* defensive programming
* fix a _cxsmilesBondIdx bug
* more defensive programming
* 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
* add SmilesWriteParameters
* rename that
* teach the CFFI code about it
* add python wrappers
* basic python testing
* Fixes#4320
support toggling the various CXSMILES output fields
* win64 builds
* it helps to actually commit everything
* I admit that I am just guessing at this point
* docs
* cleanup
* docs
* backup
* support parsing polymer sgroups from cxsmiles
* add _smilesBondOutputOrder
* make that work with SMARTS too
* get the writer working and update the docs
* ensure processCXSmilesLabels() is called at the appropriate time
* test simplification
* handle multiple s groups
test multiple s groups + data
* set sgroup indices
handled sgroup hierarchy
* write linknodes
* hello world works
* more
* more
minimallib needs to be tested
* parse substructure parameters from JSON
* add substruct search and parameters
* add descriptors
* register more descriptors
* fingerprints, first pass
* stop outputting tiny coord vals
* support generating 2d coords
* coordgen testing
* return nulls
* initial 3d support; add/removeHs; cleanup
* Embedding parameters from JSON
* update
* pattern fp, fps as bytes
* use json to configure MFP
* use json to configure rdkit and pattern fps
* aligned 2d coords
* parsing options
* options for writers
* rename remove_hs
* get this working on windows (kind of)
* silence some msvc warnings
* cmake updates
* update python tests
* add the CFFI code to CI builds
* cleanup line ending mess?
* a couple small fixes
* make this work with URF
* support coordMap in the 3D coordinate generation
* updates in response to review
* 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>