Commit Graph

61 Commits

Author SHA1 Message Date
Greg Landrum
fd44d72fb7 Fixes #5849 (#5861)
* Fixes #5849
This may not be the best fix since it adds another step to canonicalization

* more test cases

* update docs
2022-12-28 20:10:13 +00:00
Greg Landrum
edb542097b Fixes #5462 (#5463) 2022-08-03 04:46:17 +02:00
Greg Landrum
85608555fe add ROMol::atomNeighbors() and ROMol::atomBonds() (#4573)
* add ROMol::atomBonds() and ROMol::atomNeighbors() methods

* remove some warnings

* start using the new code

* add default for those template params

* some more applications

* get the SWIG builds working

* get rid of extraneous ref

* remove extraneous comments
2021-10-02 07:28:24 +02:00
Greg Landrum
6fbe4f788d Fixes #3330 (#3869) 2021-03-05 19:59:37 -05:00
Greg Landrum
3b79156697 Fixes #3805 (#3838) 2021-02-23 14:25:39 +01: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
Rocco Moretti
3cc2123637 Fix undefined behavior in testCoordGen test (#3495)
* Fix ROMol->RWMol static casts

* Fix accessing of end-iterator.

* Fix some test build issues I saw while compiling with Clang.

* Add build settings for sanitizers.

* Revert "Add build settings for sanitizers."

This reverts commit 5dc84374f0.
2020-10-17 04:26:13 +02:00
Greg Landrum
d41752d558 run clang-tidy with readability-braces-around-statements (#2899)
* run clang-tidy with readability-braces-around-statements
clang-format the results
clean up all the parts that clang-tidy-8 broke

* fix problem on windows
2020-01-25 14:19:32 +01:00
Eisuke Kawashima
5cd27a242f Fix typo (#2862)
* Fix typo

* Reflect the comments

* Fix more typos
2019-12-31 06:43:27 +01:00
Greg Landrum
253f172353 Allow identification of chemistry problems (#2587)
* add AtomValenceException

* refactor a bit and add KekulizeException

* add copy ctor and copy() method

* add detectChemistryProblems

* add getType() method
want to be able to get the type of the exception without requiring doing a bunch of dynamic casts

* first pass at exception inheritance/translation
needs some cleanup and expansion, but this does pass all tests.

* cleanup and finish the python wrappers for the new exceptions

* make sure things are truly polymorphic

* wrap shared_ptrs of the new exception types

* expose DetectChemistryProblems()

* get the java wrappers building again

* transfer those changes to the c# wrapper

* add detectChemistryProblems()
and deal with the fun fun exception inheritance things that ensue

* response to review
2019-08-28 14:15:55 -07:00
Greg Landrum
d8c49e6dab Code cleanups from PVS/Studio (#2531)
* first round of cleanups based on PVS-studio suggestions

* a couple more

* a few more cleanups

* another round of cleanups

* undo one of those cleanups
we want the integer rounding behavior here

* add a comment to make that clear

* Fix for filter catalog PRECONDITION redundancy
2019-07-13 07:25:37 +02:00
Alain Vaucher
ee12b4c0bd correct mistake in halogen cleanup and add test cases, fix for #2020 (#2021)
* correct mistake in halogen cleanup and add test cases

* Add same example for the test as in #2020
2018-09-05 16:13:50 +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
e8c46ca2a9 Fix/github1810 (#1811)
* Fixes #1810
There's still a problem with stereo atoms (see the commented out test),
but this takes care of the basics and that's up next.

* clean up that last problematic bit.
Still needs all tests to run

* this seems to be a necessary workaround for problems with VS2017.
It's a bit ugly, but shouldn't have any performance impact, so I'm not
going to get too worked up.

* This set of changes alters what we get for some of the InChI test cases.
Adjust for that.
2018-04-11 04:48:16 +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
a58f9bef8e Add an MDL aromaticity model (Fixes #1622) (#1693)
* backup

* Add a couple of more tests and an exclusion for triple bonds.

* expose the MDL aromaticity model to python and test it.

* exocyclic bonds should not “steal” electrons in the MDL model

* backup (partial) update for aromaticity model documentation

* add examples to testGithub1622 for aromatic and nonaromatic compounds

* updates to aromaticity model and docs based on additional information from @bannanc

* some additional examples from @bannanc

* add rule to allow exocyclic multiple bonds to disqualify an atom.

* minor doc update

* address some review comments
2017-12-21 08:39:49 -05:00
Greg Landrum
f94e277856 another pass of clang modernize 2017-10-12 06:35:51 +02:00
Greg Landrum
8d31f56c29 Merge branch 'master' into modern_cxx 2017-10-07 06:46:28 +02:00
Greg Landrum
d29844a614 Fixes #1605 (#1606) 2017-10-06 11:07:10 -04: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
f762346ced make the perchlorate cleanup pattern more generic to cover all halogenates;
Fixes #115
2016-04-01 07:54:32 +02:00
Greg Landrum
cf7ceab383 remove wave of warnings 2016-03-30 13:09:59 +02:00
Greg Landrum
d7d95dd684 an alternate approach to fixing #805 2016-03-13 04:21:36 -07: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
403a3d6b7c Suppresses Boost warnings 2015-10-18 13:41:03 -04:00
Riccardo Vianello
78d7f6c1d9 Fix regressions occurring when building with msvc9 2015-10-14 09:43:16 +02:00
Greg Landrum
a7383e7861 first pass at #567 2015-08-21 16:45:00 +02:00
Nadine Schneider
0cf0dd37ce Bugfix in SmilesWrite and some additional tests for getMolFrags function 2015-04-16 10:53:20 +02:00
Nadine Schneider
0b8b6a3690 Some performance fixes for the new canonicalization
- handling molecules/proteins with multiple fragments
- add criteria for using special symmetry invariant
2015-04-15 18:42:29 +02:00
Greg Landrum
2f77e5e6cd Fixes #447 2015-03-19 07:19:47 +01:00
Schneider
5774337c89 MolOps: Add function to get the number of atoms with a distinct property 2014-08-19 13:01:10 +02:00
Greg Landrum
e4cfc340a4 support white and black lists for getMolFragsWithQuery 2014-03-25 08:18:30 -04:00
Greg Landrum
fe07610683 copy over conformers too. Part of #234 2014-03-18 06:06:24 +01:00
Greg Landrum
196c2278fb Fixes #234 2014-03-17 08:33:07 +01:00
Greg Landrum
f629c1ea6d Fixes #116 2013-10-06 07:49:54 +02:00
Greg Landrum
7ba9571e3c further refinements 2012-02-26 08:47:14 +00:00
Greg Landrum
a2b93cf084 pass one: add the basics 2012-02-11 06:41:25 +00:00
Greg Landrum
a99ad44859 clean up some compiler warnings 2011-12-31 15:58:57 +00:00
Greg Landrum
3ba11316b2 initial pass at requiring core-dummy matches in replaceCore; remove an extra header import from MolOps.cpp 2011-03-28 06:13:48 +00:00
Greg Landrum
3b3d44db16 remove exe property from source files 2011-01-13 04:22:56 +00:00
Greg Landrum
f3fbef45c5 update copyright statements 2010-09-26 17:04:37 +00:00
Greg Landrum
214f1c5c20 primarily minor code cleanups. 2010-05-26 18:27:40 +00:00
Greg Landrum
e2a3aa49ae fix and test issue 2952255 2010-02-15 19:21:31 +00:00
Greg Landrum
83e2637137 remove compiler warnings 2009-09-28 09:52:41 +00:00
Greg Landrum
96adbc11ea remove the deprecated assign{Atom,Bond}ChiralCodes functions 2009-08-02 15:33:08 +00:00
Greg Landrum
f9c0186515 add some minimal targets; move implementations of a couple functions out of MolOps.h 2009-04-18 13:16:17 +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
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