Commit Graph

3192 Commits

Author SHA1 Message Date
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
bed5b95ae4 Fixes #3543 (#3615)
* does not work

* Fixes #3543

* remove debug printing
2020-12-08 08:45:46 -05: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
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
Kazuya Ujihara
6767edc1b8 fix example of SmilesToMol (#3575) 2020-11-24 04:59:21 +01:00
Greg Landrum
427c0fa2c0 Fixes #3577 (#3578) 2020-11-24 04:55:05 +01:00
Brian Kelley
23ad0f8b84 Addd fragment on bonds and isotope labelling 2020-11-22 19:39:43 -05:00
Brian Kelley
847426faa2 Final algorithm implementation 2020-11-21 17:08:28 -05:00
Paolo Tosco
c5dc6cc258 A few improvements to SubstructLibrary (#3557)
* - enable SubstructLibrary to build without threading support
- enforce consistency across single- and multi-threaded runs
- improve performance on single-threaded runs avoiding overhead of spawning threads
- consolidate internalCountMatches and internalGetMatches into one function to reduce code duplication
- fix a bug in Python CountMatches whjich would run on 1000 threads

* reverted Code/GraphMol/SubstructLibrary/Wrap/SubstructLibraryWrap.cpp as it is now in its own PR (#3558)

* - added missing cast
- removed unnecessary std::make_move_iterator
- added Brian's test

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2020-11-18 16:07:34 -05:00
Brian Kelley
08e0c714d7 First pass at molzip 2020-11-16 14:55:30 -05:00
Ric
2afb4fbac4 Mem checkup & fixes (#3510)
* fix leak in testConformerParser

* fix leaks in testMultithreadedMolSupplier

* fix leak in catch_graphmol

* pass build type to YAEHMOP

* cleanup fragments in CoordGen minimizeOnly

* fix leaking ConjElectrons stack in res mol supplier

* avoid double delete

* do not delete 'this'; clean ce not added to map

* delete mol if Multithreaded SD readMolProps throws

* fix typo

* fix typo in comment
2020-11-09 12:08:36 -05:00
Paolo Tosco
b2c3cd935a fixes bug in SubstructLibrary Python wrappers (see #3557) (#3558) 2020-11-09 10:08:26 -05:00
Paolo Tosco
4b978f0c58 Fixes an RGD issue with cores having dummies adjacent to R-group labels (#3551)
* - fixes an issue with cores having dummy atoms adjacent to R-group labels

* changes in response to review
2020-11-09 08:07:43 -05:00
Greg Landrum
1c2e3f1923 Fixes #3553 (#3554)
* Fixes #3553

* add another test

* Apply suggestions from code review

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>

* add an additional test for that

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
2020-11-09 08:06:14 -05:00
Paolo Tosco
5f4d12b33b - add #ifdef to enable building ScaffoldNetwork with no Boost serialization support (#3538)
- do not look for Threads if not needed
2020-11-08 12:42:03 +01:00
Greg Landrum
f1bbc319b5 Fixes #3531 (#3545)
* Fixes #3531

* remove the new Br valences too
2020-11-08 07:17:37 +01:00
Paolo Tosco
41f3e0c64c Fixes #3517 (#3523)
* fixes #3517

* added test in response to review

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2020-11-04 12:54:47 +01:00
Paolo Tosco
e5feb83a84 removes function which is an exact duplicate of another function (#3524) 2020-11-04 12:50:55 +01:00
Greg Landrum
ab2fc55292 add methods to allow the following properties from SubstanceGroups to be cleared: (#3547)
- Brackets
- CStates
- AttachPoints
2020-11-03 12:02:25 -05:00
Greg Landrum
5ac465d777 Fixes #3529 (#3546) 2020-11-03 09:02:37 -05:00
Paolo Tosco
145828967f Fixes #3492 (#3527)
* fixes #3492

* added missing const
2020-11-03 06:35:07 +01:00
Paolo Tosco
ffddae7ac4 give a bit more time to debug builds (#3536) 2020-11-03 06:32:17 +01:00
Greg Landrum
d594998dda legend_height_ should be preserved after drawing the molecule (#3520) 2020-10-27 06:35:05 +01:00
Ric
7bc4b90c2e Fixes #3511 (#3513)
* fix

* add pickling test
2020-10-21 17:31:31 +02:00
Greg Landrum
bba71631b8 fix problem with H+ caused by #3473 (#3503)
* fix problem with H+ caused by #3473

* changes in response to review
2020-10-19 12:45:00 -04:00
Paolo Tosco
b74a4aeb4c Fixes a few bugs in the R-group decomposition code (#3497)
* - Fixes three bugs in the R-group decomposition code

* - delete iterator properly during loop so the Mac does not complain

* added more tests

Co-authored-by: user173873 <user173873@FF026.local>
2020-10-19 07:46:06 -04:00
Paolo Tosco
6053f62453 Added support for isotopic Hs to TautomerEnumerator (#3502)
* - added support for isotopic Hs to TautomerEnumerator

* review suggestions

Co-authored-by: greg landrum <greg.landrum@gmail.com>
2020-10-19 13:42:51 +02:00
Greg Landrum
170796a175 Fixes some problems with findPotentialStereo() (#3499)
* backup, definitely does not work

* remove obsolete test
(not even really sure anymore that's a bug)

* remove code from a false path

* at this point the code passes all tests

* backup

* handle isotopes and h counts properly

* remove some compiler warnings

* all tests passing

* Use InChI minimimum ring size for bonds

* Fixes edge-case bug in canonicalization when bond labels are provided

* cleanup, no substance here

* fixes the last set of problems I've seen

* document that this is still experimental

* remove obsolete/testing comments

* stop considering charge and H count in chirality
2020-10-17 04:35:58 +02:00
Ric
5526fab546 Fix python invalid escape sequences (#3508)
* unescape spaces

* fix smiles in EnumerateStereoisomers.py

* raw docstring in Scoring.py

* raw strings for escaped parens in pdfgen.py, pidPDF.py, pdfutils.py, pidPS.py

* raw string in fmcs.py

* fix Inchi matchers
2020-10-17 04:34:55 +02:00
Rocco Moretti
3cc2123637 Fix undefined behavior in testCoordGen test (#3495)
* Fix ROMol->RWMol static casts

* Fix accessing of end-iterator.

* Fix some test build issues I saw while compiling with Clang.

* Add build settings for sanitizers.

* Revert "Add build settings for sanitizers."

This reverts commit 5dc84374f0.
2020-10-17 04:26:13 +02:00
Ric
362cb9f026 add include dirs (#3494) 2020-10-16 06:17:38 +02:00
Greg Landrum
336c3a5103 add a version for the pattern fingerprint (#3496) 2020-10-15 15:33:19 +02:00
Paolo Tosco
7d0d7df5f0 Fixes a number of issues flagged by clang (#3498)
* - fixes a number of issues flagged by clang

* - removed commented line
2020-10-15 15:03:34 +02:00
Cédric Bouysset
04a2be149f add newlines for code blocks + typo (#3475) 2020-10-13 05:09:34 +02:00
Paolo Tosco
f1119f3980 Make MetalDisconnector more robust against metallorganics (#3465)
* Make MetalDisconnector more robust against metallorganics

* - fixed misbehavior with radicals
- added tests
- code cleanup

* - fixed MetalDisconnector with dative bonds
- removed pointless test
2020-10-13 04:41:18 +02:00
Greg Landrum
b86b2364c2 add new oxidation states for Cl, Br, I, Xe, Po, At (#3486)
* add new oxidation states for Br, I, Xe, Po, At

Changes the allowed value 2->3 for I

* add Cl too

* update expected test results
2020-10-12 15:26:18 +02:00
Greg Landrum
acf318c188 Fixes #3470 (#3473) 2020-10-11 08:44:52 -04:00
Greg Landrum
37a5d1c710 allow filcolour to be changed from python (#3480) 2020-10-11 11:35:39 +02:00
Greg Landrum
6fbb8d4efd Fix a crashing bug when some rdMolStandardize functions are called with None (#3481) 2020-10-11 09:42:16 +02:00
Jin Pan
d36bda6b08 ROMol: add inline impl for common getNumAtoms call (#3469)
This improves throughput of `MolToSmiles` by about 5%.
2020-10-11 08:02:58 +02:00