Commit Graph

16 Commits

Author SHA1 Message Date
Paolo Tosco
3d5a3f2af1 - wrap types that are otherwise not accessible from SWIG wrappers (#6110)
- remove redundant Point2D_Vect definition (laready defined elsewhere)
- blacklist getPositions() whose return type is not accessible from SWIG

Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2023-02-20 12:44:24 +01:00
Greg Landrum
e322928028 swap boost::tuple to std::tuple (#5851) 2022-12-16 16:01:19 +01: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
Gareth Jones
b50bce4ed0 Swig MolDraw2D cairo (#5128)
* MolDraw2DCairo working in SWIG

* C# test
2022-03-24 05:54:12 +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
Greg Landrum
fb3cad523e Fixes #2896 (#2903) 2020-01-25 06:34:29 +01: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
Greg Landrum
881d4e2b42 Enable SimilarityMaps in C++ (#2562)
* basic conrec integration

* basic conrec integration

* add molecule contouring

* update

* add an alpha channel to the color

* allow filling the grid

* cleanup

* remove some debugging output

* first pass at getting similarity maps to actually work

* updates

* add another test
explicitly set linewidth to 1

* some SVG cleanup

* add option for extra padding

* update expected test results

* efficiency

* at least something of a test

* forgot an import

* fix SWIG wrappers

* cleanups in response to review

* allow calling the functions without providing levels

* allow contouring numpy grids
2019-07-28 08:59:06 -04:00
Brian Kelley
843f9cf735 Dev/general csharp fixes (#2341)
* SWIG wrap SubstructLibrary

* Fix tests

* Fix virtual overload for tagAtoms

* Add SubstructLibrary to swig

* Fix C# enums

* Ignore annoying boost:tuples in c#
2019-03-13 04:41:48 +01:00
Greg Landrum
e38d42ca11 Fix problems in the SWIG wrappers caused by #1546 (#1558)
* fix a couple problems in the java wrappers created by the changes

* more tests
2017-09-11 16:08:47 +02:00
Greg Landrum
9af90524a4 Provide support for color palettes in MolDraw2D (#1546)
* first steps towards flexible colour palettes

* add B&W palette and a test for it

* add python support;
this is, once again, not the best API due to the inability to auto-translate boost::tuples at this point

* more palette control from python

* rename some of the swig-wrapped types to make them more consistent

* handle palettes that do not have a default value
2017-09-08 10:52:01 +02:00
Greg Landrum
b9450b7ba7 add prepareMolForDrawing to SWIG wrapper; add a test for that too (#1523) 2017-08-12 15:34:50 -04:00
Greg Landrum
c1704daccd support supplying highlight radii 2015-03-04 07:21:03 +01:00
Greg Landrum
250ebffee5 cleanup the SWIG wrappers for the MolDraw2D a bit 2015-02-08 05:34:44 +01:00
Greg Landrum
f2e261c2f6 add internal stringstream support to MolDraw2DSVG 2015-02-06 03:15:24 +01:00
Greg Landrum
a5548e6e26 initial support for an explicit MolDraw2DSVG object; bring the csharp wrappers somewhat up-to-date 2015-02-04 07:16:30 +01:00