Commit Graph

3399 Commits

Author SHA1 Message Date
Greg Landrum
b5595611a6 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:26:09 +02:00
Boran Adas
d72e1ecab7 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-24 23:28:43 -05:00
Greg Landrum
fcae77cd61 fix a modern_cxx typo 2018-03-23 16:23:29 +01:00
Greg Landrum
77a44f667e Cleanup a bunch of compiler warnings (#1696)
* remove a bunch of compiler warnings

* remove some more warnings on windows (there are still plenty to go...)
2018-03-23 14:11:07 +01:00
susanhleung
4546e8cba8 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-17 19:47:28 +01:00
Greg Landrum
b1e0f67ad8 Fixes #1763 (#1765)
rename that test too
2018-03-16 06:46:45 +01:00
Greg Landrum
bd4072d3cc 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-16 06:45:36 +01:00
Jeff van Santen
754a62ad35 Fix typo in GetBoolProp documentation (#1770)
@jvansan Thanks!
2018-03-11 22:26:03 -04:00
jones-gareth
6ff69a90ce Added Morgan feature fingerprints to Java API (#1764)
* Added Morgan feature fingerprints to Java API

* Cosmetic change to trigger buil now Avalon tools are available
2018-03-05 21:25:53 +01:00
Brian Kelley
73ae05df12 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 04:38:04 +01:00
Greg Landrum
15d8fbe837 Fixes #1749 (#1750)
* Fixes #1749

* remove some deprecation warnings in the unit tests
2018-02-14 21:13:45 -05:00
Maciej Wójcikowski
500d19ea8e Treat bonds in PDB explicitly, but make blacklisted ones zero-order. (#1658) 2018-02-09 12:55:43 +01:00
Greg Landrum
18be52e446 Fixes #1689 (#1733) 2018-02-08 05:21:19 +01:00
Greg Landrum
e70ad1d016 Fixes #1728 (#1731)
* Fixes #1728

* make me work on the mac
2018-02-05 08:21:50 -05:00
Paolo Tosco
75cfdec69f - make bond stereo detection in rings consistent (#1727) 2018-02-01 04:27:15 +01:00
Paolo Tosco
a2eb632ae2 - updated the PgSQL README (#1722) 2018-01-31 07:58:30 +01:00
Maciej Wójcikowski
50299cbbf2 Improve AddHs for molecules read from PDB (#1647)
* Add AtomPDBResidueInfo during molops::addhs

* Test addhs and AtomPDBResidueInfo

* Little cleanup

* Fix serial

* Refactor code, add unique Hs labels

* Move code to separate function + bugfix.

* Make function optional (AddHs residueInfo param)

* Rename argument
2018-01-18 17:10:19 +01:00
Greg Landrum
139925047f get this compiling 2018-01-14 05:37:36 +01:00
Greg Landrum
3f8c6b8a4d Fixes #1691 (#1718)
* add the relevant tests

* Fixes #1691
2018-01-13 04:48:50 +01:00
Greg Landrum
4cee071235 backport the fix for #1695 2018-01-13 04:39:17 +01:00
Greg Landrum
82ce108a34 part of fix for #1703 2018-01-13 04:39:17 +01:00
Greg Landrum
b6946d95fe Fixes #1703 (#1714)
* does not actually work

* all tests pass;
Fixes #1703

* make that a bit cleaner
2018-01-13 04:39:17 +01:00
Greg Landrum
6869691c16 backport tests to c++98 2018-01-13 04:39:17 +01:00
Brian Kelley
6526633192 Fix/rgroup prefer matching nonhs over hs (#1707)
* Tweak the scoring function to penalize non h matches considerably.  Only full H rgroups get a one.  Might need to tweak int the future

* Scale the hydrogens as 1/# mols unless they are a full group
2018-01-13 04:39:17 +01:00
Greg Landrum
11a4b52e39 Fix a bug reported by Roger S (#1720) 2018-01-12 11:12:53 -05:00
Paolo Tosco
7b793285e8 - cosmetic fix of an indentation (#1717)
- added dependency from Boost include files to COde/PgSQL/rdkit/CMakeLists.txt to allow conda rdkit-postgresql95 build
2018-01-12 14:55:08 +01:00
Greg Landrum
b6645fab90 Allows CIS/TRANS double bonds to be de-pickled (#1710) (#1711)
* Fixes #1710

* add an additional test for #1563 while we're here
2018-01-07 14:54:01 -05:00
Greg Landrum
a41e55a5b7 Fixes github #1702 (#1706)
* Fixes #1702

* more on #1702
2018-01-04 11:34:47 -05:00
Matt Swain
020946e2f4 Update embedded InChI to v1.05 (#1684)
* Update download-inchi.sh for InChI 1.05

* Fix downloadAndCheckMD5

* Update FindInchi.cmake for InChI 1.05

* Update CMakeLists.txt for InChI 1.05
2017-12-20 06:36:16 +01:00
Paolo Tosco
6655a694f5 There is no need to enforce that (i, j) and (k, l) be bonded when setting a i, j, k, l dihedral (#1673)
* - there is no need to enforce that (i, j) and (k, l) be bonded
  when setting a i, j, k, l dihedral

* - added unit tests for PR #1673
2017-12-01 12:37:57 +00:00
Greg Landrum
d2c6ccb53b Fixes #1668 (#1669)
* Fixes #1668

* add test for the additional Bi valence
2017-11-29 10:58:41 -05:00
Brian Cole
8fdb7fb51c 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 20:22:27 +01:00
Greg Landrum
c9c3991b44 Fix github1657 (#1665)
* re-enable some tests that were commented out (also reformatting)

* re-enable some tests that were commented out (also reformatting)

* Fixes #1657
2017-11-27 09:09:50 -05:00
Brian Kelley
dbd6dd735a Dev/substructlibrary docs (#1620)
* Adds substruct library documentation

* Adds testing of (fixed) documentation code

* Fixes typos and emphasizes the speed of trusted smiles

* Removes colons from parameters in docstrings, was causing warnings
2017-11-22 09:05:28 +01:00
Matt Swain
9b90bc3d94 Use numpy not numeric for boost 1.65+ - fixes #1581 (#1664)
boost python numeric no longer exists in boost 1.65, so check boost version and conditionally use boost python numpy.
2017-11-18 06:30:32 +01:00
Brian Cole
6eb710254f Make sure EmbedMultipleConfs is deterministic for very large seeds and a seed of 0 (#1635)
* Make sure EmbedMultipleConfs is deterministic for very large seeds and a seed of 0.

Fixing two distinct bugs:

- A randomSeed of 0 didn't use '0' as the seed even though the
  documentation said that it should.

- Very large seeds could overflow the 'int' representation during
  calculation of a new internal seed. This would make
  EmbedMultipleConfs non-deterministic even though the user provided a
  valid seed.

* Adding a C++ test for case pull request #1635.
2017-11-14 03:58:35 +01:00
Maciej Wójcikowski
dac6504905 [MRG] Fix PDB reader + add argument to toggle proximity bonding (#1629)
* Add parameter to skip proximity bonding during PDB reading

* Test proximityBonding flag

* Remove multivalent Hs and bonds to metals in PDB

* Add tests for multivalent Hs and metal unbinding

* Remove covalent bonds to waters

* Test unbinding of HOHs

* Refactor funxtions

* Rename flag for cosistency

* Include flavor in double bond perception

* Add metalorganic test (APW ligand)

* Validate input foe IsBlacklistedPair and minor changes.
2017-11-14 03:49:50 +01:00
Patrick Avery
f4767dc1df Update CPack to create .deb files correctly (#1580)
* Update CPack to create .deb files correctly

* get this working with debs
2017-11-12 12:53:54 +01:00
sriniker
6106136821 Improved regression test for ETKDG version 2 (#1640)
* version 2 of ETKDG

* setting default and changing to unsigned int

* ETversion 2 only via EmbedParams available

* Some refactoring so that the DG functions that take the parameter object are the primaries.
This should allow new parameters to be added without having to modify the API

* test and wrapper changes to go along with that

* update cookbook to use etkdg

* regression test for ETKDG version 2 improved
2017-11-02 10:23:55 -05:00
sriniker
c650e4dd7c Version 2 of ETKDG (#1597)
* version 2 of ETKDG

* setting default and changing to unsigned int

* ETversion 2 only via EmbedParams available

* Some refactoring so that the DG functions that take the parameter object are the primaries.
This should allow new parameters to be added without having to modify the API

* test and wrapper changes to go along with that

* update cookbook to use etkdg
2017-10-31 06:43:28 -05:00
Greg Landrum
642e6e6238 Enable windows build that uses cairo (#1628)
* add cairo to moldraw2d wrappers link (for windows)

* add ChemReactions to moldraw2d wrappers link (for windows)

* add SmilesParse to moldraw2d wrappers link (for windows)
2017-10-29 11:51:51 +01:00
Noel O'Boyle
cf537a18b8 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-10-27 21:54:14 +02:00
Greg Landrum
fd67e249f7 get this to compile on windows 2017-10-27 08:26:58 +02:00
Greg Landrum
28d34bf253 send a string, not a stringstream, to the log message 2017-10-27 07:39:54 +02:00
Brian Kelley
1516d9b56a Turns off exception throwing for certain classes of Rlabel sanitization
It now does the best it can and moves on (#1621)
2017-10-27 06:54:08 +02:00
Paolo Tosco
b7c7ff880e - GetMolFrags now optionally returns atom indices along with mols (#1602)
* - GetMolFrags now optionally returns atom indices along with mols as its C++ counterpart
- added relevant test in rough_test.py

* Changed the way fragment maps are returned by rfmolops.GetMolFrags()

* - Fixed build error on Linux
2017-10-26 17:21:01 +02:00
Paolo Tosco
e477307357 Fixes Java wrapper build error with Boost 1.64 (#1613) 2017-10-22 00:39:51 -04:00
Greg Landrum
d29844a614 Fixes #1605 (#1606) 2017-10-06 11:07:10 -04:00
Greg Landrum
0775cf0da5 add substructure searches of Mols using MolBundles from Python (#1603) 2017-10-03 17:46:44 -04:00
Greg Landrum
28f8421644 set atom->setQuery() to delete old query (#1604)
adjust the rest of the code to respect that
2017-10-03 17:46:06 -04:00