Commit Graph

60 Commits

Author SHA1 Message Date
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
ddf7c73b50 Adds Atom atom map and rlabel apis (#1004)
* Adds Atom atom map and rlabel apis

* Moves RLabels to their own namespace, adds other properties.

* Removes namespaces, liberally adds Atom to function names.

* move detail::computedPropName to RDKit::detail::computedPropName
2016-08-11 04:46:41 +02: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
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Greg Landrum
5618819c64 merge #641 2015-11-14 05:03:24 +01:00
Paolo Tosco
deb01fa717 Merge remote-tracking branch 'upstream/master' 2015-10-18 22:03:19 +01:00
Brian Kelley
5f59333a56 Silences unused parameters 2015-10-18 14:02:29 -04:00
Paolo Tosco
eaa187b03d - added ResonanceMolSupplier
- added overloaded SubstructMatch() version supporting ResonanceMolSupplier
- added relevant Python wrappers
- added C++/Python tests
2015-10-04 23:21:28 +01:00
Brian Kelley
d50fd264f6 Change to const std::string & API 2015-09-25 15:15:21 -04:00
Paolo Tosco
5dfbecd6d0 - fixed missed kekulization of aromatic carbocations such as cyclopropenyl
and tropylium
2015-07-17 01:00:34 +01:00
Greg Landrum
797db2fa82 remove Atom::setMass() 2015-03-22 17:57:04 +01:00
Greg Landrum
37673af15a remove dativeFlag from atoms 2015-03-22 17:48:06 +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
Greg Landrum
5b7b3b3d3d fix problem with Atom->needsUpdatePropertyCache() and noImplicit 2014-12-29 08:00:40 +00:00
Nadine Schneider
0bbf3ec79b Add function to test if UpdatePropertyCache is necessary 2014-12-19 13:59:42 +01:00
Greg Landrum
c26cbc26cb switch to using references to smart pointers for the Match functions;
really ought to re-examine when/how we are passing smart pointers
 around in general, but that is a bigger job.
Ref: http://herbsutter.com/2013/06/05/gotw-91-solution-smart-pointer-parameters/
2014-05-10 06:21:27 +02:00
Greg Landrum
9f4471f872 more on #204
A few other cleanups
2014-02-06 06:43:28 +01:00
Greg Landrum
924fc373ef Fixes #165 2013-12-31 07:52:08 +01:00
Greg Landrum
eec7c1c089 make sure there is ring info available 2013-12-03 04:12:46 +01:00
Greg Landrum
53ea3259c9 small SSS optimization 2013-12-02 06:21:32 +01:00
Greg Landrum
46b80e92a6 Merge branch 'mmpa_update_14Aug2013' 2013-09-18 01:56:15 +02:00
Greg Landrum
585385a166 remove extraneous print 2013-08-23 07:31:21 +02:00
Greg Landrum
7e1843a2c5 initial set of tests in 2013-08-09 14:07:20 +02:00
Greg Landrum
3c835f61bb initial pass 2013-08-09 10:14:33 +02:00
Greg Landrum
a4734bbd43 start using the alternate getProp form 2013-07-20 07:26:06 -04:00
Greg Landrum
b5fe1f3f8c add return vals for getProps on ROMol, Atom, and Bond;
use a variable to store computed prop names
2013-07-20 06:07:19 -04:00
Greg Landrum
b4f2ec374e Fixes: #61 2013-07-04 18:00:09 +02:00
Greg Landrum
50bc499c20 fix for sf.net bug 274 2012-12-15 03:29:03 +00:00
Greg Landrum
175338d061 fix sf.net issue261: add isotope information to debugMol() 2012-12-04 05:40:55 +00:00
Greg Landrum
16e2a04d2c patch from Roger Sayle to improve valence handling of
transition metals and lanthanides
2012-10-10 10:14:42 +00:00
Greg Landrum
e7d25d7973 tests passing except reactions 2012-04-21 04:40:55 +00:00
Greg Landrum
e38ef02346 initial pass at changing atom-atom matching behavior;
fix for issue 3495370
2012-03-02 07:20:16 +00:00
Greg Landrum
813f4863ed fix and test Issue 3480481 2012-02-18 05:34:34 +00:00
Greg Landrum
29312e73e1 minor updates 2012-01-03 07:50:53 +00:00
Greg Landrum
f3fbef45c5 update copyright statements 2010-09-26 17:04:37 +00:00
Greg Landrum
116c036c07 doc updates for writers to indicate that "-" writes to stdout;
rename computedProps property to __computedProps
2010-09-19 13:13:10 +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
1d7168f0ab cleanup 2010-06-03 15:49:32 +00:00
Greg Landrum
214f1c5c20 primarily minor code cleanups. 2010-05-26 18:27:40 +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
0f469bd5c4 fix and test issue 2381580 2008-12-05 14:32:39 +00:00
Greg Landrum
6d3a9f6fb3 Check in a bunch of changes to fix radical handling.
These are connected to issues 2093420, 2091890, and 2091839
this still needs more testing.
2008-09-23 06:02:02 +00:00
Greg Landrum
023f7b4f0f Merge changes from the iterative chirality branch:
https://rdkit.svn.sourceforge.net/svnroot/rdkit/branches/IterativeChirality_20Aug2008
into the trunk.
This covers revs 798-828.

Dependent chirality should now be correctly handled, but the
handling of ring stereochemistry, i.e. things like:
C[C@H]1CC[C@H](C)CC1
is still not 100% correct.
2008-09-19 09:40:15 +00:00
Greg Landrum
cd97b8035b refactor the new radical-handling code to add a getNumRadicalElectrons()
method to Atom
2008-09-04 18:09:54 +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
41fa5fa7b0 The force argument to getExplicitValence and getImplicitValence wasn't doing anything 2008-06-12 05:44:57 +00:00
Greg Landrum
148a3a87c4 add getTotalDegree() method to Atom; support generating stereochem information from 3D coords 2008-05-26 14:54:35 +00:00
Greg Landrum
a6c1a64d1a remove some compiler warnings
rearrange the argument ordering for the Dice similarity stuff so 
that it can be invoked the same as the other similarity metrics.
2008-04-24 19:03:34 +00:00