Commit Graph

2352 Commits

Author SHA1 Message Date
DavidACosgrove
472c77ac20 Made changes as requested in review of PR.
Most notably, added test cases for C++ and Python which just make sure
the code runs without crashing, no comparison of results with
existing test files.
2016-12-17 17:46:46 +00:00
DavidACosgrove
698a84c94b Moved GenerateDepictionMatching[23]DStructure from Allchem.py to the
core C++ code in RDDepictor and created Python wrappers for them.
2016-12-09 10:44:15 +00:00
gedeck
e9af48ffd7 Issue1071/yapf (#1078)
* Issue #1071: add yapf configuration file

* yapf formatting of Code directory

* yapf formatting of Contrib directory

* yapf formatting of Data directory

* yapf formatting of Docs directory

* yapf formatting of External directory

* yapf formatting of Projects directory

* yapf formatting of Regress directory

* yapf formatting of Scripts directory

* yapf formatting of Web directory

* yapf formatting of rdkit directory
2016-09-23 04:58:46 +02:00
Greg Landrum
adbfb5bd8b Fixes #1044 (#1077) 2016-09-23 04:57:27 +02:00
Greg Landrum
9dcef9ac57 Fixes #607 (#1075) 2016-09-23 04:57:07 +02:00
Greg Landrum
eabba306e1 Fixes github #1073 (#1074)
* Fixes #1073

* add a tests for #1073
2016-09-23 04:55:14 +02:00
Greg Landrum
99efdd2bd3 Fixes #1041 (#1070) 2016-09-22 14:38:13 +02:00
Greg Landrum
c503a37102 get the new multi-mol drawing code building properly on windows (#1072) 2016-09-22 06:12:58 +02:00
Greg Landrum
98e3e941da Merge branch 'feat/draw_multiple_mols' of https://github.com/greglandrum/rdkit into greglandrum-feat/draw_multiple_mols 2016-09-14 16:42:48 -07:00
Greg Landrum
23fce87073 Draw crossed bonds (#1052)
* remove dead code

* Draw crossed bonds
2016-09-14 11:01:50 -04:00
Greg Landrum
159413e6fe add pickle support to FilterCatalog (#1063) 2016-09-13 12:22:28 -04:00
Greg Landrum
9d92c9d4e4 Merge branch 'fix/github1051' of https://github.com/greglandrum/rdkit into greglandrum-fix/github1051 2016-09-09 16:57:33 +02:00
Greg Landrum
6745264a82 Adds some additional canned atom and bond query definitions (#1047)
* atoms: radical electrons and presence of a chiral tag

* bonds: presence of stereo

* add new atom queries to python wrapper

* add queries for missing atom chiral tags
2016-09-09 10:31:02 -04:00
Greg Landrum
7c964a752f Fixes #1051 2016-09-02 11:23:43 +02:00
Greg Landrum
f0bb85dfdb Fixes #1049 (#1050)
* fixes #1049
That was almost too easy

* elaborate the test a bit
2016-09-01 09:22:17 +02:00
Greg Landrum
eb2b81c1e2 handle null molecules 2016-08-31 20:13:45 +02:00
Greg Landrum
53247114a3 more grid 2016-08-31 07:20:21 +02:00
Greg Landrum
29d9251f93 first pass at drawing a grid 2016-08-31 05:01:50 +02:00
Greg Landrum
91674e6482 Fixes issue #1021 (#1026)
* Fixes #1021, kind of.
The test for the bug passes, but there are other failures

* all tests except hanoi pass

* passes all tests

* remove some vestigial code

* remove debug-droppings

* minor documentation
2016-08-30 18:59:10 +02:00
Greg Landrum
435a07a30e better control over scaling 2016-08-30 17:56:34 +02:00
Greg Landrum
cb895f93c7 first pass of python wrapper 2016-08-30 17:02:10 +02:00
Greg Landrum
8009b867b5 Fixes #1034: squiggle bonds are now preserved if no sanitization is done (#1043)
* backup commit

* typo

* forgot the test file

* also test that atom chirality is handled properly
2016-08-30 16:02:31 +02:00
Greg Landrum
1eb2c4924a grid drawing now working 2016-08-30 15:18:32 +02:00
Greg Landrum
8b6ecda0cd first pass at multiple panels 2016-08-30 14:41:56 +02:00
Greg Landrum
ad79aff187 more or less works 2016-08-30 13:45:36 +02:00
Greg Landrum
c045e9f88b passes all drawing tests 2016-08-30 11:04:29 +02:00
Greg Landrum
2dab4d434d does not yet work 2016-08-30 10:45:59 +02:00
Paolo Tosco
87b69a7d82 Added the option to label deuterium and tritium as D and T (#1011)
* - added the option to label deuterium and tritium as D and T
  to the C++ and Python drawing code

* - added test for deuterium/tritium labels
2016-08-19 04:51:04 +02:00
Greg Landrum
7a49dd3bb9 fixes #1023 (#1027) 2016-08-18 16:29:29 -04:00
Paolo Tosco
a5699d9000 FMCS fix for Windows DLLs (#1030)
* - Fixed a bug which prevented FMCS to work correctly on Windows when
  linking to DLLs

* - removed spurious debugging info
- fixed function name

* - correct fix for the pyFMCS issue

* - the already existing macro RDKIT_WRAP_DECL is used in lieu of
  RDFMCS_DLLIMPORT
2016-08-17 04:58:34 +02:00
Brian Kelley
71a0ae32b2 Adds replaceCore function that takes a matchVect (#1013)
* Adds replaceCore function that takes a matchVect

* Fixes error reporting, adds tests

* Switches PRECONDITION to ValueError exceptions

* Fixes MatchVectType annoyance in swig.  Don't know why this is necessary.

* Silences warnings

* Adds working doctests and better explanations.
2016-08-17 04:40:59 +02:00
Greg Landrum
ddb13ecc16 Add an initial version of wavy bonds (#1014)
* Add an initial version of wavy bonds
Used for attachment points and unknown stereochem
This is not a perfect implementation, but is a decent place to start
Currently only supports SVG and Cairo canvases.

* code review cleanup
2016-08-16 08:06:27 +02:00
Greg Landrum
003ede5889 remove a compiler warning (#1019) 2016-08-11 06:11:39 +02:00
Brian Kelley
ddf7c73b50 Adds Atom atom map and rlabel apis (#1004)
* Adds Atom atom map and rlabel apis

* Moves RLabels to their own namespace, adds other properties.

* Removes namespaces, liberally adds Atom to function names.

* move detail::computedPropName to RDKit::detail::computedPropName
2016-08-11 04:46:41 +02:00
Brian Kelley
fe7d4fefb3 Dev/chemtransforms chirality (#1006)
* Adds useChirality to replaceCore, fixes atom ordering
  n.b. when replaceDummies==False and labelByIndex==True
   the indices used are the indices of the dummy atom,
   previously they were the atoms the dummy was connected
   to.

* Adds useChirality to the remaining functions in ChemTransforms

* Adds a mess o tests

* Fixes labelByIndex=false ordering for dummies

* Removes debugging statements
2016-08-09 04:41:36 +02:00
Greg Landrum
cb710340a1 Support ETKDG from within the SWIG wrappers (#1010)
* add test files

* add seed to the mol name so that it is obvious

* add support (and tests) for ETKDG to Java
2016-08-08 11:08:55 +02:00
Paolo Tosco
7aa42e3fd9 Fixes MMFF94 aromaticity perception and ChemicalForceFields.MMFFHasAllMoleculeParams() (#1007)
* - calcImplicitValence() and setNumExplicitHs() are now called after
  all aromaticity flags have been set

* - ChemicalForceFields.MMFFHasAllMoleculeParams() now operates on a copy of the molecule
  such that atom and bond aromaticity are not altered by the check
- test11 was added to GraphMol/ForceFieldHelpers/Wrap/testHelpers.py to check
  for the two bugs fixed by this PR

* - modified the prototype of MMFFHasAllMoleculeParams() to take a const ROMol&
  and make a copy of that within the function body
- removed unnecessary imports from testHelpers.py
- replaced EmbedMolecule() with a quicker test

* - WIP

* - now the issue seems to be properly fixed, as the implicit valence
  made explicit does not sum up anymore to the already explicit valence
2016-08-06 05:21:48 +02:00
Greg Landrum
7fd991e13d Fixes #962 (#1003) 2016-08-05 07:57:20 -04:00
Brian Kelley
900fc391aa Fixes middle-justified symbols in sd files, adds M_CHG tests (#1002)
* Adds boost::trim, M  CHG tests

* stoi is a c++11 feature

* Actually test charges
2016-08-02 14:41:08 +02:00
Brian Kelley
7440ac082f Fixes rounding errors in test (#1001) 2016-08-02 06:07:47 +02:00
NadineSchneider
61ca812972 ChemReactions: Bugfix in copy constructor (#996) 2016-07-27 10:22:13 -04:00
Paolo Tosco
63b6bdef46 - RCSB SDF files which feature right-justified element names can now be parsed (#994)
- added a relevant test
2016-07-27 14:49:52 +02:00
Greg Landrum
339fa081e5 Merge fix/github908 branch 2016-07-27 04:49:55 +02:00
Greg Landrum
435a34df4f Expose the aromatizeIfPossible parameter to python (#991)
- Add tests for that
- Improve the C++ tests for aromatizeIfPossible
2016-07-26 13:17:41 -04:00
Greg Landrum
91212a4eb3 A variety of drawing-related changes (#986)
* Fixes #982
also changes bond-wedging algorithm to favor lighter non-ring bonds

* prefer wedging bonds to lower-degree atoms

* Fixes #983

* small fixes
- Fix a problem where a chiral atom is selected to draw a wedge to instead of a ring atom
- Fix a problem where two calls to PrepareMolForDrawing() led to two wedged bonds from an atom.

* Fixes #985

This isn't the most satisfying solution (the wedged bonds are sometimes a bit too large), but it gives reasonable results on the test cases I've tried.
2016-07-25 17:28:41 -04:00
Greg Landrum
2afeb3b086 Dev/cleanup bad confs (#973)
* passes all tests, but is still not 100 percent there

* generalize _centerInVolume for possible future use

* better testing of tetrahedral centers
update tests

* only test ring atoms

* handle 4-coordinate n too

* add a volume check; not all tests pass

* turn off debug printing

* rearrange the order of tests.
if this is not done, we get a seg fault when the github55 test runs.
the whole thing needs to be run under valgrind to track this down

* clear up a memory leak

* a bit more documentation
add a constant for one of the threshold values

* get more permissive on the energy tests.
Only do the extra tetrahedral tests for atoms in at least two rings.

* add a DEBUG_EMBEDDING option to make tracking down failures easier

* enable better debugging when the flag is set

* remove a FIX

* remove some debug printing from the tests
2016-07-25 14:26:19 -04:00
Greg Landrum
3e5605e793 Fixes #975 (#976) 2016-07-21 15:22:32 -04:00
Paolo Tosco
d73f3e1fde - minor fix to Code/GraphMol/Wrap/testTrajectory.py (#979) 2016-07-20 22:53:03 -04: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
659ac6cb27 Adds aromatization and reaction options to AdjustQuery (#965)
* Adds aromatization and reaction options to AdjustQuery

 aromatizeIfPossible - checks kekulized queries for
    aromatic compatibility
 adds IGNORE_MAPPED and IGNORE_ATTACHEDRGROUPS options
  to adjustDegree

* Missed return false.

* Removes IGNOREATTACHEDRGROUPS
2016-06-29 05:09:30 +02:00