Commit Graph

72 Commits

Author SHA1 Message Date
jasondbiggs
1649029367 Embedder callback (#3668)
* adding a void pointer as a member for the EmbedParameters struct to allow aborting molecule embedder

* revert whitespace chage

* tabs->spaces

* have the callback function receive the iteration number as an argument, for progress monitoring

Co-authored-by: Jason Biggs <jasonb@wolfram.com>
2020-12-29 07:38:11 +01:00
Greg Landrum
edd922c99c Cleanup warnings from clang-10 (#3238)
* stop returning local memory in exceptions

* remove a couple unnecessary copies in loops

* fix a bug in the way the default MMFF aromatic parameters are constructed

* remove a bunch of loop-variable warnings

* remove a bunch of clang warnings

* disable clang warnings in python wrappers

* remove some warnings when building the python wrappers
2020-06-19 17:16:22 -04:00
hjuinj
acdfe26dea Improve Conformational Sampling of Small and Large Ring Molecules (#2999)
* improvements for smal anr large ring conformer generation

* add documentation and reorder parameters in EmbedParam

* resolve merge conflict due to coordMap null pointer

* minor changes to address merge comments

* reorder variables in EmbedParameters

* add regression test for small ring and macrocycle torsion preferences

* not apply small ring torsions to bridged ring systems

* fix and test for bridged small rings torsion pattern exclusion

* add ETKDGv3 and srETKDGv3 option to keep compatiblity for original ETKDG

* EKTDG version 3 related minor fix

* add reference to doc string

* Java wrapper for ETKDGv3

* fix doc

* change CPCI to shared_ptr, but it seems to be much slower

* minor modifications to small bridged ring systems, and share_ptr from previous commit is fine

* rollback from shared_ptr(map) to just map

* run clang-format

Co-authored-by: Shuzhe Wang <shuwang@eu-login-10.euler.ethz.ch>
Co-authored-by: Shuzhe Wang <shuwang@eu-login-14.euler.ethz.ch>
Co-authored-by: Shuzhe Wang <shuwang@eu-login-17.euler.ethz.ch>
Co-authored-by: Shuzhe Wang <shuwang@eu-login-45.euler.ethz.ch>
Co-authored-by: Shuzhe Wang <shuwang@eu-login-05.euler.ethz.ch>
Co-authored-by: Shuzhe Wang <shuwang@eu-login-15.euler.ethz.ch>
Co-authored-by: greg landrum <greg.landrum@gmail.com>
2020-03-23 14:57:46 +01:00
Greg Landrum
d41752d558 run clang-tidy with readability-braces-around-statements (#2899)
* run clang-tidy with readability-braces-around-statements
clang-format the results
clean up all the parts that clang-tidy-8 broke

* fix problem on windows
2020-01-25 14:19:32 +01:00
Greg Landrum
ec366c1ab7 Dev/pvs studio cleanups2 (#2877)
* a round of cleanups courtesy of PVS studio

* add a test to make sure that a warning is a false alarm

* bug fix

* Fix a UFF bug

* more PVS studio cleanups

* next round of PVS studio cleanups

* completely remove the chances for that bug

* changes in response to review

* add an additional test
+ a bit of reformatting that snuck in
2020-01-22 15:10:58 +01:00
Eisuke Kawashima
5cd27a242f Fix typo (#2862)
* Fix typo

* Reflect the comments

* Fix more typos
2019-12-31 06:43:27 +01:00
Greg Landrum
186d24bfb1 Fix for github #2800 (#2828)
* backup

* Fixes #2800
Still needs a bit of tweaking before merge though

* docs

* changes in response to review

* Typo
2019-12-10 06:12:53 +01:00
Greg Landrum
116cebf385 Allow providing a bounds matrix to EmbedMol (#2560)
* Support providing a distance matrix for molecule embedding

* a bit of parameter checking

* allow fragmentation before embedding to be disabled

* fix a build problem on windows
change in response to review
2019-07-30 06:43:42 -04:00
Greg Landrum
8524652a86 Fixes #2246 (#2248)
* Fixes #2246

* Fixes #2247
2019-02-04 10:32:33 -05:00
Greg Landrum
a59997b7e4 Some refactoring of the distance geometry code (#2153)
* move _embedPoints over to use EmbedArgs structure

* move _embedWithExpTorsions over

* a few pointer cleanups

* step by step

* more

* wrap the ETKDG paramaters into a struct

* fix a typo

* additional cleanup

* more

* simplify the embedargs struct

* pass embedParams instead of having them in embedargs

* a bit more cleanup

* response to code review
2019-01-02 06:06:38 +00: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
Brian Cole
360421e2a8 Make sure EmbedMultipleConfs is deterministic for very large seeds and a seed of 0 (#1635)
* Make sure EmbedMultipleConfs is deterministic for very large seeds and a seed of 0.

Fixing two distinct bugs:

- A randomSeed of 0 didn't use '0' as the seed even though the
  documentation said that it should.

- Very large seeds could overflow the 'int' representation during
  calculation of a new internal seed. This would make
  EmbedMultipleConfs non-deterministic even though the user provided a
  valid seed.

* Adding a C++ test for case pull request #1635.
2017-11-15 06:53:42 +01:00
sriniker
a14f853e56 Version 2 of ETKDG (#1597)
* version 2 of ETKDG

* setting default and changing to unsigned int

* ETversion 2 only via EmbedParams available

* Some refactoring so that the DG functions that take the parameter object are the primaries.
This should allow new parameters to be added without having to modify the API

* test and wrapper changes to go along with that

* update cookbook to use etkdg
2017-11-15 06:50:39 +01: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
5f7e04fe5d Fix github1240 (#1396)
* add a test (currently fails, of course)

* backup, not really working

* Fixes #1240

* a bit more parameter tweaking to get some more structures to embed
2017-04-18 02:33:23 -04:00
Greg Landrum
e9eb89e4b1 Fix #1227 (#1393)
* Fixes #1227

* make only heavy atoms the default with the pre-defined param sets; this may not be the right answer
2017-04-09 10:20:41 -07:00
Greg Landrum
4315388f77 Add a parameters structure for controlling the embedding options. (#1121)
* initial version; no actual testing yet

* start on tests

* rename seed->randomSeed; add tests

* add support in java wrapper

* add support in python wrapper

* initial version; no actual testing yet

* start on tests

* rename seed->randomSeed; add tests

* add support in java wrapper

* add support in python wrapper

* yapf

* document the parameter object;
introduce pre-defined const objects for ETDG, ETKDG, and KDG

* this is why we write tests

* swig did not like the initialization in the header file
2016-11-01 11:39:03 +01: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
29a1a755fc remove warning about non-planar centers 2016-06-29 05:02:28 +02:00
sriniker
7943b8c79d Improved planarity for ETKDG (#967)
* enforce planarity

* increase the force constant for the impropers

* force constant adapted

* reduced tolerance for planarity and force constants changed for some torsions

* tolerance for planarity increased a bit again

* cerr outputs removed

* planarity tolerance increased

* boost log added in planarity check
2016-06-29 05:00:30 +02:00
Greg Landrum
cf7ceab383 remove wave of warnings 2016-03-30 13:09:59 +02:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Greg Landrum
5618819c64 merge #641 2015-11-14 05:03:24 +01:00
Sereina
26ab552232 fixes based on code review 2015-10-21 14:51:53 +02:00
Sereina
687b464e91 small fixes 2015-10-20 17:04:54 +02:00
Sereina
9cf706b581 enforceChirality flag added back 2015-10-20 15:04:13 +02:00
Sereina
ac7ef34f05 ETKDG implementation 2015-10-20 13:51:43 +02:00
Brian Kelley
633ac22b51 Silences unused params and casting issues 2015-10-18 21:16:17 -04:00
Brian Kelley
daa7e62258 Fixes signed conversion issues (use rdcast) 2015-10-18 15:16:38 -04:00
Brian Kelley
5f59333a56 Silences unused parameters 2015-10-18 14:02:29 -04:00
Brian Kelley
a146c3826a Remove unused variables/functions and register keyword 2015-10-18 10:01:00 -04:00
Sereina
f28ebaf448 chirality test added and flag for them introduced 2015-09-29 11:30:54 +02:00
Greg Landrum
87bfa334d6 add a central method for calculating the number of threads that supports negative numbers 2015-09-04 13:48:52 +02:00
Greg Landrum
49cada6e46 First pass at #586 2015-09-04 11:09:57 +02:00
Greg Landrum
79518c9a6f Fixes #568 2015-08-17 04:24:58 +02:00
Greg Landrum
ed9c96f544 still not really working 2015-08-15 14:26:52 +02:00
Greg Landrum
33306bc2bb fix the chiral volume flag 2015-08-14 16:07:21 +02:00
Greg Landrum
ee850b232f progress on #563 2015-08-14 07:23:18 +02:00
Greg Landrum
55f6fed10d progress on #563 2015-08-14 07:19:52 +02:00
Greg Landrum
80f7ac4515 Merge branch 'master' of github.com:rdkit/rdkit 2015-04-11 03:06:13 +02:00
Greg Landrum
0e56ca1dc0 default to 400 iterations for the dgeom force field 2015-04-11 03:06:08 +02:00
Nadine Schneider
5d963846b8 merge 2015-04-10 09:44:18 +02:00
Riccardo Vianello
7c346d7c2e Code/RDBoost/Exceptions.h moved to Code/RDGeneral 2015-03-16 22:31:48 +01:00
Greg Landrum
250c621310 add multi-threaded support for multi-conf embedding
part of #445
2015-03-13 06:03:08 +01:00
Greg Landrum
d5e1f0a7f6 now all tests pass 2015-01-23 06:50:17 -05:00
Greg Landrum
2d9f809770 fix some broken tests; pyDistGeom is still failing 2015-01-23 06:43:12 -05: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
ab1f936425 Fixes #256 2014-05-05 05:44:36 +02:00
Greg Landrum
e71c0a2d2d Fixes #167
I am not completely comfortable with the fact that one reference energy in testDistGeom.py
  had to be changed. This is worth looking into some more
2013-11-27 07:26:05 +01:00