Commit Graph

100 Commits

Author SHA1 Message Date
Ric
6224a42516 Build warnings revisited (#2318)
* unused vars in bison parser cleanup

* initialization order in TopologicalTorsionGenerator

* unused params in SLN bison

* sln flex unused params

* throwing destructor in TDTWriter

* signed comparison in substructmethods

* unused input param in smiles/smarts bison

* unused ms param in sln bison

* signed comparison in FingerprintGenerator

* store return of fscanf in StructCheckerOptions

* unreferenced var in catch

* uninitialized value in FileParserUtils

* avoid override overload warning in MolDraw2DSVG

* non-final overrides in Validate.h

* unused static var in Avalon

* unused vars in catch blocks

* make AvalonTools avalonSimilarityBits & avalonSSSBits const int

* assert fscanf result in StructCheckerOptions
2019-03-08 16:42:54 +01: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
Paolo Tosco
f7c888844d moved test.h from RDBoost to RDGeneral for consistency with export.h (#2074) 2018-10-11 17:35:23 -04:00
Greg Landrum
f0c0e6a035 Resolve #1269 (#1991)
* this is not anything like done

* Adjust reduceProductToSidechains() to the change

* reformatting

* switch to using global properties
2018-09-04 10:24:27 -04:00
Greg Landrum
8a099085ea Fixes #1988 (#1997)
* Fixes: #1988
This just handles the atomic number part. Still need to think about the bond types

* update the tests
This includes adding UnitTestSaltRemover.py to the list of tests to be run

* fix bug from interacting PRs
2018-08-13 18:40:28 +02:00
Greg Landrum
ba157fd397 Fixes #1869 (#1961)
Fixes #1955
2018-07-18 09:06:21 +02:00
Greg Landrum
4613d1a123 Fixes #1950 (#1958)
* Fixes #1950

* Changes from review:
- replace MolAtomList with MolAtomQuery
- support MRV SMA as well
2018-07-17 09:11:02 -04: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
8cfa694035 Add Properties interface to ChemicalReactions (#1848)
* initial pass at pickling reaction properties

* move more of the property handling functions to props.hpp
Wouldn't be bad to rename these at some point.

* add reaction properties to python wrappers
2018-05-05 04:39:10 +02:00
Greg Landrum
3f136946e3 Start using "*" instead of "[*]" in SMILES (#1788) 2018-03-23 15:52:52 -04: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
Brian Kelley
3a5939bcb3 Turns off exception throwing for certain classes of Rlabel sanitization
It now does the best it can and moves on (#1621)
2017-11-15 06:44:05 +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
8dc371619b Fixes github #1544 (#1545) 2017-09-11 08:46:42 -04: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
d3ad7d2770 Fixes #1387 (#1392)
* backup

* Fixes #1387
this passes the bug tests, but needs the full tests run

* all tests pass

* remove some droppings left from an earlier attempt at a fix

* remove some additional printing

* cleanup
2017-04-07 11:57:43 -04:00
Brian Kelley
a02f2b0bb1 Fix/sanitizerxn merge hs (#1367)
* Fixes exceptions to use correct functionName

* Deprecates ChemDrawAdjustParams name sciquest integration/eln searching
 doesn’t map to this behavior.  renamed  MatchOnlyAtRgroupAdjustParams

* Python wrapper for deprecated API

* fixHs now is more intelligent about merging hs.

The only cases where hs can’t be merged is if they are mapped
to a non hydrogen in the product.

* Updates deprecated ChemDrawAdjustParams
2017-03-20 14:30:36 +00:00
Greg Landrum
c775b0c04e Fixes #1266 (#1270) 2017-01-20 09:23:18 -05:00
Brian Kelley
fa89438358 Dev/reaction enumeration (#1111)
* Adds C++ Enumeration Engine to the RDKit

* Adds Sanitization helpers, wrappers and tests

* Clang format

* Remove unused enumerationStateOnly flag

* Fixes docStrings to current API

* Adds doc strings

* Removes RGroupPosition, adds getPosition to EnumerationBase

* Fixes readability.

* Adds EnumerateLibraryBase::reset and getReaction

* Added getReagents method to EnumerateLibrary

* Make the tests have the same naming

* Need to save the initial state for resetting.

* Stupid case-insensitive file systems

* Moves ResetState to EnumerateLibraryBase

* Adds removeNonmatchingReagents helper

* Renames currentPosition to getPosition

* Adds Enumeration Toolkit tutorial

* Fixes Python3 serialization and enumerators

* Verified to run on python2 and 3

* Fixes integer issues on windows

* The number of enumeration should be unsigned.

* Adds deserialization constructor

* Moves boost_serialization to the end

* Deprecates Clone in favor of copy

* Update tests to use copy.copy not Clone

* Move RGROUPS and BBS into an EnumerationTypes namespace

* Make sure old pickles work

* Adds pickle for backwards compatibility

* Moves to uint64_t from size_t for public api

* Whups, accidentally used the binary archiver.

* Commits boost 1.55 serialization

* Makes serialization turnoffable Like Filter Catalog

* Fixes tests when serialization not available.  Adds more enumeration strategy tests

* Fixes a syntax error on some versions of python

* Fixes sanitizeRxn to actually make proper RGroup atoms

* Updates SanitizeRXN python API

* Updates Enumeration API to a parameter class - fixes reagent removal

* Adds a mess of tests

* Change stats to return a string.

* Exposes EvenPairSamplingStrategy Stats to python

* Fixes a crash bug in SanitizeRxn

* Adds better testing of the even pair sampling

* Fixes namespace

* One more try to fix gcc

* Enum classes are c++11 and a microsoft extension.

* Fix typo

* Fixes np.median for python3

* Fixes atom iterators

* Adds virtual tags to derived virtual functions (for clarity)

* Fixes size comparison issues

* Adds doc string

* Small cleanup (has no effect since flags aren’t used)

* fixes crash bug on windows

* get the tests working on windows

* Updates tutorial

* Adds Glare implementation to Contrib
2016-11-05 14:42:52 +01:00
NadineSchneider
61ca812972 ChemReactions: Bugfix in copy constructor (#996) 2016-07-27 10:22:13 -04:00
Greg Landrum
3e5605e793 Fixes #975 (#976) 2016-07-21 15:22:32 -04:00
Greg Landrum
bb4df7c082 stop including isotope labels on dummies from reduceProductToSideChains()
The atom-map info is there and is sufficient, adding the redundant isotope info does not help
2016-04-08 03:38:06 +02:00
Greg Landrum
bc65b6994c merge with master 2016-03-23 17:35:44 +01:00
Greg Landrum
409dc7791f Fixes #685 2016-03-23 17:31:19 +01:00
Brian Kelley
7cf1e51ee4 Fixes #825 test60RunSingleReactant() not being run 2016-03-23 11:31:55 -04:00
Brian Kelley
46a06e2bdc Adds C++ tests 2015-12-17 14:25:22 -05: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
Brian Kelley
a146c3826a Remove unused variables/functions and register keyword 2015-10-18 10:01:00 -04:00
Nadine Schneider
0b8b6a3690 Some performance fixes for the new canonicalization
- handling molecules/proteins with multiple fragments
- add criteria for using special symmetry invariant
2015-04-15 18:42:29 +02:00
Nadine Schneider
ca4bcca6ae Include atom-mapping numbers if present in the canonicalization 2015-04-10 09:47:16 +02:00
Nadine Schneider
33f9906572 Chemical reactions: allow canonical order in reaction smiles 2015-04-10 09:47:15 +02:00
Nadine Schneider
465c7cb4c6 new_canon: Delete numRingMember invariant 2015-02-12 18:06:27 +01:00
Greg Landrum
a0a02b4a99 merge on master 2015-02-03 16:41:46 +01:00
Greg Landrum
ac5756310a a bit of test cleanup 2015-01-30 04:20:42 +01:00
Brian Kelley
ff0548a871 RDKit learns how to round grip MOLFile values.
This is CTAB form:
“V XXX YYYYYY”

where (XXX is atom index, Y is the value)
2015-01-29 15:44:32 -05:00
Greg Landrum
2d9f809770 fix some broken tests; pyDistGeom is still failing 2015-01-23 06:43:12 -05:00
Greg Landrum
6d7b2b0914 merge with master 2015-01-22 06:30:51 -05:00
Greg Landrum
53bf6a4609 merge master 2015-01-16 05:49:11 +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
Nadine Schneider
d8ee04b5b7 Bugfix in the chirality handling of chemical reactions 2015-01-09 10:34:28 +01:00
Greg Landrum
775369bbf1 update to new canonicalization 2014-12-31 06:36:40 +00:00
Greg Landrum
e6826d335a remove some compile warnings 2014-11-03 13:30:00 +01:00
Schneider
2b05873136 ChemReactionUtils: remove unused/specialized functions from interface
- specialized utils functions only used in the pgsql cartridge were removed
  from the interface
2014-08-25 16:30:09 +02:00
Schneider
8aac978f1b ChemReactions: Extented functionality of chemical reactions
- Module to generate reaction fingerprints: structural FP for screening,
  difference FP for similarity search
- Add some utility functions to simplify handling of reactions
- Add new functionality to include agents in the reactions, some adaptions
  to parsers and writers had to be done
- Supports intra-bond breaks in products now
- Molecules with rxn role (atom property) can be parse as reaction now
2014-08-19 13:08:11 +02:00
Greg Landrum
c0bf384832 Fixes #290 2014-07-12 08:20:31 +02:00
Greg Landrum
a310f3bff5 Fixes #249 2014-04-16 08:58:03 +02:00
Greg Landrum
5586330f16 Fixes #243 2014-04-13 07:15:35 +02:00
Greg Landrum
ddc66b90a9 initial verison of allowing rxns to be built from smiles 2014-04-11 04:41:48 +02:00