Commit Graph

4217 Commits

Author SHA1 Message Date
Greg Landrum
72340e33c2 Fixes #3648 (#3654)
* Fixes #3648

Code now builds without either MAEParser or coordgen integration enabled.

* add CI build with minimal dependencies

* remove doctests from the new CI build

they need the cairo support
2020-12-17 09:29:59 -05:00
Greg Landrum
a7c438f870 Fixes #3646 (#3653) 2020-12-17 08:34:15 -05:00
greg landrum
03a43051e6 Merge branch 'greglandrum-feat/bond_query_drawing' 2020-12-17 06:55:15 +01:00
greg landrum
7564a4af8b Merge branch 'feat/bond_query_drawing' of https://github.com/greglandrum/rdkit into greglandrum-feat/bond_query_drawing 2020-12-17 06:43:49 +01:00
Paolo Tosco
be0f5b01f4 fixes #3635 (#3638) 2020-12-17 05:47:13 +01:00
Greg Landrum
df47393045 Fixes #3089 (#3642)
also adds a small test for PDB flavors
2020-12-14 12:34:32 -05:00
Paolo Tosco
5e31c975a2 Fixes a few residual issues with the RGD code (#3606)
* - replaced set with vector for SMILES-based R-group equivalence
- the first GreedyChunk is constituted by chunkSize+1 mols
- labeled R-groups may not be extracted when onlyMatchAtRGroups==false
- labeled geminal R-groups are incorrectly scored
- my attempt to introduce consistency in R-group labeling was buggy
- added a DEBUG pre-processor directive to the tests to make debugging easier
- added a unit test
- fixed unit test results which were inconsistent with the expected behavior

* changes in response to review
2020-12-12 08:52:00 -05:00
greg landrum
21788d285b Merge branch 'feat/noatomlabels' of https://github.com/greglandrum/rdkit into greglandrum-feat/noatomlabels 2020-12-12 12:07:58 +01:00
greg landrum
aeb8a0d79a Merge branch 'feat/draw_variableattachments' of https://github.com/greglandrum/rdkit into greglandrum-feat/draw_variableattachments 2020-12-12 12:02:21 +01:00
greg landrum
3382458312 Merge branch 'feat/draw_sgroup_data' of https://github.com/greglandrum/rdkit into greglandrum-feat/draw_sgroup_data 2020-12-12 11:52:35 +01:00
Greg Landrum
753d3c145a Fix: add missing python wrappers for MolDraw2DQt (#3613)
* works, but is not optimal

* swap back to using a reference

* convenience function and tests

* Update rdMolDraw2D.cpp

* another attempt

* trying to suppress the crashing problem

* trying to suppress the crashing problem2

* force a rebuild

* try to make this work

[skip ci]

* stupid typo

* change the SIP imports (suggestion from @ricrogz)

* Update linux_build.yml
2020-12-12 08:54:02 +01:00
Greg Landrum
96800b0a86 moldraw2djs should not close all polygonal paths (#3634) 2020-12-12 06:10:13 +01:00
Greg Landrum
b81e313c51 Fix #3631 (#3632)
* Fixes #3631

Still worth investigating *why* this happened.

* a bit of simplification/refactoring
2020-12-12 05:50:29 +01:00
Paolo Tosco
5075084bd2 Fixes #3625 (#3628)
* fixes #3625

* added test
refactored tests to use scoping

* more grunt work
2020-12-10 18:31:37 +01:00
greg landrum
15ccf87862 add configuration option to disable atom symbols in the rendering 2020-12-10 18:27:05 +01:00
Jin Pan
ab6b164924 Speed up GraphMol/Chirality.cpp/iterateCIPRanks (#3482)
* Speed up GraphMol/Chirality.cpp/iterateCIPRanks

The changes in this patch increases throughput of `iterateCIPRanks` by
about 61.8%.  This patch consists of many changes that all combine to
contribute to the performance gains, and these are the major changes:

* Introduce Bond.getTwiceBondType to avoid floating point operations in
`floor(2*bond->getBondTypeAsDouble() + .1)`
* In RDGeneral/Ranking.h/rankVect, just store the last index (instead of
the last vector) and avoid creating a copy at the current index.
* In GraphMol/Chirality.cpp/iterateCIPRanks, reserve more capacity ahead
of time.
* In GraphMol/Chirality.cpp/iterateCIPRanks, avoid materializing
localEntry and then copying; instead, track the data to be added in a
`counts` vector and a `updatedNbrIdxs` vector.

In GraphMol/Chirality.cpp/iterateCIPRanks, we also make several
micro-optimizations that were individually measured to give a small
performance improvement.

* Chirality.cpp/iterateCIPRanks: avoid materializing allIndices vec

* misc cleanup
2020-12-10 05:36:51 +01:00
Greg Landrum
d8afc9f027 A couple changes to speedup bulk similarity calculations from Python (#3574)
* add a wrapper for bulk nearest-neighbor calculations
A bit of minor refactoring

* header fix

* add tests for new neighbor functionality

* add the rest of the similarity metrics
2020-12-10 05:33:32 +01:00
Paolo Tosco
8030c36e5b Minor tweaks to SubstructLibrary (#3564)
* - added some missing const keywords
- added an addFingerprint overload to allow passing pointers
- added a test

* changes in response to review

* removed print

* added missing shared_ptr declaration

* added PatternNumBitsHolder serialization

* - merged with upstream changes and resolved conflicts
- got rid of PatternNumBitsHolder and leveraged the serialization version to get the PatternHolder to be backwards-compatible

* built substructLibV1.pkl with an older version of boost

* reverted serialization version to 1
only write numBits if != 2048 and only read numBits if it exists in the archive

* bogus commit just to trigger a rebuild
2020-12-09 19:42:38 -05:00
Greg Landrum
e7e17adc4e add documentation (#3583) 2020-12-09 13:31:14 +01:00
greg landrum
8527f0bf55 a bit more cleanup 2020-12-09 13:25:35 +01:00
greg landrum
52cb6c7a85 additional cleanup 2020-12-09 10:27:51 +01:00
greg landrum
805a0bce4b initial pass at variable attachment point bonds 2020-12-09 09:28:21 +01:00
Greg Landrum
b82b3c0695 Fixes #3620 (#3621) 2020-12-09 04:37:13 +01:00
Brian Kelley
66fa3c3a86 Reverts acciental molzip push 2020-12-08 17:04:07 -05:00
Brian Kelley
2509558db2 Add catchall to case statement 2020-12-08 10:25:29 -05:00
Brian Kelley
52bf58e254 Response to review: invert a and b molecules in tests. Fix bug found. 2020-12-08 10:23:53 -05:00
Brian Kelley
e02b1e21a1 Merge branch 'master' of https://github.com/rdkit/rdkit 2020-12-08 09:58:13 -05:00
greg landrum
ab93b8ddf6 reorg 2020-12-08 15:50:43 +01:00
greg landrum
c30b96e25c bit of code cleanup and testing with highlights 2020-12-08 15:39:45 +01:00
greg landrum
7bc13df800 more progress 2020-12-08 15:39:45 +01:00
greg landrum
169860a4b1 backup 2020-12-08 15:39:45 +01:00
greg landrum
517db5ad76 backup 2020-12-08 15:39:45 +01:00
greg landrum
75b4830862 remove vestigial files 2020-12-08 15:39:45 +01:00
greg landrum
a068a18a53 all tests now passing 2020-12-08 15:39:45 +01:00
greg landrum
55bc8d7ec1 backup 2020-12-08 15:39:45 +01:00
Greg Landrum
bed5b95ae4 Fixes #3543 (#3615)
* does not work

* Fixes #3543

* remove debug printing
2020-12-08 08:45:46 -05:00
greg landrum
fdbca5a9f1 switch to left justification 2020-12-08 08:52:04 +01:00
greg landrum
20e41d4250 stop rendering FIELDNAME 2020-12-08 08:46:36 +01:00
greg landrum
a60721623f add an example 2020-12-08 08:37:21 +01:00
greg landrum
f1475307ff mostly works 2020-12-08 08:18:35 +01:00
greg landrum
18a2e1a1cd works, but is not optimal 2020-12-04 05:03:40 +01:00
Greg Landrum
938563c5ac Get MolDraw2DQt working again (#3592)
* Qt drawing works with freetype.
needs polish and testing
non-freetype drawing doesn't work still

* make the Qt rendering anti-aliased

* non-freetype fonts work in Qt
With the giant caveat that you need a QGuiApplication to use fonts. We try to detect that

* cleanup

* changes in response to review

* add qt support to CI builds

* fix VS build problem

* try resolving a linux link error

* Update linux_build.yml

* Update linux_build.yml

* another attempt to get the linux CI builds working

* getting closer?

* Update linux_build.yml

* disable the qt CI builds on windows
2020-12-03 17:28:01 +01:00
Greg Landrum
885be973a6 Fixes #3320 (#3595) 2020-11-30 13:50:41 -05:00
Greg Landrum
9949b4cbf6 Fixes #3597 (#3600)
* Fixes #3597

* add a test for super small values
2020-11-30 16:31:42 +01:00
Greg Landrum
9ab84f0884 Add rendering of SGroup brackets to MolDraw2D (#3586)
* backup

* further progress

* backup

* refactor handling of atom/bond annotations

move to a single annotation list to make it easier to add new annotation
types

* backup, doesn't actually work

* not unhappy with how the bracket rendering now works
still need to do bracket annotations

* backup

* commit first pass at brackets annotations

* add a bit more flexibility to how we handle annotations
Stll needs to be elaborated a bit, but the tests currently pass

* cleanup

* support comic mode with brackets

moves the handdrawnLine code to MolDraw2D_detail, which is a better place for it

* updates in response to review
2020-11-28 08:03:20 +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
85d4d714d1 add a "comic mode" to MolDraw2D (#3584)
* works

* auto download of comic-neue font

* support it in the python layer

* getting ready for a PR

* tone down the wobbly line effect a bit

* add end-point shifts
tone the wiggles down a bit
2020-11-25 09:00:39 +01:00
Paolo Tosco
e4d872f0b5 Use MODULARIZE and EXPORT_NAME (#3570)
* Use MODULARIZE and EXPORT_NAME

* updated Dockerfile

* wip

* updated demo.html
2020-11-24 05:15:18 +01:00
hjuinj
666df68e5b correct handling of amide distances for macrocycles (#3559)
* patch correct handling of amide distances for macrocycles

* higher delta for test
2020-11-24 05:03:00 +01:00
Paolo Tosco
9c64df9a73 fixes #3540 (#3573) 2020-11-24 05:00:55 +01:00