22 Commits

Author SHA1 Message Date
Brian Kelley
b417465e93 Adds MolToCDXMLBlock to FileParsers (#9291)
* Adds MolToCDXMLBlock to FileParsers

* Simplified code, removed warning

* Fix C# wrapper for MolToCDX

* Add C# test, fix cscode in swig

* Fix typo in tests

* Set default format to CDXML for MolToCDXML

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

* Add CDXML writer smoke tests

---------

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2026-05-29 05:36:35 +02:00
Yakov Pechersky
0986d22c58 Deterministic kekulize, independent of atom and bond order (#9125)
* Make kekulization deterministic

* Add tautomer order-independence regression (python)

* Adjust tautomer tests for deterministic kekulization

* Update graphmol wedged-bond kekulization checks

* SmilesParse: update aromatic bond index expectations

* SmilesParse: refresh cxsmilesTest expected files

* Depictor: update testDepictor expected MolBlocks

* Depictor: update depictorCatch expectations

* Depictor Wrap: update expected MolBlock for pyDepictor

* MarvinParse: update testMrvToMol expected outputs

* FileParsers: refresh testAtropisomers expected outputs

* FileParsers: update tests for deterministic kekulization

* MolDraw2D: refresh brittle bond assertions

* RascalMCES: update expected cluster size

* MinimalLib: make cffi wedging check order-independent

* documentation fix

* MinimalLib: update Kekulé bond table in aligned-coords test

* Hoist duplicated lambdas to TEST_CASE scope

* Remove unused originalWedges variable

* Remove redundant bounds check; clarify wedge-end preference

* Pre-sort allAtms by wedge-end + rank

* Use mol.atomNeighbors() for neighbor iteration

* Check inAllAtms before linear-scanning done

* Drop redundant optsV/wedgedOptsV sorts

* Remove unused Canon.h include

* Add canonical parameter to Kekulize; skip ranking during sanitization

* Test canonical re-kekulization preserves stereo across atom orderings

* MinimalLib: update Kekulé bond orders in invertedWedges

* Change Kekulize canonical default to false, expose in Python wrappers

* keep rank order, push_back

* Revert "RascalMCES: update expected cluster size"

This reverts commit a81bb39495.

* docstring change

* expose new flag to python wrapper

* document changes in ReleaseNotes.md

* revert minimallib test changes again

* canonical = true defaults

* Revert "revert minimallib test changes again"

This reverts commit 039e1d84da.

* Reapply "RascalMCES: update expected cluster size"

This reverts commit 7b83a7a3e8.

---------

Co-authored-by: greg landrum <greg.landrum@gmail.com>
2026-03-19 08:43:13 +01:00
Brian Kelley
cf269aa813 Expose CDX support to FileParsers and ChemDraw to SWIG (#8681)
* 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>
2025-08-29 04:39:22 +02:00
Paolo Tosco
42a2874045 - expose the onlyWedgeFlags parameter to SWIG ClearSingleBondDirFlags (#8600)
- exercise the flag through a unit test

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-06-25 09:24:10 +02:00
Gareth Jones
7f5b19d59b C sharp failing to build (#7160)
* Fix C# build

* Updated ROMol.i
2024-02-17 05:38:45 +01:00
Greg Landrum
fbb1e6baaa Add v2 API to FileParsers (#7077)
* 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)
2024-01-28 05:11:54 +01:00
Greg Landrum
8127c85a91 [v2 API] SMILES/SMARTS parsers (#6203)
* 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
2024-01-19 17:17:51 +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
Gareth Jones
e00c2c5336 Fix swig memory leak (#6346) 2023-05-10 06:16:35 +02:00
Paolo Tosco
0f1b371574 expose some stereochemistry-related functions to SWIG wrappers (#6075)
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2023-02-16 12:28:14 +01:00
Paolo Tosco
1ec95d2cda Update obsolete SWIG definitions (#5658)
* - updated outdated SWIG definitions of ROMol.generateDepictionMatching2DStructure
- added unit test

* - added strictParsing flag

Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2022-10-18 15:09:29 +02:00
Paolo Tosco
177c09cd6b Expose additional functionality to SWIG wrappers (#5614)
* - 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>
2022-10-04 05:04:28 +02:00
Brian Kelley
d1985caaa7 cdxml parser (#5273) 2022-09-28 05:49:27 +02:00
Greg Landrum
e8e86a5f41 allow the cleanup step of Mol2 parsing to be disabled (#1898)
* allow the cleanup step of Mol2 parsing to be disabled

* reformatting

* add the file...
2018-06-09 05:44:10 +02:00
Greg Landrum
5f6650306e Fixes #1837 (#1839)
* Fixes #1837

* do not expose the takeOwnership forms of addAtom and addBond
2018-04-26 16:02:21 -04:00
Maciej Wójcikowski
10fbd483bb [MRG] Fix PDB reader + add argument to toggle proximity bonding (#1629)
* Add parameter to skip proximity bonding during PDB reading

* Test proximityBonding flag

* Remove multivalent Hs and bonds to metals in PDB

* Add tests for multivalent Hs and metal unbinding

* Remove covalent bonds to waters

* Test unbinding of HOHs

* Refactor funxtions

* Rename flag for cosistency

* Include flavor in double bond perception

* Add metalorganic test (APW ligand)

* Validate input foe IsBlacklistedPair and minor changes.
2017-11-15 06:53:31 +01:00
Greg Landrum
ae774c4f24 add support the new sequence readers to wrappers (#1181) (#1221)
* Fixes #1181
needs more testing

* improved docs and a couple tests

* add the new sequence support to the java wrappers too
2016-12-21 04:42:17 +01:00
Greg Landrum
5ce9c06d68 initial pass at adding pdb support into the swig wrappers 2013-10-11 05:51:01 +02:00
Greg Landrum
5fab7845e3 make these work with non-java wrappers 2012-10-28 12:17:57 +00:00
Greg Landrum
c757ea64b6 add support for replacements in smiles and smarts.
remove SmilesToMol and SmartsToMol from RDKFuncs (they leaked)
remove useless wrapper file (SmilesParseOps.i).
2011-07-07 05:45:31 +00:00
Greg Landrum
e2d9ed51b3 add svn props 2011-07-01 04:43:39 +00:00
Greg Landrum
7e3c70f71a missed some files on the commit 2011-04-08 02:46:35 +00:00