Commit Graph

3370 Commits

Author SHA1 Message Date
Greg Landrum
27f82686ef remove c++11 bits 2018-01-21 06:51:14 +01:00
Greg Landrum
3fcb34ca4a get this compiling 2018-01-21 06:01:57 +01:00
Paolo Tosco
33e262a066 - cosmetic fix of an indentation (#1717)
- added dependency from Boost include files to COde/PgSQL/rdkit/CMakeLists.txt to allow conda rdkit-postgresql95 build
2018-01-20 15:10:26 +01:00
Greg Landrum
25c1a01967 Allows CIS/TRANS double bonds to be de-pickled (#1710) (#1711)
* Fixes #1710

* add an additional test for #1563 while we're here
2018-01-20 15:09:52 +01:00
Greg Landrum
6c86cb4463 part of fix for #1703 2018-01-20 15:09:14 +01:00
Greg Landrum
af91e415f9 Fixes #1703 (#1714)
* does not actually work

* all tests pass;
Fixes #1703

* make that a bit cleaner
2018-01-20 15:09:06 +01:00
Greg Landrum
ed08c7d318 Fixes github #1702 (#1706)
* Fixes #1702

* more on #1702
2018-01-20 15:07:57 +01:00
Greg Landrum
6c726a447e backport the fix for #1695 2018-01-20 15:07:34 +01:00
Greg Landrum
ef481b1be1 Fixes #1691 (#1718)
* add the relevant tests

* Fixes #1691
2018-01-20 15:07:11 +01:00
Brian Kelley
de7a21a9b7 Fix/rgroup prefer matching nonhs over hs (#1707)
* Tweak the scoring function to penalize non h matches considerably.  Only full H rgroups get a one.  Might need to tweak int the future

* Scale the hydrogens as 1/# mols unless they are a full group
2018-01-20 15:06:30 +01:00
Greg Landrum
32e9b9f2f0 get this compiling with older gcc 2017-12-02 07:06:33 +01:00
Greg Landrum
4fc86841c9 Fixes #1668 (#1669)
* Fixes #1668

* add test for the additional Bi valence
2017-12-02 05:55:41 +01:00
Matt Swain
62f88303bb Use numpy not numeric for boost 1.65+ - fixes #1581 (#1664)
boost python numeric no longer exists in boost 1.65, so check boost version and conditionally use boost python numpy.
2017-12-02 05:55:20 +01:00
Greg Landrum
ac55b5a9f5 Fix github1657 (#1665)
* re-enable some tests that were commented out (also reformatting)

* re-enable some tests that were commented out (also reformatting)

* Fixes #1657
2017-12-02 05:54:51 +01:00
Brian Cole
e2fe6d8429 Make sure EmbedMultipleConfs is deterministic for very large seeds and a seed of 0 (#1635)
* Make sure EmbedMultipleConfs is deterministic for very large seeds and a seed of 0.

Fixing two distinct bugs:

- A randomSeed of 0 didn't use '0' as the seed even though the
  documentation said that it should.

- Very large seeds could overflow the 'int' representation during
  calculation of a new internal seed. This would make
  EmbedMultipleConfs non-deterministic even though the user provided a
  valid seed.

* Adding a C++ test for case pull request #1635.
2017-12-02 05:50:57 +01:00
Greg Landrum
894de65bde Enable windows build that uses cairo (#1628)
* add cairo to moldraw2d wrappers link (for windows)

* add ChemReactions to moldraw2d wrappers link (for windows)

* add SmilesParse to moldraw2d wrappers link (for windows)
2017-12-02 05:46:18 +01:00
Greg Landrum
effde2e6a6 get this to compile on windows 2017-12-02 05:45:51 +01:00
Noel O'Boyle
7ad941f2f5 Add support for %(NNN) notation for ring closures (#1624)
* Add support for %(....) notation for ring closures

* add the .cmake files

* add the extended numbering to SMARTS as well

* and the .cmake file
2017-12-02 05:44:23 +01:00
Greg Landrum
20e62cf6b1 Fixes #1605 (#1606) 2017-10-07 07:08:56 +02:00
Greg Landrum
0775cf0da5 add substructure searches of Mols using MolBundles from Python (#1603) 2017-10-03 17:46:44 -04:00
Greg Landrum
28f8421644 set atom->setQuery() to delete old query (#1604)
adjust the rest of the code to respect that
2017-10-03 17:46:06 -04:00
Greg Landrum
c0d3842df1 get the new code building with the old compiler (#1601) 2017-10-02 09:37:18 +02:00
Greg Landrum
a6faf74e1c switch to using boost::isnan instead of std::isnan, which does not exist in MSVC2010 (#1598) 2017-10-02 05:02:26 +02:00
Greg Landrum
6ed76d9fff Expose the MolBundle to python (#1583)
* backup

* initial mol bundle wrapper

* Move the substructure matching wrapper code to a template header file to clean stuff up.

* update python docs
2017-09-26 13:00:53 -04:00
Greg Landrum
96b092177e [WIP] add threshold argument to maxmin picker (#1587)
* add threshold argument

* expose the new options to python
not yet tested, but it at least compiles

* support threshold on the python side;
fix a bug with the way the threshold is returned
2017-09-26 12:49:33 -04:00
Greg Landrum
56b472ef97 Support continuous highlighting in drawMolecules(). (#1579)
Add a fillHighlights option to DrawOptions
2017-09-22 07:25:17 +02:00
Greg Landrum
4862c920a5 Fixes github1567 (#1576)
* Fixes #1567

* update expected results

* some cleanup and documentation
2017-09-19 08:04:18 -04:00
Greg Landrum
fd3524f77c Optimization of the MaxMin diversity picker (#1574)
* initial submission; needs review

* minor

* line endings

* remove cache functionality since it's now redundant

* add test data

* add a test

* changes from review
2017-09-17 09:13:14 -04:00
Greg Landrum
c21605dbea SMILES lexer optimization/enhancement (#1575)
* needs testing

* add some tests, update periodic table

* update isotope data from NIST
2017-09-17 09:12:53 -04:00
Brian Kelley
2fbf74c06e Fixes double free for Dict::update (#1571)
* Fixes double free for Dict::udpate

* fix a leak

* Dict.update now behaves like python's update (i.e. replaces existing values)
2017-09-16 04:44:50 +02:00
Patrick Avery
f30dea195f Added C++ version of getBestRMS() (#1568)
getBestRMS() was previously a Python-only function. This
adds a C++ version of the function, and replaces the old version.
2017-09-16 04:44:06 +02:00
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