Commit Graph

43 Commits

Author SHA1 Message Date
Greg Landrum
e625c58bab Add cis/trans tags to double bonds (#1316)
* add cis and trans to bond stereo

* compiles, does not work

* tests all pass

* Whitespace cleanup to recent changes.

* C++ test case for Bond::setStereo using Bond::STEREOCIS and Bond::STEREOTRANS

* Adding a PRECONDITION to Bond::setStereo to make sure the stereo atoms
are already specified if CIS or TRANS is being specified.

E/Z is technically defined by the topology of the molecule so the
stereo atoms are redundant (easier to understand and use!), but
ultimately redundant with the graph. However, CIS and TRANS is _only_
defined in this usage as the orientation of the atoms in the
getStereoAtoms vector.

* Exposing Bond::setStereo to Python and adding test cases to make sure
it can be used to set CIS/TRANS stereochemistry.

* verify substructure matching works

* Adding Bond::setStereoAtoms to C++ Bond class.

This allows setting the atoms to be considered for CIS or TRANS
directly without a much more costly determination of ranking that E/Z
requires.

* Wrap Bond::SetStereoAtoms into python with a new type of test case.

* docs
2017-02-26 08:15:44 -05:00
Greg Landrum
b31ae66e2d passes all tests except FMCS 2015-12-13 17:18:36 +01:00
Greg Landrum
40bbaa98fa still not there, but closer (maybe) 2015-12-13 10:58:41 +01:00
Greg Landrum
8b65790fde backup 2015-12-11 10:09:53 +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
Greg Landrum
5618819c64 merge #641 2015-11-14 05:03:24 +01:00
Paolo Tosco
95fcfe5cc4 - Fixed a post-decrement which causes a crash when compiling under Windows
with MSVC 9
2015-11-12 13:43:30 +00:00
Paolo Tosco
7f71c7033d - made the ResonanceMolSupplier really lazy, i.e. resonance structure
enumeration is only carried out when the user asks for a structure
  or when the user explicitly request that calling the enumerate()
  member function. This makes object creation fast and enables
  calling getNumConjGrps(), getBondConjGrpIdx() and getAtomConjGrpIdx()
  member function without incurring in the cost of necessarily
  enumerating resonance structures
- fixed some int/unsigned int inconsistencies
- now bonds and atoms with do not belong to conjugated groups
  get a -1 index
- added a few Python wrappers
- added a few tests
- removed unused variables from Code/GraphMol/ForceFieldHelpers/MMFF/Builder.cpp
- fixed ResonanceMolSupplier Java wrappers which were really broken
2015-11-03 14:57:56 +00:00
Paolo Tosco
3d48ba72e1 - added threading support to ResonanceMolSupplier and relevant tests
- added threading support to the ResonanceMolSupplier-enabled
  SubstructMatch() and relevant tests
- modified/removed some code in O3AAlignMolecules.cpp which doesn't
  seem necessary anymore
- modified Code/GraphMol/CMakeLists.txt to allow building
  on Windows
2015-11-01 23:01:34 +00:00
Brian Kelley
380badc12f Removes IFDEF internal API points, uses BOOST_FOREACH 2015-10-29 13:49:35 -04:00
Brian Kelley
bf99daea04 Merge branch 'master' into fix/fix-unlocking-mutexes-that-arent-locked
Merged with ResonanceSupplier based changes
2015-10-28 18:10:47 -04:00
Brian Kelley
340d4274cc Fixes trying to unlock mutexes that aren't locked 2015-10-28 16:42:36 -04:00
Paolo Tosco
f43677b978 - fixed a problem with thiocarboxylates/thiolates not being perceived
as conjugated like their oxygen analogs
- fixed an issue with large numbers of resonance structures exceeding
  the unsigned int allowance
- implemented the uniquify feature properly
- uniquify now defaults to false when using the ResonanceMolSupplier-
  enabled SubstructMatch() version
- the concept of 'laziness' is now clearer
- TODO:
  * remove some debugging info
  * move classes from .h to .cpp
  * SWIG wrappers
  * improve resonance structure sorting for degenerate resonance
    structures
  I will do all of the above ASAP
2015-10-21 20:06:53 +01:00
Brian Kelley
fbf9225172 Fixes more unused parameters 2015-10-18 16:07:57 -04:00
Brian Kelley
a146c3826a Remove unused variables/functions and register keyword 2015-10-18 10:01:00 -04:00
Paolo Tosco
eaa187b03d - added ResonanceMolSupplier
- added overloaded SubstructMatch() version supporting ResonanceMolSupplier
- added relevant Python wrappers
- added C++/Python tests
2015-10-04 23:21:28 +01: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
4b8caf2ceb Fixes #409 2015-01-10 07:21:55 +01:00
Greg Landrum
34ab68ca2a introduce QueryBond::QueryMatch, as with QueryAtoms;
all tests passing;
performance tests still needed
2014-05-07 05:29:25 +02:00
Greg Landrum
4a14a52674 Fixes #153 2013-11-15 06:47:18 +01:00
Greg Landrum
24764635d8 initial support for double bond stereochem in substructure searching 2013-03-11 05:36:00 +00:00
Greg Landrum
414b579b1c first pass at support for supporting atomic stereochemistry in substructure matches 2013-03-10 07:33:00 +00:00
Greg Landrum
14314b01ad add cmake configure variable to make multi-threaded stuff optional 2012-12-17 04:07:20 +00:00
Greg Landrum
bcf6310f11 an attempt to make handling of recursive SMARTS threadsafe.
This passes the tests here and in knime on linux64. Other OSs still need testing
2012-09-29 09:01:43 +00:00
Greg Landrum
3b3d44db16 remove exe property from source files 2011-01-13 04:22:56 +00:00
Greg Landrum
f3fbef45c5 update copyright statements 2010-09-26 17:04:37 +00:00
Greg Landrum
0ce95829a5 cleanup deprecated args 2010-08-21 00:16:55 +00:00
Greg Landrum
f42f479d28 enabling infrastructure for making repeated recursive
smarts queries run faster (like vector bindings). Though there is an addition to the smarts parser
exposed here, I do not recommend using it in client code.
2010-06-03 10:02:15 +00:00
Greg Landrum
ec2c2042e8 remove the vflib usage code from Substruct area 2010-04-19 07:45:22 +00:00
Greg Landrum
49ef84ed45 a bunch of fixes to SLN handling 2010-04-11 09:06:52 +00:00
Greg Landrum
44b5041ef2 fix and test sf.net bug 2884178 2009-10-24 06:01:32 +00:00
Greg Landrum
17fa9210e6 merge revs1065:1087 from vf2 branch into trunk 2009-04-18 18:25:27 +00:00
Greg Landrum
f3dc387bc4 merge changes from revs991:996 on Ullmann_9Feb2009 branch;
get USE_VFLIB fulling working and make it the default
2009-02-28 16:52:06 +00:00
Greg Landrum
e05580e495 This is a sizeable one: change the way BGL is used so that atoms and bonds are stored as bundled properties
instead of using the property map interface.
A nice side-effect is that the wart of having to use property maps to loop over bonds or atom neighbors
is now gone.
This potentially breaks lots of client C++ code.
2009-02-11 20:19:25 +00:00
Greg Landrum
30fe77b609 initial commit: passes all tests and seems to be faster than the original code 2009-02-09 16:19:31 +00:00
Greg Landrum
7cfa8cde0b another substruct caching try 2007-09-23 06:56:13 +00:00
Greg Landrum
d5ffea669d add support for chirality in substructure searches;
this only is going to work in cases where CIP codes have been (i.e. can be)
assigned to atoms.
2006-11-03 06:35:14 +00:00
Greg Landrum
88d596abca get the AR_MOLGRAPH caching write with substructs; the current implementation introduces a core leak, so it is disabled by default 2006-10-19 05:24:05 +00:00
Greg Landrum
830f05f73f remove the cache_armolgraphs stuff, it was not being used and probably cannot work anyway as it was being done 2006-10-18 04:09:09 +00:00
Greg Landrum
a5d7fc550a try to get ChemTransforms checked in 2006-07-18 05:35:12 +00:00
Greg Landrum
5d03333c22 setup svn keywords (should have done this before import... grn) 2006-05-06 22:54:39 +00:00
Greg Landrum
75a79b6327 initial import 2006-05-06 22:20:08 +00:00