Commit Graph

92 Commits

Author SHA1 Message Date
Greg Landrum
7e6600f3be Fixes #2516 (#2519)
* RDStreams now installed properly

* skip Wrap directories if RDK_BUILD_PYTHON_WRAPPERS is not set

Fixes #2516
2019-06-28 09:57:00 -04:00
Greg Landrum
2602ea6de8 A bit of not-particularly-related cleanup 2019-04-24 14:30:54 +02:00
Greg Landrum
4db0bade46 Fixes $945
Fixes #2420

Tests updated to reflect changes.

The existing CompleteRingsOnly code wasn't actually guaranteeing CompleteRingsOnly at all, it was just causing #2420.
The updated code actually makes sure that bonds that were ring bonds in one of the queries are ring bonds in the final MCS.
This is done via a relatively simple DFS.
2019-04-24 14:30:38 +02:00
Greg Landrum
1d47049f2a add test for #945 2019-04-23 17:32:57 +02:00
Greg Landrum
ec31bea97b clang-tidy-7 pass (#2408) 2019-04-16 12:05:47 -04:00
Ric
a6b26253ff Fix (most of) mem problems (#2123)
* do not use new on loggers

* del pointers in testDistGeom

* Update Dict hasNonPOD status on bulk update

* delete new Dicts in memtest1.cpp

* fixes in MolSuppliers and testFMCS

* PeriodicTable singleton as unique_ptr

* fix EEM_arrays leak

* fix leaks in testPBF

* fix ParamCollection leak in test UFF

* fix leaks in MMFF

* clear prop dict before read in in pickler

* fix leaks in testFreeSASA

* fix leaks in test3D

* modernize Dict.h & SmilesParse.cpp

* fix leaks in testQuery

* fix leaks in testCrystalFF

* fix leaks in cxsmilesTest

* fix leaks in Catalog & mol cat test

* fix leaks in ShapeUtils & tests

* fix leaks in testSubgraphs1

* fix leaks testFingerprintGenerators

* fix leaks in Catalog/FilterCatalog

* fix leaks in graphmolqueryTest

* these changes reduce bison parse leaks

* fixed leaks in testChirality.cpp

* fix leaks + 2 tests in testMolWriter

* fix 4m leaks in substructLibraryTest

* small improvements to molTautomerTest; still leaks

* fix leaks in testRGroupDecomp

* fix leaks in test; parser still leaks

* fix leaks in itertest

* fix 4m leaks in testDepictor

* fixes in smatest; still leaking due to parser

* fixes in testSLNParse; still leaking due to parser

* flex/bison: always add atoms with ownership; smarts error cleanup

* fix leaks in testReaction

* fix leaks in testSubstructMatch

* fix leaks in resMolSupplierTest

* fix leaks in testChemTransforms + bug in ChemTransforms

* fix leaks in testPickler

* fix leaks in testMolTransform

* fix leaks in testFragCatalog

* fix leak in testSLNParse. Still leaks due to Smiles

* fixed most leaks in testMolSupplier

* pre bison fix

* fix some atom & bond parse problems; others still fail

* bison smiles & smarts, atoms & bonds more or less fixed

* fix leaks in molopstest.cpp

* fix leaks in testFingerprints, MACCS.cpp & AtomPairs.cpp

* fix leaks in moldraw2Dtest1

* fix leaks in testDescriptors

* fix leaks in testInchi

* fix leaks in testUFFForceFieldHelpers

* fix leaks in hanoiTest & new_canon.h

* fix leaks in testMMFFForceField

* fix leaks in graphmolTest1

* fix leaks in testMMFFForceFieldHelpers

* fix leaks in testDistGeomHelpers

* fix leaks in testMolAlign

* initialize occupancy & temp facto with default values

* fix leak in TautomerTransform

* updated suppressions

* fix testStructChecker

* fix logging & py tests

* fix TautomerTransform class/struct issue

* remove misplaced delete in testSLNParse

* deinit in testAvalonLib1

* fix Avalon-triggered(?) bug in StructChecker/Pattern.cpp

* fix random testMolWriter/Supplier fails

- diversify output file names to avoid clashing.
- unify Writers close/destruct behavior.
- flushing/closing in tests.

* use reset in FFs Params.cpp

* comments on testMMFFForceField

* unrequired 'if's added to mol suppliers

* correct cast in FilterCatalog.h

* use unique_ptr in MACCS Patterns

* remove unrequred if in new_canon

* update & move suppressions
2018-10-29 14:33:26 +00: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
Greg Landrum
50d2328251 Fixes #2034 (#2035)
* Fixes #2034

* update release notes to describe that
2018-09-17 06:50:54 +02: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
Dan W
3c3106bd7b Allow types.h to be included in applications that use /D_USE_MATH_DEFINES (#1846)
* spelling

* Allow types.h to be included in applications that set _USE_MATH_DEFINES

Our application defines _USE_MATH_DEFINES on the visual studio
compiler command line, so every compilation includes the macro
definition. Including types.h (or anything other RDKit header,
basically) causes compilation to fail with a "doubly defined
macro" error message.

This commit defines the macro locally and only if it is not already
defined
2018-05-05 04:47:24 +02:00
Greg Landrum
f94e277856 another pass of clang modernize 2017-10-12 06:35:51 +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
4001b2ba0e Add the option to match formal charges to FMCS (#1311)
* very basics of charge checking in

* add the new parameters to the python wrapper. more testing please

* Additional testing.

* update which unittest methods are used
2017-02-28 08:49:28 -05:00
Greg Landrum
e625c58bab Add cis/trans tags to double bonds (#1316)
* add cis and trans to bond stereo

* compiles, does not work

* tests all pass

* Whitespace cleanup to recent changes.

* C++ test case for Bond::setStereo using Bond::STEREOCIS and Bond::STEREOTRANS

* Adding a PRECONDITION to Bond::setStereo to make sure the stereo atoms
are already specified if CIS or TRANS is being specified.

E/Z is technically defined by the topology of the molecule so the
stereo atoms are redundant (easier to understand and use!), but
ultimately redundant with the graph. However, CIS and TRANS is _only_
defined in this usage as the orientation of the atoms in the
getStereoAtoms vector.

* Exposing Bond::setStereo to Python and adding test cases to make sure
it can be used to set CIS/TRANS stereochemistry.

* verify substructure matching works

* Adding Bond::setStereoAtoms to C++ Bond class.

This allows setting the atoms to be considered for CIS or TRANS
directly without a much more costly determination of ranking that E/Z
requires.

* Wrap Bond::SetStereoAtoms into python with a new type of test case.

* docs
2017-02-26 08:15:44 -05: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
Paolo Tosco
a5699d9000 FMCS fix for Windows DLLs (#1030)
* - Fixed a bug which prevented FMCS to work correctly on Windows when
  linking to DLLs

* - removed spurious debugging info
- fixed function name

* - correct fix for the pyFMCS issue

* - the already existing macro RDKIT_WRAP_DECL is used in lieu of
  RDFMCS_DLLIMPORT
2016-08-17 04:58:34 +02:00
Paolo Tosco
dd871c3536 Modifications to enable building with MinGW compilers (#960)
* - added -DBOOST_SYSTEM_NO_DEPRECATED to definitions for MINGW builds
- modified a few #ifdef's to discriminate better between MINGW and MSVC
- added a ios::binary to Code/GraphMol/FileParsers/testMolSupplier.cpp
  (I already had to add some of those in the past to avoid the CR+LF issues on Windows)
- modified Code/GraphMol/FMCS/MaximumCommonSubgraph.cpp and
  Code/GraphMol/FMCS/FMCS.h because checking the function pointer does not
  work with DLLs as the function pointer changes upon different calls
- builds under MinGW with -DRDK_USE_BOOST_SERIALIZATION=OFF and
  RDK_BUILD_THREADSAFE_SSS=OFF

* - added the possibility to define MSVC_RUNTIME_DLL to point to the
  absolute path of an appropriate MSVC runtime DLL to enable
  multi-threaded builds with MinGW
- modified C++ and Python tests of the multi-threaded conformation
  embedder as under 32-bit MinGW lower numeric precision introduces minimal
  coordinate differences with result in ~1-kcal energy difference.
  Therefore the energy criterion has been made more lenient, and a
  coordinate MSD criterion has been introduce to compare substantial
  identity of conformations

* - reverted Code/GraphMol/DistGeomHelpers/Wrap/testDistGeom.py and Code/GraphMol/DistGeomHelpers/testDgeomHelpers.cpp
  to the upstream/master version
2016-06-25 09:12:40 +02:00
Doliath Gavid
1729c90748 Fix crazy out of range dereference 2016-04-12 19:42:24 -04:00
Greg Landrum
9d1e7b73dc normalize line endings on testFMCS_Unit.cpp 2016-01-20 08:51:44 -05:00
Alexander Savelyev
66c52aa701 fmcs: fix fmcs for chiral sub queries #688 2015-12-17 17:17:40 +03:00
Doliath Gavid
e5dbeaeb09 Use sets instead of and map. Minor comments cleanup. 2015-11-18 23:55:57 -05:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Greg Landrum
e37296d7c7 post review 2015-11-14 08:08:14 +01:00
Brian Kelley
633ac22b51 Silences unused params and casting issues 2015-10-18 21:16:17 -04:00
Brian Kelley
54311dff9c Suppresses warnings in tests 2015-10-18 16:09:58 -04:00
Brian Kelley
5abca9473c Moves -1 magic number into const unsigned int (warning suppression) 2015-10-18 16:09:05 -04:00
Brian Kelley
daa7e62258 Fixes signed conversion issues (use rdcast) 2015-10-18 15:16:38 -04:00
Brian Kelley
5f59333a56 Silences unused parameters 2015-10-18 14:02:29 -04:00
Brian Kelley
403a3d6b7c Suppresses Boost warnings 2015-10-18 13:41:03 -04:00
Brian Kelley
a146c3826a Remove unused variables/functions and register keyword 2015-10-18 10:01:00 -04:00
Alexander Savelyev
11105660c8 fmcs: fixes #631 with chiralirty 2015-10-07 14:40:31 +03:00
Greg Landrum
f724a477db test the problem 2015-10-03 07:55:12 +02:00
Greg Landrum
e6414e772a release the GIL before MCS 2015-08-28 15:59:33 +02:00
Greg Landrum
56d1e78b3b cleanup the python->C++ call; add support for the seed argument; add a test for the seed argument 2015-08-25 14:40:24 +02:00
Alexander Savelyev
e331a57791 fmcs: implement adding an initial seed structure 2015-08-25 14:21:04 +03:00
Greg Landrum
ab5224a449 Merge branch 'mol_hash_and_fmcs_Feb2015'
Fixes #481
2015-04-18 06:13:09 +02:00
Alexander Savelyev
5fc0e5fd1d fmcs: add default parameters for AtomCompare and BondCompare 2015-04-17 18:27:54 +03:00
Alexander Savelyev
654ae2b682 issue #481 was fixed 2015-04-17 18:27:26 +03:00
Riccardo Vianello
72576ba4e1 install missing Graph.h header file 2015-04-12 17:43:42 +02:00
Alexander Savelyev
b0177a4ea1 restore java and python wrappers. New parameter (matchChiralTag) was added. New function findFMCS_P() receives json parameters 2015-04-10 16:24:58 +03:00
Alexander Savelyev
ec6ecdd3bc request notes were fixed. chirality algorithm was slighlty improved 2015-04-06 19:53:19 +03:00
Alexander Savelyev
c6be709dad fix fmcs comparator functions 2015-03-30 18:26:48 +03:00
Alexander Savelyev
dc208b0829 chirality flag was implemented for fmcs() function 2015-03-30 18:17:57 +03:00
Greg Landrum
7c26af1358 remove an overloading ambiguity 2015-02-17 06:29:48 +01:00
Greg Landrum
403c83a73e Add initial (not yet complete) support for parsing JSON to MCS parameters.
Make it explicit that the MCSParameters argument to findMCS is optional
2015-02-17 04:13:49 +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
3c529cdca0 add a test of running FMCS multi-threaded mode 2014-12-17 06:18:37 +01:00
Greg Landrum
7cb35fd5a4 Fixes #397 2014-12-09 06:39:33 +01:00