Commit Graph

22 Commits

Author SHA1 Message Date
Greg Landrum
969b1aadee Revert "ChemDraw Document and read/write support for the RDKit (#8539)" (#8618)
This reverts commit f8fde2f7d8.
2025-07-03 07:57:20 +02:00
Brian Kelley
f8fde2f7d8 ChemDraw Document and read/write support for the RDKit (#8539)
* 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>
2025-07-03 06:01:58 +02:00
Greg Landrum
8eb02b8bed switch to C++20 (#8039)
* c++20 builds working

* get MolStandardize building with clang19

* get FMCS building with clang-19

* set cxx version to c++20

* remove a few more compiler warnings

* bump min boost version, CI cleanup

* boost 1.81 is not available from conda-forge

* remove unused constants

* bump linux version for CI

* remove another unused variable

* fix (hopefully) cartridge CI builds

* simplify cartridge environment

* try postgresql14 in CI

* start the postgresql service

* change the columns used in the pandastools nbtest

* remove missed merge conflict artifact

* get github4823 test to pass with numpy 2.2

* remove a compiler warning/error with g++13
2025-04-09 11:57:17 +02:00
Greg Landrum
fa048eacc5 Replace GetImplicitValence() and GetExplicitValence() with GetValence() (#7926) 2025-01-28 21:09:03 +01:00
Greg Landrum
da6cd73168 Run clang-format across everything (#7849)
* run clang-format-18 across Code/*.cpp and Code/*.h

* run clang-format-18 across External
2024-09-26 13:39:02 +02:00
Brian Kelley
b1b7fb1892 Fixes #7501 dative bonds in cdxml (#7757)
* Fix datative bonds in CDXML

* Finalize test

* Don't sanitize, use normal smiles
2024-08-28 05:59:43 +02:00
Brian Kelley
2b99ee477c Allow fragments to be grouped in cdxml (#7529)
* Allow fragments to be groups in CDXML

* Add support for grouped reactants

* run clang-format

* Change github issue to 7528

* Add documents to the code

* response to review, check grouped reactants in cdxml against rxn file

* Remove unused code

* Add missing file

---------

Co-authored-by: Brian Kelley <bkelley@relaytx.com>
2024-06-23 07:02:19 +02:00
tadhurst-cdd
a2b149a806 No coords atropisomers - fix smiles output of atrop wedges after reordering (#7418)
* 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>
2024-05-07 17:06:33 +02:00
Brian Kelley
9764f70d41 Allow any bond (smiles ~) recognition in CDXML (#7363)
* Allow any bond (smiles ~) recognition in CDXML

* Move anybond.cdxml to the right place

* a bit of simplification

---------

Co-authored-by: Brian Kelley <bkelley@relaytx.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2024-04-29 16:20:23 +02:00
Greg Landrum
848b57f654 Revert "Support handling atropisomers without coordinates (#7301)" (#7370)
This reverts commit 2159594164.
2024-04-19 06:05:32 +02:00
tadhurst-cdd
2159594164 Support handling atropisomers without coordinates (#7301)
* 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>
2024-04-19 04:38:27 +02:00
Greg Landrum
e771242714 v2 API for the molecule CDXML parser (#7113) 2024-02-02 18:05:55 +01:00
tadhurst-cdd
d5d4d194ec atropisomer handling added (#6903)
* 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>
2023-12-22 04:58:18 +01:00
Brian Kelley
c2dd50fcc7 Fixes #6887 - issue where stereogroups could overwrite each other (#6892)
Co-authored-by: Brian Kelley <bkelley@relaytx.com>
2023-11-12 17:03:12 +01:00
Ric
90d22c94c5 Fixes #6664 (#6692)
* add some testing

* fix issue

* update doctests
2023-09-07 12:32:38 +02:00
Ric
d033aee043 Optionally forward Enhanced Stereo Group ids (#6560)
* add id members to StereoGroup class

* add optional read id argument to StereoGroup constructors

* add functions forward Stereo Group Ids and assign the missing ones

* update ops updating stereogroups to forward read id

* update CX Smiles to parse/write stereogroup ids

* Add test cases for stereo group id forwarding/canonicalization

* update mol block (V3K only) to parse/write stereogroup ids

* update pickling to parse/write stereogroup ids

* update cdxml parser to store stereogroup ids

* update mol interchange to parse/write stereogroup ids

* update draw code with new stere group ids

* update test

* add some tests

* Update Code/GraphMol/Wrap/rdmolfiles.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/Wrap/rdmolfiles.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/Canon.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/SmilesParse/CXSmilesOps.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* review

---------

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2023-07-27 18:53:40 +02:00
Riccardo Vianello
88c5d80b33 unused targetBondLength argument in the CDXML parser's scaleBonds (#6469)
* fix unused targetBondLength argument in scaleBonds

* Replace literal with named constant in call to scaleBonds

* small fix in response to review
2023-07-04 16:54:29 +02:00
Greg Landrum
fcfbb7b083 Fix a couple CDXML issues (#6463)
* Scale bonds, make the Wedge detection cleaner, add more tests

* Readd comment

* Use document bond length

* Adds roundtrip test through a molblock

* a bit of cleanup

* change expected results for a bogus structure
add a non-ambiguous version of it

* fixes #6462

* document incompatibility

---------

Co-authored-by: Brian Kelley <bkelley@relaytx.com>
2023-06-15 05:05:33 +02:00
Ric
bc8d2e7556 Fix build warnings (#6235)
* un/signed comparisons in molops

* reference in loop in EmbeddedFrag.cpp

* un/signed comparison in filtercatalogtest.cpp

* un/signed comparison in Descriptors/catch_tests.cpp

* un/signed comparisons in DetermineBonds.cpp

* drop unused 'params' arg from static functions in MolInterchange/Writer.cpp

* un/signed comparisons in MolDraw2D/catch_tests.cpp

* unused var in SubgraphUtils.cpp

* 'move' preventing copy ellision in CDXMLParser.cpp

* fix infinite recursive call in SubstructLibraryWrap.cpp
2023-03-30 19:21:51 +02:00
Brian Kelley
6d10f90a8b Add wavy stereo bond support to cdxml (#5755)
* Add wavy stereo bonds

* Add wavy single bonds

* Single bonds have bond stereo stripped

Co-authored-by: Brian Kelley <bkelley@relaytx.com>
2022-11-17 04:58:46 +01:00
Greg Landrum
1f4584b2ca run clang_format (#5676) 2022-11-01 04:14:26 +01:00
Brian Kelley
d1985caaa7 cdxml parser (#5273) 2022-09-28 05:49:27 +02:00