Commit Graph

3610 Commits

Author SHA1 Message Date
Greg Landrum
8c6a5b4286 remove a test that does not work on the release branch 2019-03-26 13:52:03 +01:00
Greg Landrum
2b2e5bf08f Fixes #2346 (#2347) 2019-03-26 11:29:12 +01:00
Greg Landrum
f0e678a925 Fixes #2308 (#2309)
* Fixes #2308

* move the definition to the .cpp file.
add a few more tests
2019-03-26 11:28:53 +01:00
Greg Landrum
47a119e934 Fixes #2303 (#2304) 2019-03-26 11:28:22 +01:00
Greg Landrum
4a699856c9 Fixes #2299 (#2300) 2019-03-26 11:27:53 +01:00
Brian Kelley
2bae47c04a Fixes #2209 - testEnumeration on 32bit systems (#2226) 2019-03-26 11:23:26 +01:00
Greg Landrum
34c5d04d95 Fix #2148 and #2244 (#2275)
* not quite done yet

* Fixes #2244

* Fixes #2148

This fixes a few of the knock-on effects of the actual fix.

* Test that we still write SMILES properly

* Fixes #2266 (#2269)

* Fixes #2268 (#2270)

* Improve interactivity of output SVG (#2253)

* Add clickable atoms when tagAtoms() is called

* add python tests

* add class tags for atoms and bonds

* add marker to allow easy insertion of extra text
2019-03-26 11:22:18 +01:00
Greg Landrum
e2f94019fe Fixes #2368 (#2369) 2019-03-26 10:34:18 +01:00
Greg Landrum
5afbdb6e6a move the test to molopstest 2019-03-16 14:33:14 +01:00
Greg Landrum
8ee1899ff7 not really fixed yet 2019-03-16 10:20:51 +01:00
Greg Landrum
49a6fbac53 Fixes #2229 (#2235)
also some reformatting
2019-02-21 08:10:44 +01:00
Greg Landrum
7f254cf692 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-02-21 08:10:21 +01:00
Greg Landrum
f23a8d7614 Fixes #2224 (#2234)
* Fixes #2224

* test the basics
2019-02-21 08:09:51 +01:00
Brian Kelley
db27bb4465 Fix TautomerTransform in operator= (#2203)
* operator= should always return a value

* Match implementation with declaration

* Revert throw (moved to another PR)
2019-02-21 08:08:54 +01:00
Greg Landrum
74f2c0d24b Fix #2197 and #2237 (#2238)
* Fixes #2197

* Fixes #2237
2019-02-21 08:06:57 +01:00
Jan Holst Jensen
a679132061 Fix for Issue #2174. (#2175)
* Add test case to demonstrate GitHub issue 2174.

* Fix issue 2174.

* minor cleanup from review
2019-02-21 08:06:20 +01:00
Greg Landrum
3ee651b1c7 Fixes #2144 (#2147)
* Fixes #2144

* clean up a couple test leaks
clang formatting
2019-02-21 07:58:00 +01:00
Greg Landrum
14c2064154 Fixes #2149 (#2150) 2018-11-14 04:57:12 +01:00
Greg Landrum
3ac39eb11b Fixes #2142 (#2146) 2018-11-14 04:56:52 +01:00
Petr Kubat
01ce7acfc4 PgSQL: fix boolean definitions for Postgresql 11 (#2129) 2018-11-14 04:53:38 +01:00
Greg Landrum
7976c36b87 add explicit catch dependency for tests that use it (#2126) 2018-10-19 16:38:58 +02:00
Greg Landrum
8240aa567f Docs/autodoc update (#2124)
* update the autodoc stuff for the Python docs

* document backwards incompatible changes

* cleanup

* python doc updates
2018-10-19 15:11:56 +02:00
Greg Landrum
34b206afc6 Changes to the convenience functions for the new fingerprinter (#2119)
* Changes to Python bulk FP convenience functions
- Change the default fingerprint to Morgan
- Change the method of specifying fingerprints to use an enum instead of a string
- Pluralized the name of the bulk functions to make it obvious that they return more than one FP

* Use Morgan radius=2 for the bulk convenience functions
2018-10-18 20:20:35 +02:00
Greg Landrum
08844e8f3a Fixes #2115 (#2116)
* Fixes #2115

* update release notestoo
2018-10-17 07:11:17 -04:00
Ric
91008ff11d Address compile warnings & trivial improvements (#2097)
* Address compile warnings & trivial improvements

* revert unwanted initializers; use RDUNUSED_PARAM for unused params

* revert fix in testRDFcustom; marked with 'TO DO' comment
2018-10-12 06:39:32 -04:00
Greg Landrum
9edd65593d Part of #2074 2018-10-12 04:47:28 -04: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
ba40ecaca1 Fixes #299 (#2100)
add a fallback for when the original algorithm fails
2018-10-11 17:24:15 -04:00
Greg Landrum
0be2c4a472 Remove the MolDrawing code (#2111)
Fies #2106
2018-10-11 12:43:37 -04:00
Greg Landrum
47bcff20a1 Fixes 1916 (#2093)
* backup commit

* finish adding reaction_to_svg()
Fixes #1916
2018-10-08 22:28:29 +02:00
Greg Landrum
c59d586431 Fixes #2040 (#2085)
* does not yet really work

* tests pass

* store the info about the attachment points in case we want to use it later.

* add a couple more tests; changes in response to review
2018-10-08 22:27:48 +02:00
Brian Kelley
bae005bd75 Dev/expose setquery to python (#2088)
* Expose SetQuery to python

* Add a default for maximum products generated by a reaction (maxProducts=1000)

* Add better documentation for test that used to raise exception

* properly import rdqueries
2018-10-08 22:26:52 +02:00
Greg Landrum
d203801350 add the appropriate exports for the new fingerprint code (#2098)
* run clang-tidy

* try to get the declspecs in

* cleanup

* last steps to get the windows build working
2018-10-08 11:10:23 +02:00
guillaume godin
d58197f4a2 Fix #2042 allowing python/c++ randomizer smiles generator (#2059)
* Fix #2042 allowing python/c++ randomizer smiles generator

* adding rootAtAtoms randomness

* add the minor change to bypass rules if doRandom

* Add another point of randomness (the initial choice had been missed)
Make the tests cross-platform. Hopefully
2018-10-08 11:09:42 +02:00
Boran Adas
139d2bdb83 GSoC 2018 - Fingerprints (#2005)
* Fingerprint generator first prototype

* Added some more details to the prototype

* Update based on comments

* Added additional outputs and return type changes

* FingerprintGenerator updated and placeholder implementation added

* Added getFingerprint implementation to FingerprintGenerator

* Added comments for FingerprintGenerator

* WIP: Atom pairs fingerprint implementation for FingerprintGenerator

* Removed templates and added comments

* Fixed AtomPairEnvGenerator creating duplicate environments

* Added a atom pair old version compatibility test

* Moved the FingerprintGenerator related tests to a new file

* Added new comments and changes from the PR comments

* using int types from std instead of boost and remove cleanUpEnvironments

* Minor refactoring for atom-pair atom code generation

* Added more tests for AtomPairGenerator

* Removed additional clean up method from FingerprinGenerator

* Added additional output for atom-pair fingerprint and a test

* Removed leftover code

* Default argument changes

* Removed leftover include

* Default invariant generation logic seperated from env generation logic for AtomPairs

* Implemented fingerprint as bit vector type and added the test for it

* Folded fingerprint implementation and a test case added

* String representation for fingerprint generator is added

* Python wrapper for fingeprint generator added with a simple test

* Removed unused linked libraries

* AtomPair related wrapper code moved to its own file

* Python wrapper methods for different fingerprint output types added

* Wrappers for invariants generators and tests are added

* Added more comments and tests

* Changed python side names for FIngerprintGenerator and removed extra wrappers used for invariant generators on python

* Fixed object lifetime problems for invariant generators in  Python

* Fixed typo

* Added a list of test molecules and made fingerprint generator related classes noncopyable

* Morgan fingerprint python wrappers

* Removed argument helper class for wrapper

* Morgan Fingerprint simple implementation

* Added more invariants generators for Morgan

* Fixed a bug in Morgan bond invariant generator

* Added invariant generator combination tests

* Added atom pair generator to the invariant generator combination test

* Fixed a problem in morgan feature invariant generator

* Overriding invariants without generators is made possible

* Added comments and documentation

* Radius changed for morgan fingerprint test

* RDKit fingerprint generator implementation with cpp tests

* 32 bit and 64 bit fingerprint support for FingerprintGenerator

* Common utilities moved to FingerprintUtil.h and code duplication reduced

* Solved undefined reference issues for FPGenerator templates

* Topological torsion fp generator added

* Fingerprint notebook added

* Python wrappers updated

* Morgan tests added

* Tests expanded and reduced excess amounts of collision in folded output

* Expanded tests

* More documentation

* Python docs for atom pair

* Updated fingerprint generator notebook

* Python wrapper documentation added

* Seperated FingerprintGenerator implementations into seperated file again

* Python wrapper names updated to reflect new naming

* getCountFingerprint now returns 32 bit output and count simulation does not affect count fingerprints

* Python 3 compatibility for fingerprint generator tests

* a bit of ABC cleanup

* some comment formatting got screwed up

* <sigh>

* fix an uninitialized memory problem

* Added copyright statement to new files

* Corrected some comments and docs according to the latest changes

* Bulk fingerprint generation and tests

* Convenience function wrappers and size limiting for getSparseFingerprint

* Copyright text fixed

* Info string added to python wrappers

* Some changes to get the swig wrappers building again
2018-10-07 05:02:12 +02:00
Pavel Raiskup
d4a17f94d2 PgSQL: add support for PostgreSQL_CONFIG cmake var (#2014)
This is useful for installations where pg_config is renamed to not
collide with the system default pg_config name.

We should drop 'find_package(PostgreSQL REQUIRED)' statement in
future because that's supposed to find PostgreSQL client library
to build against, not PostgreSQL server.  It might happen that
PostgreSQL server on the system is of different version than libpq
(Debian), but in future it will be problematic also on Fedora
(rhbz#1618698).

See also: https://gitlab.kitware.com/cmake/cmake/issues/17223
2018-10-07 05:00:19 +02:00
Greg Landrum
17323d11bf Modify removeHs so that it does not remove degree 0 atoms (#2089)
* Modify removeHs so that it does not remove degree 0 atoms
Update the docs at the same time.

* include a warning when not removing some Hs

* clear up a problem with the warning log
2018-10-05 13:43:09 -04:00
Greg Landrum
1be160baaa Fixes #2057 (#2091)
* Fixes #2057
docs still need to be updated

* docs update

* Update getting started doc.
This still needs to have the doctests run and should probably be
proofread and tweaked

* some doc updates

* change in response to review
2018-10-05 08:18:44 -04:00
Greg Landrum
b917fd4159 Fixes #1850 (#2087)
* Fixes #1850

* docstring update in response to review

* return immediately if the conformer isn't 3D
also header update
2018-10-04 08:29:50 -04:00
Brian Kelley
0454492ebb Fix 2D/3D interpretation of V2000 ctabs (#2083)
* Fix 2D/3D interpretation of V2000 ctabs

* Remove debugging statements

* Apply fix to V3000 molblock

* Add 3D pretending to be 2D test case

* Fix for review comments.
2018-10-03 21:05:33 +02:00
Greg Landrum
d516883472 intriguing (#2070) 2018-10-03 12:02:58 -04:00
Greg Landrum
37f3443899 move rdInfoLog to stderr (#2073) 2018-10-02 11:43:08 -04:00
Greg Landrum
ffc123a665 Fixes #2062 (#2079) 2018-10-02 11:41:22 -04:00
Greg Landrum
0aa1147398 Fixes #1632 (#2076)
* Fixes #1632

* clang-format
2018-10-02 11:41:02 -04:00
Greg Landrum
2ec3b2543d Fixes #2063 (#2075) 2018-10-02 11:39:37 -04:00
Greg Landrum
3e00673a28 A couple of chemical feature related enhancements (#2078)
* fixes #1636
a bit of refactoring of the tests

* Fixes #2077
Add better confId handling to the chemical feature machinery
2018-10-01 17:38:36 +02:00
Greg Landrum
848aacc231 add export flags for the MolStandardize library (#2072) 2018-09-29 07:43:07 +02:00
Brian Kelley
28bd1e5b55 Add a default for maximum products generated by a reaction (maxProducts=1000) (#2069) 2018-09-29 07:13:11 +02:00
Brian Kelley
e92ee9724b Fix memory leak in Dict operator= (#2061)
* Fix memory leak in Dict operator=

* Reenable old tests

* Don't overwrite nonPodData until the last moment

* Fix previous bug.  Need to check other._hasNonPodData, not our own
2018-09-28 14:03:04 +02:00
Susan Leung
956fdf268c Dev/GSOC2018_MolVS_Integration (#2002)
* short test file for MolVS standardize_sm

* short test file for MolVS fragment

* short test file for MolVS metals

* short test file for MolVS normalize

* short test file for MolVS reionize

* short test file for MolVS tautomer

* short test file for MolVS validate

* long test file for MolVS standardize smiles

* long test file for MolVS fragment

* long test file for MolVS metals

* long test file for MolVS normalize

* long test file for MolVS reionize

* long test file for MolVS tautomer

* long test file for MolVS validate

* Unit tests for MolVS steps

* dropping support for Python2

* molvs/__init__.py

* molvs/charge.py

* molvs/errors.py

* molvs/fragment.py

* molvs/metal.py

* molvs/normalize.py

* molvs/resonance.py

* molvs/standardize.py

* molvs/tautomer.py

* molvs/utils.py

* molvs/validate.py

* molvs/validations.py

* molvs/cli.py

* adapted and renamed molvs/cli.py to work within $RDBASE/Contrib/MolVS/

* setup MolStandardize directories, source with empty cleanup function, header, CMake files

* corrections to empty source, header and test1.cpp

* adding empty functions and initializers to MolStandardize

* empty Metal source, header and added test

* added most of Metal.cpp functionality and made some more tests

* empty functions and initializers to Normalize

* empty functions and initializers to Validate

* added most code for RDKitDefault mode, along with some tests

* restructure for abstract base class ValidateMethod

* written in isNoneValidation for MolVSValidation

* took out isNoneValidation, put in noAtomValidation, neutralValidation, isotopeValidation for MolVSValidation

* added in AllowedAtoms

* added in disallowedAtoms

* corrections to Validate

* added code for FragmentRemover

* extended fragment functionality to include choose largest fragment, added in tests for fragment catalog, fragment remover. Also added fragmentValidation method in MolStandardize

* added another test to testValidate test_fragment

* corrections to fragment

* corrections to Metal

* added code for Normalize

* added normalize member function to MolStandardize and added tests

* added multi fragment functionality to Normalize.cpp and additional tests

* TransformCatalog

* tests for Normalize.cpp

* first bit of cleanup

* added most of Charge functionality and some tests

* some corrections to Charge.cpp and some more tests to testCharge.cpp

* corrections to Charge.cpp

* start of Tautomer Enumerate with some tests

* added BondType option to Tautomer Enumeration

* correcting for some memory leakage

* a few alterations to formatting

* sorting out some memory leaks

* sorting out some memory leaks

* some corrections for PCS test set

* redo tests with updated RDKit

* fixing memory leak

* more fixes after 100kPCS set testing

* using tab as delimiter in CSVs rather than comma

* tutorial for MolStandardize

* still working on Tautomer enumeration

* deleted some empty tests

* starting writing tautomer canonicalize

* rename test_data -> data (the source still needs to be updated)

* automatic source reformatting

* adjust to directory rename

* move the fragment catalog test into the MolStandardize directory
do not create separate library for FragmentCatalog

* stop building separate libraries for the catalogs

* move the CleanupParameters into the MolStandardize namespace

* first pass at python wrapper

* move the py module to the correct dir;
add some python tests;
add standardizeSmiles to python wrapper

* disabling the compareMolVSTest since that requires command line arguments to run

* get this building on windows

* put the python lib in the right place

* further work on python wrapper for rdMolStandardize

* added get and set functions to Metal and wrapped them

* added get and set functions to Metal and wrapped them

* changed construstor of Reionizer class and input args for reionize, wrapped this default

* overload Reionizer constructor so user can input own AcidBaseFile from python

* added Uncharger class to Charge and added test for Uncharger

* wrapped Fragment, fixed some memory leakage, changed some args and return types, added some tests

* wrapped Normalized and changed how Normalizer class is initiated

* changing MolVSValidation structure so user can choose which MolVS submethod they want

* starting to write Wrap for Validate

* now it compiles with Wrap/Validate.cpp

* a couple refactorings around validate

* move the validate code into the rdMolStandardize module

* make sure a valid pointer is returned for standardizeSmiles

* rdMolStandardize.MolVSValidation done and tests added

* half way through AllowedAtomsValidation

* finished AllowedAtomsValidation and DisallowedAtomsValidation

* moved charge, fragment, metal, normalize into the rdMolStandardize module

* changed tutorial to use wrapped code

* added copyrights

* added copyrights

* move the data files

* modify source files to adjust to the move

* added validateSmiles functionality

* removed std::cout

* redid some of the 100k PCS tests

* working on the tutorial

* adding some documentation

* deleting some comment lines

* some changes after pull review

* More changes after pull review

* start of trying to make java wrap

* remove some warnings, add some questions

* additional warning removals, a bit more reporting

* some test cleanups

* enable testing of the java code
2018-09-28 11:24:25 +02:00