Commit Graph

314 Commits

Author SHA1 Message Date
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
Gareth Jones
c223c19ee3 Add ColorPalette_Vect to SWIG bindings (#5580)
* Added swig bindings for C# and ColorMap

* Update ColourPalette_Vect name

* Simple test/verification
2022-09-23 05:38:54 +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
Gareth Jones
b50bce4ed0 Swig MolDraw2D cairo (#5128)
* MolDraw2DCairo working in SWIG

* C# test
2022-03-24 05:54:12 +01:00
Eisuke Kawashima
b53ee20b49 Fix Flake8 erorrs (#4252)
* Fix PEP8 [E101](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes)

* Fix PEP8 [E502](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes)

* Fix PEP8 [E703](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes)

* Fix PEP8 [E711](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes)

* Fix PEP8 [E712](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes)

* Fix PEP8 [E713](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes)

* Fix PEP8 [E722](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes)

* Fix PEP8 [W605](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes)
2022-03-10 06:55:18 +01:00
Kevin Burk
7bd9f7b434 Remove extra newline from Kekulize error message. (#5022)
* Remove extra newline from Kekulize error message.

* Fix test for exception message.
2022-02-22 04:48:14 +01:00
David Cosgrove
f93016a77f Refactor mol draw2 d (#4948)
* MolDraw2D refactoring
- rename setupMoleculeDraw->initMoleculeDraw
- track whether or not initDrawing() has been called
- centralize calls to initDrawing() and clearDrawing() into initMoleculeDraw()
- update svg hashes in tests

* update some expected test results

* support changing font scale and default scale
add reaction test

* does not work... this is hard

* all tests pass

* do something about legends

* docs

* more tests

* more docs

* cleanup

* going around in circles...
hopefully converging

* cleanup

* Single bond skeleton works.

* Simple bond drawing seems to be working.

* Initial addition of atom symbols.

* Stash of not-quite-working atom symbols prior to major surgery.

* Atom symbols seem to be working.  Major surgery not required, just inverted Y coords at the outset.

* Add classes to atom labels.

* Renamed AtomLabel AtomSymbol.

* Add highlights.

* Fix bug from PR4839.

* Molecule note.

* Added atom notes.

* Added bond notes.

* Extract radicals.

* Annotation via new DrawAnnotation class.

* Add brackets.

* Add linknodes.

* Add close contacts.

* Add attachment points.  Fix wavy lines.

* Draw molecules in grid.

* Tidy.

* Fix radicals when font has hit maxFontSize.
Make getDrawCoords work.

* Draw primitives take atom or draw coords.

* Fix legends.

* More fixing for tests.  DrawMol::setScale now takes font scale as well.

* tidy debug writes

* Variable fraction of panel for legend.

* Better legend positioning.

* Fix sub- and super-script spacing.
Added spaces to Freetype strings.

* Basic reaction drawing.

* Reaction highlighting.

* Minor tweak to reacctions.

* Tweaked reaction DrawMol widths.

* Fix atomTags.

* Fix catch tests except contours.

* Contouring working in catch_tests.cpp.

* Fix catch tests.

* AtomSymbol and DrawAnnotation into MolDraw2D_detail.

* DrawMol and DrawShape into MolDraw2D_detail.

* DrawText inot MolDraw2D_detail.

* Machete out.

* DrawText goes private.

* Move some stuff about, such as StringRect to its own header.

* Python wrapper compiles (but crashes when Draw imported).

* More tidying.  Python DrawArrow failing.

* Linux changes.

* Fixed error in DrawShapeArrow spotted by valgrind.
Fixed some warnings from gcc.

* Maybe fixed DrawArrow.

* Added basic argparse interface.

* Added newlines.

* Changes in response to review.
Non-const args in move constructors and operator=.
Added missing classes to MolDraw2D_detail.
Deleted move operator= where it had been forgotten.
Fixed copyright dates.

* Deleted all default c'tors in derived classes.

* Changes in response to review:
Wedge widths now a proportion of mean bond length in draw coords..
Add padding below legend when positioning it.

* Fix tests.

* Fix the private/protected mess of the new classes.

* Moved doesLineIntersect etc.

* Reinstate original alignString for non-FT drawings.

* More faffing about with reaction layouts.

* Fix font sizes in testGitHub3391.

* Fix atom notes fitting inside fat wedges.

* Fix molecule annotation font size.

* More fixes of rectangle/triangle collision detection.

* Test for highlight linewidth multiplier.

* Use push_back not emplace_back.

* Attempt at better Freetype char spacing.

* Option to turn off TEST_ASSERT. Currently off.

* Fixed embarrassing maths to do with wedge fatness.

* More tidying post-review.

* Document highlight_linewidth_multipliers.

* Expose baseFontSize to Python.

* Changes in response to review.

* Allow DrawMolecules molecules to be drawn to different scales.

* Fix bond sneaking between C:8 in, for example, reactions.

* Fix bad re-factoring.

* Fix globbing.

* Changes in response to review.

* Add invariant check.

* Add draw option to fix font size.

* suggested changes

* Update catch test results.

* Fix expected freetype results.

* Fix non-freetype drawers.

* Fin non-freetype test results.

* get the Qt drawer working too

* Fix disappearing reaction highlights.

* Changes as result of review.

* Fixed non-FreeType hash codes for reaction SVGs.  Extra comment in catch_tests.

* reactant highlighting was clearning properties

* Fix for failing contour python test.

* fix a non-freetype problem

* swig wrappers working

* Bump timeouts in test.

Co-authored-by: greg landrum <greg.landrum@gmail.com>
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2022-02-18 16:30:21 +01:00
Kazuya Ujihara
de088cd7dd add JavaGzStreamTests (#4973) 2022-02-01 17:28:36 +01:00
Kazuya Ujihara
0530d468e2 Fix i-files for RDK_USE_BOOST_IOSTREAMS=OFF (#4933)
* fix i-files for RDK_USE_BOOST_IOSTREAMS=OFF

* separate gzstream test

Co-authored-by: Kazuya Ujihara <ujihara@preferred.jp>
2022-01-23 07:06:36 +01:00
Greg Landrum
71770c60a9 fix some leaks in the SWIG wrappers (#4916) 2022-01-19 21:22:53 +01:00
Eisuke Kawashima
11532089de Run clang-format against cpp (#4358) 2021-10-20 04:25:27 +02:00
Brian Kelley
6a16d64169 Adds KeyFromPropHolder to hold user defined indices (#4571)
* 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
2021-10-02 08:17:50 +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
Greg Landrum
22da97b836 Add support for SRUs to MolEnumerator (#4563)
* preliminary first pass at SRU enumeration

* handle HH

* working
plus add a missing file... <doh!>

* passes basic tests for enumeration of multiple non-overlapping SRUs

* more SRU testing

* explore combining the SRU enumeration with enumerate()

* first step towards RepeatUnit in the python interface

* first pass at directly connected SRUs

* Fixes #4561

* make sure we don't try to enumeration SRU + LINKNODE
update python docs

* exception for ladders

* get a bit smarter about rejecting linknode enumerations

* turns out we actually *can* do ladders pretty easily

* update java wrappers

* make sure we can input from CXSMILES too

* some cleanup/documentation

* some refactoring

* response to review
2021-09-28 16:37:39 +02:00
Paolo Tosco
9cb48cb8ad - enable building Java wrappers with MinGW compilers (#4384) 2021-08-08 05:07:54 +02:00
Paolo Tosco
f09e12765b - remove SWIG kludge on Windows (#4388)
- do not define SWIGWORDSIZE64 on Windows
2021-08-07 06:06:02 +02:00
Paolo Tosco
e8175cf29c Three more Windows build fixes (#4356)
* - fixes MinGW build
- make sure that supplier istream is opened in binary mode or istream::tellg() will
  report wrong offsets on MinGW builds (MSVC will make no difference)
- avoid that in MSVC conda DLL builds the libboost_*.lib static
  libraries are picked by cmake instead of the boost_*.lib import libraries
  by defining BOOST_ALL_DYN_LINK

* - make sure that C# wrappers build with MinGW compilers
- make sure that static builds work under Windows with both MSVC and
  MinGW

* - disable building static libraries on Windows also when using MinGW compilers
- fix the C# wrapper build on Windows under both MSVC and MinGW

* reverted -DSWIGWORDSIZE64 as it was originally

* reverted -DSWIGWORDSIZE64 definition

Co-authored-by: Paolo Tosco <paolo.tosco@novartis.com>
2021-07-29 05:52:18 +02:00
Eisuke Kawashima
b9a5be5a2d miscellaneous updates (#4284)
* Remove accidentally tracked files and unset x flag

* Ignore ComicNeue

* Unify test tag to `reader`

* Trivial destructors

* Bump CMAKE_CXX_STANDARD to 14 (#4165)
2021-07-13 06:57:29 +02:00
Greg Landrum
b50e799da1 Linux CI modernization (#4285)
* linux CI modernization
- remove 16.04 python builds
- switch 16.04 java build to 20.04

* update

* update

* use dynamic libs
-fPIC never ceases to amuse

* specify swig version

* force swig3

* force swig3

* re-enable the other tests
2021-06-30 11:09:26 +02:00
Eisuke Kawashima
78aac3c1bc Run clang-format against header files (#4143) 2021-06-08 07:57:51 +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
Kazuya Ujihara
0b934953a2 Get SWIG wrappers working with C# again (#4020)
* fix to work for C#

* revert gitignore
2021-04-14 13:56:15 -04:00
Ric
0022ad34e2 fix build (#3936) 2021-03-16 04:55:14 +01:00
Brian Kelley
c8aa10c80f Add tautomer query to the substructlibrary (#3808)
* 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>
2021-03-05 04:56:20 +01:00
Ric
c9199cf1da Address #2753 (#3750)
* add test export heder to gitignore

* define export macros in separate file

* install new header

* patch GA with the new macros

* fix struct declarations

* fix conformerparser exports

* fix MolSGroupParsing ParseV3000Array export

* fix java wrappers

* export exceptions

* remove duplicated exports

* Build RDGeneral exceptions into lib

* export queries, only for *nix

* fix RingDecomposerLib header manipulation

* fix CIP labeler test issues
2021-02-15 14:29:04 +01:00
Steve Roughley
b1fd950eb2 Added getMessage method to exceptions (#3700)
* Added getMessage method to exceptions

* Added test cases to WrapperTests.java

* Corrected typo in test case

* Corrected test case error
2021-01-14 06:53:37 +01:00
Gareth Jones
fcd72bb953 Add Molbundle search to SWIG (#3698) 2021-01-07 08:53:50 +01:00
Greg Landrum
6805789c71 add support for generating pattern fps for MolBundles (#3665)
* add support for generating pattern fps for MolBundles

* get python wrappers building
2020-12-29 07:33:09 +01:00
Brian Kelley
cf9ea71384 First pass at MolZip (now with bond stereo!) (#3644)
* First pass at MolZip (sans bond stereo)

* Add support for bond stereo zipping

* Add molzip swig wrappers

* Add simple python wrapper/tests

* Remove smiles round tripping now that fragmentOnBonds is fixed

* Responses to review

* AtomMaps and Isotopes must explicitly be set

* Add molzip single molecule api isotope test

* Add missing %newobject

* Add better python docs, label test

* fix docs add a test for molzip

* Update Code/GraphMol/ChemTransforms/MolFragmenter.cpp

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

* Add missing case breaks

* Add more preconditions, move mark and restore to private functions

* Remove unused and redunddant code

* optimize get_other_atom

* Add single arg molzip test

* Update Code/GraphMol/Wrap/rough_test.py

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

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2020-12-25 05:15:12 +01:00
Greg Landrum
36dea7d737 support enumerating from lists of enumerators (#3664)
support enumerating all supported operations for a molecule
2020-12-25 05:14:46 +01:00
Eisuke Kawashima
e0b665bfe1 Clean up CMake files (#3417)
* Clean up CMake files

* bump CMake minimum required version to 3.7 to utilize
  [`VERSION_GREATER_EQUAL`](https://cmake.org/cmake/help/v3.7/release/3.7.html#index-0-command:if)
* improve catch-dependency
* fix conditionals
* use early return
* properly use CMake commands

* Apply suggestions from code review

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2020-11-28 08:00:39 +01:00
Greg Landrum
d2d87909de Add support for abbreviations (#3406)
* 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
2020-09-28 17:09:46 -04:00
jones-gareth
9a864f4238 Sgroup (#3390)
* Changes to use SubstanceGroups in Java

* Forgot to add SWIG file

* Java test for SubstanceGroup wrappers

* Added RDKit boilerplate
2020-09-09 04:59:08 +02:00
Greg Landrum
b558de22c6 Cleanup alignment dependencies (#3317)
* split MolAlign lib into two pieces

* further dependency cleanup

* release notes update

* add a missing dependency to the new library
2020-08-18 07:42:59 +02:00
jones-gareth
aa4d5dc22c Fixes for aromatic bond fuzzy queries (#3328)
* C# wrapper for fragmentMolOnBonds

* Fix failing tautomer query test

* Fix ChemTransforms.i

* SmartsWriter fix
2020-08-10 05:00:19 +02:00
jones-gareth
0b97153a79 Add ScaffoldNetwork to csharp (#3289) 2020-07-13 14:48:34 +02:00
Greg Landrum
73d26036de Support enumerating some mol file features into MolBundles (#3257)
* 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
2020-07-11 12:54:23 +02:00
jones-gareth
21a8a263bd Tautomer search (#3205)
* 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>
2020-06-24 17:27:40 +02:00
David Cosgrove
bc9e4d6478 Support using FreeType for text rendering (#3237)
* First working version with DrawText classes, original functionality only.  No font scaling.

* Added font scaling.

* Added atom colours.

* First stab at freetype text drawing.  A stash prior to major surgery.

* Freetype seems to be working.  On to whack-a-mole.

* Added class flag to atom labels and annotations.

* Another intermim commit whilst re-factoring all string drawing code from MolDraw2D.

* Fixed scaling and implemented max font size.

* Fixed bugs in non-FT Cairo and SVG drawing.

* More re-factoring of drawStrings - now creates StringRwct for each char in all strings.

* More re-factoring of string drawing - all mentions removed from MolDraw2D, I think..

* Working native Cairo, simple tests.

* Working native Cairo, simple tests.

* Padding roumd rectangles.

* Working FT Cairo, FT SVG, native SVG, simple tests.

* Two line labels mostly sorted. Native SVG wrong.

* Two line SVG labels sorted.

* Two line SVG labels sorted.

* Tidied out debug writes.

* Tweaked merge.

* Annotations working, radicals now failing.

* Fixed radicals crash.

* All tests passed for freetype drawings.  Grid drawings not right.

* Fixed bug in grid drawings.

* Better font size.

* Fixed legends in grids.

* Fixed rect intersection bug.

* Tidied up font sizes.

* moldraw2DTest1 all passing.

* All catch tests pass.

* Few rixes, and reactions look ok.

* Added minimum font size.

* Fixed radical drawing when max/min font size hit.

* Interim cmmmit, most test1.cpp working.

* Fixed uninitialised min_font_size_ in DrawText.  Took out use of MolDraw2D::setFontSize() which probably needs to go back in at some point.

* More test1.cpp passing.

* test1.cpp all pass, freetype and non-freetype

* Fixed superscripts hitting min font size in test860.  Made superscripts and subscripts same size.

* testc.pp all pass.

* Fixed bug in freetype text. All testt1.cpp pass.

* All tests passed.d

* Added option for different font.

* Added option for explicit terminal methyls.

* Added option to explicitly not use Freetype in drawers.  Used same in catch_tests.cpp.

* Got sense of NO_FREETYPE wrong in catch_tests.cpp.  D'oh!

* Fixed Python draw tests.

* Added new options to JSON interpreter.

* Fixed scale of text in contoured plots.

* Added optional molecule to grid drawer to help set scale.

* Fixed Python wrappers  for drawing 2D grids .

* Added Greg's CMakeLists.txt

* Moved fonts out of code tree.
Improved handling of font files not found, including logging to rdWarningLog.

* Interim commit.

* Tidied up some namespace std issues.

* Reverted to previous version.
Took out 'using namespace std;'

* update expected java results

* Added multi-line legends.  Also carves out a reserved bit for the legend, and sets the font size so the legend will fit.

* enable annotations on windows with freetype

* Removed stray font file.

* Removed stray font file.

* Re-instanted fontSize() and setFontSize(), though with change of units.

* Added RDK_BUILD_FREETYPE_SUPPORT to cmake.

* re-expose the fontsize controls to python.
document API change w.r.t. font size

* Update ReleaseNotes.md

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
Co-authored-by: greg landrum <greg.landrum@gmail.com>
2020-06-23 17:31:50 +02:00
Eisuke Kawashima
a9d5170239 Set RDK_BOOST_VERSION to pass minimum required version to FindBoost (#3074) 2020-05-05 04:41:25 +02:00
Greg Landrum
45bf58754a Cleanup some cmake dependencies (#3077)
* change minimal cmake version to a consistent 3.5

* progress towards a cleanup

* get the basic python deps working

* two more libs

* another round of changes
all tests pass at this point

* next round of changes
all tests pass at this point

* close to done
all tests pass

* very close

* almost done

* shift the RDBoost dependencies around a bit

* remove an extraneous python linkage
this is trying to get the mac builds working again

* Only link to python if it was built shared (#3091)

* change in response to review

Co-Authored-By: Ric <ricrogz@users.noreply.github.com>

* move that suppression of the maybe-uninitialized warning to BoostStartInclude.h

Co-authored-by: Brian Kelley <fustigator@gmail.com>
Co-authored-by: Ric <ricrogz@users.noreply.github.com>
2020-04-17 14:34:23 +02:00
Greg Landrum
5712176605 Implement the two deprecations that were planned for the 2020.09 release cycle (#3047)
* Deprecation: planned removal of .message() and .getMessage() methods

* Deprecation: planned removal of old MolHash code

* document deprecations

* output the diffs when the psql tests fail

* remove .message() from SWIG wrappers

note that the KeyError doesn't work properly. We should clean up the the exceptions here anyway

* typo
2020-04-01 14:30:07 +02:00
hjuinj
acdfe26dea Improve Conformational Sampling of Small and Large Ring Molecules (#2999)
* improvements for smal anr large ring conformer generation

* add documentation and reorder parameters in EmbedParam

* resolve merge conflict due to coordMap null pointer

* minor changes to address merge comments

* reorder variables in EmbedParameters

* add regression test for small ring and macrocycle torsion preferences

* not apply small ring torsions to bridged ring systems

* fix and test for bridged small rings torsion pattern exclusion

* add ETKDGv3 and srETKDGv3 option to keep compatiblity for original ETKDG

* EKTDG version 3 related minor fix

* add reference to doc string

* Java wrapper for ETKDGv3

* fix doc

* change CPCI to shared_ptr, but it seems to be much slower

* minor modifications to small bridged ring systems, and share_ptr from previous commit is fine

* rollback from shared_ptr(map) to just map

* run clang-format

Co-authored-by: Shuzhe Wang <shuwang@eu-login-10.euler.ethz.ch>
Co-authored-by: Shuzhe Wang <shuwang@eu-login-14.euler.ethz.ch>
Co-authored-by: Shuzhe Wang <shuwang@eu-login-17.euler.ethz.ch>
Co-authored-by: Shuzhe Wang <shuwang@eu-login-45.euler.ethz.ch>
Co-authored-by: Shuzhe Wang <shuwang@eu-login-05.euler.ethz.ch>
Co-authored-by: Shuzhe Wang <shuwang@eu-login-15.euler.ethz.ch>
Co-authored-by: greg landrum <greg.landrum@gmail.com>
2020-03-23 14:57:46 +01:00
Paolo Tosco
a6cafc4635 Added support for Python FMCS functors (#3023)
* Added support for Python FMCS functors

* - changes in response to review
2020-03-23 11:20:57 +01:00
Greg Landrum
f3587ea4d0 Add a scaffold network implementation (#2911)
* backup

* backup

* backup

* getting close to v0.1

* switch to using node indices

* add pruning and flattening

* support multiple mols

* example notebook

* backup

* initial commit
Just includes the basic API and flatten

* add the pruning step

* add removeAttachmentPoints()

* add makeScaffoldGeneric()

* improve compilation speed by adding catch_main.cpp

* add getMolFragments()

* doc cleanup

* actually add the network building code

* first pass at python wrapper

* allow edges to be nicely converted to strings

* get node counts working

* backup python notebook

* switch example notebook to use wrapped C++ code

* add BRICS fragmentation option

* fix a bug with removing attachment points to aromatic heteroatoms

* add provisional attachment point merger to notebook

* fix a bug with includeScaffoldsWithAttachments=false

* backup of efforts to get this working on windows

* backup of efforts to get this working on windows

* does not work. backup

* Fix a substructure crash on Windows

* re-enable tests

* adjust to the new BRICS form

* in-code documentation

* more doc updates

* reformat

* change the string output format for edges

* remove old python implementation

* remove obsolete test

* include a generic scaffold for the pruned structure too

* default to keepOnlyFirstFragment=false with BRICS params

* bug in removal of attachment points from generic scaffolds

* more testing

* support working from std::shared_ptr as well as boost::shared_ptr

* more testing

* disable debug printing

* use memo-ization in getMolFragments() to avoid duplicate work

* add SWIG wrapper and basic testing

* add define for RDK_USE_BOOST_SERIALIZATION

* add serialization at the C++ level

* add a string ctor for a scaffold networks

* add pickle support on the python side

* formatting

* remove old notebook

* move the fantastically useful iterable_convertor to RDBoost/Wrap.h

* expose parameter constructor with std::vector<std::string>

* add scaffoldnetwork to documentation
2020-02-11 08:21:01 -05:00
Ric
9188c70a64 Override what() in exceptions (Addresses #2920) (#2928)
* add overrides for what()

* translation fot KeyErrorException; update tests

* Switch all exceptions to `const char *` as a return type from message() (#4)

* switch return type of message() from std::string to const char *

* adjust one test to the new return type from message()
remove unnecessary verbosity from some tests

* fix cartridge build: update call to message().c_str()

* rebase agains master; fix another issue in cartridge build

* add deprecation note for message() and getMessage()

* amend Release notes

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2020-02-05 08:20:17 +01:00
Greg Landrum
fb3cad523e Fixes #2896 (#2903) 2020-01-25 06:34:29 +01:00
Greg Landrum
0ac7fa5165 java wrapper build cleanups (#2901) 2020-01-23 16:27:46 -05:00
jones-gareth
eb289cd13c Fix to allow multistructure images in Java/C# and use MCS for c# wrapper (#2898) 2020-01-23 09:03:09 +01:00