84 Commits

Author SHA1 Message Date
Ricardo Rodriguez
92d5d2c657 Refactor to stop using iterator definitions in types.h (#9275)
* clean up iterator defs in types.h

* do not use auto for inline constexpr

* restore undef max,min

* restore types.h declarations
2026-05-21 19:19:38 +02:00
Hussein Faara
44364fd982 remove no-op macros and dead code (pt 4) (#8037)
* remove no-op macros and dead code (pt 4)

* review comments
2025-01-26 07:49:50 +01:00
Hussein Faara
8411f4535e remove no-op macros and dead code (pt 2) (#8035)
* remove no-op macros and dead code (pt 2)

* test failures due to whitespace changes?

* actually run the testFeatures tests

---------

Co-authored-by: greg landrum <greg.landrum@gmail.com>
2025-01-11 14:10:00 +01:00
Hussein Faara
f35e7e6414 remove no-op macros and dead code (pt 1) (#8012) 2024-11-19 04:31:56 +01:00
Greg Landrum
da6cd73168 Run clang-format across everything (#7849)
* run clang-format-18 across Code/*.cpp and Code/*.h

* run clang-format-18 across External
2024-09-26 13:39:02 +02:00
Hussein Faara
ab7b8dd2c6 Remove boost::regex support #6817 (#6913)
Made the following changes
        * removed RDK_USE_BOOST_REGEX cmake option and its references
        * removed usage of RDKIT_USE_BOOST_REGEX macro
        * removed install instructions related to boost regex
2023-11-21 07:58:29 +01:00
Ric
880a8e5725 Reformat Python code for 2023.03 release (#6294)
* run yapf

* run isort

---------

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2023-04-28 06:53:56 +02:00
Eisuke Kawashima
11532089de Run clang-format against cpp (#4358) 2021-10-20 04:25:27 +02:00
Eisuke Kawashima
b9a5be5a2d miscellaneous updates (#4284)
* Remove accidentally tracked files and unset x flag

* Ignore ComicNeue

* Unify test tag to `reader`

* Trivial destructors

* Bump CMAKE_CXX_STANDARD to 14 (#4165)
2021-07-13 06:57:29 +02:00
Eisuke Kawashima
78aac3c1bc Run clang-format against header files (#4143) 2021-06-08 07:57:51 +02:00
Ric
703fe5a225 Remove boost::foreach from public headers (#3820)
* remove include from headers

* update implementation files

* completely remove BOOST_FOREACH (#7)

* convert those changes to use auto

* get rid of all usage of BOOST_FOREACH

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2021-02-17 14:15:48 +01:00
Eisuke Kawashima
535d8a2f35 Avoid C preprocessor macros (#3138) 2020-05-05 08:08:20 +02:00
Eisuke Kawashima
75f03412ef Modernize deprecated header inclusion (#3137) 2020-05-04 10:40:57 +02:00
Greg Landrum
45bf58754a Cleanup some cmake dependencies (#3077)
* change minimal cmake version to a consistent 3.5

* progress towards a cleanup

* get the basic python deps working

* two more libs

* another round of changes
all tests pass at this point

* next round of changes
all tests pass at this point

* close to done
all tests pass

* very close

* almost done

* shift the RDBoost dependencies around a bit

* remove an extraneous python linkage
this is trying to get the mac builds working again

* Only link to python if it was built shared (#3091)

* change in response to review

Co-Authored-By: Ric <ricrogz@users.noreply.github.com>

* move that suppression of the maybe-uninitialized warning to BoostStartInclude.h

Co-authored-by: Brian Kelley <fustigator@gmail.com>
Co-authored-by: Ric <ricrogz@users.noreply.github.com>
2020-04-17 14:34:23 +02:00
Greg Landrum
5712176605 Implement the two deprecations that were planned for the 2020.09 release cycle (#3047)
* Deprecation: planned removal of .message() and .getMessage() methods

* Deprecation: planned removal of old MolHash code

* document deprecations

* output the diffs when the psql tests fail

* remove .message() from SWIG wrappers

note that the KeyError doesn't work properly. We should clean up the the exceptions here anyway

* typo
2020-04-01 14:30:07 +02:00
Ric
9188c70a64 Override what() in exceptions (Addresses #2920) (#2928)
* add overrides for what()

* translation fot KeyErrorException; update tests

* Switch all exceptions to `const char *` as a return type from message() (#4)

* switch return type of message() from std::string to const char *

* adjust one test to the new return type from message()
remove unnecessary verbosity from some tests

* fix cartridge build: update call to message().c_str()

* rebase agains master; fix another issue in cartridge build

* add deprecation note for message() and getMessage()

* amend Release notes

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2020-02-05 08:20:17 +01:00
Greg Landrum
a75018fe38 Cleanups and additional tests to improve test coverage (#2852)
* disable builds of the StructChecker code by default

* operator"" _smarts() doesn't need to catch sanitization errors

* remove unused function

* turn back on some tests that shouldn't have been disabled

* Remove unused code from SMARTS parser and simplify a bit

SmilesParseOps::AddFragToMol is now used only from the SMARTS parser, so we can simplify the API

* Removes obsolete special case code for SMARTS

This was relevant when organic atoms in SMARTS queries were stored as two-part queries.

* improve SMARTS testing

make sure we can generate SMARTS from all the examples and then parse that again.

* Fixes #2814

* Fixes #2815

* some additional smarts tests to improve coverage

* test copy ctor and getPos

* remove obsolete test_list files

* include tests for the morgan invariant generators

* more cleanups and coverage improvements

* remove files that were mistakenly added
2020-01-09 16:07:55 -05:00
Eisuke Kawashima
5cd27a242f Fix typo (#2862)
* Fix typo

* Reflect the comments

* Fix more typos
2019-12-31 06:43:27 +01:00
Eisuke Kawashima
7599b5fb14 Tidy Up (#2834)
* Replace obsolete `throw()` with `noexcept`

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r4.html

* Avoid deprecated tempfile.mktemp

https://docs.python.org/3/library/tempfile.html#deprecated-functions-and-variables

* Fix "warning: control reaches end of non-void function"
2019-12-18 16:44:55 +01:00
Eisuke Kawashima
185ec927ab Unset executable flag 2019-10-10 20:18:43 +09:00
Greg Landrum
ec31bea97b clang-tidy-7 pass (#2408) 2019-04-16 12:05:47 -04:00
Greg Landrum
24f1737839 Remove a bunch of Python2-related warts (#2315)
* remove all of the "from __future__" imports

* remove the first batch of rdkit.six imports/uses

* next step of rdkit.six removal

* removing xrange, range, and some maps

* next round of removals

* next round of cleanups

* fix inchi test

* last bits of "from rdkit.six" are gone

* and the last of the six stuff is gone

* strange importlib problem
2019-03-06 20:43:49 -05:00
Paolo Tosco
f7c888844d moved test.h from RDBoost to RDGeneral for consistency with export.h (#2074) 2018-10-11 17:35:23 -04:00
Paolo Tosco
c08ea49bda - enable building DLLs on Windows (#1861)
* - enable building DLLs on Windows

* - export.h and test.h are now auto-generated by CMake
2018-05-16 08:42:41 +02:00
Alain Vaucher
7795a425ff Further cmake improvements (#1515)
* New syntax to import Qt5 dependency in MolDraw2D

* In QTDemo, not necessary to import Qt explicitly because it is automatically imported through target MolDraw2D

* improve import of Cairo dependency

* Remove explicit linking of Cairo in C++ examples

* Use imported targets for Boost

* Using imported CMake targets for Eigen

* Use imported targets for Threads

* Simplify sample CMakeLists

* Remove duplication

* a couple small changes for travis

* typo

* update toolchain to trusty

* switch to requiring at least boost 1.56

* typo

* update boost dependency to pull in the build that has more libraries

* meaningless commit to trigger travis

* switch to ust libc++

* install libc++

* check abi

* try the other one; disable py27 for the moment to speed things up

* switch to c++11, that seems necessary with the conda boost builds at the moment

* re-enable python2.7
2017-08-07 15:49:08 +02:00
gedeck
e9af48ffd7 Issue1071/yapf (#1078)
* Issue #1071: add yapf configuration file

* yapf formatting of Code directory

* yapf formatting of Contrib directory

* yapf formatting of Data directory

* yapf formatting of Docs directory

* yapf formatting of External directory

* yapf formatting of Projects directory

* yapf formatting of Regress directory

* yapf formatting of Scripts directory

* yapf formatting of Web directory

* yapf formatting of rdkit directory
2016-09-23 04:58:46 +02:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58: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
Riccardo Vianello
95f60d21bc python3 portability fixes for pandas and the ipython notebook 2014-09-11 23:49:45 +02:00
Greg Landrum
03a5d8ac81 boost_system not required 2014-01-04 16:48:57 +01:00
Greg Landrum
06a11de24c more drawing updates 2013-03-22 04:02:19 +00:00
Greg Landrum
5b97b2ebab working towards a resolutin for github issue 13 2013-03-21 06:21:34 +00:00
Greg Landrum
1b2bcd38dc get draw demo working when cairo is not installed 2013-01-08 20:14:58 +00:00
Greg Landrum
e5640a1079 reflect move of cairo code 2012-12-04 05:16:00 +00:00
Greg Landrum
ee28352889 move the svg drawing code into GraphMol too 2012-12-03 16:03:02 +00:00
Greg Landrum
af4bf0a8c8 get the drawing demos building 2012-12-03 05:12:42 +00:00
Greg Landrum
38c5149c3e move c++ drawing code from Demo to GraphMol 2012-12-03 04:40:33 +00:00
Greg Landrum
f8c1999207 update build system to work with boost v1.51 2012-10-26 03:48:04 +00:00
Greg Landrum
4e90f88ab7 get dashes working in the cairo drawing;
additional improvements to the drawing
2012-09-20 04:12:24 +00:00
Greg Landrum
00b79222c7 modify drawing code so that it once again handles non-cyclic aromatic bonds (for fragments) 2012-09-19 02:52:37 +00:00
Greg Landrum
b50b4d4a5d add D. Cosgrove's qt demo 2012-08-29 03:33:14 +00:00
Greg Landrum
cb795c7b5d check in a contribution from David Cosgrove to improve drawing 2012-08-14 03:17:16 +00:00
Greg Landrum
ed8dd637e0 added 2011-08-15 03:38:32 +00:00
Greg Landrum
d67d7709a1 add a simple reaction example 2011-08-02 04:17:56 +00:00
Greg Landrum
c552ad6afc add isotope info to depictions 2011-07-01 03:52:01 +00:00
Greg Landrum
f0cd1b076e add a background fill 2011-06-20 04:06:14 +00:00
Greg Landrum
82dac76936 remove extra printing 2011-06-20 04:00:41 +00:00
Greg Landrum
c8995c1f54 experimental cairo support in C++ 2011-06-20 03:00:20 +00:00
Greg Landrum
0bc15ead9d additions to drawing code and SWIG wrappers 2011-02-21 06:45:34 +00:00
Greg Landrum
31e5d6cff6 update the svg generation; improved atomic text 2010-12-20 04:27:50 +00:00