44 Commits

Author SHA1 Message Date
Ricardo Rodriguez
d3d4170e7c CXSMILES: do not add separators for unserializable Substance Groups (#9048)
* do not write extra separators

* add a test

* update tests

* Update Code/GraphMol/SmilesParse/CXSmilesOps.cpp

---------

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2026-01-27 12:35:18 +01:00
Greg Landrum
0ee90279b5 Partial fix to a problem with implicit Hs being written to SMARTS (#8893)
* Partially resolve a problem with implicit Hs ending up in SMARTS

* update doctest

* document in release notes
2025-10-24 07:50:06 +02:00
Brian Kelley
a7deb6fb8d Implements #8222 adds react_idx (index of reactant) to product atoms (#8231)
* Implements #8222 adds react_idx (index of reactant) to product atoms

* Remove react_idx from mol enumerator products

* Response to review, add test to ensure product only atoms aren't tagged

* Reenable tests
2025-02-06 17:07:55 +01:00
Hussein Faara
44364fd982 remove no-op macros and dead code (pt 4) (#8037)
* remove no-op macros and dead code (pt 4)

* review comments
2025-01-26 07:49:50 +01:00
Greg Landrum
2f119c2693 Convert reaction fingerprinter to use FingerprintGenerators (#7931)
* FingerprintGenerator improvements

1. simplify construction by adding ctors taking FingerprintArguments
2. remove inexplicable boost::noncopyable from FingerprintArguments

* Switch FingerprintType to be an enum class

* Fixes #7521

* dumb mistake

* initialize everything

* get the defaults right

* Update Code/GraphMol/ChemReactions/ReactionFingerprints.cpp

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>

---------

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
2024-10-31 06:58:02 +01:00
Kollin Trujillo
2e5f7ce80c Support Writing CX Extensions for Reactions (#7838)
* Support writing CX extensions in reactions

* fixed merge conflicts

* wip

* Updated for getCXExtensions

* Refactored and deleted extraneous file.

* Updated function signatures

* Updated some tests

* Removed extraneous include from debugging

* Removed comment in reactionwriter.cpp

* Updated some tests with expected strings

* Updated to add logging for linknodes and substance group hierarchies

* Addressed some issues

* updated tests

* Addressed Greg's comments

* Updated for recommendations

---------

Co-authored-by: Rachel Walker <rachel.walker@schrodinger.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2024-10-24 19:31:04 +02:00
Greg Landrum
df51a2def3 Fixes #7699 (#7904)
* Fixes #7669

Still need to add:
- testing for bond stereogroups
- code to handle the cases where the stereogroups should not be copied over

* backup

* stereogroups in the product templates take
priority over stereogroups in the reactant

* stereogroups in the product templates take
priority over stereogroups in the reactant

* backup

* fix handling of existing stereo groups
Atoms which are in template stereogroups are removed from reactant stereogroups,
but otherwise reactant stereogroups are preserved.

All tests pass

* response to review
2024-10-16 16:21:52 +02:00
Greg Landrum
1790de84d3 Fixes #7675 (#7680)
* Fixes #7675

* update expected psql results
these changed because of the version bump to the pickles
2024-08-02 09:24:34 +02:00
Greg Landrum
86f197caac Fixes #7674 (#7681)
* Fixes $7674

* typo
2024-08-01 17:19:58 +02:00
Brian Kelley
2b99ee477c Allow fragments to be grouped in cdxml (#7529)
* Allow fragments to be groups in CDXML

* Add support for grouped reactants

* run clang-format

* Change github issue to 7528

* Add documents to the code

* response to review, check grouped reactants in cdxml against rxn file

* Remove unused code

* Add missing file

---------

Co-authored-by: Brian Kelley <bkelley@relaytx.com>
2024-06-23 07:02:19 +02:00
Greg Landrum
2bc3a2d3e2 Allow disabling output of dative bonds to SMILES (#7384)
* basic code to convert dative to single if we aren't outputting dative to the SMILES

add forms of GetAtomSmiles() and GetBondSmiles() that take SmilesWriteParams

* dative/coordinate bond support when writing CXSMILES

* expose all of that to Python

* remove usage of _doIsoSmiles property
add params to smarts writers

* allow disabling dative bonds in SMARTS

* typo

* add support to the reaction writers

* support params for SMARTS
2024-05-25 06:48:55 +02:00
Ricardo Rodriguez
d71e82179d Fixes #7375 (#7381)
* check for ringinfo levels instead of init

* check for ring info in kekulizefragment

* add a test

* update tests

* update doctests

* revert ringinfo level checks
2024-05-16 09:13:32 +02:00
Greg Landrum
aa4602f6d2 Adds a new function to sanitize the components of a reaction like molecules (#7116)
Fixes #7108
2024-02-02 18:14:27 +01:00
Greg Landrum
3f1a4b1d6a support sanitization of reaction product templates (#7095)
* support sanitization of reaction products as well
enable that by default for CDXML
remove a deprecated usage from the CDXML reaction parser

* retrigger checks
2024-01-31 17:16:38 +01:00
Greg Landrum
f1fd4dda0b Fixes #7028 (#7091) 2024-01-25 20:59:58 +01:00
Greg Landrum
7807958c29 add a test for Github #6492 (#7045)
the issue is already fixed
2024-01-18 05:03:10 +01:00
Greg Landrum
a2ecd6723c Fixes #5819 (#6897)
* Fixes #5819
still some things to think about there

* test parsing

* make sure the fix for 5819 also shows up in reactions

* patch some other holes
2023-11-22 17:35:58 +01:00
Greg Landrum
2957ab4576 switch to catch2 v3 (#6898)
* switch to catch2 v3
Fixes #6894

* fix a couple of problems noticed in the CI builds

* more warning cleanup

* changes in response to review
2023-11-15 06:45:42 +01:00
Greg Landrum
42c09f5237 Fixes #6818 (#6820)
* make sure that a full build and test can work even if boost::iostreams is not being used

Hopefully nobody every actually needs this, but as long as we supply the option, the tests should actually work

* update doctests for that change
2023-10-22 05:23:05 +02:00
Greg Landrum
ac54eb3209 Add an in place version of most of the MolStandardize functionality (#6491)
* reionizer and uncharger and normalizer can now operate in place

* add removeUnmatchedAtoms argument to in-place version of runReactant

When set to false atoms which are not explicitly removed by the reaction are preserved

* Fix a case where transforms were incorrectly updating atomic numbers

* add more inplace operations to MolStandardize

* support those in the Python layer

* support inplace for the rest of the python wrappers

* move a few more functions over to the inplace code
2023-07-21 08:44:41 +02:00
Greg Landrum
536285ba80 Fix a case where transforms were incorrectly updating atomic numbers (#6493) 2023-07-20 11:10:56 -04:00
Greg Landrum
71051cde10 Fixes #6211 (#6250)
* backup

* basic tests pass

* add JSON out to substruct match parameters

* serialize the substruct match parameters in reactions

* add that to the python wrapper

* more testing
2023-04-05 19:08:37 +02:00
Gareth Jones
a5e9d63d3c ReactionFromRxnBlock fails on bond with reacting center status set (#6199)
* Fixed bug in MolFileParser::toInt.  Added test

* Also fix MolFileParser::toUnsigned

* ToInt and ToUnsigned to return 0 when parsing blank string

* Update Code/GraphMol/FileParsers/MolFileParser.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Update Code/GraphMol/FileParsers/MolFileParser.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

---------

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2023-03-16 17:39:47 +01:00
Greg Landrum
a8c8e9a8e1 Add canonicalization of stereo groups (enhanced stereo) (#6051)
* add function to canonicalize enhanced stereo representations

* use enhanced stereo in canonicalization

* Fixes #6045
enables the doc tests for EnumerateStereoisomers.py
Re-enables the BRICS tests

* some things work... tests need to be updated

* c++ and python tests pass

* update expected psql results

* run the canonicalization on SMILES generation;
c++ and python tests pass

* cartridge and java tests pass

* update doctests
2023-02-08 04:21:51 +01:00
Greg Landrum
0f88141c09 Propagate query features from reacting molecules to products (#6021)
* add tests

* remove a compiler warning

* Fixes #6015
Fixes #6014  (since it was due to #6015)

* fix a leak
2023-01-28 04:47:46 +01:00
Greg Landrum
cba7ecf3a4 Fixes #5785 (#5871)
* make the test for how to write valences more robust w.r.t. unsanitized molecules

* Fixes #5785
2022-12-16 16:00:30 +01:00
Greg Landrum
3e3b7b8693 Support stereo for double bonds in rings from CXSMILES (#5636)
* initial support for wiggly and wedged bonds in cxsmiles
add CX_ALL_BUT_COORDS convenience option to CXSMILES writer

* move ClearSingleBondDirFlags to MolOps

* do a better job of handling the wiggly bonds

* mark 3D conformers from CXSMILES

* remove some extraneous printing

* test wD as well

* remove non-applicable test

* basic tests (not passing) for parsing t/c/ctu

* remove test for unimplemented feature

* basic tests (not passing) for parsing t/c/ctu

* backup

* parsing works

* Fixes #5585

* cleanup, use the constant instead of hardcoding

* write ctu block

* document new cxsmiles additions

* more stereo info in the docs

* changes in response to review

* this passes all tests
Need to still think a bit about whether the "basic writing" test results are actually correct

* happier with those results
2022-10-20 07:44:11 +02:00
Greg Landrum
ce082ae96b Revert "Support ring-bond stereo flags in CXSMILES (#5595)" (#5629)
This reverts commit c6388a0ba7.
2022-10-08 17:33:23 +02:00
Greg Landrum
c6388a0ba7 Support ring-bond stereo flags in CXSMILES (#5595)
* initial support for wiggly and wedged bonds in cxsmiles
add CX_ALL_BUT_COORDS convenience option to CXSMILES writer

* move ClearSingleBondDirFlags to MolOps

* do a better job of handling the wiggly bonds

* mark 3D conformers from CXSMILES

* remove some extraneous printing

* test wD as well

* remove non-applicable test

* basic tests (not passing) for parsing t/c/ctu

* remove test for unimplemented feature

* basic tests (not passing) for parsing t/c/ctu

* backup

* parsing works

* Fixes #5585

* cleanup, use the constant instead of hardcoding

* write ctu block

* document new cxsmiles additions

* more stereo info in the docs

* changes in response to review
2022-10-07 17:52:37 +02:00
Brian Kelley
d1985caaa7 cdxml parser (#5273) 2022-09-28 05:49:27 +02:00
Brian Kelley
eddb87b2f0 Fixes #5324 (#5355) 2022-06-18 09:06:08 +02:00
Greg Landrum
90c6ffa472 Support writing V3000 reactions (#4982)
* first pass at writing v3K rxns

* python wrapper

* test other C++ call

* cleanup

* Fixes Windows DLL build issue

* changes in response to review

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
2022-02-08 14:37:53 +01:00
Greg Landrum
2616a92906 Support CXSMILES/CXSMARTS for reactions (#4895)
* start with some basic tests
these currently fail, of course

* prep work

* minor refactoring and prep work

* get better at handling spaces

* first pass, needs completion and testing
loads more testing required
coordinate bonds don't work at all yet
I'm suspicious about the SGroup hierarchy

* more progress
agents and products are now parsed
more testing added
way more testing needed

* correctly ignore names
test cleanup

* more sgroup improvements and testing
now I think most everything is there and the basics are tested

* all tests pass

* link nodes and variable attachment points

* more cleanup and testing

* changes in response to review
2022-01-26 08:52:10 +01:00
Greg Landrum
97a609f211 Fixes #4759 (#4760)
* Fixes #4759

* add forgotten warning

* handle spaces after the >>

* be more explicit
2021-12-03 17:42:32 +01:00
Greg Landrum
e970148830 Allow applying single-reactant/single-product reactions in place (#4511)
* minor preparatory refactor

* add test

* add reaction literals

* tests for the new literals

* add runReactant
first steps to making things work

* remove works

* backup

* all current tests passing except bond-order changes
some atom-property copying fixed

* bond changes now work

* handle atomic stereo

* some cleanup and more tests

* docs

* not-working

* add KekulizeIfPossible()

* return a value from KekulizeIfPossible

* Revert "not-working"

This reverts commit 2ebd8a5519.

* add in-place reactions to python wrapper

* simplify deprotection wrapper code

* support in-place deprotection

* changes in response to review

* forgotten change
2021-09-26 14:35:23 -04:00
Greg Landrum
9a04aea918 Improvements to reaction chirality handling (#3412)
* add tests for the problem

* more testing (still no fix)

* Fixes #2891

Try to be more robust w.r.t. atom reordering in input SMILES

* better handling of differing numbers of bonds between reactants and products

all tests now passing

* update the rdkit book with more details about chirality in reactions

* changes in response to review
2020-09-18 09:33:26 +02:00
Greg Landrum
1a3ce773cf Molecule metadata in PNGs (#3316)
* reader stub. Navigates the file successfullly

* works

* works

* read out all metadata, not just ours

* first pass at reading out molecules

* support mol blocks too

* add python wrapper for parser

* add direct writer

* get rid of multiple definitions in PNParser.h

* update from code review

* robustification

* handle reading compressed metadata

* support compressing metadata too

* reorder arguments to make this more consistent

* add writers to python wrappers

* forgotten file

* add pickle support

* explicit zlib dependency

* get windows builds working
at least with conda boost+zlib

* switch to using boost::iostreams to do the compression/decompression

* switch to using a vector of string pairs to store the metadata

need this so that we can contain "duplicate" keys

* add metadata output to MolDraw2DCairo
still need python test

* add a python test

* initial work at reading/writing reactions from PNGs

refactor the ReactionParser.h header a bit

* cleanup debug messages

* reaction PNG support -> python

* ReactionPickler no longer includes all ProductTemplate props

* handle metadata at the MolDraw2D level
Currently only supported by MolDraw2DCairo, it's worth extending this to SVG too

* support reading multiple molecules from a png

* support multiple molecules from files and in python

* stop duplicating tags with multiple molecules

* update to get windll builds working
this change should be propagated to more cmakelists.txt files

* make sure the metadata ends up in the notebook

* make sure PNGs in the notebook also have metadata

efficiency improvements for some notebook bits (i.e stop going PNG->Image->PNG)

* no need to pretend that we might be using PIL anymore

* documentation

* update docs to show new functionality

* not sure why the doctests failed on linux

* still trying to diagnose those failures

* protect doctests in case python interpreters are being re-used

* switch tags

* the wrapped functions to read png data from files weren't working

* <sigh>... windows dlls
2020-08-25 07:51:18 +02:00
Greg Landrum
b77d67893d fixes #3119 (#3130) 2020-05-07 12:52:46 -04:00
Eisuke Kawashima
be9349b3bb Correct TEST_CASE tags for Catch2 (#3069)
https://github.com/catchorg/Catch2/blob/v2.1.2/docs/test-cases-and-sections.md#tags
2020-04-08 15:43:38 +02:00
Manan Goel
4d96356067 Fixes #2954:Rxn Smarts with Dative Bonds not parsed (#3050)
* This commit fixes #2954:Rxn Smarts with Dative Bonds not parsed
Implemented an approach which does not use std::string::find to find ">" occurrences. The new implementation checks the chracters around ">" and seperates the reactants and products accordingly

* made suggested changes
2020-03-31 15:02:07 +02:00
Greg Landrum
920bf6b300 Fixes #2604 (#2689)
* Fixes #2604

* Changes in response to review

* Fixes #2709

* add tests
2019-10-13 09:33:10 -04:00
Greg Landrum
5c6706cc50 Fixes #2427 (#2429) 2019-05-15 04:46:06 +02:00
Dan N
2bcb7ea692 I2366 Preserve enhanced stereo in reactions (#2377)
* Potential implementation of copying enhanced stereo groups

Copies the enhanced stereo if all atoms in the reactant
end up in the same molecule of the product with valid
ChiralTags.

Current implementation: Only copy StereoGroup if all atoms are "valid" in the product.
Possible implementation: Copy StereoGroup for all atoms that are "valid" in the product.

Details:
Uses ChiralTag invalidation to decide whether StereoGroup should be copied. If
the product atoms have valid ChiralTag, then the reaction was able to
meaningfully propogate chirality from the reactant to the product. This means
that it is also meaningful to propogate the StereoGroup from the reactant to
the product.

The only exception to this is if the product template defines a specific
absolute configuration for an atom. This means that the reaction defines the
stereochemistry for the atom, so the stereochemistry of that atom is no longer
relative.

If an atom from a reactant StereoGroup appears multiple times in the product,
all copies of that atom are put in the same product StereoGroup.

Still developing test cases.

    from rdkit import Chem
    from rdkit.Chem import AllChem

    # Duplicate a molecule example:
    mol1 = Chem.MolFromSmiles('Cl[C@@H](Br)C[C@H](Br)CCO |&1:1,4|')
    mol2 = Chem.MolFromSmiles('CC(=O)C')
    rxn = AllChem.ReactionFromSmarts('[O:1].[C:2]=O>>[O:1][C:2][O:1]')
    for prods in rxn.RunReactants([mol1, mol2]):
        for p in prods:
            for a in p.GetAtoms():
                for k in a.GetPropsAsDict():
                    a.ClearProp(k)
            print(Chem.MolToCXSmiles(p))

Output:

[21:26:08] product atom-mapping number 1 found multiple times.
CC(C)(OCC[C@@H](Br)C[C@@H](Cl)Br)OCC[C@@H](Br)C[C@@H](Cl)Br |&1:6,9,15,18

* Issue 2366: Documentation and fix stereo group invalidation

Adds some documentation to EnhancedStereo.md

Also invalidates StereoGroup if a reaction specifies the
stereochemistry of a center. This destroys the relative
relationship of the center to other centers.

* Demo python file examples for Enhanced Stereochemistry in reactions

This is not intended to be pushed. These probably will become test
cases. For the output looks like this:

    0a. Reaction preserves stereo:
      [C@:1]>>[C@:1]
        F[C@H](Cl)Br |o1:1|
          >>
          F[C@H](Cl)Br |o1:1|

    0b. Reaction preserves stereo:
      [C@:1]>>[C@:1]
        F[C@@H](Cl)Br |&1:1|
          >>
          F[C@@H](Cl)Br |&1:1|

    0c. Reaction preserves stereo:
      [C@:1]>>[C@:1]
        FC(Cl)Br
          >>
          FC(Cl)Br

    1a. Reaction ignores stereo:
      [C:1]>>[C:1]
        F[C@H](Cl)Br |a:1|
          >>
          F[C@H](Cl)Br |a:1|

    1b. Reaction ignores stereo:
      [C:1]>>[C:1]
        F[C@@H](Cl)Br |&1:1|
          >>
          F[C@@H](Cl)Br |&1:1|

    1c. Reaction ignores stereo:
      [C:1]>>[C:1]
        FC(Cl)Br
          >>
          FC(Cl)Br

    2a. Reaction inverts stereo:
      [C@:1]>>[C@@:1]
        F[C@H](Cl)Br |o1:1|
          >>
          F[C@@H](Cl)Br |o1:1|

    2b. Reaction inverts stereo:
      [C@:1]>>[C@@:1]
        F[C@@H](Cl)Br |&1:1|
          >>
          F[C@H](Cl)Br |&1:1|

    2c. Reaction inverts stereo:
      [C@:1]>>[C@@:1]
        FC(Cl)Br
          >>
          FC(Cl)Br

    3a. Reaction destroys stereo:
      [C@:1]>>[C:1]
        F[C@H](Cl)Br |o1:1|
          >>
          FC(Cl)Br

    3b. Reaction destroys stereo:
      [C@:1]>>[C:1]
        F[C@@H](Cl)Br |&1:1|
          >>
          FC(Cl)Br

    3c. Reaction destroys stereo:
      [C@:1]>>[C:1]
        FC(Cl)Br
          >>
          FC(Cl)Br

    3d. Reaction destroys stereo (but preserves unaffected group):
      [C@:1]F>>[C:1]F
        F[C@H](Cl)[C@@H](Cl)Br |o1:1,&2:3|
          >>
          FC(Cl)[C@@H](Cl)Br |&1:3|

    3e. Reaction destroys stereo:
      [C@:1]F>>[C:1]F
        F[C@H](Cl)[C@@H](Cl)Br |&1:1,3|
          >>
          FC(Cl)[C@@H](Cl)Br

    4a. Reaction creates stereo:
      [C:1]>>[C@@:1]
        F[C@H](Cl)Br |o1:1|
          >>
          F[C@@H](Cl)Br

    4b. Reaction creates stereo:
      [C:1]>>[C@@:1]
        F[C@@H](Cl)Br |&1:1|
          >>
          F[C@@H](Cl)Br

    4c. Reaction creates stereo:
      [C:1]>>[C@@:1]
        FC(Cl)Br
          >>
          F[C@@H](Cl)Br

    4d. Reaction creates stereo (preserve unaffected group):
      [C:1]F>>[C@@:1]F
        F[C@H](Cl)[C@@H](Cl)Br |o1:1,&2:3|
          >>
          F[C@@H](Cl)[C@@H](Cl)Br |&1:3|

    4e. Reaction creates stereo:
      [C:1]F>>[C@@:1]F
        F[C@H](Cl)[C@@H](Cl)Br |o1:1,3|
          >>
          F[C@@H](Cl)[C@@H](Cl)Br

    5a. Reaction preserves unrelated stereo:
      [C@:1]F>>[C@:1]F
        F[C@H](Cl)[C@@H](Cl)Br |o1:3|
          >>
          F[C@H](Cl)[C@@H](Cl)Br |o1:3|

    5b. Reaction ignores unrelated stereo:
      [C:1]F>>[C:1]F
        F[C@H](Cl)[C@@H](Cl)Br |o1:3|
          >>
          F[C@H](Cl)[C@@H](Cl)Br |o1:3|

    5c. Reaction inverts unrelated stereo:
      [C@:1]F>>[C@@:1]F
        F[C@H](Cl)[C@@H](Cl)Br |o1:3|
          >>
          F[C@@H](Cl)[C@@H](Cl)Br |o1:3|

    5d. Reaction destroys unrelated stereo:
      [C@:1]F>>[C:1]F
        F[C@H](Cl)[C@@H](Cl)Br |o1:3|
          >>
          FC(Cl)[C@@H](Cl)Br |o1:3|

    5e. Reaction creates unrelated stereo:
      [C:1]F>>[C@@:1]F
        F[C@H](Cl)[C@@H](Cl)Br |o1:3|
          >>
          F[C@@H](Cl)[C@@H](Cl)Br |o1:3|

    6e. Reaction splits StereoGroup atoms into two Mols:
      [C:1]OO[C:2]>>[C:2]O.O[C:1]
        F[C@H](Cl)OO[C@@H](Cl)Br |o1:1,5|
          >>
          O[C@@H](Cl)Br + O[C@H](F)Cl
          >>
          O[C@H](F)Cl + O[C@@H](Cl)Br

    7. Add two copies:
      [O:1].[C:2]=O>>[O:1][C:2][O:1]
        Cl[C@@H](Br)C[C@H](Br)CCO |&1:1,4| + CC(=O)C
    [17:15:38] product atom-mapping number 1 found multiple times.
          >>
          CC(C)(OCC[C@@H](Br)C[C@@H](Cl)Br)OCC[C@@H](Br)C[C@@H](Cl)Br |&1:6,9,15,18|

    8. Add two copies:
      [O:1].[C:2]=O>>[O:1][C:2][O:1]
        Cl[C@@H](Br)C[C@H](Br)CCO |&1:1,4| + CC(=O)C
    [17:15:38] product atom-mapping number 1 found multiple times.
          >>
          CC(C)(OCC[C@@H](Br)C[C@@H](Cl)Br)OCC[C@@H](Br)C[C@@H](Cl)Br |&1:6,9,15,18|

* Updates StereoGroup strategy in reactions to copy all possible atoms.

Copy all atoms for which the stereochemistry was not created or destroyed
in the reaction. Any StereoGroup which has at least one atom will appear
in the product.

Also updates the documentation to match this description, and adds C++
and Python tests which fail before this PR and pass after. The Python
tests are more extensive.

Test output was validated by hand (especially the stereo groups
generated. I'm less confident in the reaction processing in my head,
but I truested the existing validation there.)

For future diagnosis: Python unittest failures will look like:

    AssertionError: 'F[C@H](Cl)Br' != 'F[C@H](Cl)Br |&1:1|'
    - F[C@H](Cl)Br
    + F[C@H](Cl)Br |&1:1|
    ?             +++++++

For future diagnosis: C++ Catch2 failures will look like:

      CHECK( MolToCXSmiles(*p) == "F[C@H](Cl)Br |o1:1|" )
    with expansion:
      "FC(Cl)[C@@H](Cl)Br |&1:3|"
      ==
      "F[C@H](Cl)Br |o1:1|"

* Add a couple of new tests.

* rename "relative" to "enhanced"
some reformatting

* Factor out test helper function.

* Actually, enhanced stereo groups are exposed ot Python

* Added discussion of enhanced stereochemistry in reactions to docs

* Fix new test
2019-04-07 06:06:28 +02:00
Greg Landrum
0aa1147398 Fixes #1632 (#2076)
* Fixes #1632

* clang-format
2018-10-02 11:41:02 -04:00