Commit Graph

57 Commits

Author SHA1 Message Date
Brian Kelley
373a89021e Change boost int types to std types (#2233) 2019-01-22 17:45:03 +01:00
guillaume godin
d58197f4a2 Fix #2042 allowing python/c++ randomizer smiles generator (#2059)
* Fix #2042 allowing python/c++ randomizer smiles generator

* adding rootAtAtoms randomness

* add the minor change to bypass rules if doRandom

* Add another point of randomness (the initial choice had been missed)
Make the tests cross-platform. Hopefully
2018-10-08 11:09:42 +02: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
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
Brian Kelley
2debdfde0d Adds RDAny (smaller generic holder) Updates all used dictionaries (#896)
* Adds RDAny (smaller generic holder) Updates all used dictionaries

This is an API compliant version of the current rdany system,
but uses a lot less memory in practice.

* Removes code duplication

* Converts CHECK_INVARIANT to TEST_ASSERT

* Fixes DoubleTag issue

* Adds Bool to DoubleMagic implementation

* Removes reference to property pickler
2016-05-29 17:04:21 +01:00
kelley
5dbec2fe85 Adds rdcasts where appropriate 2015-11-29 17:52:27 -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
5f59333a56 Silences unused parameters 2015-10-18 14:02:29 -04:00
Brian Kelley
a146c3826a Remove unused variables/functions and register keyword 2015-10-18 10:01:00 -04:00
Nadine Schneider
5d963846b8 merge 2015-04-10 09:44:18 +02:00
Nadine Schneider
140dc2d938 Bugfix: consider doIsomericSmiles flag in canonicalizeFragment 2015-03-20 16:38:23 +01:00
Riccardo Vianello
7c346d7c2e Code/RDBoost/Exceptions.h moved to Code/RDGeneral 2015-03-16 22:31:48 +01:00
Nadine Schneider
e013399bb9 Bugfixes and new invariant for chiralAtoms 2015-03-06 15:47:08 +01:00
Nadine Schneider
489d06cfca Constify atom ranks in smiles construction 2015-02-12 08:59:28 +01:00
Nadine Schneider
47dbaf2304 Fix: ring stereo chemistry was swapped incorrectly 2015-02-11 18:21:15 +01: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
3193f88709 merged with trunk; this builds but it has not been tested at all 2014-11-30 06:33:56 +01:00
Greg Landrum
9830b0e8fd some code cleanup 2014-08-27 22:47:08 +02:00
Greg Landrum
a94ce46a43 smiles tests now pass as well 2014-08-27 22:32:49 +02:00
Greg Landrum
b2a6fd1373 backup 2014-08-27 04:18:00 +02:00
Greg Landrum
e170195421 backup commit; this does not completely work yet 2014-08-03 08:01:58 +02:00
Greg Landrum
23076b1cdb Fixes #298 2014-07-23 05:31:16 +02:00
Greg Landrum
75be63fd6b merge with trunk 2014-02-09 05:00:18 +01:00
Greg Landrum
64366007e1 more C++ style cleanups 2014-01-01 17:16:25 +01:00
Greg Landrum
3b0c72c4bf initial pass at ZBO support.
does not yet handle the HYD and ZCH lines
2013-11-30 06:58:03 +01:00
Greg Landrum
a4734bbd43 start using the alternate getProp form 2013-07-20 07:26:06 -04:00
Greg Landrum
f467bdad9a fix problem caused by github-8 fix 2013-03-14 06:23:13 +00: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
f2d9755a65 at this point all tests pass 2012-06-29 03:40:28 +00:00
Greg Landrum
6157345dde this version passes the ZINC natural-products torture test 2012-06-28 06:45:42 +00:00
Greg Landrum
0f3b84cd28 backup commit; we are not quite there yet 2012-06-26 06:15:08 +00:00
Greg Landrum
ee43d3e8f8 another step forward 2012-06-13 05:20:39 +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
c293dc23da initial version of MolFragmentToSmiles 2012-05-19 03:50:31 +00:00
Greg Landrum
de2126b641 optimization work 2012-04-15 06:19:22 +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
5592e31464 initial fix and tests for issue 3154208 2011-01-10 07:11:44 +00:00
Greg Landrum
f4a0012bc6 fix a residual problem with ring stereochem 2011-01-04 04:45:42 +00:00
Greg Landrum
5891b5edc8 further work on bug 3139534 2010-12-28 15:43:20 +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
052ec66542 cleanups:
remove x bit from headers and sources;
remove a couple empty files from Code/GraphMol
2010-09-08 04:25:57 +00:00
Greg Landrum
d23bdac363 fix and test sf.net issue 3018558 2010-06-20 03:46:58 +00:00
Greg Landrum
96adbc11ea remove the deprecated assign{Atom,Bond}ChiralCodes functions 2009-08-02 15:33:08 +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
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