Commit Graph

45 Commits

Author SHA1 Message Date
Ric
c9199cf1da Address #2753 (#3750)
* add test export heder to gitignore

* define export macros in separate file

* install new header

* patch GA with the new macros

* fix struct declarations

* fix conformerparser exports

* fix MolSGroupParsing ParseV3000Array export

* fix java wrappers

* export exceptions

* remove duplicated exports

* Build RDGeneral exceptions into lib

* export queries, only for *nix

* fix RingDecomposerLib header manipulation

* fix CIP labeler test issues
2021-02-15 14:29:04 +01:00
Greg Landrum
d2d87909de Add support for abbreviations (#3406)
* support read-only access to cstates from python

* expose GetBrackets

* expose getAttachPoints too

remove vestigial SubstanceGroupCState_VECT

* backup

* backup

* basics working

* backup

* add label_mol_abbreviations

* fix a bug in the chirality handling

* add linkers, needs more testing

* add another peptide test

* sanitize results by default

* just need rings

* getting started with the C++ form of abbreviations

* a bit of error handling

* add findApplicableMatches

* actually apply the abbreviations

* make the getDefault functions more efficient

* add labeling (creating s groups)

* docs

* basic python wrappers (maybe this is enough?)

* add _displayLabel and _displayLabelW support to MolDraw2D
update the docs for that

* use displayLabel props

* add more default abbrevs

* change default linker defns
add parseLinkers convenience function

* make sure attachment point atoms aren't aromatic

* change the color of dummies to be darker gray

* remove python implementation

* support abbreviations in the java wrappers

* add abbreviations to the csharp wrappers

* add abbreviations to the js wrappers

* add molParity to the list of atom props not written to CXSMILES

* support condensing SUP substance groups

* add that to the python wrappers

* Update testAbbreviations.py

* clear ring info if we added it

* document that the molecules with abbreviations removed have not been sanitized
2020-09-28 17:09:46 -04:00
jones-gareth
9a864f4238 Sgroup (#3390)
* Changes to use SubstanceGroups in Java

* Forgot to add SWIG file

* Java test for SubstanceGroup wrappers

* Added RDKit boilerplate
2020-09-09 04:59:08 +02:00
Greg Landrum
73d26036de Support enumerating some mol file features into MolBundles (#3257)
* backup

* compiles

* progress, but not there yet

* basics now working

* start towards adding another test

* test having two variation points

* add actual enumeration and the corresponding tests

* docs and cleanup

* cleanups to get the mac build working

* attempt to get win32 dll builds to work

* dlls are fun

* Add FixedMolSizeMolBundle class

* changes in response to review

Also: add warnings for bad input in ParseV3000Array

* a bit of refactoring

* additional testing

* does not work, backup

* LINKNODES work now

* cleanup

* allow silencing reaction validation warnings during initialization

* docs

* fix (and test) handling of empty enumerations

* silence warnings when doing alchemy

* first pass at a Python wrapper for the enumerator

* Add Java wrappers for MolBundle and the MolEnumerator

* cleanup some comment formatting
2020-07-11 12:54:23 +02:00
jones-gareth
21a8a263bd Tautomer search (#3205)
* TautomerQuery class

* working test

* Comment header

* Merge with master. Greg's suggestions. More tests. Python wrapper

* Updated Pattern Fingerprints to merge with master. Reset email

* Java/C# wrappers. Java test

* Java/C# wrappers. Java test

* Java/C# wrappers. Java test

* Greg suggestions of 6_2_2020

* Explicit types in Java TautomerQueryTests class

* Update Code/GraphMol/QueryOps.h

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* get windows dll builds working

* Removed tautomer query wrappers from RDKit namespace

* Fixes from evaluation

* Template molecule identification fix. Greg's suggestion

* Final check search functor for evaluating template matches as they are found

Co-authored-by: Gareth Jones <gjones@glysade.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2020-06-24 17:27:40 +02:00
Greg Landrum
f3587ea4d0 Add a scaffold network implementation (#2911)
* backup

* backup

* backup

* getting close to v0.1

* switch to using node indices

* add pruning and flattening

* support multiple mols

* example notebook

* backup

* initial commit
Just includes the basic API and flatten

* add the pruning step

* add removeAttachmentPoints()

* add makeScaffoldGeneric()

* improve compilation speed by adding catch_main.cpp

* add getMolFragments()

* doc cleanup

* actually add the network building code

* first pass at python wrapper

* allow edges to be nicely converted to strings

* get node counts working

* backup python notebook

* switch example notebook to use wrapped C++ code

* add BRICS fragmentation option

* fix a bug with removing attachment points to aromatic heteroatoms

* add provisional attachment point merger to notebook

* fix a bug with includeScaffoldsWithAttachments=false

* backup of efforts to get this working on windows

* backup of efforts to get this working on windows

* does not work. backup

* Fix a substructure crash on Windows

* re-enable tests

* adjust to the new BRICS form

* in-code documentation

* more doc updates

* reformat

* change the string output format for edges

* remove old python implementation

* remove obsolete test

* include a generic scaffold for the pruned structure too

* default to keepOnlyFirstFragment=false with BRICS params

* bug in removal of attachment points from generic scaffolds

* more testing

* support working from std::shared_ptr as well as boost::shared_ptr

* more testing

* disable debug printing

* use memo-ization in getMolFragments() to avoid duplicate work

* add SWIG wrapper and basic testing

* add define for RDK_USE_BOOST_SERIALIZATION

* add serialization at the C++ level

* add a string ctor for a scaffold networks

* add pickle support on the python side

* formatting

* remove old notebook

* move the fantastically useful iterable_convertor to RDBoost/Wrap.h

* expose parameter constructor with std::vector<std::string>

* add scaffoldnetwork to documentation
2020-02-11 08:21:01 -05:00
Greg Landrum
49d247ea8c Fixes #2677 (#2687) 2019-10-03 18:07:26 -04:00
Greg Landrum
253f172353 Allow identification of chemistry problems (#2587)
* add AtomValenceException

* refactor a bit and add KekulizeException

* add copy ctor and copy() method

* add detectChemistryProblems

* add getType() method
want to be able to get the type of the exception without requiring doing a bunch of dynamic casts

* first pass at exception inheritance/translation
needs some cleanup and expansion, but this does pass all tests.

* cleanup and finish the python wrappers for the new exceptions

* make sure things are truly polymorphic

* wrap shared_ptrs of the new exception types

* expose DetectChemistryProblems()

* get the java wrappers building again

* transfer those changes to the c# wrapper

* add detectChemistryProblems()
and deal with the fun fun exception inheritance things that ensue

* response to review
2019-08-28 14:15:55 -07:00
Greg Landrum
980f955271 Fixes #2466 and #2465 (#2467)
* Fixes #2466

* Fixes #2465

* remove obsolete test

* remove redundancy

response to review
2019-05-30 18:45:57 +02:00
Brian Kelley
d2f716a2e4 Adds gzstream stream, exposes to swig (#2314)
* Move RDBoostStreams to RDStreams

* RDBoostStreams->RDStreams

* RDBoostStreams->RDStreams

* Wrap SWIG (with Java test)

* Fix missing declaration

* Use the file that already exists

* Revert to original version

* Revert to CXSMiles version

* Update boost version

* Remove redundant code

* Add zlib

* check for win32

* FileParsers now builds static on windows
2019-03-18 05:32:42 +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
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
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
Dan N
eaa44b40c2 Enhanced stereo read/write support in SDF files. (#2022)
* add a couple test files

* backup

* first pass at some theory documentatin

* it's a draft

* Update enhanced stereochemistry documentation

Adds initial target use case and caveats about the tentative
nature of the current implementation.

* Support read/write of molfile enhanced stereochemistry

This includes reading and writing of enhanced stereochemistry
from v3000 molfiles (sdf). Enhanced stereochemistry encodes
the relative configuration of stereocenters, allowing
representation of racemic mixtures and compounds with
unknown absolute stereochemistry.

It does not include:
* Python wrapping
* invalidation of the enhanced stereochemistry
* use of enhanced stereochemistry in search
* depiction of enhanced stereochemistry.

* Update to reflect changes from #1971

* change names of enum elements to allow compilation in VS2017

I think it's also clearer to do things this way

* Addressed most review comments.

* Run missed test "testEnhancedStereoChemistry"
* In tests, added size checks to group equality checks
* Updated copyright statements
* Deleted mol created for a test
* Use perfect forwarding in RWMol::setStereoGroups()
* use references for stereo groups that are checked in write and pickle
* Updated stereogroup.h in hopes of fixing compilation on Windows.
* clang-format

* try allowing a switch to boost regex and requiring it for g++-4.8

* do a better job of that

* typo

* Code review comments. Updated Copyright notice.

* When an atom is deleted, delete stereo groups containing it.

Also updates StereoGroup toUse accessors instead of
constant member attributes. This allows move of StereoGroups.

* RDKit style guide

* Add header required on Windows.

* get the SWIG wrappers to build
2018-09-26 15:44:23 +02:00
Greg Landrum
2738c35178 Fixes #1903 (#1971)
* Fixes #1903

* update SWIG bindings too
2018-07-25 09:14:17 +02:00
Greg Landrum
77078eac66 Add an auto-populated file with cmake config options (#1874)
* this is a rough first pass, needs to be finished and is a strong argument for changing the names of some of the #defines that are currently used

* rationalize the rest of the #defines
add something to the release notes about this
2018-06-09 05:41:28 +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
greg landrum
f051e329fd changes to get wrapper builds working on windows with VS2017 2018-04-11 15:28:58 +02:00
Greg Landrum
b8738361f1 Fixes #1776 (#1780)
* add wrapper for reaction fingerprints.
Fixes #1776

* Move definitions of default fingerprint params to .cpp file.

* just a kick to get travis to run
2018-03-20 10:10:40 -04:00
Paolo Tosco
5649405444 Fixes Java wrapper build error with Boost 1.64 (#1613) 2017-11-15 06:36:15 +01:00
Brian Kelley
e70599a12e Dev/pickle properties (#1277)
* Adds pickling of properties (optional)

* Ignores RDKit::Dict::Pairs - previously private

* Fixes AllProps definition

* Fixes BondProps seperation

* Fixes reaction pickling - Adds ability to pickle atom + QueryAtom

* Bumps pickle version

* Removes fugly post-increments

* Changes Default to NoProps

* Tests more options for pickling

* Runs clang format

* Adds get/setDefaultPropertyPickleOptions, exposes to python

* turns tests back on.

* Fixes enum (clang was allowing c++11 semantics)

* Adds global settings test

* Code/GraphMol/testPicklerGlobalSettings.cpp
2017-02-09 16:06:01 +01:00
Brian Kelley
092ab6ff12 Fixes csharp build for 64 bit systems (#1098)
* Fixes csharp build for 64 bit systems

* Need to support make and make install stages

* switch to an alternate strategy and get it working for the java wrappers too
this now builds for me on 64bit win10 with MSVC14

* add missing files from that last commit

* Hopefully fixes unix and osx builds while maintaining msvc builds

* Fixes mono builds, removes python check
2016-10-14 15:40:05 +02:00
Paolo Tosco
a286112cbe Java wrappers for Trajectory/Snapshot objects (#977)
* - started SWIG wrapping of Trajectory code
* - work in progress
* - wip
* - wip
* - WIP on TrajectoryTests.java
* - WIP
* - WIP
* - TrajectoryTests.java completed
* - reverted file modified my accident
2016-07-20 22:51:01 -04:00
Brian Kelley
2debdfde0d Adds RDAny (smaller generic holder) Updates all used dictionaries (#896)
* Adds RDAny (smaller generic holder) Updates all used dictionaries

This is an API compliant version of the current rdany system,
but uses a lot less memory in practice.

* Removes code duplication

* Converts CHECK_INVARIANT to TEST_ASSERT

* Fixes DoubleTag issue

* Adds Bool to DoubleMagic implementation

* Removes reference to property pickler
2016-05-29 17:04:21 +01:00
Greg Landrum
a2278045da Gets Java wrappers building with modern C++ compilers and recent versions of boost 2016-02-18 06:24:42 +01:00
Greg Landrum
1aec53181d add Int_List to SWIG wrappers 2015-10-12 07:34:57 +02:00
Brian Kelley
8a66860d74 Updated docs 2015-09-10 11:34:41 -04:00
Brian Kelley
5f62a5f62f Properly use shared_ptrs 2015-09-09 16:49:08 -04:00
Brian Kelley
7240f92ab5 Add First pass at Java FilterCatalog wrapper 2015-09-03 14:55:06 +02:00
Greg Landrum
a5548e6e26 initial support for an explicit MolDraw2DSVG object; bring the csharp wrappers somewhat up-to-date 2015-02-04 07:16:30 +01:00
Greg Landrum
c8582645b2 Merge branch 'master' into fmcs_port_21Feb2014 2014-08-10 07:29:09 +02:00
Greg Landrum
4fc6a95ae9 "Fix" a problem with modern versions of boost and old versions of SWIG 2014-08-10 07:28:37 +02:00
Greg Landrum
c37ddd908e first pass at adding fmcs to the swig wrapper (untested) 2014-08-10 07:08:58 +02:00
Greg Landrum
76188798a2 Fixes #285 2014-06-27 08:02:53 +02:00
Greg Landrum
0639f0c3d4 Merge branch 'PDB_29September2013' 2013-10-16 05:35:12 +02:00
Greg Landrum
40908a43da mmff into SWIG wrapper. first tests
note: these changes remove some direct ff-manipulation functionality that was
present previously
2013-10-12 16:24:18 +02:00
Greg Landrum
21393521a3 first java wrappers of pdb stuff 2013-10-11 18:06:09 +02:00
Greg Landrum
dafff3bcaf stop including our own std_vector.i, instead just extend the one provided with swig; duplicate the std_list file into the csharp wrapper in case it ends up needing to be different 2012-11-21 16:11:16 +00:00
Greg Landrum
3a3b582d28 clean up + add support for D and T in molecular formula 2012-07-27 06:16:45 +00:00
Greg Landrum
2575bfbfb6 initial addition of avalontoolkit support 2011-12-23 06:17:39 +00:00
Greg Landrum
c6f08a7522 add support for a diversity picker to java wrapper 2011-10-08 12:59:40 +00:00
Greg Landrum
c757ea64b6 add support for replacements in smiles and smarts.
remove SmilesToMol and SmartsToMol from RDKFuncs (they leaked)
remove useless wrapper file (SmilesParseOps.i).
2011-07-07 05:45:31 +00:00
Greg Landrum
acbc80ef73 sync with trunk. add inchi support to java wrapper. 2011-06-29 04:42:05 +00:00
Greg Landrum
800a4c2149 additional functionality required by the knime nodes 2011-04-12 10:07:52 +00:00
Greg Landrum
c7ef21088b add initial version of new swig wrappers 2011-04-07 05:22:00 +00:00