Commit Graph

5790 Commits

Author SHA1 Message Date
Greg Landrum
e078bf68b5 Set up CI with Azure Pipelines 2019-02-11 13:21:34 +00:00
Greg Landrum
a102eaf932 Add options for substructure searching (#2254)
* first pass at adding a SubstructMatchParameter struct

* start moving the rest of the backend to use the parameters

* backend at least mostly moved over

* add aromaticMatchesConjugated
add tests

* switch over the MolBundle too
Add templates to reduce duplicated code

* support older compilers

let's see if it works...

* add SubstructMatchParameters to Python wrapper

* remove some deprecations and warnings

* damn compilers

* parameter support for bundles in python wrapper

* add the parameters to the java wrappers

* response to review
2019-02-08 09:10:10 -05:00
Greg Landrum
8524652a86 Fixes #2246 (#2248)
* Fixes #2246

* Fixes #2247
2019-02-04 10:32:33 -05:00
Greg Landrum
4d14a819e6 Fixes #2245 (#2250)
* not yet done

* update docs, python tests, and the release notes

* updates in response to review
2019-01-31 00:03:39 -05:00
Brian Kelley
fe3096cffa Fixes #2240 (#2241)
* Fixes #2240

* Fix for boost python variants

* Revert unneeded constructor
2019-01-25 17:30:08 +01:00
Ric
6c619f6235 Added exports (#2242) 2019-01-25 04:38:13 +01:00
Greg Landrum
7ba5c54277 Fix #2197 and #2237 (#2238)
* Fixes #2197

* Fixes #2237
2019-01-24 15:20:08 -05:00
Brian Kelley
373a89021e Change boost int types to std types (#2233) 2019-01-22 17:45:03 +01:00
Greg Landrum
ca54f64289 Fixes #2229 (#2235)
also some reformatting
2019-01-22 10:53:48 -05:00
Ric
d26d4b076e Support for parsing/writing SGroups in SD Mol files. (#2138)
* Implementation of SGroups

* remove sample files test

* update gitignore with test outputs

* fix RevisionModifier

* re-enable tests

* backup commit; things seem to work so far

* some refactoring; obvious s group tests pass now

* more refactoring

* everything now out of the public API

* not sure why this was still in there

* rename functions; all tests now pass

* remove getNextFreeSGroupId; readd comment in copy SGroups

* clang-format

* squash-merge current master

* squash merge master

* Address comments on PR

- Update to current master.
- Move SGroup parse time checks to SGroupChecks namespace.
- Store SGroups in ROMOl as vector<SGroups>.
- SGroup methods return referenes instead of pointers.
- Use atom/bond/sgroup indexes for properties instead of pointers.
- Have SGroups inherit from RDProps; move properties to RDProps.
- Remove trivial/unused methods.
- Add a link to the SD specification atop SGroup.h
2019-01-22 15:42:27 +01:00
Greg Landrum
069e920645 Fixes #2224 (#2234)
* Fixes #2224

* test the basics
2019-01-21 11:31:02 -05:00
Brian Kelley
bac0318ab4 Fixes #2209 - testEnumeration on 32bit systems (#2226) 2019-01-18 16:21:40 +01:00
Greg Landrum
8c9795f535 Fix #2225 (#2228)
* Fixes #2225

* A bit of extra cleanup

* forgotten file

* Make this thread safe and add support for v3K mol blocks

* add the file

* update expected results
2019-01-17 11:44:23 -05:00
magattaca
3683cfe506 Added documentation files written in Japanese into Book directory (#2210)
* add documents translated into Japanese

* add conf.py

* change links to images

* change Translation_into Japanese to Translation_into_Japanese

* move japanese translation to Book_jp

* update image paths

* makefile and config

* remove Book/Translation_into_Japanese
2019-01-16 06:35:52 +01:00
Jan Holst Jensen
6c1dc44310 Fix for Issue #2174. (#2175)
* Add test case to demonstrate GitHub issue 2174.

* Fix issue 2174.

* minor cleanup from review
2019-01-15 15:51:49 +01:00
Brian Cole
c3b7fdcad5 Silencing the following Python 3 warning message: (#2223)
Silencing some Python 3 warning messages
2019-01-15 15:51:08 +01:00
Greg Landrum
395c312345 Fixes #2220 (#2221)
* untested

* test works now

* add python wrapper
2019-01-14 12:58:50 -05:00
Greg Landrum
0bebef890c remove the RDPharm3D documentation (#2213)
the software no longer exists and this confuses things
2019-01-11 07:51:01 -05:00
Greg Landrum
18f6484861 re-enable (and update) the file parser tests (#2208) 2019-01-11 06:16:25 +01:00
Jan Holst Jensen
dd6165c8af Fix #2176: InChI functions should return NULL on un-InChI-able input molecules. (#2177)
* Add check of returned string from InChI helper functions and convert to NULL when blank string is returned (a valid InChI string or InChI key will never be blank).

* Since MolInchi() and MolInchiKey() will never return a NULL pointer, I have removed the check for NULL.
Hopefully the intent of the code is now clearer.
2019-01-11 04:51:25 +01:00
Francois Berenger
a5772c4593 removed unused and outdated file rdkit/Chem/PeriodicTable.py (#2141)
* removed unused and outdated file rdkit/Chem/PeriodicTable.py

* rm rdkit/Chem/UnitTestPeriodicTable.py

* rm UnitTestPeriodicTable from the unit tests list

* rm ref to PeriodicTable in rdkit/Chem/__init__.py

* MolSurf.py was still using Chem.PeriodicTable

* remove reference to Chem.PeriodicTable

* The Labute ASA contributions should use Rb0

* rm PeriodicTable from rdkit/Chem/GraphDescriptors.py
2019-01-09 12:15:02 +01:00
Francois Berenger
83b155a147 Less warnings (#2155)
* rm names of unused params in Code/GraphMol/Fingerprints/AtomPairGenerator.cpp

* correct some compilation warnings

mostly unused parameters and one unsigned Vs signed comparison
2019-01-06 06:30:14 +00:00
Ric
3cc9206a48 Update build rules for coorgen & maeparser (#2184) 2019-01-06 06:28:00 +00:00
sirbiscuit
cb444f21a0 Do not allow PandasTools to overwrite pandas settings (#2206)
* Do not allow PandasTools to overwrite pandas settings

When PandasTools is used, setting global pandas variables like
'display.max_rows' or 'display.max_columns' have no effect. For example,
executing the following code results in printing ten rows although
'display.max_rows' is set to 5:

import pandas as pd
from rdkit.Chem import PandasTools
PandasTools.RenderImagesInAllDataFrames()
pd.set_option('display.max_rows', 5)
pd.DataFrame(['some text'] * 10)

Solve this problem by using pandas' default HTML rendering method instead
of the DataFrameFormatter. Additionally, remove all unnecessary
'pd.set_option' calls.

* Set max_colwidth only temporarily

Setting pandas option 'display.max_colwith' only during the generation of
HTML avoids breaking unit tests.

* Set max_columns in unit tests

Some unit tests fail, because 'display.max_columns' is not set by
PandasTools anymore. Set this variable in the context of the particular
test cases to infinity in order to avoid truncating of data frames.
2019-01-05 05:54:58 +00:00
Brian Kelley
73e6b751ce RGroupDecomposition fixes, keep userLabels more robust onlyMatchAtRGroups (#2202)
* Fix onlyMatchAtRGroups
 adjust queries wasn’t working

* Keep user RLabels if present in the core

* Fix tests

* Fix for review comments
2019-01-02 17:57:34 +00:00
Greg Landrum
a59997b7e4 Some refactoring of the distance geometry code (#2153)
* move _embedPoints over to use EmbedArgs structure

* move _embedWithExpTorsions over

* a few pointer cleanups

* step by step

* more

* wrap the ETKDG paramaters into a struct

* fix a typo

* additional cleanup

* more

* simplify the embedargs struct

* pass embedParams instead of having them in embedargs

* a bit more cleanup

* response to code review
2019-01-02 06:06:38 +00:00
Brian Kelley
a85e80b497 Fix TautomerTransform in operator= (#2203)
* operator= should always return a value

* Match implementation with declaration

* Revert throw (moved to another PR)
2018-12-29 06:46:57 +00:00
sirbiscuit
021838b6fb Update installation instructions for Linux (#2181)
If boost is installed with conda, cmake will not find it. For that reason,
we have to specify BOOST_ROOT.
2018-12-28 06:38:10 +00:00
msteijaert
05262ca9f6 Skip compound if smiles conversion fails (#2168)
* Skip compound if smiles conversion fails

If something is wrong with one of the structures in an sdf, smiles cannot be generated and Chem.PandasToolsLoadSDF will throw an error and stops processing the file. Here I propose skipping the compound and continue processing the sdf.

* add None when smiles coversion fails

Now the smiles is set None, rather than skipping the compound (as suggested by @greglandrum)

* improved logging

Now using logging.warning, as suggested by @bp-kelley
2018-12-28 06:06:52 +00:00
Greg Landrum
6a36c87961 Update to use the travis Xenial environment (#2200)
* unlikely to work

* try using system boost

also disable mac builds for the moment

* yeah, can't use system boost; use conda instead

* typo

* switch to boost 1.67.0

1.65.1 causes failures with testEnumeration on linux

* oops

* re-enable mac builds
2018-12-25 21:58:52 -05:00
Greg Landrum
fa27a5e40a Fixes #2144 (#2147)
* Fixes #2144

* clean up a couple test leaks
clang formatting
2018-11-18 10:41:33 -05:00
Francois Berenger
55b4b77540 typo (#2157) 2018-11-15 07:58:02 +01:00
Noel O'Boyle
213b6317f9 Rename the #define _DEBUG to MMPA_DEBUG as _DEBUG is defined bu MSVC whenever a Debug build is specifed, but that is not the intention here. (#2140) 2018-11-15 07:47:13 +01:00
Lukas Turcani
fbaf22f604 Added stk into the "Projects using RDKit" section of the README. (#2162)
* Added stk into the "Projects using RDKit" section of the README.

* Moved stk to the top of projects list and added it to Overview.md.
2018-11-11 14:03:03 +00:00
Greg Landrum
76c950171b add a bunch of extension module documentation (#2161) 2018-11-08 12:04:52 -05:00
Greg Landrum
da0674e7a7 Fixes #2142 (#2146) 2018-11-08 12:04:06 -05:00
Susan Leung
f0cc4bffbf ShapeTverskyIndex python function (#2156)
* trying to add shape tversky

* alpha and beta no defaults, added more tverskyIndex tests to testGrid

* added python function ShapeTverskyIndex to call tverskyMolShapes

* rebasing

* add python test for ShapeTverskyIndex

* changing to aassertAlmostEqual in testShapeHelpers
2018-11-08 07:42:10 -06:00
Greg Landrum
01b79a05e4 Fixes #2151 (#2152)
* move definition of ctor to header
clang-format

* Fixes #2151
a bit of clang-format as well
2018-11-05 07:14:00 -05:00
Greg Landrum
710c9a74ac Fixes #2149 (#2150) 2018-11-05 07:11:37 -05:00
Greg Landrum
213b776251 Stop building against python2 in travis (#2134)
* remove python2 from travis

* more python2 removal
2018-11-03 04:55:23 +01:00
Greg Landrum
29e8699f98 Merge branch 'ricrogz-memcheck_on_tests' 2018-10-31 05:27:31 +01:00
Greg Landrum
9ac981d60a Merge branch 'memcheck_on_tests' of https://github.com/ricrogz/rdkit into ricrogz-memcheck_on_tests 2018-10-31 05:25:56 +01: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
iwatobipen
797dff02f1 change line 141 from parent to parents (#2137) 2018-10-29 06:28:38 +01:00
Ric
0ed583eb4f move valgrind suppressions into Code/cmake/ 2018-10-27 11:40:02 -04:00
Greg Landrum
70861d5b11 update fingerprint tutorial notebook (#2130) 2018-10-26 13:09:20 +02:00
Dan N
04c1234f11 Enhanced stereo python issue 2108 (#2121)
* Issue #2108: Read Enhanced Stereochemistry from Python

This wraps enhanced stereochemistry data for an ROMol for use
in Python and includes a test that demonstrates access.

* Adds test for potential memory management problems

(also fixes incorrect class name and bad docstring)

* Corrected file reading idiom and object lifetime test logic
2018-10-25 04:58:02 +02:00
Petr Kubat
2c95be4c2c PgSQL: fix boolean definitions for Postgresql 11 (#2129) 2018-10-24 04:48:59 +02:00
Greg Landrum
6f68d56c28 prep for next release 2018-10-22 06:50:19 +02:00
Greg Landrum
41d1c4befe bump the version for the release Release_2018_09_1 2018-10-22 04:29:34 +02:00