Commit Graph

167 Commits

Author SHA1 Message Date
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
4fc86841c9 Fixes #1668 (#1669)
* Fixes #1668

* add test for the additional Bi valence
2017-12-02 05:55:41 +01:00
Greg Landrum
20e62cf6b1 Fixes #1605 (#1606) 2017-10-07 07:08:56 +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
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
960c539995 Fixes #1439 (#1530) 2017-08-23 17:24:47 -04: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
db690e5695 Fix for #1478 (#1486)
* Fixes #1478

* minor optimization
2017-07-01 09:03:26 -04:00
Greg Landrum
e625c58bab Add cis/trans tags to double bonds (#1316)
* add cis and trans to bond stereo

* compiles, does not work

* tests all pass

* Whitespace cleanup to recent changes.

* C++ test case for Bond::setStereo using Bond::STEREOCIS and Bond::STEREOTRANS

* Adding a PRECONDITION to Bond::setStereo to make sure the stereo atoms
are already specified if CIS or TRANS is being specified.

E/Z is technically defined by the topology of the molecule so the
stereo atoms are redundant (easier to understand and use!), but
ultimately redundant with the graph. However, CIS and TRANS is _only_
defined in this usage as the orientation of the atoms in the
getStereoAtoms vector.

* Exposing Bond::setStereo to Python and adding test cases to make sure
it can be used to set CIS/TRANS stereochemistry.

* verify substructure matching works

* Adding Bond::setStereoAtoms to C++ Bond class.

This allows setting the atoms to be considered for CIS or TRANS
directly without a much more costly determination of ranking that E/Z
requires.

* Wrap Bond::SetStereoAtoms into python with a new type of test case.

* docs
2017-02-26 08:15:44 -05:00
Greg Landrum
6509e52611 Fixes #1230 (#1231)
* Fixes #1230

* add a test for cleanIt = False
2016-12-23 13:02:15 -05:00
Greg Landrum
97916ef894 Fixes #1204 (#1212) 2016-12-19 12:50:28 -05: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
Greg Landrum
9dcef9ac57 Fixes #607 (#1075) 2016-09-23 04:57:07 +02:00
Greg Landrum
91674e6482 Fixes issue #1021 (#1026)
* Fixes #1021, kind of.
The test for the bug passes, but there are other failures

* all tests except hanoi pass

* passes all tests

* remove some vestigial code

* remove debug-droppings

* minor documentation
2016-08-30 18:59:10 +02:00
Greg Landrum
7fd991e13d Fixes #962 (#1003) 2016-08-05 07:57:20 -04:00
Greg Landrum
339fa081e5 Merge fix/github908 branch 2016-07-27 04:49:55 +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
Brian Kelley
659ac6cb27 Adds aromatization and reaction options to AdjustQuery (#965)
* Adds aromatization and reaction options to AdjustQuery

 aromatizeIfPossible - checks kekulized queries for
    aromatic compatibility
 adds IGNORE_MAPPED and IGNORE_ATTACHEDRGROUPS options
  to adjustDegree

* Missed return false.

* Removes IGNOREATTACHEDRGROUPS
2016-06-29 05:09:30 +02: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
ca1d3015ef update a test 2016-06-21 06:25:08 +02: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
Brian Kelley
45ab3505dc AddTee is now SetTee (#930) 2016-06-01 04:46:27 +02:00
Greg Landrum
e846a96123 Fix github #868 (#925)
* fix an incorrect status message

* Fixes #868

Switch the warning to only occur if we have a non-negated atomic number query with value=1
2016-05-31 13:23:21 -04:00
Greg Landrum
1c56b07f66 cleanups of RDLog's tee behavior (#926)
- rename RDLog::AddTee()->RDLog::SetTee()
- remove a leak when RDLog::SetTee() (formerly AddTee()) is called twice
- add RDLog::ClearTee() method to allow RDLog::SetTee() to be safely used with a stream that goes out of scope.
2016-05-30 10:04:59 -04:00
Greg Landrum
06818ee0ed improve error reporting for kekulization failures (#919)
* improve error reporting for kekulization failures
Connected to #917

* better phrasing of the message.
2016-05-23 16:10:08 -04:00
Greg Landrum
f762346ced make the perchlorate cleanup pattern more generic to cover all halogenates;
Fixes #115
2016-04-01 07:54:32 +02:00
Greg Landrum
6a4a032e92 Fixes #518 2016-03-21 16:57:12 +01:00
Greg Landrum
d7d95dd684 an alternate approach to fixing #805 2016-03-13 04:21:36 -07:00
Greg Landrum
ed7b7b8a37 Fixes #805 2016-03-09 08:47:29 +01:00
Greg Landrum
027d231e38 add a test (still fails) 2016-03-09 07:27:11 +01:00
Greg Landrum
da46a3d80f Merge remote-tracking branch 'origin/master' into fix/Issue694 2016-02-20 02:35:29 +01:00
Greg Landrum
250a8abbd4 removed a diff-dropping 2016-02-17 05:57:08 +01:00
Greg Landrum
38f8a92d2b Fixes #754 2016-02-17 05:15:53 +01:00
Greg Landrum
b0b9ed632f add first test (it fails) 2016-02-17 05:15:30 +01:00
Greg Landrum
0ee4ce4b8c add a test 2016-02-16 14:02:33 +01:00
bp-kelley
84b4122f6b Merge pull request #759 from greglandrum/dev/github758
Add argument to addHs allowing only certain Hs to be considered
2016-02-12 17:24:08 -05:00
Greg Landrum
4f2aa0f51e Fixes #758 2016-02-08 16:11:22 +01:00
Juuso Lehtivarjo
2ad2b03c4a Bug fix to getShortestPath 2016-02-08 11:27:08 +02:00
Greg Landrum
70c2995cf8 Fixes #717
This changes the CIPCode and CIPRank atom properties to no longer be computed properties.
Note: under linux I was unable to actually get the bug to manifest (converting the uint property to an int didn't cause problems), but that doesn't mean it shouldn't still be fixed.
2016-01-06 03:45:14 +01:00
Greg Landrum
23d7df99f0 Fixes #678 2015-12-17 04:11:21 +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
54311dff9c Suppresses warnings in tests 2015-10-18 16:09:58 -04:00
Greg Landrum
c5a7371202 Fixes #584 2015-08-27 10:00:35 +02:00
Greg Landrum
8596c6f9ad add support for converting dummies to queries 2015-08-22 05:43:42 +02:00
Greg Landrum
a7383e7861 first pass at #567 2015-08-21 16:45:00 +02:00
Greg Landrum
cf17b14c12 add a couple more test cases that came up independently 2015-07-17 03:40:41 -04:00
Paolo Tosco
5dfbecd6d0 - fixed missed kekulization of aromatic carbocations such as cyclopropenyl
and tropylium
2015-07-17 01:00:34 +01:00
Paolo Tosco
48396640c1 - fixed lack of tropylium/ciclopropenyl cation aromaticity perception
- added a test for allyl cation conjugation
- added a test for tropylium/ciclopropenyl cation aromaticity
2015-07-16 20:05:46 +01:00
Greg Landrum
a7a2ee9a62 Fixes #526 2015-06-20 04:54:54 +02:00