Commit Graph

55 Commits

Author SHA1 Message Date
Greg Landrum
3637cd4d75 Fixes Issue 1614 (#1781)
* This makes assignStereochemistry cleanIt=True not remove CIS/TRANS
bond stereo chemistry that was manually added as described in issue #1614.

Incorrect CIS/TRANS stereochemistry will still be removed by
'cleanIt=true' if symmetry is detected. However, this symmetry
detection doesn't work in more complex pseudo-stereo chemistry cases:
bond stereo that depends on other bond stereo to break symmetry; and
bond stereo that depends on other atom stereo centers to break
symmetry. Test cases for these cases have been added ifdef'd in based
on USE_NEW_STEREOCHEMISTRY.

However, getting USE_NEW_STEREOCHEMISTRY to work in a copacetic way is
not trivial, I tried a little bit here to no avail. I'm leaving the
test cases checked in as they should be useful when we decide to make
the plunge into using Canon::chiralRankMolAtoms for symmetry detection
instead of the CIP ranks.

So this fixes at least the glaring issue of STEREOCIS and STEREOTRANS
being incorrectly removed by 'cleanIt=true' when it is indeed valid
stereo. The checks made for symmetry are rudimentary, but don't feel
complete.

* add another test; make what's being tested explicit

* test smiles generation and function when Hs have been added

* add a test that fails

* I think that it's ok to remove this

* backup

* At this point all tests pass.
Bond wedging is now handled even if sanitization is turned off when mol files are read

* adjust to code changes

* fix a couple problems caused by rebase

* update docs
2018-04-01 17:48:36 +02:00
Greg Landrum
3f136946e3 Start using "*" instead of "[*]" in SMILES (#1788) 2018-03-23 15:52:52 -04:00
Brian Kelley
87dda6acd2 Fixes #1735 (#1743)
* Fixes #1735

I’m unsure if this is the correct solution, it appears
empty molecules never initialize their rings.

* Return immediately when ranking empty molecules

* Make github issue the correct one

* Always resize results to the number of atoms
2018-02-15 05:39:02 +01:00
Paolo Tosco
503b84995c - make bond stereo detection in rings consistent (#1727) 2018-02-01 04:28:10 +01:00
Greg Landrum
d15efc1ac9 Make the defaults for some functions less error prone. (#1690)
* auto generate coords in mol block writer if includeChirality = True

* default to include chirality when writing mol blocks/files

* make isomeric smiles the default; note that not all tests are passing at the moment

* update a reaction test

* update expected cartridge search results
at this point all python, c++, and cartridge tests pass

* docs

* update incompatibility docs

* update doctests

* these now build

* minor example update

* update expected c++

* typo

* make allowCXSMILES=true the default

* add auto perception of chirality when reading 3D structures from mol blocks

* explain changes in release notes

* further doc update
2017-12-22 08:09:36 -05: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
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
f2c1a95c6e Fixes #1294 (#1302)
* Fixes #1294
There was no reason to require only two ring bonds.

* code now matches the docs
2017-02-10 08:50:28 -05:00
Greg Landrum
d0ed0e900c Fixes #803 2016-03-09 05:05:33 +01:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Greg Landrum
acf69ea1b8 Fixes #553 2015-08-09 07:19:46 +02:00
Nadine Schneider
47dbaf2304 Fix: ring stereo chemistry was swapped incorrectly 2015-02-11 18:21:15 +01:00
Greg Landrum
2d9f809770 fix some broken tests; pyDistGeom is still failing 2015-01-23 06:43:12 -05:00
Greg Landrum
6d7b2b0914 merge with master 2015-01-22 06:30:51 -05:00
Brian Kelley
95a92282d1 Dictionary access is saniztized and optimized.
o rdkit gains a RDKit::common_properties namespace that contains common string value properties

 o Dict.h and below gain getPropIfPresent that attempts to retrieve a property and returns
  true/false on success or failure.  This is used to optimize access.

 o rdkit learns how to pass property keys by reference, not value.

A new namespace has been added to RDKit, common_properties
that contains the std::string values for commonly used
properties.  This helps to avoid typos in string values
but also avoids a creation of std::strings from character
values.  All accessors (has/get/clear and getPropIfPresent) now pass
the key by reference.

Additionally, getPropIfPresent removes the double lookup
of hasProp/getProp which can be a significant speedup
in the smiles and smarts parsers (10-20%)
2015-01-15 12:23:29 -05:00
Greg Landrum
9f36ec2534 now testChirality passes 2014-12-29 07:26:25 +00:00
Greg Landrum
9d55833ec1 testChirality passes with the exception of the one test that is commented out
(testIssue2705543)
2014-12-24 06:16:20 +00:00
Greg Landrum
ab0f1dcf60 rename to new_canon (probably should come up with a better name, but this will do for now) 2014-12-22 07:56:26 +00:00
Greg Landrum
e17d93078f remove most everything from RankAtoms.h; remove RankAtoms.cpp from the files included in the build.
This compiles, but has yet to be tested.
NOTE that there are untested mods in testChirality.cpp that may not work
2014-12-22 06:58:54 +00:00
Greg Landrum
bc96ccdf1b Merge with master 2014-12-21 07:36:24 +01:00
Greg Landrum
b640be11d9 some cleanup 2014-12-19 13:49:16 +01:00
Greg Landrum
7fb24da423 merge with master 2014-09-21 21:06:40 +02:00
Greg Landrum
a94ce46a43 smiles tests now pass as well 2014-08-27 22:32:49 +02:00
Greg Landrum
e170195421 backup commit; this does not completely work yet 2014-08-03 08:01:58 +02:00
Greg Landrum
6f909ed449 switch chirality to using unsigned ints 2014-07-27 08:09:00 +02:00
Greg Landrum
0839cf41ad Fixes #210 2014-02-03 05:25:27 +01:00
Greg Landrum
c95d57aa54 add in-place form of addHs() 2013-10-04 07:58:53 +02:00
Greg Landrum
c82e1151b3 Fixes #90 2013-08-23 12:58:41 +02:00
Greg Landrum
40ab2c06e3 Fixes #87 2013-08-21 08:20:19 +02:00
Greg Landrum
24e269f8ac I *think* that this fixes sf.net issue 40:
the long-standing problem with ring stereochemistry and canonicalization
2012-11-02 06:33:11 +00:00
Greg Landrum
b96cff10e8 fix and test sf.net issue 254 2012-09-23 10:13:46 +00:00
Greg Landrum
3a3b582d28 clean up + add support for D and T in molecular formula 2012-07-27 06:16:45 +00:00
Greg Landrum
a3dc23c43c more canonicalization improvements
there are still some problems with double bonds
2012-06-11 03:21:30 +00:00
Greg Landrum
5eadc06bf6 fix and test for issue 3453172 2011-12-30 07:13:33 +00:00
Greg Landrum
2ffaa92cf7 fix and test issue3228150;
note that as part of these changes MolToSmiles and MolToSmarts no longer have
side effects on the original molecule.
2011-03-26 06:51:50 +00:00
Greg Landrum
d6741adc22 make some types more explicit in MolOps.h (easier SWIG wrapping)
support finding non-specfied chiral centers
remove vestigial GetFragmentSmiles() function
additional flexibility in AllChem.TransformMol()
2011-02-24 08:00:39 +00:00
Greg Landrum
3b3d44db16 remove exe property from source files 2011-01-13 04:22:56 +00:00
Greg Landrum
006c696067 an inital pass at a solution to adding support for stereochemistry of ring bonds (bug 3139534);
this needs a ton more testing, but it is worth getting a "working" version in
2010-12-28 10:38:14 +00:00
Greg Landrum
f3fbef45c5 update copyright statements 2010-09-26 17:04:37 +00:00
Greg Landrum
80c0a8825e fix issue 3009836; partial fix for issue 3009911 2010-06-01 17:54:49 +00:00
Greg Landrum
2805355f34 First pass at the rewrite:
this gets rid of all the "preceding atom" code and passes all tests on linux

builds on other OS's and more extensive regression testing is required
2010-05-31 14:08:11 +00:00
Greg Landrum
96adbc11ea remove the deprecated assign{Atom,Bond}ChiralCodes functions 2009-08-02 15:33:08 +00:00
Greg Landrum
268b08ec17 fix and test sf.net issue 2804599 2009-06-11 04:55:44 +00:00
Greg Landrum
e3ebc00ed5 fix and test bug 2762917 2009-04-15 04:39:10 +00:00
Greg Landrum
09455ef42e resolves issue 2705543 2009-03-28 06:43:04 +00:00
Greg Landrum
a412664c65 just for backup 2009-03-27 16:12:54 +00:00
Greg Landrum
6042af28b9 add removeStereochemistry function to MolOps 2009-03-06 09:55:53 +00:00
Greg Landrum
9ac8b25d4b make ring stereochemistry in output SMILES at least correct (if not canonical);
move the incorrectness warning to the SMILES writer
2008-12-06 06:51:52 +00:00
Greg Landrum
ac4eee9115 continuing refinement of issue 1896935 2008-12-03 19:53:51 +00:00
Greg Landrum
a61cc8a07b fix a ring-stereochem edge case 2008-12-03 17:04:01 +00:00