Commit Graph

6194 Commits

Author SHA1 Message Date
guillaume godin
df609d45f8 Add CoulombMat calculator (#2993)
* Coulomb Mat v0.1 issue on linux

* use static 3D molecule instead of generating 3D conf for testing

* fix tokenize

* fix issue removeHs

* update test for sdf 3D molecule

* strip things back to just do the basic coulomb matrix

* add RDKIT_DESCRIPTORS_EXPORT

* fix 3 typos and a missing const

* Update rdMolDescriptors.cpp

Co-authored-by: greg landrum <greg.landrum@gmail.com>
Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
2020-03-15 17:38:21 +01:00
shrey183
00c6a7e370 Possible fix for issue #2965 (#3001)
* fixed issue #2965

* added test case for issue #2965

* fixed formatting and added comment.
2020-03-14 14:28:17 +01:00
Greg Landrum
2ee798ddca Add support for the rest of the v3000 atom properties (#3007)
* Add convenience functions for generating v3K mol blocks and mol files

* first pass at parsing/writing the remaining atom properties from the CTAB spec

* handle SUBST

* write out the bond props that were being read but not written

* add an additional test

* fix a couple of problems caught in review
2020-03-14 04:58:07 +01:00
Greg Landrum
c683b828b1 Fix atom highlighting in notebook PNGs (#3000)
Also allows bond highlighting in notebook SVGs
2020-03-12 13:11:53 -04:00
Greg Landrum
1dc9ac3fbf adds a one-liner for getting a vector of random smiles for a molecule (#3002)
* first pass at random smiles vector; c++ version

* add python wrappers for that

* Remove accidental change

* switch to using a cross-platform reproducible RNG
2020-03-12 13:10:29 -04:00
hsiao yi
3d28ded230 add EnableSubstructMatchRendering and DisableSubstructMatchRending (#2998) 2020-03-11 06:54:26 +01:00
Greg Landrum
a6219eff3f Update azure-pipelines.yml (#2997)
* Update azure-pipelines.yml

* Update mac_build.yml

* Update mac_build_java.yml
2020-03-10 13:12:21 -04:00
David Cosgrove
774892a9ab 2ddrawenhancements2931 (#2979)
* First pass of fixing layout of OH/NH type drawing.

* Fixed scale for N/S NH type groups.

* Fixed bond end points with new display of heteroatoms.

* Fixed case where it drew aromatic dashed bonds in wrong ring for morphine.

* Minor edit.

* Fixed non-drawing of chiral bonds.

* Removed use of boost for_each.

* Modern atom traversal.

* Put in fixed scale for drawings.
Made drawMolecule() take note of prepareMolsBeforeDrawing.
Updated more iterators to modern idiom.

* Added fixed bond length for drawing.

* Fixed drawing of CH4, NH3 etc.

* Stash of working but ugly, prior to re-work.

* Better, simpler splitting of atom symbols.

* Took clang-tidy's advice about use of override.

* Tidied up drawing of text strings.

* Tweaked what is classed as vertical bond in drawing.

* fixedBondLength now down-scales if it would overflow the draw window.

* Some tidying.

* Tests for new parameters in JSON.
Fixed some existing tests where, for example, scale on picture is now different.

* Added option to rotate 2D draw coords before drawing.

* First pass at highlighting atoms in multiple colours.  Circles only at the moment.

* Line width scales if big enough.

* Tweaked SVG text drawing.

* Added highlighting with more than 1 colour on an atom.  C++ only.

* Fixed some issues with widths of highlights in a frustrating game of whackamole.
Updated some tests accordingly.

* Added Python wrapper for new drawing code.

* Removed debugging writes.

* Added C++ test for multi-coloured highlights.

* Added python test for multi-coloured highlights.

* Attempt to show radicals.

* Tidied up radicals in drawing, including a bullet instead of full stop in SVG.

* Fixed catch_tests.cpp for MolDraw2D.

* Fixed crash in Python wrappers on OSX.

* Fixed test5_2.svg bug (trailing </tspan>).
Made wavy line width scale as other lines do.

* Improved placing of charges.

* We're already in the future.

* Fixed a number of bugs that made drawMolecules not set the scales properly.

* Fixed Cairo wavy line width.

* Fixed non-closure of collision boxes.

* Added maximum font size for text, with tests.

* Addressed all Greg's first PR change requests.

* Fixed crash in extractAtomsymbols.

* stop using coordgen and adjust tests to reflect that
there's a bit of reformatting in here too

* Fixed layout of reactions.

* Fiddled with moldraw2DTest1 tests again.

* Fiddled with catch test.

* Fixed istope postion in W atom labels.

* Minor tweak to cairo,

* update expected results

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2020-03-10 17:33:59 +01:00
Brian Kelley
4c1ea25fda Fix a hang when trying to read mols from a directory not a file on linux (#2983)
* Fix a hang when trying to read mols from a directory not a file on linux

* thrown an exception at construction time

* clarify the readme

* update release notes

* Refactor the stream opening and checking code to a common method

Co-authored-by: Brian Kelley <bkelley@relaytx.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2020-03-09 15:27:58 +01:00
guillaume godin
34e96e2048 Atom Features (#2988)
* Atom Features

* remove back_push

* Revert "remove back_push"

This reverts commit f430524ced.

* Revert "Atom Features"

This reverts commit e9e98c82cc.

* correct version

* add Cmake

* few fix v1

* additional tests

* fix function name remove test.h file

* reomve test.h
2020-03-09 15:25:14 +01:00
Dan N
3b6dfb0343 Enable larger ring matches in SMARTS expressions (#2981)
Although these are probably nonsense, I've seen some pretty
big [r#] expressions in SMARTS expressions. In particular, for
SMARTS generated for toolkits that don't have the range
extension, people do this to mean "in rings bigger than 6" or
whatever:

   [r7,r8,r9,r10
2020-03-07 15:09:38 +01:00
Greg Landrum
fe745cfc04 ScaffoldNetwork rearrangements (#2985)
* backup

* rearrange the network to make it cleaner

- GenericBond scaffolds are now directly connected to the corresponding Generic scaffold
- Attachment points are no longer removed from Generic (or GenericBond) scaffolds

* remove dead code
2020-03-06 13:51:38 +01:00
Greg Landrum
494c28de18 add add_hs() and remove_hs() to JS wrappers (#2986) 2020-03-05 15:27:48 +01:00
Brian Kelley
f518805f1f Remove redudant (and case sensitive) files 2020-03-05 09:17:27 -05:00
Brian Kelley
4c0a99f2ad Add multithreaded pattern/fp generator (#2973)
* Add threaded pattern generator to help speed up library creation

* Add size to FPHolderBase

* Add more complete python wrapper, fix leak in doctest

* Add basic usage test for addPatterns, fix I/O leak

* Add basic test for trusted smiles

* Actually add the new code

* Export addPatterns on windows

* Try fixing the cartridge build

* Change pattern_factory to PatternFactory

* Change boost::ref to std::ref
2020-03-04 09:41:03 -05:00
Greg Landrum
f616b504e2 fix a typo in the scaffold network wrappers and add some tests (#2982) 2020-03-04 09:22:32 -05:00
Greg Landrum
55f0099257 Merge branch 'master' of https://github.com/rdkit/rdkit 2020-03-04 12:42:46 +01:00
Greg Landrum
35c60a2c63 Merge branch 'MorseAtomFingerprint' 2020-03-04 12:40:11 +01:00
Greg Landrum
54229e2a4e Merge branch 'MorseAtomFingerprint' of https://github.com/thegodone/rdkit into MorseAtomFingerprint 2020-03-04 12:35:32 +01:00
guillaume godin
3ff8eaaf85 Update test1.cpp
adding Morse Atom Fingerprint test
2020-03-04 12:24:22 +01:00
Greg Landrum
e5b387fa41 Merge branch 'master' into MorseAtomFingerprint 2020-03-04 11:53:45 +01:00
Ric
14b80eca8b Fix build without boost serialization. (#2972)
* fix build, test

* add new test file

* rename scaffold pickling test
2020-03-04 04:52:43 -05:00
guillaume godin
013642b74f Update testMolDescriptors.py
add python testcase Morse Atom Fingerprint
2020-03-04 09:42:35 +01:00
guillaume godin
74bb9d7aa1 Update MorganFingerprints.cpp
fix the redundantEnv
2020-03-04 09:34:21 +01:00
guillaume godin
f9b15a40d8 Update MorganFingerprints.cpp
fix line split
2020-03-04 06:05:55 +01:00
Zhenting Gao
ae8e2a11ae Description for the data files. (#2975)
* Create README.md

Description of solubility data is added by Zhenting Gao

* Update README.md
2020-02-28 09:28:56 -05:00
Greg Landrum
fcdf086ee5 A couple additions to the extended Hueckel integration (#2955)
* add reference input/output files for yaehmop

* orbital energies, overlap matrix, and hamiltonian on the C++ side

* add the python wrappers for the new functions
2020-02-24 10:32:02 +01:00
Brian Kelley
96353c3a8b Add BCUT 2D descriptors (#2957)
* [WIP] Add BCUT 2D descriptors

* Use the standard RDKit license

* Add Check for EIGEN3

* Add vector param, fix some formatting, remove debug print

* Add make_burden function, optimize symmetric eigenvalues

* Add some tests, finalize API

* Make the python API return tuples

* Updates docs

* Remove unused variable

* Fixed up C++ tests

* Remove std::pair wrapper, don't build BCUT when missing EIGEN

* Add bigger test case for BCUTs

* Accidentally removed the wrong code
2020-02-23 16:09:36 +01:00
Brian Kelley
310bb21ea8 Don't switch locales unless really necessary (float/double) (#2958) 2020-02-19 07:44:50 -05:00
Greg Landrum
6f9ba35826 Tune the tautomer scoring (#2959)
* tautomer scoring tweaks
doc updates
expose tautomer score to Python

* fix leaks in tests
2020-02-19 07:38:04 -05:00
Greg Landrum
41d1f762f5 Fixes #2948 (#2950) 2020-02-19 07:31:43 -05:00
Greg Landrum
eb846091cc Include running the documentation tests as part of the CI runs (#2932)
* initial attempt to run doctests in CI

* add cairo support; disable other builds until we are done with this

* we don't actually need cairo
Adds cleanup code to cookbook

* be explicit about SVG
it does not seem like this should be necessary, but...

* turn the other tests back on now that the doctests work

* try enabling the doc tests for mac and win too

* remove mac tests again, fix problem with windows

* trying to get tests working on windows

* stop requesting PNGs in the cookbook

* skip calls to molstogridimage too

* remove vestigial doctest directive
2020-02-13 15:23:48 +01:00
Greg Landrum
915471a079 Fix a problem with aromatic heteroatom tautomer enumeration (#2952)
* update transforms to enforce neutral nitrogens when doing the aromatic neteroatom transforms

* formatting, add a test

* remove unused #include
2020-02-13 06:35:01 +01:00
Steven Kearnes
40b9828fd9 Avoid data race warning in SmilesParse.cpp (#2946)
* Avoid data race in SmilesParse.cpp

Avoid data race in SmilesParse.cpp for SMILES and SMARTS

* More informative comments

* Fix line width
2020-02-12 04:57:45 +01:00
Greg Landrum
ced45aceb4 Fixes #2936 (#2938)
* fix some bad argument checking

* Fixes #2936
2020-02-11 08:27:42 -05: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
Ben Cornett
c3220f30a0 Fix regression introduced by e245349c (#2945) 2020-02-09 06:54:01 +01:00
Greg Landrum
3160c46af4 Fixes #2929 (#2934) 2020-02-05 16:51:51 +01:00
Greg Landrum
1830767d5d Fix a couple residual problems created by #2899 (#2935) 2020-02-05 16:32:08 +01: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
2266542ac3 patch to make PandasTools tests pass with pandas v0.22 (#2913) 2020-02-04 11:23:09 -05:00
Greg Landrum
a2767d9f7d Allow custom post-match filters for substructure matching (#2927)
* backup, does not work

* working on the C++ side

* backup

* fix the API

* document the new functionality

* improve that example

* final bit of cleanup

* switch to std::function
2020-02-04 11:22:38 -05:00
Greg Landrum
a9bc37a66a Merge branch 'greglandrum-feat/github2829' 2020-02-04 02:43:18 +01:00
Greg Landrum
a7874672bc Merge branch 'feat/github2829' of https://github.com/greglandrum/rdkit into greglandrum-feat/github2829
# Conflicts:
#	Code/GraphMol/AdjustQuery.cpp
#	Code/GraphMol/FileParsers/file_parsers_catch.cpp
#	Code/GraphMol/MolOps.h
#	Code/GraphMol/catch_graphmol.cpp
2020-02-04 02:42:31 +01:00
Greg Landrum
abadada1a2 Parse and handle the stereoCare or STBOX flags in CTABs (#2917)
* get fileparsers catch tests building faster
should use this same approach across all of the catch2 tests

* Fixes #2916

* support parsing of STBOX for atoms and bonds in v3K mol files
add molStereoCare to common_properties

STBOX is translated to the molStereoCare property

* add stereocare support to adjustQueryProperties
make building the catch2 tests faster for the GraphMol package

* copy in AdjustQueryParameters JSON parsing from adapter.cpp
(That still needs to be ported to use the new code)

* get the cartridge using the new parsing code

* update test to reflect new parser behavior

* add a v2000 test

* changes in response to review
2020-02-03 15:55:57 -05:00
autodataming
7ef947def8 Update Overview.md (#2925)
format error
2020-02-03 13:08:15 +01:00
Greg Landrum
a0dd56ddee remove the MRV_IMPLICIT_H groups after processing them 2020-02-02 06:12:40 +01:00
Greg Landrum
1cea3800c4 Fixes #2829 2020-01-30 16:56:18 +01:00
Greg Landrum
b2e8cad444 Merge remote-tracking branch 'origin' into feat/github2829 2020-01-30 15:23:01 +01:00
Greg Landrum
1655684aa1 fix doctest problem with Pandas v1.0 (#2918)
* fix doctest problem with Pandas v1.0

* include the old output with a +SKIP
2020-01-30 15:17:15 +01:00