Commit Graph

81 Commits

Author SHA1 Message Date
Brian Kelley
fa89438358 Dev/reaction enumeration (#1111)
* Adds C++ Enumeration Engine to the RDKit

* Adds Sanitization helpers, wrappers and tests

* Clang format

* Remove unused enumerationStateOnly flag

* Fixes docStrings to current API

* Adds doc strings

* Removes RGroupPosition, adds getPosition to EnumerationBase

* Fixes readability.

* Adds EnumerateLibraryBase::reset and getReaction

* Added getReagents method to EnumerateLibrary

* Make the tests have the same naming

* Need to save the initial state for resetting.

* Stupid case-insensitive file systems

* Moves ResetState to EnumerateLibraryBase

* Adds removeNonmatchingReagents helper

* Renames currentPosition to getPosition

* Adds Enumeration Toolkit tutorial

* Fixes Python3 serialization and enumerators

* Verified to run on python2 and 3

* Fixes integer issues on windows

* The number of enumeration should be unsigned.

* Adds deserialization constructor

* Moves boost_serialization to the end

* Deprecates Clone in favor of copy

* Update tests to use copy.copy not Clone

* Move RGROUPS and BBS into an EnumerationTypes namespace

* Make sure old pickles work

* Adds pickle for backwards compatibility

* Moves to uint64_t from size_t for public api

* Whups, accidentally used the binary archiver.

* Commits boost 1.55 serialization

* Makes serialization turnoffable Like Filter Catalog

* Fixes tests when serialization not available.  Adds more enumeration strategy tests

* Fixes a syntax error on some versions of python

* Fixes sanitizeRxn to actually make proper RGroup atoms

* Updates SanitizeRXN python API

* Updates Enumeration API to a parameter class - fixes reagent removal

* Adds a mess of tests

* Change stats to return a string.

* Exposes EvenPairSamplingStrategy Stats to python

* Fixes a crash bug in SanitizeRxn

* Adds better testing of the even pair sampling

* Fixes namespace

* One more try to fix gcc

* Enum classes are c++11 and a microsoft extension.

* Fix typo

* Fixes np.median for python3

* Fixes atom iterators

* Adds virtual tags to derived virtual functions (for clarity)

* Fixes size comparison issues

* Adds doc string

* Small cleanup (has no effect since flags aren’t used)

* fixes crash bug on windows

* get the tests working on windows

* Updates tutorial

* Adds Glare implementation to Contrib
2016-11-05 14:42:52 +01:00
NadineSchneider
61ca812972 ChemReactions: Bugfix in copy constructor (#996) 2016-07-27 10:22:13 -04:00
Greg Landrum
3e5605e793 Fixes #975 (#976) 2016-07-21 15:22:32 -04:00
Greg Landrum
bb4df7c082 stop including isotope labels on dummies from reduceProductToSideChains()
The atom-map info is there and is sufficient, adding the redundant isotope info does not help
2016-04-08 03:38:06 +02:00
Greg Landrum
bc65b6994c merge with master 2016-03-23 17:35:44 +01:00
Greg Landrum
409dc7791f Fixes #685 2016-03-23 17:31:19 +01:00
Brian Kelley
7cf1e51ee4 Fixes #825 test60RunSingleReactant() not being run 2016-03-23 11:31:55 -04:00
Brian Kelley
46a06e2bdc Adds C++ tests 2015-12-17 14:25:22 -05: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
a146c3826a Remove unused variables/functions and register keyword 2015-10-18 10:01:00 -04:00
Nadine Schneider
0b8b6a3690 Some performance fixes for the new canonicalization
- handling molecules/proteins with multiple fragments
- add criteria for using special symmetry invariant
2015-04-15 18:42:29 +02:00
Nadine Schneider
ca4bcca6ae Include atom-mapping numbers if present in the canonicalization 2015-04-10 09:47:16 +02:00
Nadine Schneider
33f9906572 Chemical reactions: allow canonical order in reaction smiles 2015-04-10 09:47:15 +02:00
Nadine Schneider
465c7cb4c6 new_canon: Delete numRingMember invariant 2015-02-12 18:06:27 +01:00
Greg Landrum
a0a02b4a99 merge on master 2015-02-03 16:41:46 +01:00
Greg Landrum
ac5756310a a bit of test cleanup 2015-01-30 04:20:42 +01:00
Brian Kelley
ff0548a871 RDKit learns how to round grip MOLFile values.
This is CTAB form:
“V XXX YYYYYY”

where (XXX is atom index, Y is the value)
2015-01-29 15:44:32 -05: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
Greg Landrum
53bf6a4609 merge master 2015-01-16 05:49:11 +01: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
Nadine Schneider
d8ee04b5b7 Bugfix in the chirality handling of chemical reactions 2015-01-09 10:34:28 +01:00
Greg Landrum
775369bbf1 update to new canonicalization 2014-12-31 06:36:40 +00:00
Greg Landrum
e6826d335a remove some compile warnings 2014-11-03 13:30:00 +01:00
Schneider
2b05873136 ChemReactionUtils: remove unused/specialized functions from interface
- specialized utils functions only used in the pgsql cartridge were removed
  from the interface
2014-08-25 16:30:09 +02:00
Schneider
8aac978f1b ChemReactions: Extented functionality of chemical reactions
- Module to generate reaction fingerprints: structural FP for screening,
  difference FP for similarity search
- Add some utility functions to simplify handling of reactions
- Add new functionality to include agents in the reactions, some adaptions
  to parsers and writers had to be done
- Supports intra-bond breaks in products now
- Molecules with rxn role (atom property) can be parse as reaction now
2014-08-19 13:08:11 +02:00
Greg Landrum
c0bf384832 Fixes #290 2014-07-12 08:20:31 +02:00
Greg Landrum
a310f3bff5 Fixes #249 2014-04-16 08:58:03 +02:00
Greg Landrum
5586330f16 Fixes #243 2014-04-13 07:15:35 +02:00
Greg Landrum
ddc66b90a9 initial verison of allowing rxns to be built from smiles 2014-04-11 04:41:48 +02:00
Greg Landrum
254cb7a405 Fixes #233 2014-03-14 18:40:10 +01:00
Greg Landrum
296bbfb65b Fixes #228 2014-03-05 05:48:17 +01:00
Greg Landrum
8db139da5e steps towards #222
at least now agents no longer generate parse errors
2014-02-23 09:55:30 +01:00
Greg Landrum
4ace62f019 remove more clang warnings 2013-12-02 05:10:23 +01:00
Greg Landrum
5904be011d update reaction stereochem handling (needs more work) 2013-04-06 06:39:22 +00:00
Greg Landrum
0a1621e97d fix and initial tests for github issue 4 2013-02-09 07:26:49 +00:00
Greg Landrum
03ef0e6f1b Add support for merging recursive queries on the C++ side
(contribution from Sereina Riniker)

A pure Python version of this was in the tutorial material from the RDKit UGM.
2013-01-08 15:13:01 +00:00
Greg Landrum
009f7259a2 support _protected flags in reactions 2012-12-01 06:26:50 +00:00
Greg Landrum
60956a59b3 get component level SMARTS grouping working in reaction smarts;
this probably needs some more work
2012-10-10 10:17:52 +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
6e2508972c all tests passing 2012-04-21 05:37:34 +00:00
Greg Landrum
e7d25d7973 tests passing except reactions 2012-04-21 04:40:55 +00:00
Greg Landrum
de2126b641 optimization work 2012-04-15 06:19:22 +00:00
Greg Landrum
dd609388e4 further improvements to getReactingAtoms() 2012-01-19 08:43:57 +00:00
Greg Landrum
e8cb290f18 add an initial pass at getReactingAtoms() for reactions 2012-01-18 05:52:38 +00:00
Greg Landrum
a99ad44859 clean up some compiler warnings 2011-12-31 15:58:57 +00:00
Greg Landrum
5e49aacd06 fix and test issue 3434271 2011-11-07 05:08:35 +00:00
Greg Landrum
2bc9481be8 further work on the SMARTS parser: support [13] as a free-standing query and update the reaction code so that the resulting queries work correctly in reactions 2011-10-29 05:51:05 +00:00
Greg Landrum
faab610321 add string replacements to smiles and smarts parsers 2011-05-22 10:45:14 +00:00