* 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>
* 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>
* 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 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
* make sure we don't try to access an SG which no longer exists
* Fixes#6479
updates a bunch of tests to support this
* test ring stereo too
* update expected results from the tests
* expose RDLog to SWIG wrappers
* - added a SetTee() overload that takes a filename as parameter to simplify redirecting from wrappers that do not have interface with C++ streams (e.g., Java and C#)
- replaced some duplicate code with ClearTee() calls
- replaced RDLogger std::shared_ptr with boost::shared_ptr to make it more easily available from SWIG wrappers
- exposed the RDLogger methods to SWIG wrappers
- added Java test for RDLogger
* this should fix the segfault
* avoid issues on case-insensitive platforms
* here's a solution keeping std:;shared_ptr
* change in response to review
---------
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
* wip
* - avoid leaking memory after instantiating UChar_Vect
- fix some indentation
- make it easier to read/write pickles as native byte arrays from Java and C#
- add tests
---------
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
* - expose [sg]etUseLegacyStereo()
- In MolToSmiles() doIsomericSmiles should default to true as in C++ and Python
- added missing parameters to MolToSmiles() and MolToMolBlock()
- added SmilesWriteParams MolToSmiles() overload
- added and updated Java tests
* - changes in response to review
- exposed the same functionality also in MinimalLib and CFFI and added tests
---------
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
* add function to canonicalize enhanced stereo representations
* use enhanced stereo in canonicalization
* Fixes#6045
enables the doc tests for EnumerateStereoisomers.py
Re-enables the BRICS tests
* some things work... tests need to be updated
* c++ and python tests pass
* update expected psql results
* run the canonicalization on SMILES generation;
c++ and python tests pass
* cartridge and java tests pass
* update doctests
* extend the allowed valences of the alkali earths
make it possible to have preferred and arbitrary valence states (I thought this already worked)
* backup
* maybe needed
* copy in some swig3 files;
at this point the tests all work
* remove SWIG version lock
* changes in response to review
* - updated outdated SWIG definitions of ROMol.generateDepictionMatching2DStructure
- added unit test
* - added strictParsing flag
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
* - setenv() should be defined also for MinGW builds, not just MSVC
- fixed getBestRMS signature (ROMol& should be const)
- expose normalizeDepiction(), straightenDepiction(), getBestRMS(), CalcRMS() and getBestAlignmentTransform() to SWIG wrappers
- expose MolFromSmiles() overload taking SmilesParserParams parameter to SWIG wrappers
- expose DoubleVector class to SWIG wrappers as it is needed by alignment functions
- replace std::string with const std::string& in several SWIG wrapper signatures
- build RDKit2DotNet.dll as a 64-bit library on MinGW 64-bit
- add Java tests for the newly exposed SWIG functions
- fixed inconsistent indentation in Chemv2Tests.java
* changes in response to review
* fix typo
* reverted file committed by mistake
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
* Adds KeyFromPropHolder to hold user defined indices
* Add missing file
* I hate swig. Had to move keyholder classes into main header file, yuck.
But I added tests, so yay?
* Remove removed dependency
* Fix borked test
* Make consistent getKeys function, fix constness
* Fix overloaded call
* Remove GetKey/s from SubstructLibrary
* Fixes#3797
* [WIP] Add tautomer queries to the substruct library
* Add TautomerQuery to CMake
* Add missing TautomerQuery functions, python wrapper and tests
* Add python wrappers for Substruct Library Tautomer Queries
* Explictly label non-const pattern function now that we have both
* Use boost::shared_ptr not std::shared_ptr
* Fix java builds
* One more try to fix java builds
* Fix Java Tests
* Run clang format
* Reenable tests
* Fix annoyingly stupid bug and annoying commit of debug code
* Fix documentation
* reenable ifdef threadsafe check
* Throw warning and perform tautomer search instead of bailing with incorrect fingerprints
* Simplfy api with templates
* Fix SubstructLibrary java issues
* minor API cleanup
* simplify the SWIG wrappers
Co-authored-by: Brian Kelley <bkelley@relaytx.com>
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* support read-only access to cstates from python
* expose GetBrackets
* expose getAttachPoints too
remove vestigial SubstanceGroupCState_VECT
* backup
* backup
* basics working
* backup
* add label_mol_abbreviations
* fix a bug in the chirality handling
* add linkers, needs more testing
* add another peptide test
* sanitize results by default
* just need rings
* getting started with the C++ form of abbreviations
* a bit of error handling
* add findApplicableMatches
* actually apply the abbreviations
* make the getDefault functions more efficient
* add labeling (creating s groups)
* docs
* basic python wrappers (maybe this is enough?)
* add _displayLabel and _displayLabelW support to MolDraw2D
update the docs for that
* use displayLabel props
* add more default abbrevs
* change default linker defns
add parseLinkers convenience function
* make sure attachment point atoms aren't aromatic
* change the color of dummies to be darker gray
* remove python implementation
* support abbreviations in the java wrappers
* add abbreviations to the csharp wrappers
* add abbreviations to the js wrappers
* add molParity to the list of atom props not written to CXSMILES
* support condensing SUP substance groups
* add that to the python wrappers
* Update testAbbreviations.py
* clear ring info if we added it
* document that the molecules with abbreviations removed have not been sanitized
* backup
* compiles
* progress, but not there yet
* basics now working
* start towards adding another test
* test having two variation points
* add actual enumeration and the corresponding tests
* docs and cleanup
* cleanups to get the mac build working
* attempt to get win32 dll builds to work
* dlls are fun
* Add FixedMolSizeMolBundle class
* changes in response to review
Also: add warnings for bad input in ParseV3000Array
* a bit of refactoring
* additional testing
* does not work, backup
* LINKNODES work now
* cleanup
* allow silencing reaction validation warnings during initialization
* docs
* fix (and test) handling of empty enumerations
* silence warnings when doing alchemy
* first pass at a Python wrapper for the enumerator
* Add Java wrappers for MolBundle and the MolEnumerator
* cleanup some comment formatting
* TautomerQuery class
* working test
* Comment header
* Merge with master. Greg's suggestions. More tests. Python wrapper
* Updated Pattern Fingerprints to merge with master. Reset email
* Java/C# wrappers. Java test
* Java/C# wrappers. Java test
* Java/C# wrappers. Java test
* Greg suggestions of 6_2_2020
* Explicit types in Java TautomerQueryTests class
* Update Code/GraphMol/QueryOps.h
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* get windows dll builds working
* Removed tautomer query wrappers from RDKit namespace
* Fixes from evaluation
* Template molecule identification fix. Greg's suggestion
* Final check search functor for evaluating template matches as they are found
Co-authored-by: Gareth Jones <gjones@glysade.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>