Commit Graph

2620 Commits

Author SHA1 Message Date
greg landrum
f0f40093e7 update expected results
necessary because #1940 is not on the production branch
2018-08-14 06:56:05 +02:00
Greg Landrum
3b61dc42c2 Fixes #1990 (#1992)
* Fixes #1990
makes sure we don't destroy a double bond's StereoAtoms just because a bond connected to one of its atoms is removed

* change in response to review
2018-08-14 01:56:24 +02:00
Greg Landrum
b3cdbae2bb Fix github1928 (#1946)
* add the failing test and some debugging info

* fixes #1928
Stop allowing rused-ring aromaticity if the rings share more than one bond
2018-08-14 01:56:04 +02:00
Greg Landrum
aa307b8fe4 fixes #2000 (#2001) 2018-08-14 01:23:10 +02:00
Greg Landrum
673ade8fc5 Call updatePropertyCache() before generating SMARTS. (#1986)
Fixes: #1985
2018-08-14 01:22:26 +02:00
Greg Landrum
618f4b0705 Fix for #1968 (#1969)
* Fixes #1968

* add another test
2018-08-14 01:17:43 +02:00
Greg Landrum
5a96f47e72 a bit of adaptation to the status of the release branch 2018-07-18 10:07:22 +02:00
Greg Landrum
e8c5eb1039 Fixes #1869 (#1961)
Fixes #1955
2018-07-18 09:06:55 +02:00
Greg Landrum
ba0d2146dd Fixes #1950 (#1958)
* Fixes #1950

* Changes from review:
- replace MolAtomList with MolAtomQuery
- support MRV SMA as well
2018-07-18 09:05:29 +02:00
Greg Landrum
7fb09f89eb Fixes #1906 (#1956)
* Fixes #1906

* changes in response to review
2018-07-18 08:55:14 +02:00
Greg Landrum
4e3e074543 Fixes #1920 (#1921)
* Add a test for #1920

* Fixes #1920
2018-07-18 08:49:00 +02:00
Greg Landrum
5000cf2228 Fixes #1925 (#1959)
This also introduces a dependency on boost::format since it seems much cleaner than using a stringstream
2018-07-18 08:46:44 +02:00
Greg Landrum
ebb214a046 Fixes #1924 (#1953) 2018-07-18 08:46:16 +02:00
Greg Landrum
09636c55e2 Fixes #1936 (#1945)
* Fixes #1936
doctests of the book still need to be verified

* a fix that is related to #1940

* add test for what was actually reported
2018-07-18 08:42:20 +02:00
Brian Kelley
c66c229cbc Fix embarassing bug, check the counter each iteration not just after searching (#1939) 2018-07-18 08:35:59 +02:00
Paolo Tosco
cd8454e42d Fixes locale handling on Windows (#1892)
* - fixes locale handling on Windows

* - removed comment which is no longer relevant
2018-07-18 08:29:20 +02:00
Brian Kelley
b23dd2fc3a Fix for matchOnlyAtRgroups to allow H replacements as well (#1871)
R-group Decomposition: allow H replacements when matchOnlyAtRgroups is set
2018-07-18 08:28:53 +02:00
Brian Kelley
4d1f6c7f6a RWMol::destroy now calls ROMol::iniMol (#1844) 2018-05-13 16:36:39 +02:00
Dan W
61aa29d1b1 Allow types.h to be included in applications that use /D_USE_MATH_DEFINES (#1846)
* spelling

* Allow types.h to be included in applications that set _USE_MATH_DEFINES

Our application defines _USE_MATH_DEFINES on the visual studio
compiler command line, so every compilation includes the macro
definition. Including types.h (or anything other RDKit header,
basically) causes compilation to fail with a "doubly defined
macro" error message.

This commit defines the macro locally and only if it is not already
defined
2018-05-13 16:36:15 +02:00
Greg Landrum
a0ce4aee60 builds on ubuntu 18.04 (#1858) 2018-05-13 16:35:32 +02:00
Greg Landrum
d6d3ef6f10 patch from Roger (#1856) 2018-05-13 16:35:08 +02:00
Greg Landrum
7a13a7dfba Fixes #1719 (#1853)
* Fixes #1719

* comment a debugging message back out

* Fixes #1719

* some additional tests for #1719
2018-05-13 16:30:06 +02:00
Greg Landrum
90511c9434 Fixes #1829 (#1830) 2018-04-20 08:13:12 +02:00
Greg Landrum
656a62ca9e add an additional test to make sure the generated PNG is not empty 2018-04-19 06:26:15 +02:00
Greg Landrum
2174465536 minor oversight in fix for #1810 (#1816) 2018-04-11 09:42:11 +02:00
Greg Landrum
d4839de4a0 Various small tweaks (#1814)
* remove a bunch of MSVC compiler warnings

* remove a compiler warning

* try running tests in appveyor

* typo

* investigation

* is the problem the os item?

* investigation

* output on test errors

* if only I could type

* suppress some warnings on windows (and remove a bogus attempt at doing so)

* build without serialization

* this should have been noticed for #1767
2018-04-11 04:52:37 +02:00
Greg Landrum
e8c46ca2a9 Fix/github1810 (#1811)
* Fixes #1810
There's still a problem with stereo atoms (see the commented out test),
but this takes care of the basics and that's up next.

* clean up that last problematic bit.
Still needs all tests to run

* this seems to be a necessary workaround for problems with VS2017.
It's a bit ugly, but shouldn't have any performance impact, so I'm not
going to get too worked up.

* This set of changes alters what we get for some of the InChI test cases.
Adjust for that.
2018-04-11 04:48:16 +02:00
Greg Landrum
2284d5da92 Fixes #1615 (#1797) 2018-04-04 10:43:34 +02:00
Greg Landrum
5cf8a6a9b7 Support for a JSON-based molecule interchange format (#1798)
* expose addRing to python

* backup commit

* basics of atom and bond loading

* basics of atom and bond loading

* do bond stereo too

* Loads of cleanups
Read conformers and molecule properties
Better tests
update one of the test values so that we aren't always testing ccw

* enable auto-download of rapidjson distrib

* reader now mostly done (still missing atomic/bond properties)

* a bit of optimization

* a bit of cleanup

* a bit more optimization

* backup

* test zero-order bonds

* prep work for writer (not done)

* add isotope support

* backup

* getting there with the writing

* progress on writing; still need to do the RDKit part though

* can now roundtrip, including chirality.
double bond stereo needs to wait for backend fixes

* add a timing test for benchmarking

* add a timing test for benchmarking

* add another template

* add parse params; optionally set bond types to aromatic; add python wrapper

* disable benchmark run by default

* write conformers

* refactoring

* docs

* port to commonchem

* switch representation

* start reading and writing properties

* fix a memory problem

* set a common_property for gasteiger charges

* parse partial charges

* add partial charge writing

* reformatting

* add support for disabling parts of the parsing

* remove the "name" property from files

* editing

* more post-review changes

* make the molinterchange build optional

* make them really optional
2018-04-02 05:12:03 +02:00
Greg Landrum
6cacab7fd2 disable building the sln parser with gcc v4.8 (#1801) 2018-04-02 05:10:58 +02:00
Greg Landrum
0d7bb5796f Fixes #1793 (#1795)
A bit of reformatting too.
2018-04-02 05:02:15 +02:00
Greg Landrum
3637cd4d75 Fixes Issue 1614 (#1781)
* This makes assignStereochemistry cleanIt=True not remove CIS/TRANS
bond stereo chemistry that was manually added as described in issue #1614.

Incorrect CIS/TRANS stereochemistry will still be removed by
'cleanIt=true' if symmetry is detected. However, this symmetry
detection doesn't work in more complex pseudo-stereo chemistry cases:
bond stereo that depends on other bond stereo to break symmetry; and
bond stereo that depends on other atom stereo centers to break
symmetry. Test cases for these cases have been added ifdef'd in based
on USE_NEW_STEREOCHEMISTRY.

However, getting USE_NEW_STEREOCHEMISTRY to work in a copacetic way is
not trivial, I tried a little bit here to no avail. I'm leaving the
test cases checked in as they should be useful when we decide to make
the plunge into using Canon::chiralRankMolAtoms for symmetry detection
instead of the CIP ranks.

So this fixes at least the glaring issue of STEREOCIS and STEREOTRANS
being incorrectly removed by 'cleanIt=true' when it is indeed valid
stereo. The checks made for symmetry are rudimentary, but don't feel
complete.

* add another test; make what's being tested explicit

* test smiles generation and function when Hs have been added

* add a test that fails

* I think that it's ok to remove this

* backup

* At this point all tests pass.
Bond wedging is now handled even if sanitization is turned off when mol files are read

* adjust to code changes

* fix a couple problems caused by rebase

* update docs
2018-04-01 17:48:36 +02:00
Boran Adas
8452ec59f9 Fix for issue #1730 (#1792)
* Fix for issue #1730

setAromaticity() now works even if there are aromatic atoms present and the relevat test case is added

* Removed setaromaticity flag
2018-03-25 06:38:34 +02:00
susanhleung
1743ced5a5 add Tversky index calculation for shapes (#1777)
* trying to add shape tversky

* alpha and beta no defaults, added more tverskyIndex tests to testGrid

* corrections to GridUtils.h and ShapeUtils.cpp

* corrections to GridUtils.h
2018-03-24 08:33:30 +01:00
Greg Landrum
3f136946e3 Start using "*" instead of "[*]" in SMILES (#1788) 2018-03-23 15:52:52 -04:00
Jeff van Santen
e593d13f6f Fix typo in GetBoolProp documentation (#1770)
@jvansan Thanks!
2018-03-23 12:25:36 +01: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
Greg Landrum
0f74b0f0be Fixes #1763 (#1765)
rename that test too
2018-03-09 08:38:26 -05:00
Greg Landrum
bea45ebece make the build work even if boost::serialization is disabled (#1767)
* make the build work even if boost::serialization is disabled

* get tests working when serialization is disabled
2018-03-06 11:47:06 -05:00
Greg Landrum
26718fd45f Fixes #1756 (#1757) 2018-02-22 03:43:46 +01:00
Greg Landrum
0c530637f2 Stop dereferencing end() iterators (#1748)
* cleanup the build requirements for test-valgrind

* cleanup a recently added test

* the new iterators would dereference end() iterators. Fix that.
2018-02-22 03:43:28 +01:00
Greg Landrum
108d84ab1e Switch from boost::thread to std::thread (#1745)
* boost::thread mostly gone... still need to get rid of once
everything compiles

* replace boost::call_once

* remove link-time dependency on boost::thread

* first pass at using async

* switch to using async everywhere
2018-02-22 03:43:07 +01:00
Greg Landrum
f6bbba411d Fix github1734 (#1741)
* Fixes #1734
still want some additional testing though

* formatting

* typo

* add python tests

* response to review
re-enable some forgotten tests
2018-02-15 20:24:40 -05:00
Brian Kelley
87dda6acd2 Fixes #1735 (#1743)
* Fixes #1735

I’m unsure if this is the correct solution, it appears
empty molecules never initialize their rings.

* Return immediately when ranking empty molecules

* Make github issue the correct one

* Always resize results to the number of atoms
2018-02-15 05:39:02 +01:00
Greg Landrum
007a11ea77 Fixes #1749 (#1750)
* Fixes #1749

* remove some deprecation warnings in the unit tests
2018-02-15 05:39:02 +01:00
Greg Landrum
42eecc664d Integrate Coordgen (#1708)
* first pass, does not yet actually work

* pass2, same problems

* pass2, same problems

* another test

* new tests; bugfix

* move the code out to a header

* add a double bond example

* enable auto-downloads of the code

* move the function to its own namespace

* first pass at a basic python wrapper

* change coordgen commit used

* try supporting bond stereo; does not currently work

* cis/trans seems to now work.

* first pass at templates; needs testing

* use the fixed flag too

* need mol align

* expand test

* initial pass at python wrapper for template

* simplify tests

* add an option to directly use a substructure match for alignment

* scaling

* add #define

* Define a cache setting for RDK_COORDGEN_LIBS to allow these to be used in other packages

* return the conformer id from addCoords

* Make CoordGen the default when it’s available.
This is a backup commit… the tests don’t even come close to passing.

* add some debugging options for a bit

* add alignment step to testing when using non-fixed coords

* Add global to allow use of CoordGen to be disabled
get the basic depictor tests working

* make coordgen the default when it is available

* make sure things continue to work when coordgen is disabled

* get windows builds working

* mods to get this building on windows.
something is screwy with the fileParsersTest1

* no need to generate coords for the 1K C string

* fix java wrappers

* works on linux

* update the (stupid) way dependencies were handled on windows.
this allows a lot of cleanup of cmake files (still more to do)
the linux build is unlikely to work due to the way _statics aren't handled

* docs

* extend forceRDKit applicability

* switch coordgen version

* try using templates

* try to get the template dir finding reasonably robust w.r.t. conda install

* continuing to iterate on the way the template file is installed

* fix a problem caused by the merge

* remove test that should never have been checked in

* update expected results for cartridge tests

* switch back to using the RDKit as the default coordinate generator
2018-02-15 05:36:03 +01:00
Greg Landrum
b0f44cac0c switch to using std::regex in the SLN parser (#1746)
* switch to using std::regex in the SLN parser;
removes the boost regex dependency

* cleanup
2018-02-14 20:54:55 -05:00
Greg Landrum
f35e04403a replace the usage of rdk_auto_ptr with std::unique_ptr (#1752)
That is what was being used for modern c++ anyway
2018-02-14 19:49:47 -05:00
Greg Landrum
8c43f2d6f2 Use uint32 atom and bond indices (#1742)
* Switch to uint32 for atom index to support more atoms

* Test adding and removing big number of atoms (70k)

* Change order of properites in Atom class
2018-02-10 09:43:49 +01:00
Maciej Wójcikowski
7987c7fa66 Treat bonds in PDB explicitly, but make blacklisted ones zero-order. (#1658) 2018-02-10 06:22:47 +01:00