Commit Graph

52 Commits

Author SHA1 Message Date
Brian Kelley
28bd1e5b55 Add a default for maximum products generated by a reaction (maxProducts=1000) (#2069) 2018-09-29 07:13:11 +02:00
Greg Landrum
dfae8377dd Some optimization of the queries constructed from SMARTS (#1940)
* Fixes #1929

* add a tests to make sure bogus template directories work

* add a combined atomic number + aromaticity query operation to speed up SMARTS matches
Still needs to be recognized by the SMARTS writer, serialization, and no doubt a few other places.

* add a combined query for the single/aromatic bond query that shows up in SMARTS

* Stop using a dead pointer in the when parsing Marvin SMARTS in a CTAB

* At this point all tests pass on windows

* debugging info back in

* update the bison output
2018-06-30 20:22:06 -04:00
Greg Landrum
ba12d98ad0 Removes ATOM/BOND_SPTR in boost::graph in favor of raw pointers (#1713)
* Removes ATOM/BOND_SPTR in boost::graph in favor of raw pointers

* Actually delete atoms and bonds...

* RWMol::clear now calls destroy to handle atom/bond deletion

* Changes broken Atom lookup for windows/gcc

* Adds tests for running with valgrind

* Adds test designed for valgrind and molecule deletions

* Removes RNG, actually tests bond deletions

* update swig wrappers

* deal with most recent changes on the main branch
2018-01-07 14:19:47 -05:00
Greg Landrum
915cf08faa run clang-format with c++-11 style over that 2017-04-22 17:19:10 +02:00
Greg Landrum
7c0bb0b743 clang-tidy output 2017-04-22 17:09:24 +02:00
Greg Landrum
d3ad7d2770 Fixes #1387 (#1392)
* backup

* Fixes #1387
this passes the bug tests, but needs the full tests run

* all tests pass

* remove some droppings left from an earlier attempt at a fix

* remove some additional printing

* cleanup
2017-04-07 11:57:43 -04:00
Brian Kelley
a02f2b0bb1 Fix/sanitizerxn merge hs (#1367)
* Fixes exceptions to use correct functionName

* Deprecates ChemDrawAdjustParams name sciquest integration/eln searching
 doesn’t map to this behavior.  renamed  MatchOnlyAtRgroupAdjustParams

* Python wrapper for deprecated API

* fixHs now is more intelligent about merging hs.

The only cases where hs can’t be merged is if they are mapped
to a non hydrogen in the product.

* Updates deprecated ChemDrawAdjustParams
2017-03-20 14:30:36 +00:00
Greg Landrum
3e5605e793 Fixes #975 (#976) 2016-07-21 15:22:32 -04:00
Nadine Schneider
7a109aea89 Add some utils functions to ChemReactions
Chemical reactions: provide function to re/move agents
Chem Reactions: Add utils function to remove atom-mapping numbers
2016-04-01 10:14:21 +02:00
Brian Kelley
cad0e0a589 Adds runReactant (create a product with only one reagent
specified)
Adds reduceProductToSidechains which extracts the side chains
 from a product generated from a reaction.
2015-12-17 11:34:32 -05:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Brian Kelley
6ebbeb3bd3 Major conversion of std::string API to const std::string & 2015-09-25 15:15:59 -04: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
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
5586330f16 Fixes #243 2014-04-13 07:15:35 +02:00
Greg Landrum
296bbfb65b Fixes #228 2014-03-05 05:48:17 +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
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
6229f639a5 clean up some debugging printing; get the handling of the sanitization options more robust on windows; this needs testing back on mac and linux 2012-04-12 04:23:41 +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
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
2cea8b58b4 fix for issue 3140490 2010-12-20 05:00:23 +00:00
Greg Landrum
18a8be8538 add isMoleculeReactantOfReaction() and isMoleculeProductOfReaction() convenience functions 2010-08-21 00:16:02 +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
1896aac566 transfer conformer data to products in reactions; sf.net issue 2832951 2009-08-06 04:39:04 +00:00
Greg Landrum
7fdece9cd7 initial pass at supporting reaction pickles 2009-06-02 05:06:06 +00:00
Greg Landrum
73784d8f6f fix a problem with transfer of aromatic bond info to products 2009-03-04 16:14:56 +00:00
Greg Landrum
e05580e495 This is a sizeable one: change the way BGL is used so that atoms and bonds are stored as bundled properties
instead of using the property map interface.
A nice side-effect is that the wart of having to use property maps to loop over bonds or atom neighbors
is now gone.
This potentially breaks lots of client C++ code.
2009-02-11 20:19:25 +00:00
Greg Landrum
82661fb59b partial fix for sf.net issue 2540021;
valence changes caused by modifying bond orders still not handled
2009-02-02 05:30:26 +00:00
Greg Landrum
e1a4c98503 enforce reaction initialization requirement 2008-11-26 10:44:56 +00:00
Greg Landrum
1e5f0afcf6 fix handling of properties in the products 2008-11-26 07:41:33 +00:00
Greg Landrum
de86e06e10 make sure aromaticity flags get copied onto dummy atoms too 2008-11-17 14:33:52 +00:00
Greg Landrum
110e67c1a0 support query bonds in the products 2008-11-17 14:00:27 +00:00
Greg Landrum
335d379d35 fix and test issue 2050085 2008-08-14 11:49:19 +00:00
Greg Landrum
57be4a92ef This is a fix for sf.net issue 1968930:
http://sourceforge.net/tracker/index.php?func=detail&aid=1968930&group_id=160139&atid=814650

In order to fix the problem, the value of the query function for atomMass queries
is being multiplied by a constant factor (currently 1000) before converting
to an int. This allows distinguishing between things like [CH4] (where the
C has mass 12.011) and [12CH4] (where the C has mass 12.000).
2008-08-13 04:56:48 +00:00
Greg Landrum
4d49b70c4a code cleanups 2008-08-09 07:58:50 +00:00
Greg Landrum
f5b0d637aa don't update implicit props when the atomic number changes 2008-04-25 05:04:05 +00:00
Greg Landrum
b1aac14542 progress towards fixing and testing issue 1934052 2008-04-24 05:41:03 +00:00
Greg Landrum
31d03cc949 further progress towards fixing bug 1920627 2008-04-01 19:34:27 +00:00
Greg Landrum
84a48a03c7 preliminary fix for sf.net issue 1920627
more testing is required, but this should have it mostly solved
2008-03-25 06:36:59 +00:00
Greg Landrum
e21af3db7b update chirality handling in reactions;
fix and test issue 1882479
make sure reaction tests get run when the GraphMol tests go;
2008-01-31 06:47:53 +00:00
Greg Landrum
a788e29511 merge the changes from the CanonicalizerRework30Nov branch in.
The changes are revs 451:498.
2008-01-30 14:53:04 +00:00
Greg Landrum
6aeeca797d fix a small memory leak 2008-01-26 04:34:45 +00:00
Greg Landrum
38e5d9d030 fix stupid typo in the copyright
add test for sf.net bug 1804420
2007-09-29 06:34:30 +00:00