Commit Graph

89 Commits

Author SHA1 Message Date
Greg Landrum
1efa8e696e another clang-format run 2017-10-12 06:42:15 +02:00
Greg Landrum
f94e277856 another pass of clang modernize 2017-10-12 06:35:51 +02:00
Greg Landrum
87786c08b5 Merge branch 'master' into modern_cxx
# Conflicts:
#	.travis.yml
#	Code/GraphMol/FileParsers/MolFileParser.cpp
#	Code/GraphMol/FileParsers/MolFileStereochem.cpp
#	Code/GraphMol/ForceFieldHelpers/UFF/testUFFHelpers.cpp
#	Code/GraphMol/MolAlign/testMolAlign.cpp
#	Code/GraphMol/MolDraw2D/MolDraw2D.cpp
#	Code/GraphMol/MolDraw2D/Wrap/rdMolDraw2D.cpp
#	Code/GraphMol/QueryOps.cpp
#	Code/GraphMol/ROMol.cpp
#	Code/GraphMol/SmilesParse/test.cpp
#	Code/GraphMol/Trajectory/Trajectory.cpp
#	Code/GraphMol/Wrap/Atom.cpp
#	Code/GraphMol/Wrap/Bond.cpp
#	Code/GraphMol/new_canon.cpp
#	Code/RDGeneral/testDict.cpp
#	Code/SimDivPickers/Wrap/MaxMinPicker.cpp
2017-10-05 05:58:38 +02:00
Greg Landrum
64399a46f0 Fixes github1497 (#1555)
* move detectBondStereoChemistry() into MolOps

* switch more code over to using the new function

* add an addStereoChemistryFrom3D() function. Needs testing still.

* add some tests

* cleanups and rename
2017-09-11 08:37:32 -04:00
Greg Landrum
f7de91db05 Fixes #1423 (#1424)
* Fixes #1423

* hanoTest fails; otherwise ok

* remove a redundant dir spec on input

* address comments from review

* typo

* typo (sigh)
2017-07-02 10:27:45 +02:00
Greg Landrum
d5fd08369b Fixes #1423 (#1424)
* Fixes #1423

* hanoTest fails; otherwise ok

* remove a redundant dir spec on input

* address comments from review

* typo

* typo (sigh)
2017-06-03 09:32:07 -04:00
Greg Landrum
f6ced134f0 a number of other small changes from manually reviewing the PR 2017-04-22 17:24:57 +02: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
f2c1a95c6e Fixes #1294 (#1302)
* Fixes #1294
There was no reason to require only two ring bonds.

* code now matches the docs
2017-02-10 08:50:28 -05:00
Greg Landrum
6509e52611 Fixes #1230 (#1231)
* Fixes #1230

* add a test for cleanIt = False
2016-12-23 13:02:15 -05:00
Brian Cole
9ed4250067 Find potential stereo bonds should return any (#1202)
* Wrap Chem.FindPotentialStereoBonds into Python.

* findPotentialStereoBonds now sets the Bond.GetStereo property of the double bond to Bond::STEREOANY.

Some of the doc strings indicated this as the desired behavior, but
some others also indicated otherwise. So I've cleaned up and
refactored those doc strings as well to be consistent. Pulled all the
doc string comments from the .cpp file up to the .h file and merged
all the necessary prose, including adding some about the fact rings
are ignored.

Previously, users would have to test the size of the GetStereoAtoms
vector to determine whether this function found potential double bond
stereo. Testing for Bond::STEREOANY instead is way more straight
forward.
2016-12-17 05:37:30 +01:00
Greg Landrum
9dcef9ac57 Fixes #607 (#1075) 2016-09-23 04:57:07 +02:00
Greg Landrum
91674e6482 Fixes issue #1021 (#1026)
* Fixes #1021, kind of.
The test for the bug passes, but there are other failures

* all tests except hanoi pass

* passes all tests

* remove some vestigial code

* remove debug-droppings

* minor documentation
2016-08-30 18:59:10 +02:00
Greg Landrum
8009b867b5 Fixes #1034: squiggle bonds are now preserved if no sanitization is done (#1043)
* backup commit

* typo

* forgot the test file

* also test that atom chirality is handled properly
2016-08-30 16:02:31 +02:00
Greg Landrum
d0ed0e900c Fixes #803 2016-03-09 05:05:33 +01:00
Greg Landrum
e104ef7ff2 drop the explicit "false" in setProp 2016-01-06 04:55:50 +01:00
Greg Landrum
70c2995cf8 Fixes #717
This changes the CIPCode and CIPRank atom properties to no longer be computed properties.
Note: under linux I was unable to actually get the bug to manifest (converting the uint property to an int didn't cause problems), but that doesn't mean it shouldn't still be fixed.
2016-01-06 03:45:14 +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
Brian Kelley
daa7e62258 Fixes signed conversion issues (use rdcast) 2015-10-18 15:16:38 -04:00
Greg Landrum
acf69ea1b8 Fixes #553 2015-08-09 07:19:46 +02:00
Greg Landrum
3077ea75dc an optimization for when molecules have no stereochemistry indicated 2015-04-12 06:44:45 +02:00
Greg Landrum
97d70dd306 add compile-time option to use new sterochem 2015-04-10 09:47:17 +02:00
Greg Landrum
a66662b2a2 switch back to using the previous stereochemistry code for now 2015-04-10 09:47:17 +02:00
Nadine Schneider
7ddff9c71c Some performance fixes 2015-03-20 18:19:08 +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
52d44a1e47 At this point all C++ tests pass except the two postponed smiles tests dealing with fragment-smiles creation and the smiles test for issue 1844617 (this still needs to be tracked down and fixed).
The commit is just from an untabify run
2014-12-31 07:12:33 +00:00
Greg Landrum
ab0f1dcf60 rename to new_canon (probably should come up with a better name, but this will do for now) 2014-12-22 07:56:26 +00:00
Greg Landrum
cad05ca184 get rid of RankAtoms.cpp and
move the remaining functionality from RankAtoms.h into the new file
RDGeneral/Ranking.h
2014-12-22 07:35:58 +00:00
Greg Landrum
0d21cdc7c9 backup commit 2014-08-24 16:24:31 +02:00
Greg Landrum
6f909ed449 switch chirality to using unsigned ints 2014-07-27 08:09:00 +02:00
Greg Landrum
f5cf3322fe code cleanup: removing compiler warnings 2014-05-08 06:06:07 +02:00
Greg Landrum
0839cf41ad Fixes #210 2014-02-03 05:25:27 +01:00
Greg Landrum
deed4a9acf Merge branch 'Issue194_V3000MolWriter'
Conflicts:
	Code/GraphMol/Chirality.cpp
	Code/GraphMol/FileParsers/test1.cpp
2014-01-22 07:07:27 +01:00
Greg Landrum
c13a643e06 Fixes #191 2014-01-12 05:42:50 +01:00
Greg Landrum
11af614ebc more cleanups of this stuff 2014-01-01 17:35:35 +01:00
Greg Landrum
64366007e1 more C++ style cleanups 2014-01-01 17:16:25 +01:00
Greg Landrum
d779c850c9 further stereochemistry speedupb 2013-12-18 05:12:32 +01:00
Greg Landrum
4d47482f0f speed-up the stereochemistry cleanup 2013-12-18 04:59:30 +01:00
Greg Landrum
297f5d7877 minor optimization of chirality determination 2013-12-14 08:30:57 +01:00
Greg Landrum
c82e1151b3 Fixes #90 2013-08-23 12:58:41 +02:00
Greg Landrum
40ab2c06e3 Fixes #87 2013-08-21 08:20:19 +02: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
0b446d696e minor efficiency tweak 2013-02-25 05:41:50 +00:00
Greg Landrum
7610e1e6f5 additional help for sf.net issue 275 2013-01-10 05:10:40 +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
b96cff10e8 fix and test sf.net issue 254 2012-09-23 10:13:46 +00:00