Commit Graph

3661 Commits

Author SHA1 Message Date
Greg Landrum
435521453c Fixes #2346 (#2347) 2019-03-14 09:48:40 -04:00
Greg Landrum
55fb9034a6 Add a skip_all_if_match option to the FragmentRemover (#2338)
* add SKIP_IF_ALL_MATCH argument to FragmentRemover
    Refactor FragmentRemover::remove() to make it more efficient

* implement and test SKIP_IF_ALL_MATCH

* expose the extra option to Python

* add info to logger
2019-03-14 09:32:08 -04:00
Greg Landrum
89439f5520 Expose RGroupDecomposition to SWIG (#2345)
* change to make the SWig builds work on windows

* add the wrapper. Still needs tests

* first rgd java wrapper test, does not pass

* get static builds working on windows
2019-03-13 08:23:23 -04:00
Greg Landrum
a1e4165292 change to make the SWig builds work on windows (#2340) 2019-03-13 08:11:13 -04:00
Brian Kelley
843f9cf735 Dev/general csharp fixes (#2341)
* SWIG wrap SubstructLibrary

* Fix tests

* Fix virtual overload for tagAtoms

* Add SubstructLibrary to swig

* Fix C# enums

* Ignore annoying boost:tuples in c#
2019-03-13 04:41:48 +01:00
Brian Kelley
af6d413ccc Exposes substructlibrary to swig (#2337)
* SWIG wrap SubstructLibrary

* Fix tests

* Fix virtual overload for tagAtoms

* Add SubstructLibrary to swig
2019-03-12 16:35:22 +01:00
Greg Landrum
26c07e67d6 fixes #908 (#2328)
Code is a mess and really should be refactored
2019-03-10 21:43:20 -04:00
Greg Landrum
6ea02fc8a0 update expected svg results (connected to #2253) 2019-03-09 04:25:13 +01:00
Ric
6224a42516 Build warnings revisited (#2318)
* unused vars in bison parser cleanup

* initialization order in TopologicalTorsionGenerator

* unused params in SLN bison

* sln flex unused params

* throwing destructor in TDTWriter

* signed comparison in substructmethods

* unused input param in smiles/smarts bison

* unused ms param in sln bison

* signed comparison in FingerprintGenerator

* store return of fscanf in StructCheckerOptions

* unreferenced var in catch

* uninitialized value in FileParserUtils

* avoid override overload warning in MolDraw2DSVG

* non-final overrides in Validate.h

* unused static var in Avalon

* unused vars in catch blocks

* make AvalonTools avalonSimilarityBits & avalonSSSBits const int

* assert fscanf result in StructCheckerOptions
2019-03-08 16:42:54 +01:00
Dan N
3095d08cd1 Allow copying atoms in Python (#2322)
* Allow Atoms to be copyied in Python.

The dunder copy method is the idiomatic way to support
making copies in Python. Includes a test to make sure that
copied atoms are usable.

* Use RWMol in Code/GraphMol/Wrap/rough_test.py

Co-Authored-By: d-b-w <dan.nealschneider@schrodinger.com>

* Allow access to an atom's copy constructor in Python
2019-03-08 10:05:16 -05:00
Greg Landrum
f23bde46d3 fixes an r-group symmetrization problem (#2324)
* fixes a r-group symmetrization problem

* clang-tidy

* changes in response to review

* typo
2019-03-08 09:11:15 -05:00
Ric
be3170d0d5 Mem errors clean up (#2305)
* fix test leaks

* fix "invalid read" when casting Query to EqualityQuery

* fix error cleanup in SMILES/SMARTS parsers

* SMILES/SMARTS parser fix updated *.cmake

* fix error cleanup in SLN parser

* SLN parser updated *.cmake

* updated suppressions

* update loop in sln bison
2019-03-08 05:39:59 +01:00
greg landrum
92ca0da5f9 Merge branch 'doc-update' of https://github.com/greglandrum/rdkit into greglandrum-doc-update 2019-03-07 21:15:00 +01:00
Greg Landrum
e06b51ae7c Write enhanced stereo to cxsmiles (#2290)
* Add writing of enhanced stereo to cxsmiles

* changes in response to review

* fix an interaction between the fragment and enhanced smiles bits

* fix a logic error
2019-03-07 05:46:45 +01:00
Greg Landrum
24f1737839 Remove a bunch of Python2-related warts (#2315)
* remove all of the "from __future__" imports

* remove the first batch of rdkit.six imports/uses

* next step of rdkit.six removal

* removing xrange, range, and some maps

* next round of removals

* next round of cleanups

* fix inchi test

* last bits of "from rdkit.six" are gone

* and the last of the six stuff is gone

* strange importlib problem
2019-03-06 20:43:49 -05:00
Greg Landrum
84c1ea5e7a some much-needed optimization work on the new property lists (#2317) 2019-03-06 16:06:32 -05:00
Ric
a611e7f917 Update maeparser & coordgen libraries (#2302)
* update maeparser & coordgen

* fix iostreams linking

* add shared_ptr constructor
2019-03-06 08:26:39 +01:00
Greg Landrum
2aed95bcf4 Add definition of MolFragmentToCXSmiles (#2307)
* Add definition of MolFragmentToCXSmiles

* expose MolToCXSmiles and MolFragmentToCXSmiles to python

* improve a test
2019-03-05 08:16:06 -05:00
Greg Landrum
fb5e325705 update docstrings in the wrappers too 2019-03-05 11:40:28 +01:00
Greg Landrum
699f0b8c5b fix a problem with the random pickers test (#2310) 2019-03-04 22:34:25 -05:00
Greg Landrum
6bd17e94ed Fixes #2308 (#2309)
* Fixes #2308

* move the definition to the .cpp file.
add a few more tests
2019-03-04 22:33:43 -05:00
Greg Landrum
f5e1686055 Fixes #2303 (#2304) 2019-03-04 08:58:12 +01:00
Greg Landrum
180c15fe0e support reading/writing atom props from SD files (#2297)
* first crude pass

* fix a deprecation

* change naming scheme, support bools

* add standalone function

* add a default value for missings

* support long lines

* stupid typo

* make operator[] work

* revisit missing value handling

* modify missing value handling

* switch to an alternate scheme for specifying missing values

* clang-format

* First pass at property list parser
still needs more tests

* add test for processMolPropertyLists

* get this working as part of the ForwardSDMolSupplier

* first pass at python wrappers and tests

* clang-format run

* add creation of property lists at the mol level

* wrap long lines on output

* remove PoC implementation

* fix python wrappers

* remove out-of-date reference to the Python PoC

* changes in response to review
2019-03-03 13:17:13 -05:00
Brian Kelley
57a891bff2 Add serialization to SubstructLibrary (#2295)
* WIP - Substruct Library Serialization

* Add serialization to SubstructLibrary

* Add SubstructLibraryDefs

This holds the definition of whether the substruct 
library is serializable

* Wrap serialization in python

* Remove .h file, add .h.in file

* Configure header file into source dir

* Use RDConfig.h to configure serialization

* Move serialization code to seperate header file

* Fixes for review comments

* Removes some code redundancy

* Make pickling mols less memory intensive

* Check if molholders come back as the right types
2019-03-02 16:31:40 +01:00
Greg Landrum
5c1341f1dc Fixes #2299 (#2300) 2019-03-01 13:22:01 -05:00
Brian Kelley
fa61fa717d Add test for issue #2285, fix molbundle test (#2301) 2019-02-28 13:47:03 -05:00
Greg Landrum
334b1558bc Fixes #2258 (#2286) 2019-02-22 07:30:31 -07:00
Greg Landrum
733167258e Fixes #2257 (#2276)
* very basics of writing as PoC: atom labels end up in output

* further progress, does not currently work

* stop writing coordinate bonds;
we represent these in SMILES already

* add coords

* fix typo in dealing with atom properties

* get atom props working

* changes in response to PR
2019-02-22 06:50:06 +01:00
Ric
9c336565fd Parse enhanced stereo information from CXSMILES (#2282)
* parser implemented

* added a couple of tests

* use logger instead of stderr
2019-02-22 04:51:26 +01:00
Ric
ce354051dc Store extra CXSMILES data as a property (#2281)
* store cx smiles

* Cpp test

* py test

* fix substr
2019-02-21 17:43:09 +01:00
Greg Landrum
b52ad644b2 Robustify parsing of CTABs and SGROUPs (#2283)
* Fixes #2277

* changes in response to review
the big one is to move the PXA parser into the normal mol file parsing

* move the PXA changes to the writer as well

* SCN actually only needs 7 characters

* add test

* fixes in response to review

* handle blanks (instead of zeros) in the counts line.
The ctfile.pdf doc says we should do this

* Make the SGroup reader more robust w.r.t. bad data
The current behavior leads to uncaught exceptions when a line is too short.
This should clear that up so that we always throw the usual FileParseException

* make error messages a bit easier to read
2019-02-21 17:39:39 +01:00
Greg Landrum
094f65f5f4 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-02-21 08:03:28 -07:00
Greg Landrum
7869e086cd 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-02-15 15:41:10 -05:00
Greg Landrum
0360a9de84 Fixes #2268 (#2270) 2019-02-15 10:35:35 -05:00
Greg Landrum
98abd6f16f Fixes #2266 (#2269) 2019-02-15 10:35:09 -05:00
Greg Landrum
8683ef23be add warning for 2D conformations flagged as 3D (#2273) 2019-02-14 13:41:50 -05:00
Brian Kelley
ada0ef5e75 Fix to serialize binary strings (#2264)
* Fix to serialize binary strings

* Use stringstream instead of files for pickle tests
2019-02-13 18:10:47 +01:00
Greg Landrum
cb35234f8c keep extra information about bonds from Mol files (#2260) 2019-02-11 15:19:37 -05: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