Commit Graph

151 Commits

Author SHA1 Message Date
Greg Landrum
aa307b8fe4 fixes #2000 (#2001) 2018-08-14 01:23:10 +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
Greg Landrum
2284d5da92 Fixes #1615 (#1797) 2018-04-04 10:43:34 +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
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
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
e7422eac3c Fixes #1689 (#1733) 2018-02-10 06:22:24 +01:00
Maciej Wójcikowski
bfb3559e07 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-20 05:27:30 +01:00
Brian Kelley
35398acf3a Removes merge detritus 2017-12-23 12:47:54 -05:00
Brian Kelley
bb2fa96b4e throws a fileparser exception when the M MRV SMA can't be parsed as a smarts 2017-12-22 08:20:54 -05:00
Brian Kelley
af0edef5a7 Automatically parses marvin smarts when reading 2017-12-22 08:20:46 -05:00
Brian Kelley
5fe9bbb780 Adds ability to read and parse marvin smarts in mol blocks 2017-12-22 08:20:31 -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
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
adad6e55c2 Fix two problems with the PDB parsing (#1341)
* Fixes #1029

* Fixes #1340

* add test files
2017-03-04 12:34:27 -05:00
Greg Landrum
7ee348feb3 Fixes #1251 (#1252) 2017-01-09 16:29:06 -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
f4a02f5f13 Expanded sequence support (#1140)
* patch from Roger Sayle to support nucleic acids as well as amino acids

* add some tests which do not yet pass

* fix a bug I introduced in residue name parsing

* basic sequence testing

* add some more tests
2016-11-04 04:29:26 +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
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
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
7a49dd3bb9 fixes #1023 (#1027) 2016-08-18 16:29:29 -04: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
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
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
d30bf4a6df the fix for #188 also
fixes #192
2016-03-29 13:19:10 +02:00
Greg Landrum
53b6e52765 ok, this time it is a proper fix 2016-03-29 13:09:22 +02:00
Greg Landrum
9a13afba24 Fixes #188 2016-03-29 10:58:56 +02:00
Greg Landrum
added01998 Prefer wedging bonds to Hs when possible
Fixes #772
2016-02-15 14:32:30 +01:00
Greg Landrum
2ca85c775f Fixes #741 2016-02-13 05:38:03 +01:00
Brian Kelley
6d5b7a0305 Adds more extensive tests (recursion, multithreading) 2016-01-20 17:09:58 -05:00
Brian Kelley
ae13f0a93a Adds tests for locale switching 2016-01-20 17:09:58 -05:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Brian Kelley
210f2951e0 Silences warnings in tests 2015-10-18 21:20:11 -04:00
Brian Kelley
54311dff9c Suppresses warnings in tests 2015-10-18 16:09:58 -04: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
c6dd83a47c Fixes #360 2014-10-25 12:13:01 +02:00
Greg Landrum
cd03d877fb Fixes #337 2014-10-04 14:44:42 +02:00
Greg Landrum
2d8500b407 Fixes #314 2014-08-21 07:29:09 +02:00
Greg Landrum
6b26036f6a Fixes #269 2014-05-23 08:26:26 +02:00
Greg Landrum
e4cfc340a4 support white and black lists for getMolFragsWithQuery 2014-03-25 08:18:30 -04:00
Greg Landrum
fe07610683 copy over conformers too. Part of #234 2014-03-18 06:06:24 +01:00
Greg Landrum
196c2278fb Fixes #234 2014-03-17 08:33:07 +01:00
Greg Landrum
601c21f19d Fixes #189 2014-03-13 05:23:56 +01:00
Greg Landrum
75be63fd6b merge with trunk 2014-02-09 05:00:18 +01:00
Greg Landrum
0839cf41ad Fixes #210 2014-02-03 05:25:27 +01:00
Greg Landrum
deed4a9acf Merge branch 'Issue194_V3000MolWriter'
Conflicts:
	Code/GraphMol/Chirality.cpp
	Code/GraphMol/FileParsers/test1.cpp
2014-01-22 07:07:27 +01:00
Greg Landrum
aab11535e8 Fixes #196 2014-01-16 02:07:03 -05:00