Commit Graph

124 Commits

Author SHA1 Message Date
Greg Landrum
6152165ad3 Fix/github1287 (#1297)
* Fixes #1287

* unconnected fix to clean up a compiler warning from clang
2017-02-09 13:01:43 -05:00
Brian Cole
9ed4250067 Find potential stereo bonds should return any (#1202)
* Wrap Chem.FindPotentialStereoBonds into Python.

* findPotentialStereoBonds now sets the Bond.GetStereo property of the double bond to Bond::STEREOANY.

Some of the doc strings indicated this as the desired behavior, but
some others also indicated otherwise. So I've cleaned up and
refactored those doc strings as well to be consistent. Pulled all the
doc string comments from the .cpp file up to the .h file and merged
all the necessary prose, including adding some about the fact rings
are ignored.

Previously, users would have to test the size of the GetStereoAtoms
vector to determine whether this function found potential double bond
stereo. Testing for Bond::STEREOANY instead is way more straight
forward.
2016-12-17 05:37:30 +01:00
Greg Landrum
01adeee54c removes the 32bit problem (#1187) 2016-12-05 22:58:50 -05:00
Brian Cole
902a7b81bb Wrap DetectBondStereoChemistry in python (#1156)
* Expose RDKit's DetectBondStereoChemistry to python.

* Adding a test case for DetectBondStereoChemistry from python.

This test case ensures a new molecule can be constructed from scratch
and DetectBondStereoChemistry detects the correct bond stereo from the
3D coordinates alone.
2016-11-10 21:41:25 +01:00
Greg Landrum
38dde43411 add some additional parameters tests to python wrapper;
fix typo in python wrapper
2016-11-06 10:09:57 +01:00
Greg Landrum
1b946794f0 replaceBond and generic atoms and bonds in adjustQueryProperties() (#1141)
* first pass at RWMol::replaceBond()

* get ready for the changes

* rename some options
add bond options (not doing anything with them yet)
update tests to reflect new options

* backup

* re-enable the rest of the tests
2016-11-04 12:41:06 +01:00
Brian Kelley
71a0ae32b2 Adds replaceCore function that takes a matchVect (#1013)
* Adds replaceCore function that takes a matchVect

* Fixes error reporting, adds tests

* Switches PRECONDITION to ValueError exceptions

* Fixes MatchVectType annoyance in swig.  Don't know why this is necessary.

* Silences warnings

* Adds working doctests and better explanations.
2016-08-17 04:40:59 +02:00
Brian Kelley
fe7d4fefb3 Dev/chemtransforms chirality (#1006)
* Adds useChirality to replaceCore, fixes atom ordering
  n.b. when replaceDummies==False and labelByIndex==True
   the indices used are the indices of the dummy atom,
   previously they were the atoms the dummy was connected
   to.

* Adds useChirality to the remaining functions in ChemTransforms

* Adds a mess o tests

* Fixes labelByIndex=false ordering for dummies

* Removes debugging statements
2016-08-09 04:41:36 +02:00
Greg Landrum
435a34df4f Expose the aromatizeIfPossible parameter to python (#991)
- Add tests for that
- Improve the C++ tests for aromatizeIfPossible
2016-07-26 13:17:41 -04:00
Greg Landrum
d63f44cc0c Add cartridge support for adjustQueryProperties() (#949)
* backup commit

* Change the names and meanings of MolOps::AdjustQueryWhichFlags
What was there before was not flexible enough and was extremely confusing. This should clear that up.

NOTE: this does break backwards compatibility with code that uses this enum, but given that this is new and has not been
widely promoted, I suspect it should not affect that many people. The default behavior of MolOps::adjustQueryProperties()
remains the same.

* adjust to the new AdjustQueryWhichFlags

* add mol_adjust_query_properties tests to the cartridge
2016-06-21 14:38:32 -04:00
Greg Landrum
452ed7156f Add support for a simplified aromaticity model. (#942)
* first pass

* Fixes #623

* fix a merge problem

* move the aromaticity perception to a helper fn

* python doc update

* replace setSimpleAromaticity() with a parameter to setAromaticity()

* add simple test for the custom aromaticity function
2016-06-17 17:48:20 -04:00
Nadine Schneider
d3f9d7c6e1 RDKFingerprint: add an unfolded count-based version of the RDKFingerprint
- add a bitinfo map to the RDKFingerprint
- refactor some code to largely avoid code duplicates
2016-04-01 09:10:47 +02:00
Greg Landrum
f595f891f6 rename rdk_unique_ptr to rdk_auto_ptr
add C++11 compatibility
2016-02-13 14:58:35 +01:00
Greg Landrum
44c85749c9 get rdmolops building 2016-02-13 08:07:58 +01:00
Greg Landrum
4f2aa0f51e Fixes #758 2016-02-08 16:11:22 +01:00
Greg Landrum
79e1f8b1fa compiles without numpy warnings, all tests pass on ubuntu 15.04 with numpy 1.10 2015-11-28 06:49:34 +01:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Greg Landrum
e37296d7c7 post review 2015-11-14 08:08:14 +01:00
Brian Kelley
fbf9225172 Fixes more unused parameters 2015-10-18 16:07:57 -04:00
Brian Kelley
daa7e62258 Fixes signed conversion issues (use rdcast) 2015-10-18 15:16:38 -04:00
Brian Kelley
5f59333a56 Silences unused parameters 2015-10-18 14:02:29 -04:00
Brian Kelley
403a3d6b7c Suppresses Boost warnings 2015-10-18 13:41:03 -04:00
Greg Landrum
a743cff4d7 Fixes #573 2015-09-20 04:44:39 +02:00
Greg Landrum
0ed27ca9d4 add python docstrings 2015-08-22 07:51:13 +02:00
Greg Landrum
8596c6f9ad add support for converting dummies to queries 2015-08-22 05:43:42 +02:00
Brian Kelley
020a9a8f36 Change merge_unmappped_only to more consistent mergeUnmappedOnly 2015-04-26 09:03:28 -04:00
Brian Kelley
61dd0b16a5 Add merge_unmapped_only option to MergeQueryHs
By default all atoms are merged, however when
this flag is true, any mapped atom will convert
explicit Hs to implicit.  This is due to not
wanting to convert mapped hydrogens taking
part in reactions.
2015-04-23 09:54:23 -04:00
Greg Landrum
33d538242d switch GetShortestPath() to return a tuple instead of a list 2015-04-22 05:58:21 +02:00
Greg Landrum
63ceb09714 add range checking to the new GetShortestPath() 2015-04-22 05:51:17 +02:00
Paolo Tosco
a9c7a08467 - added a Python wrapper for getShortestPath()
- added a relevant test to Code/GraphMol/Wrap/rough_test.py
2015-04-22 00:39:09 +01:00
Greg Landrum
c1704daccd support supplying highlight radii 2015-03-04 07:21:03 +01:00
Greg Landrum
051ff124bb attend to the atom circling and line width multiplier arguments from python 2015-02-08 06:17:10 +01:00
Greg Landrum
f73307270b support confIds in drawing 2015-02-08 06:16:31 +01:00
Greg Landrum
7fa02f748b Fixes #430 2015-02-04 13:45:47 +01:00
Greg Landrum
c41ffea23b add full argument set to removeHs python wrapper 2015-01-30 07:20:06 +01:00
Greg Landrum
6dabc2b42f Replace the SVG generator exposed to python with the new one 2015-01-15 05:08:43 +01:00
Greg Landrum
4db5fcef52 initial pass at #163 2014-12-19 13:48:51 +01:00
Greg Landrum
69be35684f reorder the results for that cutsPerAtom case 2014-11-26 07:50:42 +01:00
Greg Landrum
3f23c91eba did not have the version for breakSomeBonds() quite right 2014-11-22 10:42:17 +01:00
Greg Landrum
1725e22cca allow tracking the number of cuts made by the fragmentation code on a per-atom basis 2014-11-22 07:57:39 +01:00
Greg Landrum
e6574531b7 update a couple docstrings 2014-10-26 05:18:32 +01:00
Greg Landrum
288feb7a8a support partial fragmentation on bonds;
Fixes #288
2014-07-02 05:47:02 +02:00
Greg Landrum
e4cfc340a4 support white and black lists for getMolFragsWithQuery 2014-03-25 08:18:30 -04:00
Greg Landrum
196c2278fb Fixes #234 2014-03-17 08:33:07 +01:00
Greg Landrum
9f4471f872 more on #204
A few other cleanups
2014-02-06 06:43:28 +01:00
Greg Landrum
d7971cc40c Fixes #171 2013-12-06 06:54:31 +01:00
Greg Landrum
8503b49b75 add MolOps::get3DDistanceMat() 2013-12-01 07:57:20 +01:00
Greg Landrum
b60b26039c add bondTypes and associated tests for FragmentOnBonds() 2013-11-02 07:54:10 +01:00
Greg Landrum
05b3c95473 add docs 2013-10-30 05:25:38 +01:00
Greg Landrum
afb9f1ddfa add fragmentOnBonds() to python API
Fixes #142
2013-10-30 04:59:29 +01:00