Commit Graph

86 Commits

Author SHA1 Message Date
Greg Landrum
ec31bea97b clang-tidy-7 pass (#2408) 2019-04-16 12:05:47 -04:00
Greg Landrum
bebf0c9002 Allow converting mol blocks directly to InChI (#2262)
* basics of enabling molblock -> InChI

* first pass at python wrapper

* test that options work
2019-02-13 09:43:02 -05:00
Ric
a6b26253ff Fix (most of) mem problems (#2123)
* do not use new on loggers

* del pointers in testDistGeom

* Update Dict hasNonPOD status on bulk update

* delete new Dicts in memtest1.cpp

* fixes in MolSuppliers and testFMCS

* PeriodicTable singleton as unique_ptr

* fix EEM_arrays leak

* fix leaks in testPBF

* fix ParamCollection leak in test UFF

* fix leaks in MMFF

* clear prop dict before read in in pickler

* fix leaks in testFreeSASA

* fix leaks in test3D

* modernize Dict.h & SmilesParse.cpp

* fix leaks in testQuery

* fix leaks in testCrystalFF

* fix leaks in cxsmilesTest

* fix leaks in Catalog & mol cat test

* fix leaks in ShapeUtils & tests

* fix leaks in testSubgraphs1

* fix leaks testFingerprintGenerators

* fix leaks in Catalog/FilterCatalog

* fix leaks in graphmolqueryTest

* these changes reduce bison parse leaks

* fixed leaks in testChirality.cpp

* fix leaks + 2 tests in testMolWriter

* fix 4m leaks in substructLibraryTest

* small improvements to molTautomerTest; still leaks

* fix leaks in testRGroupDecomp

* fix leaks in test; parser still leaks

* fix leaks in itertest

* fix 4m leaks in testDepictor

* fixes in smatest; still leaking due to parser

* fixes in testSLNParse; still leaking due to parser

* flex/bison: always add atoms with ownership; smarts error cleanup

* fix leaks in testReaction

* fix leaks in testSubstructMatch

* fix leaks in resMolSupplierTest

* fix leaks in testChemTransforms + bug in ChemTransforms

* fix leaks in testPickler

* fix leaks in testMolTransform

* fix leaks in testFragCatalog

* fix leak in testSLNParse. Still leaks due to Smiles

* fixed most leaks in testMolSupplier

* pre bison fix

* fix some atom & bond parse problems; others still fail

* bison smiles & smarts, atoms & bonds more or less fixed

* fix leaks in molopstest.cpp

* fix leaks in testFingerprints, MACCS.cpp & AtomPairs.cpp

* fix leaks in moldraw2Dtest1

* fix leaks in testDescriptors

* fix leaks in testInchi

* fix leaks in testUFFForceFieldHelpers

* fix leaks in hanoiTest & new_canon.h

* fix leaks in testMMFFForceField

* fix leaks in graphmolTest1

* fix leaks in testMMFFForceFieldHelpers

* fix leaks in testDistGeomHelpers

* fix leaks in testMolAlign

* initialize occupancy & temp facto with default values

* fix leak in TautomerTransform

* updated suppressions

* fix testStructChecker

* fix logging & py tests

* fix TautomerTransform class/struct issue

* remove misplaced delete in testSLNParse

* deinit in testAvalonLib1

* fix Avalon-triggered(?) bug in StructChecker/Pattern.cpp

* fix random testMolWriter/Supplier fails

- diversify output file names to avoid clashing.
- unify Writers close/destruct behavior.
- flushing/closing in tests.

* use reset in FFs Params.cpp

* comments on testMMFFForceField

* unrequired 'if's added to mol suppliers

* correct cast in FilterCatalog.h

* use unique_ptr in MACCS Patterns

* remove unrequred if in new_canon

* update & move suppressions
2018-10-29 14:33:26 +00:00
Greg Landrum
2738c35178 Fixes #1903 (#1971)
* Fixes #1903

* update SWIG bindings too
2018-07-25 09:14:17 +02:00
Greg Landrum
77078eac66 Add an auto-populated file with cmake config options (#1874)
* this is a rough first pass, needs to be finished and is a strong argument for changing the names of some of the #defines that are currently used

* rationalize the rest of the #defines
add something to the release notes about this
2018-06-09 05:41:28 +02:00
Paolo Tosco
97d147b3f1 - fixes the dynamic/static library CMake logic (#1875) 2018-05-27 07:13:03 +02:00
Paolo Tosco
c08ea49bda - enable building DLLs on Windows (#1861)
* - enable building DLLs on Windows

* - export.h and test.h are now auto-generated by CMake
2018-05-16 08:42:41 +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
650ad9e4f3 Add MolToInchiKey function() (#1784) 2018-03-23 15:54:06 -04: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
Matt Swain
15c31e1f88 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-21 05:45:24 +01:00
Greg Landrum
87786c08b5 Merge branch 'master' into modern_cxx
# Conflicts:
#	.travis.yml
#	Code/GraphMol/FileParsers/MolFileParser.cpp
#	Code/GraphMol/FileParsers/MolFileStereochem.cpp
#	Code/GraphMol/ForceFieldHelpers/UFF/testUFFHelpers.cpp
#	Code/GraphMol/MolAlign/testMolAlign.cpp
#	Code/GraphMol/MolDraw2D/MolDraw2D.cpp
#	Code/GraphMol/MolDraw2D/Wrap/rdMolDraw2D.cpp
#	Code/GraphMol/QueryOps.cpp
#	Code/GraphMol/ROMol.cpp
#	Code/GraphMol/SmilesParse/test.cpp
#	Code/GraphMol/Trajectory/Trajectory.cpp
#	Code/GraphMol/Wrap/Atom.cpp
#	Code/GraphMol/Wrap/Bond.cpp
#	Code/GraphMol/new_canon.cpp
#	Code/RDGeneral/testDict.cpp
#	Code/SimDivPickers/Wrap/MaxMinPicker.cpp
2017-10-05 05:58:38 +02:00
Greg Landrum
4160d20fdc Fixes github #1572 (#1573)
* Fixes #1572
initial pass

* one more cleanup; adjust expected results for the python unit tets
2017-09-15 12:59:26 -04:00
Greg Landrum
3e061504a4 silence some warnings while building inchi code with modern clang 2017-07-02 18:15:35 +02:00
Greg Landrum
e52cf5c666 Fix/github1286 (#1307)
* clean up the header a bit
clang-format

* clang-format

* add test for #1286

* backup

* fixes the specific failure, but needs more looking

* add an additional test

* update the inchi code to explicitly include queue

* fix a typo identified during the review
2017-03-04 12:35:26 -05:00
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
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
Paolo Tosco
0406520e38 - fixes #1018 (#1020) 2016-08-11 11:21:22 +02:00
Greg Landrum
cb85329ec8 fix non-inchi build (#1018) 2016-08-11 06:13:04 +02:00
Paolo Tosco
5d3bb11488 Fix Inchi being hardcoded into PostgreSQL (#1009)
* - this should fix the problem with "Inchi" being hardcoded into PostgreSQL

* - moved the InChI check code out of the main CMakeLists.txt
  into FindInchi.cmake
2016-08-08 11:22:56 +02:00
Greg Landrum
03cd55e635 Dev/cleanup warnings (#948)
* Remove a bunch of warnings

The biggest change here is to treat the boost includes as system libraries.
This causes g++ to ignore warnings from boost.
This change still needs to be tested with clang and on Windows

* suppress a bunch of warnings on clang
2016-06-22 13:49:15 -04:00
Matt Swain
8a8717bcec Fix building with system InChI 2016-04-09 23:00:31 +01:00
Paolo Tosco
8135eb0396 - Updated Install.md and README files related to the new CMake build
procedures involving the Avalon Toolkit, InChI and PostgreSQL cartridge
2016-04-03 23:06:28 +01:00
Greg Landrum
ccbebcf3ba and another block of warnings 2016-03-30 14:03:54 +02:00
Greg Landrum
e04aed8ea8 another batch of warnings squashed 2016-03-30 13:44:21 +02:00
Paolo Tosco
8adfc6503a - added the possibility to override AVALONTOOLS_BASE and INCHI_BASE too 2016-02-28 08:30:47 +00:00
Paolo Tosco
31f2b33cbc - download URLs and MD5 checksums can now be overridden with CMake
definitions
- InChI and AvalonTools README files were updated accordingly
2016-02-28 07:49:45 +00:00
Paolo Tosco
4363a40489 - added a downloadAndCheckMD5() function which attempts to use CMake
DOWNLOAD first, and if it fails it falls back to curl (Unix, OS X)
  or Powershell (Windows). The MD% sum is check with the nativa CMake
  command md5sum
2016-02-27 22:15:46 +00:00
Paolo Tosco
4c75676fb6 - as per Brian's suggestion now INCHI is downloaded at the CMake stage 2016-02-21 21:52:48 +00:00
Paolo Tosco
35014df23d - tried to make the INCHI README clearer 2016-02-21 21:50:09 +00:00
Greg Landrum
954411f9ea Fixes #614 2015-09-20 04:26:08 +02:00
Greg Landrum
3937182db7 Fixes #562 2015-08-13 13:54:23 +02:00
Greg Landrum
26db26e931 add a final test for #437 2015-04-19 06:21:38 +02:00
Nadine Schneider
5d963846b8 merge 2015-04-10 09:44:18 +02:00
Greg Landrum
e330e602d2 more changes to get things working on windows 2015-03-16 05:30:47 +01:00
Greg Landrum
433a6230cd remove unneccesary call to assignStereochemistry() 2015-02-20 07:31:32 +01:00
Greg Landrum
ca0c495676 this is the fix for #437
inchi tests now pass, the rest still need to be checked
2015-02-20 06:27:13 +01:00
Greg Landrum
3193f88709 merged with trunk; this builds but it has not been tested at all 2014-11-30 06:33:56 +01:00
Greg Landrum
140183fec3 tell the InChI code not to generate aux info when it is definitely not being used 2014-10-23 06:30:24 +02:00
Richard West
2bb3dce26c Update URLs to InChI API after inchi-trust.org website redesign.
Would be nice if these things were stable, eg. with DOIs, 
perhaps hosted on figshare, for example.
2014-10-07 13:02:40 -04:00
Greg Landrum
326fdc0463 Merge remote-tracking branch 'origin/master' into NewCanonicalization_24July2014 2014-08-21 05:08:56 +02:00
Greg Landrum
e1f0e91619 Fixes: #240 2014-08-16 05:20:39 +02:00
Greg Landrum
170205afe5 Fixes #296 2014-08-14 05:38:17 +02:00
Greg Landrum
1bc77d9475 get these building again 2014-07-29 04:47:25 +02:00
Greg Landrum
5a7fce42d3 all tests passing on python3 2014-07-12 16:59:32 +02:00
Riccardo Vianello
3358ec5925 initial set of changes introducing python3 support 2014-06-17 18:26:41 +02:00
Greg Landrum
ad8d97c257 update docs 2014-05-10 14:22:59 +02:00
Riccardo Vianello
a833ff836e install the header file for the rdkit inchi wrapper api
support compiling the postgres cartridge with inchi support when building against an existing rdkit installation.
2014-04-12 15:31:11 +02:00
Greg Landrum
937ee9f60a add in-place form of removeHs() 2013-10-04 07:19:01 +02:00
JP
ed95c50f6b Fixed inconsistent versions in InChI parts, documentation was refering
to outdated 1.03 and download script was downloading 1.04.

Updated everything to point at latest, greatest and stable version (1.04).
2013-09-09 18:33:58 +01:00