Commit Graph

50 Commits

Author SHA1 Message Date
Greg Landrum
8fc241495c Fixes #9107 (#9111)
* Fixes #9107

always include std_unique_ptr.i when using modern SWIG

* allow java tests to build without chemdraw support
2026-02-13 14:11:10 -05: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
Paolo Tosco
b1d322555b Expose propertyFlags to CFFI and MinimalLib (#7960)
* - added property support to CFFI library
- added propertyFlags JSON parser
- added support for setting propertyFlags to MinimalLib

* added missing files

* fix SWIG builds

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2024-11-07 06:08:27 +01:00
Paolo Tosco
23aaf51862 expose three ROMol methods which were not previously exposed to SWIG wrappers (#7895)
Co-authored-by: ptosco <paolo.tosco@novartis.com>
2024-10-05 06:38:33 +02:00
Greg Landrum
18eb648d56 Expose the property pickle options to SWIG (#7448)
* support pickle params in SWIG wrappers
csharp tests need to be tested

* make that work with csharp too
2024-05-24 07:37:06 +02:00
Gareth Jones
930c7d6345 Handle query atoms and bonds in SWIG wrappers (#7431)
* 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>
2024-05-23 07:18:49 +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
Riccardo Vianello
25b7dbfb17 fix several warnings originating from the swig wrappers (#7063) 2024-01-30 04:44:43 +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
Paolo Tosco
ab980bca44 SWIG pickling improvements (and other cleanup) (#6133)
* 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>
2023-03-01 05:00:56 +01:00
Paolo Tosco
3326a620a2 Stereochemistry-related SWIG updates (#6127)
* - 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>
2023-02-28 06:44:50 +01:00
Paolo Tosco
b068f51e51 - expose two useful functions from SubtructUtils to SWIG wrappers (getMostSubstitutedCoreMatch, sortMatchesByDegreeOfCoreSubstitution) (#5666)
- add unit test to exercise the above

Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2022-10-19 17:42:04 +02: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
Greg Landrum
0147cd8201 Fixes #5210 (#5408)
* revert duplicate chunk in release notes

* replace deprecated ifdefs
This one gets rid of USE_BUILTIN_POPCNT and RDK_THREADSAFE_SS
use RDK_OPTIMIZE_POPCNT or RDK_BUILD_THREADSAFE_SSS instead

* get rid of BUILD_COORDGEN_SUPPORT from ROMol.i

* fix a stupid typo

* update release notes
2022-07-11 11:20:03 +02:00
Greg Landrum
85608555fe add ROMol::atomNeighbors() and ROMol::atomBonds() (#4573)
* add ROMol::atomBonds() and ROMol::atomNeighbors() methods

* remove some warnings

* start using the new code

* add default for those template params

* some more applications

* get the SWIG builds working

* get rid of extraneous ref

* remove extraneous comments
2021-10-02 07:28:24 +02:00
Eisuke Kawashima
f4c7d341e7 Support Chemical Markup Language, CML, for writing (#3024)
* Support Chemical Markup Language, CML, for writing

Implement RDKit::MolToCMLBlock and RDKit::MolToCMLFile
http://www.xml-cml.org/

* a number of cleanups and fixes

1. stop writing the cml: namespace to the output. Tools like marvin can't read that and it's not nececssary
2. fix the H count
3. continue writing atom info for 2D confs
4. simplify the writing of atom parity

* make the conformer optional
write bond hash/wedge information

* update the expected python results

* Remove overloaded function

Co-authored-by: greg landrum <greg.landrum@gmail.com>
2021-04-29 05:00:21 +02:00
Gareth Jones
fcd72bb953 Add Molbundle search to SWIG (#3698) 2021-01-07 08:53:50 +01:00
Greg Landrum
47d1a45400 Fixes #2239 (#2693) 2019-10-07 07:51:07 +02:00
Eisuke Kawashima
b2f755e64b Support XYZ format for output (#2498) 2019-07-12 05:26:42 +02:00
Greg Landrum
0c9ca8d5aa Fixes #2532 (#2533) 2019-07-08 15:13:41 -04:00
Steve Roughley
8636cb34a5 Added rankAtoms to ROMol wrapper and added Java test case (#1540)
* Added rankAtoms to ROMol wrapper and added Java test case

* Added missing argument to rankMolAtoms call in wrapper

* Update ROMol.i

* Update ROMol.i

Removed circular reference to Canon

* Update ROMol.i

* Update ROMol.i

* Update SmilesTests.java

* minor stuff to force the CI builds to run again

* Update the test to match the current code
2019-06-07 15:57:22 +02:00
Greg Landrum
980f955271 Fixes #2466 and #2465 (#2467)
* Fixes #2466

* Fixes #2465

* remove obsolete test

* remove redundancy

response to review
2019-05-30 18:45:57 +02:00
Greg Landrum
a102eaf932 Add options for substructure searching (#2254)
* first pass at adding a SubstructMatchParameter struct

* start moving the rest of the backend to use the parameters

* backend at least mostly moved over

* add aromaticMatchesConjugated
add tests

* switch over the MolBundle too
Add templates to reduce duplicated code

* support older compilers

let's see if it works...

* add SubstructMatchParameters to Python wrapper

* remove some deprecations and warnings

* damn compilers

* parameter support for bundles in python wrapper

* add the parameters to the java wrappers

* response to review
2019-02-08 09:10:10 -05:00
Dan N
eaa44b40c2 Enhanced stereo read/write support in SDF files. (#2022)
* add a couple test files

* backup

* first pass at some theory documentatin

* it's a draft

* Update enhanced stereochemistry documentation

Adds initial target use case and caveats about the tentative
nature of the current implementation.

* Support read/write of molfile enhanced stereochemistry

This includes reading and writing of enhanced stereochemistry
from v3000 molfiles (sdf). Enhanced stereochemistry encodes
the relative configuration of stereocenters, allowing
representation of racemic mixtures and compounds with
unknown absolute stereochemistry.

It does not include:
* Python wrapping
* invalidation of the enhanced stereochemistry
* use of enhanced stereochemistry in search
* depiction of enhanced stereochemistry.

* Update to reflect changes from #1971

* change names of enum elements to allow compilation in VS2017

I think it's also clearer to do things this way

* Addressed most review comments.

* Run missed test "testEnhancedStereoChemistry"
* In tests, added size checks to group equality checks
* Updated copyright statements
* Deleted mol created for a test
* Use perfect forwarding in RWMol::setStereoGroups()
* use references for stereo groups that are checked in write and pickle
* Updated stereogroup.h in hopes of fixing compilation on Windows.
* clang-format

* try allowing a switch to boost regex and requiring it for g++-4.8

* do a better job of that

* typo

* Code review comments. Updated Copyright notice.

* When an atom is deleted, delete stereo groups containing it.

Also updates StereoGroup toUse accessors instead of
constant member attributes. This allows move of StereoGroups.

* RDKit style guide

* Add header required on Windows.

* get the SWIG wrappers to build
2018-09-26 15:44:23 +02:00
Greg Landrum
42eecc664d Integrate Coordgen (#1708)
* first pass, does not yet actually work

* pass2, same problems

* pass2, same problems

* another test

* new tests; bugfix

* move the code out to a header

* add a double bond example

* enable auto-downloads of the code

* move the function to its own namespace

* first pass at a basic python wrapper

* change coordgen commit used

* try supporting bond stereo; does not currently work

* cis/trans seems to now work.

* first pass at templates; needs testing

* use the fixed flag too

* need mol align

* expand test

* initial pass at python wrapper for template

* simplify tests

* add an option to directly use a substructure match for alignment

* scaling

* add #define

* Define a cache setting for RDK_COORDGEN_LIBS to allow these to be used in other packages

* return the conformer id from addCoords

* Make CoordGen the default when it’s available.
This is a backup commit… the tests don’t even come close to passing.

* add some debugging options for a bit

* add alignment step to testing when using non-fixed coords

* Add global to allow use of CoordGen to be disabled
get the basic depictor tests working

* make coordgen the default when it is available

* make sure things continue to work when coordgen is disabled

* get windows builds working

* mods to get this building on windows.
something is screwy with the fileParsersTest1

* no need to generate coords for the 1K C string

* fix java wrappers

* works on linux

* update the (stupid) way dependencies were handled on windows.
this allows a lot of cleanup of cmake files (still more to do)
the linux build is unlikely to work due to the way _statics aren't handled

* docs

* extend forceRDKit applicability

* switch coordgen version

* try using templates

* try to get the template dir finding reasonably robust w.r.t. conda install

* continuing to iterate on the way the template file is installed

* fix a problem caused by the merge

* remove test that should never have been checked in

* update expected results for cartridge tests

* switch back to using the RDKit as the default coordinate generator
2018-02-15 05:36:03 +01:00
Greg Landrum
ba12d98ad0 Removes ATOM/BOND_SPTR in boost::graph in favor of raw pointers (#1713)
* Removes ATOM/BOND_SPTR in boost::graph in favor of raw pointers

* Actually delete atoms and bonds...

* RWMol::clear now calls destroy to handle atom/bond deletion

* Changes broken Atom lookup for windows/gcc

* Adds tests for running with valgrind

* Adds test designed for valgrind and molecule deletions

* Removes RNG, actually tests bond deletions

* update swig wrappers

* deal with most recent changes on the main branch
2018-01-07 14:19:47 -05: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
Steve Roughley
3680644ebf Added getAlignmentTransform to ROMol.i to expose in Java SWIG wrapper (#1155)
* Added getAlignmentTransform to ROMol.i to expose in Java SWIG wrapper

* Added missing argument

Added missing argument to call to getAlignmentTransform causing build failure

* Added test case for getAlignmentTransform

* Update AlignTests.java

* Update AlignTests.java

* Update AlignTests.java
2016-11-10 21:44:03 +01:00
Brian Kelley
2debdfde0d Adds RDAny (smaller generic holder) Updates all used dictionaries (#896)
* Adds RDAny (smaller generic holder) Updates all used dictionaries

This is an API compliant version of the current rdany system,
but uses a lot less memory in practice.

* Removes code duplication

* Converts CHECK_INVARIANT to TEST_ASSERT

* Fixes DoubleTag issue

* Adds Bool to DoubleMagic implementation

* Removes reference to property pickler
2016-05-29 17:04:21 +01:00
Greg Landrum
a321337f33 remove assignAtomCIPRanks() from the SWIG Wrappers 2015-12-25 06:42:28 +01:00
Greg Landrum
3db6d874ba fix SWIG wrappers for the resonance mol suppliers 2015-11-04 05:29:50 +01:00
Paolo Tosco
ffa524c87b - added SWIG Java wrappers for ResonanceMolSupplier and
getResonanceSubstructMatches()
- added a few tests
2015-11-02 22:45:41 +00:00
Brian Kelley
7240f92ab5 Add First pass at Java FilterCatalog wrapper 2015-09-03 14:55:06 +02:00
Greg Landrum
6d7b2b0914 merge with master 2015-01-22 06:30:51 -05:00
Greg Landrum
cddaf519cd switch to using MolDraw2D in the java wrapper 2015-01-13 07:20:13 +01:00
Greg Landrum
1bc77d9475 get these building again 2014-07-29 04:47:25 +02:00
Greg Landrum
6e27eb3f1f remove some defs that were producing useless results anyway
Fixes #277
2014-06-29 15:39:29 +02:00
Greg Landrum
9f4471f872 more on #204
A few other cleanups
2014-02-06 06:43:28 +01:00
Greg Landrum
c73792bb21 passing all tests 2014-01-24 05:16:56 +01:00
Greg Landrum
c0dfdb00b1 Fixes #152 2013-11-19 06:15:13 +01:00
Greg Landrum
0639f0c3d4 Merge branch 'PDB_29September2013' 2013-10-16 05:35:12 +02:00
Greg Landrum
d5fac5501b add basic support for O3A to Java wrapper 2013-10-12 16:54:49 +02:00
Greg Landrum
5ce9c06d68 initial pass at adding pdb support into the swig wrappers 2013-10-11 05:51:01 +02:00
Greg Landrum
ee28352889 move the svg drawing code into GraphMol too 2012-12-03 16:03:02 +00:00
Greg Landrum
3a78545b2b fix a leak with getAtoms(); reported by Thomas Veith 2012-11-21 15:31:10 +00:00
Greg Landrum
79740d64a5 fix some leaks in the java wrapper; a more systematic analysis needs to be done here 2012-06-20 03:30:37 +00:00
Greg Landrum
e2d9ed51b3 add svn props 2011-07-01 04:43:39 +00:00
Greg Landrum
800a4c2149 additional functionality required by the knime nodes 2011-04-12 10:07:52 +00:00
Greg Landrum
7e3c70f71a missed some files on the commit 2011-04-08 02:46:35 +00:00