22 Commits

Author SHA1 Message Date
Greg Landrum
6664dd7fe4 Some modernization of core GraphMol classes (#7228)
* simple modernization

* more

* done with RWMol for this pass

* the ROMol.cpp variant

* Atom

* minor change to bond

* simplify Conformer

* monomerinfo, queryatom, querybond

queryatom and querybond cpp files still need to be done

* typos

* revert a dumb change

* suggestion from review
2024-03-17 06:04:04 +01:00
Eisuke Kawashima
27f711a658 Run clang-tidy (readability-braces-around-statements) (#4977)
https://github.com/rdkit/rdkit/pull/3024#discussion_r526549843
2022-03-10 08:00:10 +01:00
Greg Landrum
555ab6f1fe Start adding move constructors and move-assignment operators (#4909)
* some initial work...
Still some real questions here about what should be done with dp_mol data members

* add some tests for move semantics of Dict and Props
remove extraneous clear()

* more in-depth testing of the molecule results

* test refactoring

* improve the molecule move test

* fix some leaks found by valgrind
the new tests are now all clean in valgrind

* additional classes
QueryAtom, QueryBond, RingInfo, Conformer

* get swig working again.
Not sure why this is necessary, but SWIG is a mysterious beast

* fixes in response to review

* updates in response to review
2022-02-09 14:20:49 +01:00
Greg Landrum
4c2a580ad1 Fixes github #4311 (#4312)
* a bit of simple refactoring

* Fixes #4311

- adds getValenceContrib() to QueryBond
- adds hasBondTypeQuery() and hasComplexBondTypeQuery() to QueryOps namespace
- atoms with complex bond type queries now have explict and implicit valences of 0
- adds tests for the above

* add a test
2021-07-09 15:06:54 +02:00
Eisuke Kawashima
013ba4f21d Run clang-tidy (modernize-use-override) (#4251) 2021-07-01 05:18:56 +02:00
Eisuke Kawashima
78aac3c1bc Run clang-format against header files (#4143) 2021-06-08 07:57:51 +02:00
Greg Landrum
ee5176a557 Enable storing queries in JSON (#4003)
* start refactor query pickling

* further query pickling refactoring

* bit of modernization

* partial implementation of query writing

* serialize recursive queries

* new tests

* support QueryAtom and QueryBond with null queries

* more query cleanup

* tests pass

* switch from std::variant to boost::variant

* update clang version for CI

* explicit instantiation of templates

* get dll builds working on windows

* optionally skip h counts on parsing; more query tests

* change in response to review

* changes in response to review
2021-05-04 06:37:24 +02:00
Greg Landrum
45b9aef28b clang-tidy modernize-use-default-member-init and modernize-use-emplace (#3190)
* run clang-tidy with modernize-use-default-member-init

* results from modernize-use-emplace

* one uniform initialization per line
otherwise SWIG is unhappy

Co-authored-by: Brian Kelley <fustigator@gmail.com>
2020-05-28 09:07:58 +02:00
Eisuke Kawashima
e86e2c1d5d Modernization: use nullptr (#3143) 2020-05-25 09:40:01 +02:00
Ric
01fbec33ff Removal of redundant wildcards in SMARTS (Null Atom/Bond Query combination) (#2595)
* add nullQuery algebra

* update tests

* add header to CMake file

* add ownership notice to docstrings

* rename functions

* remove mergeNullQSecond

* fix function name

* Add comment about SMARTS changed to release notes
2019-08-15 14:37:17 +02:00
Greg Landrum
ec31bea97b clang-tidy-7 pass (#2408) 2019-04-16 12:05:47 -04:00
Greg Landrum
2738c35178 Fixes #1903 (#1971)
* Fixes #1903

* update SWIG bindings too
2018-07-25 09:14:17 +02: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
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
28f8421644 set atom->setQuery() to delete old query (#1604)
adjust the rest of the code to respect that
2017-10-03 17:46:06 -04:00
Greg Landrum
769e6648e4 Fixes #1489 (#1556)
* move the describeQuery functions to the RDKit namespace.
They are generally useful

* Fixes #1489
2017-09-11 08:34:25 -04:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Greg Landrum
34ab68ca2a introduce QueryBond::QueryMatch, as with QueryAtoms;
all tests passing;
performance tests still needed
2014-05-07 05:29:25 +02: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
ebb196b8f8 Major thing here: fix and test Issue 1748846 (https://sourceforge.net/tracker/?func=detail&atid=814650&aid=1748846&group_id=160139)
Others:
SmilesParse: clean up some of the smiles generation code
2007-07-06 17:31:58 +00:00
Greg Landrum
75a79b6327 initial import 2006-05-06 22:20:08 +00:00