Commit Graph

112 Commits

Author SHA1 Message Date
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
Paolo Tosco
f7c888844d moved test.h from RDBoost to RDGeneral for consistency with export.h (#2074) 2018-10-11 17:35:23 -04: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
Greg Landrum
9b11272eec Fixes #1972 (#1983) 2018-07-30 10:43:16 -04:00
Greg Landrum
fdf1491c8c Fixes #1925 (#1959)
This also introduces a dependency on boost::format since it seems much cleaner than using a stringstream
2018-07-16 10:44:59 -04: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
3f136946e3 Start using "*" instead of "[*]" in SMILES (#1788) 2018-03-23 15:52:52 -04:00
Greg Landrum
4049814132 Support some cactvs extensions to SMARTS (#1704)
* add queries for the number of heteroatom neighbors

* support cactvs "z" extension
this includes support for range queries on z that could
be extended to other query types as well

* extend range query extension to other SMARTS primitives

* add the less-than and greater-than versions of the range queries

* updates and new tests

* update .cmake files

* support [#6] in SMILES

* document SMILES extensions (such as they are)

* Add support for cactvs's Z queries

* add support for ^4 and ^5

* get tests running
doc update

* book updates

* update .cmake files
2018-01-04 12:00:39 -05:00
Greg Landrum
d15efc1ac9 Make the defaults for some functions less error prone. (#1690)
* auto generate coords in mol block writer if includeChirality = True

* default to include chirality when writing mol blocks/files

* make isomeric smiles the default; note that not all tests are passing at the moment

* update a reaction test

* update expected cartridge search results
at this point all python, c++, and cartridge tests pass

* docs

* update incompatibility docs

* update doctests

* these now build

* minor example update

* update expected c++

* typo

* make allowCXSMILES=true the default

* add auto perception of chirality when reading 3D structures from mol blocks

* explain changes in release notes

* further doc update
2017-12-22 08:09:36 -05:00
Brian Cole
866ea59104 Issue 1652 (#1654)
* Fix for issue #1652

* The chirality should not be inverted when it is the first atom and the
degree is 2 like in this case: [C@](Cl)(F)1CC[C@H](F)CC1

Also added the test cases listed in issue #1652 and made them check
the number of stereo centers stays consistent.

* Updating comment to make more clear based on Brian and Greg's recommendations.
2017-11-27 19:36:46 +00:00
Noel O'Boyle
c22e8eecb0 Add support for %(NNN) notation for ring closures (#1624)
* Add support for %(....) notation for ring closures

* add the .cmake files

* add the extended numbering to SMARTS as well

* and the .cmake file
2017-11-15 06:48:11 +01:00
Greg Landrum
87786c08b5 Merge branch 'master' into modern_cxx
# Conflicts:
#	.travis.yml
#	Code/GraphMol/FileParsers/MolFileParser.cpp
#	Code/GraphMol/FileParsers/MolFileStereochem.cpp
#	Code/GraphMol/ForceFieldHelpers/UFF/testUFFHelpers.cpp
#	Code/GraphMol/MolAlign/testMolAlign.cpp
#	Code/GraphMol/MolDraw2D/MolDraw2D.cpp
#	Code/GraphMol/MolDraw2D/Wrap/rdMolDraw2D.cpp
#	Code/GraphMol/QueryOps.cpp
#	Code/GraphMol/ROMol.cpp
#	Code/GraphMol/SmilesParse/test.cpp
#	Code/GraphMol/Trajectory/Trajectory.cpp
#	Code/GraphMol/Wrap/Atom.cpp
#	Code/GraphMol/Wrap/Bond.cpp
#	Code/GraphMol/new_canon.cpp
#	Code/RDGeneral/testDict.cpp
#	Code/SimDivPickers/Wrap/MaxMinPicker.cpp
2017-10-05 05:58:38 +02:00
Greg Landrum
4862c920a5 Fixes github1567 (#1576)
* Fixes #1567

* update expected results

* some cleanup and documentation
2017-09-19 08:04:18 -04:00
Greg Landrum
c21605dbea SMILES lexer optimization/enhancement (#1575)
* needs testing

* add some tests, update periodic table

* update isotope data from NIST
2017-09-17 09:12:53 -04:00
Greg Landrum
915cf08faa run clang-format with c++-11 style over that 2017-04-22 17:19:10 +02:00
Greg Landrum
7c0bb0b743 clang-tidy output 2017-04-22 17:09:24 +02:00
Greg Landrum
270f7b76e5 Partial support for reading CXSMILES (#1237)
* add a SmilesParserParams object to prepare for this

* add a SmilesParserParams object to prepare for this

* add tests for the SmilesParseParmas

* support name parsing, should it be the default?

* rename CXNSmiles to CXSmiles;
add a spirit parser for CXSmiles coordinate that is at least syntax correct

* abandon boost::spirit for now; crude atom token parser

* support params in smiles parser (not tested, may not build)

* can read coords and atom labels along with mol names; crude, but works

* read coordinate bonds

* remove some compiler warnings with VS2015

* remove a bunch of compiler warnings on windows

* remove more warnings on windows

* remove more warnings on windows

* backup commit: first pass at parsing query features

* radical spec parsing

* handle attachment points using atom mapping

* switch to a named property for atom labels

* fix handling of the "A" atom query

* add functions to construct A and Q queries (needs more work)

* fix a problem created while cleaning up warnings earlier

* add some additional convenience functions for making generic atoms.
Still need M and to recognize these while writing CXSMILES

* add M queries; update some tests

* fix a linux compile problem

* get the cxsmiles stuff working in python; basic testing

* support "M" in CXSMILES
2017-01-31 13:50:36 -05:00
Greg Landrum
1ebe5ec39f Fixes #1219 (#1220) 2016-12-20 14:07:18 -05:00
Jan Holst Jensen
5616dc2597 Add support for dative bonds. (#1190)
* Add support for dative bonds to molfile reader plus writer and to SMILES reader (SMILES writer already supports it).
Initial V3000 molfile reader and writer dative bond support by Esben Jannik Bjerrum.

* first pass at adding -> as dative bond in smiles/smarts
more testing required

* all tests pass

* update .cmake files for lex
2016-12-14 09:44:18 +01:00
Greg Landrum
9f9f2cd2d2 support additional trans-uranic elements (#1134)
* support additional trans-uranic elements
- update the atomic data and isotope lists
- update the SMILES and SMARTS parsers

* rebreak an input file
2016-11-03 11:48:31 -04:00
Greg Landrum
a30f85a022 Merge #824 2016-03-30 06:01:50 +02:00
Greg Landrum
0e6392abde two more variations on the test 2016-03-29 06:42:23 +02:00
Greg Landrum
26c8bcb058 remove an incorrect special case 2016-03-28 07:01:18 +01:00
Greg Landrum
d018da2dec Fixes #760 2016-03-23 13:04:41 +01:00
Greg Landrum
2bfb47455b Fixes #786 2016-03-23 11:26:55 +01:00
Greg Landrum
dd73eed0ef add a test for #682 2015-11-26 10:19:54 +01:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Greg Landrum
e37296d7c7 post review 2015-11-14 08:08:14 +01:00
Brian Kelley
54311dff9c Suppresses warnings in tests 2015-10-18 16:09:58 -04:00
Greg Landrum
f070a613da Fixes #532 2015-07-14 15:31:50 +02:00
Greg Landrum
c8343e07db add a couple tests for #532 (do not currently pass) 2015-07-14 06:20:42 +02:00
Nadine Schneider
0cf0dd37ce Bugfix in SmilesWrite and some additional tests for getMolFrags function 2015-04-16 10:53:20 +02:00
Nadine Schneider
0132cc72e9 Merge branch 'newCanon' into master3
Conflicts:
	Code/GraphMol/SmilesParse/test.cpp
2015-04-10 10:25:47 +02:00
Nadine Schneider
ca4bcca6ae Include atom-mapping numbers if present in the canonicalization 2015-04-10 09:47:16 +02:00
Greg Landrum
c134974d3a support empty SMILES and SMARTS strings 2015-04-02 11:11:09 +02:00
Nadine Schneider
7ddff9c71c Some performance fixes 2015-03-20 18:19:08 +01:00
Nadine Schneider
465c7cb4c6 new_canon: Delete numRingMember invariant 2015-02-12 18:06:27 +01:00
Greg Landrum
6d7b2b0914 merge with master 2015-01-22 06:30:51 -05:00
Brian Kelley
95a92282d1 Dictionary access is saniztized and optimized.
o rdkit gains a RDKit::common_properties namespace that contains common string value properties

 o Dict.h and below gain getPropIfPresent that attempts to retrieve a property and returns
  true/false on success or failure.  This is used to optimize access.

 o rdkit learns how to pass property keys by reference, not value.

A new namespace has been added to RDKit, common_properties
that contains the std::string values for commonly used
properties.  This helps to avoid typos in string values
but also avoids a creation of std::strings from character
values.  All accessors (has/get/clear and getPropIfPresent) now pass
the key by reference.

Additionally, getPropIfPresent removes the double lookup
of hasProp/getProp which can be a significant speedup
in the smiles and smarts parsers (10-20%)
2015-01-15 12:23:29 -05:00
Greg Landrum
6ea9029577 fragment smiles construction added. NOTE that bond symbols are no longer used in the canonicalization 2015-01-04 08:32:28 +01:00
Greg Landrum
48c5d0d6ff At this point all C++ tests pass 2015-01-03 06:42:54 +00:00
Greg Landrum
22eb598012 SMILES tests now pass with the exception of:
- the issue 1844617 test
 - the fragment smiles generation tests (commented out at the bottom, there is still implementation work to do for these)
2014-12-30 07:21:25 +00:00
Greg Landrum
76b3efb449 Fixes #389 2014-11-20 03:45:43 +01:00
Greg Landrum
28b22837af Fixes #378 2014-11-10 04:54:32 +01:00
Greg Landrum
ff872cdba7 add test for #378 2014-11-09 11:47:46 +01:00
Greg Landrum
a94ce46a43 smiles tests now pass as well 2014-08-27 22:32:49 +02:00
Greg Landrum
23076b1cdb Fixes #298 2014-07-23 05:31:16 +02:00
Greg Landrum
0839cf41ad Fixes #210 2014-02-03 05:25:27 +01:00
Greg Landrum
9e4ceef1bd Fixes #206 but more testing is definitely required 2014-01-28 06:44:43 +01:00
Greg Landrum
47afcc1f53 remove some debugging printing 2013-12-31 07:12:40 +01:00