Commit Graph

5845 Commits

Author SHA1 Message Date
Francois Berenger
263f8f9fe4 update to python3 (#2350)
update debian build script to python3
2019-03-14 08:10:10 +01: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
95eeec7b34 switch to using cmake to handle the C++ spec (#2334) 2019-03-11 07:16:39 -04: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
b38ea06715 fix a problem caused by #2327 with local catch2 installs 2019-03-08 15:34:51 +01: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
Gianluca Sforna
86e4f964bc allow using system's catch2 for tests (#2327) 2019-03-08 14:18:22 +01: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
Sunhwan Jo
aa8286798b simple docstring fix (#2326)
* simple docstring fix

* simple docstring fix
2019-03-08 05:32:26 +01:00
greg landrum
2d8bb6c168 Merge branch 'greglandrum-doc-update' 2019-03-07 21:16:16 +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
Greg Landrum
0aff90751a change bogus "3D" to "2D" in a test file (#2319)
we raise a warning about this now
2019-03-06 16:06:15 -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
704e041ab6 update stereogroups docs 2019-03-05 11:58:53 +01:00
Greg Landrum
fb5e325705 update docstrings in the wrappers too 2019-03-05 11:40:28 +01:00
Greg Landrum
5a3138a880 doctest cleanup
make sure there's a space in front of each doctest so that the
final documentation ends up formatted properly
2019-03-05 10:24:40 +01:00
Greg Landrum
a864195956 add enhanced stereo docs 2019-03-05 10:24:40 +01:00
Greg Landrum
4f71f0b9f7 Add Python2 warning. 2019-03-05 10:24:40 +01:00
Greg Landrum
9a37456099 update atom props example 2019-03-05 10:24:40 +01:00
Greg Landrum
c1e9576368 add example/doctest for cxsmiles 2019-03-05 10:24:40 +01:00
Greg Landrum
b2fc4774e7 first pass at CXSMILES docs 2019-03-05 10:24:40 +01:00
Greg Landrum
9c43f18275 add docs for the new atom property list scheme 2019-03-05 10:24:40 +01:00
Greg Landrum
3cd81a8266 more update 2019-03-05 10:24:40 +01:00
Greg Landrum
53cd77d8dd some doc updates 2019-03-05 10:24:40 +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
Dan N
b23fa210f1 Issue #2109: Enumerate all stereoisomers associated with StereoGroups (#2193)
Since #2022, RDkit mols have had information about groups of atom
with defined relative stereochemistry (StereoGroup). This commit
allows EnumerateStereoisomers to generate stereoisomers defined
in a mol's stereo groups.

By default, this includes the stereo groups in the generated
stereoisomers. Also adds an option to constrain stereo expansion
to _only_ expand sites specified at a stereogroup. This allows
the resulting set of molecules to (optionally) retain any
ambiguity in assignment in the original mol.
2019-02-26 12:08:42 -05:00
Riccardo Vianello
c19ebb9c56 don't use a ctab as input for the computation of 2D coordinates (#2255)
* don't use a ctab as input for the computation of 2D coordinates

Fix GitHub issue 1062.

* make sure that the output 2D coordinates are ordered correctly
2019-02-25 12:39:01 -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