3339 Commits

Author SHA1 Message Date
Greg Landrum
db89172bf8 handle the heavy-atom degree queries differently (#1560)
* handle the heavy-atom degree queries differently

* Fixes #1563

* add a test for the heavy atom degree option

* Support (and test) adjustHeavyDegree in the cartridge too.

* test results
2017-09-12 16:10:15 -04:00
Greg Landrum
25ac7904e8 remove setters and getters for RGroupDecompositionParameters data members (#1554) 2017-09-12 17:44:37 +02:00
Brian Kelley
58ede0f81b Dev/rgroup decomp freefunction (#1557)
* Adds RGroupDecomp free function and python wrapper

* Fixes subtle bug, adds new RGroupDecomp API

* Updates results for the subtle bug fix.  Verified results were correct.

* Removes smilesCaching.

* Changes RGroupDecompose ordering, adds docstrings and more tests
2017-09-12 17:41:21 +02:00
Brian Kelley
7488840ac4 Fix/urange check (#1506)
* Fixes atom documentation

* Fixes #1461

This is a complicated one.  Basically URANGE_CHECK when
used on unsigned integers has a problem when the size of
the range it’s checking is 0.  The standard operations is
to check

URANGE(num, size-1)

Which (for unsigned integers) obviously rolls over.

This fixes all usage cases to be

URANGE(num+1, size)

And fixes the bugs found.  (addBond and the mmff tests)

* Fixes #1461 - Updates URANGE_CHECK to be 0<=x<hi
2017-09-11 21:17:33 +02:00
Greg Landrum
bbd615497a Add a MolBundle class (#1537)
* very basics

* add the version to get all matches

* better exceptions, including tests

* documentation and actually add the test code

* responses to review
2017-09-11 13:04:58 -04: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
8dc371619b Fixes github #1544 (#1545) 2017-09-11 08:46:42 -04:00
Greg Landrum
64399a46f0 Fixes github1497 (#1555)
* move detectBondStereoChemistry() into MolOps

* switch more code over to using the new function

* add an addStereoChemistryFrom3D() function. Needs testing still.

* add some tests

* cleanups and rename
2017-09-11 08:37:32 -04:00
Greg Landrum
769e6648e4 Fixes #1489 (#1556)
* move the describeQuery functions to the RDKit namespace.
They are generally useful

* Fixes #1489
2017-09-11 08:34:25 -04:00
Greg Landrum
83691e4f16 Fixes #1281 in a way (#1553)
This actually just causes the molecule processing to fail in a reasonable amount of time; it is not an actual fix to the underlying ring-finding problem
2017-09-08 12:10:07 -04:00
Greg Landrum
5a06022704 R group improvements (#1552)
* Fixes #1550

* might as well update properties on the r groups too

* add option to remove Hs from sidechains;
expose a few more parameters to python;
expose ctor with parameter object to python
2017-09-08 07:49:05 -04: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
Brian Kelley
3d75f5c78f Fixes blanking of non-query atom data when QueryAtomData was being pi… (#1541)
* Fixes blanking of non-query atom data when QueryAtomData was being pickled

* Adds old version pickle test for properties

* Makes pickle py2 and py3 compatible
2017-09-07 20:43:08 +02:00
Paolo Tosco
d756490f7d - Fixes failing build with MSVC (#1547) 2017-09-07 15:45:45 +02:00
Greg Landrum
2f846276ac unsatisfying, but functional (#1525) 2017-08-23 17:25:47 -04:00
Greg Landrum
a7065dc36d fixes #1447 (#1529)
* fixes #1447

* python2 compatibility
2017-08-23 17:25:04 -04:00
Greg Landrum
960c539995 Fixes #1439 (#1530) 2017-08-23 17:24:47 -04:00
Steve Roughley
d03e9b512b Added IsInRing methods to Bond in Java wrapper(addresses #1535) (#1536) 2017-08-18 12:01:15 -04:00
Greg Landrum
3ddb54aeef Fix #1496 (#1517)
* switch from using `[D0]` to `[*]` to ensure single atom fragments are correctly handled in the pattern fingerprint;
Fixes #1496

* update expected reaction similarity results
2017-08-15 13:00:30 -04: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
80eec8f565 Fix #1466 (#1524)
* add GetAtomPairCode to python interface

* not done yet

* finish it
2017-08-12 12:47:00 -04:00
Brian Kelley
7c704c14de Adds canonicalization of atom maps (#1521)
* Adds canonicalization of atom maps

* Removes debugging statments and commented out code

* Fixed bad mapping of mmps with no cores (1-cut), remove sanitization
2017-08-12 05:36:09 +02:00
Greg Landrum
62150f7d80 Squashed commit of the following:
commit 7f7b5268a62eecd260027e0918abbdf62b100034
Merge: 90e9fd3 6dd173d
Author: Greg Landrum <greg.landrum@gmail.com>
Date:   Tue Aug 8 01:19:15 2017 +0200

    merge back to master

commit 6dd173dec6
Merge: 45a94bd e11ad49
Author: Brian Kelley <fustigator@gmail.com>
Date:   Thu Aug 3 07:54:26 2017 -0400

    Merge pull request #8 from greglandrum/dev/rgroup-decomposition

    support using generic iterators in ctor;

commit e11ad49068
Author: Greg Landrum <greg.landrum@gmail.com>
Date:   Tue Aug 1 06:29:52 2017 +0200

    move notebooks to docs

commit 606c03c28f
Author: Greg Landrum <greg.landrum@gmail.com>
Date:   Thu Jul 27 05:13:13 2017 +0200

    support using generic iterators in ctor;
    general comment: this is a useful pattern that we could use elsewhere

commit 45a94bd663
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Wed Jul 26 13:30:23 2017 -0400

    Updates notebooks

commit 8f78ba97d3
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Wed Jul 26 09:00:42 2017 -0400

    Updates notebooks

commit 44728803ae
Merge: d67409d 4d0b00d
Author: Brian Kelley <fustigator@gmail.com>
Date:   Wed Jul 26 08:53:11 2017 -0400

    Merge pull request #7 from greglandrum/dev/rgroup-decomposition

    clean up a couple leaks and some compiler warnings

commit 4d0b00dd2e
Author: Greg Landrum <greg.landrum@gmail.com>
Date:   Wed Jul 26 07:47:56 2017 +0200

    clean up a couple leaks and some compiler warnings

commit d67409da0c
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Tue Jul 25 11:43:14 2017 -0400

    Makes the scoring system more sane

commit 1b5181dc2f
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Tue Jul 25 10:55:33 2017 -0400

    Finalizes enums

commit 7e9ee61556
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Tue Jul 25 10:55:18 2017 -0400

    Fixes constructor botched in the last commit

commit aed2a201bf
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Mon Jul 24 18:22:42 2017 -0400

    Cleans up some code

commit 95e82a1398
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Mon Jul 24 18:14:31 2017 -0400

    Removes unused variable

commit 0b1ed09316
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Mon Jul 24 18:14:23 2017 -0400

    Slight optimization by combining two loops

commit ed3340a516
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Mon Jul 24 13:53:06 2017 -0400

    Fixes post increments in for loops

commit 25b1678a58
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Mon Jul 24 13:52:53 2017 -0400

    Fixes memory leak and doesn’t call SmartsToMol twice

commit 86c8c42688
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Mon Jul 24 13:52:32 2017 -0400

    Adds header guards

commit b043e38d3a
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Mon Jul 24 13:52:25 2017 -0400

    Removes unused variable

commit 631aa77153
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Tue Jul 11 08:10:39 2017 -0400

    Fixes typo in filename

commit d6e0dc753a
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Mon Jul 10 14:48:04 2017 -0400

    Fixes c++11 style enums

commit b9a31eae9a
Author: Brian Kelley <brian.kelley@novartis.com>
Date:   Mon Jul 10 14:00:04 2017 -0400

    Adds RGroupDecomposition attempt
2017-08-08 01:23:49 +02:00
Brian Kelley
90e9fd3459 Removes trailing spaces after \ to fix windows compilation errors (#1516) 2017-08-06 16:38:15 -04:00
Brian Kelley
4eca6e7f5c Fixes atom documentation (#1505) 2017-07-22 06:42:03 +02:00
Greg Landrum
74ef00ec13 Remove xlocale header (#1501)
* do not include xlocale.h, as it was removed in glibc 2.26

According to
https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27
the defines were a subset of locale.h, that we include anyway

* Apparently, clang still needs the header

* include string header
2017-07-20 05:58:35 +02:00
Brian Kelley
d8722b1c64 First entry of the SubstructLibrary module (#1493)
* First entry of the SubstructLibrary module

* Switch to shared_ptrs for memory safety

* run clang-format and add a test

* only build when threadsafe_sss is enabled, only test when test_multithreaded is enabled

* Adds PRECONDITION

* Adds exceptions for out of range errors

* Changes getQueryBits to makeQueryBits for clarity

* Adds API point to add Binary and Smiles directly

* Replaces 0 with NULL for clarity.

* Removes debugging code.

* Makes endIdx non-inclusive

* Adds substruct searching options

* Adds preconditions

* Small documentation cleanup and removes a line of code.

* Add DataStructs library dependency

* Actually uses passed in parameters

* Adds TrustedSmiles/Binary inputs

* Adds more api testing options/trusted smiles and binary inputs

* Finalizes API adds docs and doctests

* Minor copyright fixes and such
2017-07-19 10:39:42 +02:00
Paolo Tosco
cd6d3a8f88 assorted fixes to get the current master branch to build on Windows (#1495) 2017-07-18 08:04:23 +02:00
Brian Kelley
b76af93513 Dev/add update props api (#1479)
* Adds RDProps updateProps API point

* AdjustQuery now copies over original atom data to the query ato

* Preserves existing data on the replacing atom

* Exposes preserveProps to Python replaceAtom/Bond
2017-07-10 04:36:12 +02:00
Greg Landrum
5741d37c39 Support drawing reactions from C++ (#1444)
* expose and test GetDrawCoords()

* very basics are working; still loads of work to do

* very basics are working; still loads of work to do

* symbols and arrows kind of work

* switch to Nadine's approach for drawing
needs more work (like arrows and pluses) but already is not too bad

* better, but agents still to close to arrow and arrow is too short

* add a test for rxns without agents

* fix picking of cid;
drawing reactions without reactants or without products should in theory now work, but additional work is needed to get the arrows to show up

* make reactions without reactants or without products draw properly

* tweak vshift a bit; would be good to have a better solution to this

* do not draw H2O as OH2

* add option to use highlighting to show atom maps

* highlight bonds too

* cleanup

* add drawReaction to the python wrapper

* docs

* remove some printing

* fix (for real) the drawing of degree zero atoms

* ensure ring finding gets done; add some more tests

* add some SMARTS-based tests; these do not work

* improve reactant highlighting in rxn drawing

- define default colors for highlighting of reactants, atom or bonds
in the drawing options
- make highlighting colors customizable through the API

* rename to test4 in prep for merge

* temporarily disable test4 since it does not work anyway

* fix some kekulization problems

* fix YA unicode problem

* remove a stupid typo
2017-07-05 14:25:31 -04:00
Brian Kelley
fada5a3788 Don't build AUTOCORR2D if 3D is turned off (#1487)
* Don't build AUTOCORR2D is 3D is turned off

* Disable autocorr2d test if 3d isn't available
2017-07-02 11:20:08 +02:00
Greg Landrum
db690e5695 Fix for #1478 (#1486)
* Fixes #1478

* minor optimization
2017-07-01 09:03:26 -04:00
Greg Landrum
cf501fab67 Fixes #1472 (#1473)
* Fixes #1472

* handle isotope info too
2017-06-29 20:51:44 -04:00
Paolo Tosco
ea6cfe35ee - updated FindCairo.cmake (#1455) 2017-06-29 20:33:12 +02:00
Paolo Tosco
eec17536fb - fixes PgSQL CMakeLists.txt to enable conda build on Windows (#1457) 2017-06-29 20:31:41 +02:00
Brian Kelley
8784a9e0cf Fixes lookup for HELM Monomer 'D' (#1477) 2017-06-29 18:00:15 +02:00
Greg Landrum
570d403e24 Fix/github1453 (#1463)
* Reset the numBonds count.

NumBonds needs to be reset in clear(). This has been around for a while (Nov 16?) and took Noel a couple of days to track down.

* add a test
2017-06-28 09:31:58 -04:00
Greg Landrum
71932ee4f9 Add a collection of new 3D descriptors (#1467)
* 3D Descriptors Dragons

* stripped down, not yet working

* get this building on a non C++-11 compiler

* move the python test to the python directory

* move the python test to the python directory

* add the python test

* now at least those tests runn

* warning comment

* some basic refactoring and cleanup

* get python wrapper "working" (completely untested)

* fix Name

* fixing AutoCorr & RDF

* AutoCorr test added
* RDF reviewed based on AutoCorr comments

* fix Morse code

* Morse reviewed

* Correct Morse & start Getaway

* correct MORSE test
* start Getaway clean up

* simplification of Whim

* better

* fix Getaway

* fix RCON

* merge repaired

* adding Dragon 2D autocorrelations descriptors

* fix the 3D autocorrelation descriptors based on the modification in
Dragon.
* Adding the 2D autocorrelation descriptors (no need of Eigen
dependency for this one)
* Adding 2D test case
* IState … no idea for the moment
* there is an error in 2D computation (memory error ???)

* fix the IState for molecules with Hs

* need to use getTotalNumHs(true) not getTotalNumHs()
* also need to remove Hs in both dv and d!

* fixing Rcov values

I fix the Rcov values

* fix Getaway

* remove push_back
* remove call to sum
* improve tests

* fix getaway

* adding precision parameter to GETAWAY
* adding rouding (1e-3)

* fix WHIM

* use void in declarations of function
* update MolDescriptors link

* remove print option in WHIM

* fix python wrapper to 3D descriptors.

- all modifications reduce computation time by a factor of 3!

* final fix for Getaway

* all output are fixed except the 2 first values due to clustering
approach.
* cluster cannot be fixed du tu float precision issue between Java &
c++

* best fix of ITH and ISH

* use the same algorithm as in Dragon 6 but there is still a deviation

* remove std::move

* std:move only works on c++ 11

* fixing issue based on Greg Comments

* auto2D still not working on my env

* update 3d test.py

* auto 2D not working after the first loop test

* tighten up the tests

* change name

* update, but still does not pass

* make this run (though it does not work)

* re-enable test3D

* some cleanup

* add GETAWAY test data. Note that the tests fail

* fix the ATS and ATSC autocorrelation 2D

Broto Moreau and Geary autocorrelation are not correct again a specificity of Dragon to compute them. The result are not consistant with Padel because we use the relative weigth not in Padel.

* one minor change to get things to compile

* fix the M & G matrix computation

fix inversion in the computation of the equations for both M & G matrixes

* update autocorr2d tests

* 192 examples

* fix issue in cluster 0.01 0.009 case

this is not correct all the cases

* update GETAWAY expected values to reflect the fact that we cannot reproduce the literature values exactly
fix a leak in GETAWAY

* fix the negative values in gamma

this is strickly the implementation that we find in the book molecular descriptors for chemoinformatics (except the case where an atom is already in the axis in this case it should be added in the symetric list which is not the case in this implementation)

* Update WHIM.cpp

adding the axis atoms to the symetrical list

* update WHIM tests

* add AUTOCORR2D to MolDescriptors and the python wrappers

* start adding tests

* test the python versions of the new descriptors

* update list of descriptors
2017-06-27 18:57:10 +02:00
Greg Landrum
66779dfc8d Some cleanups to make Travis builds faster (#1464)
* a bit of cleanup and modernization

* switch to -j3

* back to -j2

* disable static libs

* allow dynamic linking of swig wrappers

* turn off the py27 builds while we are testing

* Install java and SWIG

* re-enable python2.7
2017-06-18 21:55:24 -04:00
Brian Kelley
044298f91f Fixes sanitizereaction throwing errors with unused rlabels in product template (#1451) 2017-06-14 04:58:50 +02:00
Greg Landrum
d5fd08369b Fixes #1423 (#1424)
* Fixes #1423

* hanoTest fails; otherwise ok

* remove a redundant dir spec on input

* address comments from review

* typo

* typo (sigh)
2017-06-03 09:32:07 -04:00
Greg Landrum
4ffc1c3488 fixes #1435 (#1437) 2017-05-31 08:29:32 +02:00
Greg Landrum
947d7be65c expose and test GetDrawCoords() (#1427) 2017-05-24 17:32:36 -04:00
Greg Landrum
58e594baea Bring back USR and USRCAT descriptors (#1417)
* backup

* cleanup svn droppings

* update URL to Adrian's repo
2017-05-24 16:37:25 -04:00
Greg Landrum
a19d6fec0b fixes #1421 (#1422)
* fixes #1421

* change suggested in review
2017-05-22 17:29:00 -04:00
Greg Landrum
d9db6c3fe6 Fix #1413 (#1414)
* swig csharp wrappers now build

* fix this in a way that does not break the java wrappers
2017-05-20 09:46:29 -04:00
Matt Swain
2e76c90caa Fix cxsmiles parse on VS2008 (#1415)
* Fix cxsmiles parse on VS2008

* Fix other instances of dangerous iterator incrementing

* Fix for modern compilers
2017-05-16 15:02:22 +02:00
Greg Landrum
3a557df24b modify pattern fp order; update expected psql results (#1399)
* move the new pattern to the end of the list so that existing bit definitions stay constant

* update expected results for psql tests
2017-04-19 11:57:48 -04:00
Greg Landrum
5f7e04fe5d Fix github1240 (#1396)
* add a test (currently fails, of course)

* backup, not really working

* Fixes #1240

* a bit more parameter tweaking to get some more structures to embed
2017-04-18 02:33:23 -04:00
Greg Landrum
e9eb89e4b1 Fix #1227 (#1393)
* Fixes #1227

* make only heavy atoms the default with the pre-defined param sets; this may not be the right answer
2017-04-09 10:20:41 -07:00