* Remove Dict::getData() for a strict abstraction boundary
Replace direct access to Dict's internal std::vector<Pair> with
encapsulated methods: size(), empty(), const iteration via
begin()/end(), appendPair(), markNonPOD(), and getRawVal().
This enables future changes to Dict's internal representation
without breaking callers.
Ref: rdkit/rdkit#9112
* Harden Dict::appendPair to take a populated Pair by move
appendPair(Pair&&) now auto-detects non-POD status via
RDValue::needsCleanup(), eliminating markNonPOD() and the
risk of dangling references or uninitialized entries.
needsCleanup() is placed next to destroy() on RDValue to
keep the POD/non-POD distinction in one place.
* Remove vestigial dictHasNonPOD param from streamReadProp
Both callers ignored the output. Non-POD detection is now handled
by Dict::appendPair via RDValue::needsCleanup().
* unbork java build
* Address PR review: bulk append, rename getRawVal, add custom data test
- Add Dict::append(vector<Pair>&&) for bulk insertion with reserve
- Use bulk append in streamReadProps to restore pre-allocation
- Rename getRawVal -> getRDValue per reviewer preference
- Add test verifying custom AnyTag data is destroyed through Dict lifecycle
* heed self-review
* don't manually implement vec.insert
* Add test: ExplicitBitVect round-trip through Dict serialization
Exercises the full streamWriteProps/streamReadProps path with an
ExplicitBitVect in an RDProps Dict, confirming the custom handler
is invoked and no memory is leaked (verified under valgrind).
* in anyTag test, assert destructors ran a specific number of times.
---------
Co-authored-by: bddap (Coding Agent) <andrew+bot@dirksen.com>
* 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
* Create a function to extract some specified atoms from a ROMol as a new ROMol by creating new graph (#8742)
This adds a new api, `RDKit::MolOps::ExtractMolFragment`, to allow efficient
extractions of mol fragments from large mols. Compared to the approach where
we delete "unwanted" atoms/bonds from the input mol, this api is faster for
small mols (about 2x faster) and at least 3x faster for big mols
(was 10x faster for "CCC"*1000).
* clang-format
* review comments
* cleanup
* Consolidate copying subsets of molecules
* Readd missing tests
* Update comment to restart build
* Remove missing test
* Remove debugging comment, fix warnings
* Fix warnings on gcc11
* Add docs
* Make vector<bool> dynamic_bitset<>
* Update copyright
* Add swig wrappers
* Use new designated constructor API
* Fix windows builds
* Change enum values from unsigned int to integer
* Fix unsigned int variable
* Update Code/GraphMol/Wrap/test_subset.py
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Update Code/GraphMol/Subset.cpp
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Update Code/JavaWrappers/gmwrapper/src-test/org/RDKit/ChemTransformsTests.java
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Reponse to review
* Fix documentation
* Remove comments
* Remove unnecessary comments
* Fix one liners
* Change assertion to be clearer (and not one-liners)
* Run clang-format
---------
Co-authored-by: Your Name <you@example.com>
Co-authored-by: Hussein Faara <hussein.faara@schrodinger.com>
Co-authored-by: Brian Kelley <bkelley@glysade.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Fist pass at CDX support
* Enable CDX support for reading (also) in the CDXMLParser API
* Add cdxml test files
* Update swig wrappers for CDXMLFormat and Parameters
* Add constructor to ChemDrawParserParams
* Add Java SWIG support for ChemDraw
* Add chemdraw define to rdconfig
* Add missing chemdraw deps
* Remove direct expat link
* Fix Java linkages for ChemDraw
* Remove bad merge code
* Remove bad merge code
* Fix csharp builds
* Add sniffer for the ChemDraw DataStream
* Include filesystem
* Fix test on windows
* Add more CDX tests
* Ensure streams are open in binary mode to support CDX on windows
* Fix text to show that a Block is the text input, not a file
* Fix CSharp test
* Disable CDX tests when not building chemdraw
* Turn back on chemdraw
* Response to review
* Turn off chemdraw support for the limited external test
---------
Co-authored-by: Brian Kelley <bkelley@glysade.com>
* 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>
* Properly cleanup Dict::Pair when serializing HasPropWithQueryValue
* Make sure pickling doesn't change original molecule
* Fix bad cut and paste
* Add PairHolder utility class for memory management of non Dict Dict::Pairs, fix mem leak in pickler
* Edit comment to force a rebuild
* Ignore PairHolder from Java/Swig builds
* Ignore PairHolder API from swig
* Reponses to review
* Add backward incompatible change
* Make release note a bullet point
* fixes a regression introduced in #7582 which made all SWIG enums become type-unsafe
* fix also PipelineStrage asserts
---------
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* - moved SMILES and RGroupDecomp JSON parsers to their own translation units
- added missing DLL export decorators that had been previously forgotten
- changed the signatures of MolToCXSmiles and updateCXSmilesFieldsFromJSON
to replace enum parameters with the underlying types
- updated ReleaseNotes.md
* make sure cxSmilesFields is only updated if the JSON string contains keys
belonging to the CXSmilesFields enum
* added missing copyright notices
---------
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* Extend RDKit::MolStandardize with a validation and standardization Pipeline
* suggested changes
* apply clang-format
* apply yapf
* MolStandardize::FeaturesValidation optionally disallow dative bonds
* add allowDativeBondType to MolStandardize::PipelineOptions
* apply clang-format
* make the API of other validation classes more consistent with MolStandardize::FeaturesValidation
* apply clang-format
* PipelineStage to enum class
remove virtual functions from Pipeline class
be explicit about enums
* light refactoring to avoid what I think is an unnecessary call to `parse`
* a bit of modernization
* make the pipeline configurable
* make parse and serialize configurable too
* switch to storing pipeline stages using uints
* add a simple test for providing a pipeline
* update pointer alignment for clang-format
* test modifying the parser and serializer
* update swig requirement
* changes in response to review
* changes in response to review
* rename PipelineResult's *MolBlock members to *MolData
* upgrade swig to 4.2 in the CI environments
* add a few missing export directives
---------
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* 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>
* Query atom information in swig
* Atom query swig wrapping working
* SWIG wrapper for queries
* Add match to QueryAtom and QueryBond
* CShart test
* Added Java test
* Replace var with type for Java test
* Apply suggestions from code review
Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
* Update Code/JavaWrappers/Queries.i
Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
* Apply suggestions from code review
Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
* Get SWIG build working again
* Remove trailing whitespace from Queries.i
* Update Queries.i to use shared_ptr
* small simplification
* remove boost::make_iterator from ROMol.i
* further simplification
---------
Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* Add mono build back into C# build
* Add mono build back into C# build
* Add mono build back into C# build
* Don't do mono build on Linux if dotnet is used
* CSharp dotnet build always on windows. Enable dotnet testing in vs_build_swit
* Fix typos
* Dotnet core build and test for RDKit
* Cmake dot net build and ctest working on windows
* Remove old Linux mono build
* Update to net8 and create RDK_BUILD_DOTNET_CSHARP_TESTS flag
* backup
* backup
* backup
* new testing file
* reorder things in the SMILES and SMARTS parser
parameters to allow easier struct initialization
* add v2 of SmilesMolSupplier
v1 is not yet there
* add TDTMolSupplier
add some very basic tests for v1 suppliers
* more progress
* all tests passing
I think all the suppliers are now moved over
* check for maeparser before building the tests
* get SWIG builds working
* changes in response to review
* basic approach to v2api
* does not work, backup commit
* well, that now compiles
* cleaner
* more cleanup and testing
* get the SWIG wrappers to build
* swig wrappers now build
* switch back to using references to default values
* adjust to new catch version
* move the implementation to v2 and call it from v1
* update the parameter object too
* move debugParse down
* a couple of review changes
* make v2 naming consistent with Python
* first pass at v2 for the ctab parsers
* move a the writing functionality to a different header
this is just an organizational thing at the moment; we still import the writers header in the parsers header so as to not break code
* do v2 of the tpl parser
* fix missing dependency
* Mol2 parser
* move over the XYZ parser
* switch over the PDB parsers too
* get mac and java builds working (hopefully)
* basic approach to v2api
* does not work, backup commit
* well, that now compiles
* cleaner
* more cleanup and testing
* get the SWIG wrappers to build
* swig wrappers now build
* switch back to using references to default values
* adjust to new catch version
* move the implementation to v2 and call it from v1
* update the parameter object too
* move debugParse down
* a couple of review changes
* make v2 naming consistent with Python
* 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>
* Added fingerprints to GeneralizedSubstruct search
* Small change to fire tests
* Edits from code review
* Updated swig - newobject not required for GeneralizedSubstruct fingerprint methods
* GeneralizedSubstruct only supports unique_ptr in SWIG4.1
* add RDKIT_CFFI_STATIC option
minimallib cmake cleanup
* clean up a lot of boost::iostreams nonsense
* find_package(boost cleanup
* update the swig wrappers
* updates to psql
* get the Qt demo working again
* fix? coordgen
* only use std::regex in moldraw2d test
this is consistent with the other tests
* cleanup the serialization stuff too
* support generalized substructure search in the SubstructLibrary
* simplify namespaces
* support the new functionality in the swig wrappers
* update mac swig version in CI
* ensure swig4
* switch mac_java ci builds to conda-forge
* change in response to review
* add copy ctor to extendedquerymol
* Back to the way it was
* 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>