26 Commits

Author SHA1 Message Date
Katharina Buchthal
c5de9f8843 Fix issue 9165 & 9166 (#9184)
* added *S-S* and bounds overwriting tests

* fixed *S-S*

* added bounds overwriting test

* searching for the bug

* added test case

* improved tests + fixed bug 9166

* updated ref mols

* regenerated refs

* clean up

* changed ref data

* removed print statements

* Update Code/GraphMol/DistGeomHelpers/BoundsMatrixBuilder.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Typo

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Incooperated suggestions

* applied remaining suggestions

* restored imports

---------

Co-authored-by: Katharina Buchthal <katharina.buchthal@phys.chem.ethz.ch>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2026-03-19 16:47:04 +01:00
Niels Maeder
5b1d04d23e Fix grad scaling (#8791)
* fix grad

* adapt tests to pass with fix

---------

Co-authored-by: Niels Maeder <maedern@ethz.ch>
2025-09-21 18:19:50 +02:00
nmaeder
168b111fe3 Ensure 13 bounds constraints are added to angles that are part of an improper torsion (#7729)
* make sure 13 bounds constraints are added to angles that are part of an impropper torsion

* make sure angles are constrained with higher force constant to prevent rings from folding

* adapt tests to new behavior

* move comment to correct place

* add min bounds test

* make sure we are not terribly outside of the bounds matrix
2024-08-21 16:06:29 +02:00
Greg Landrum
2c5ae534f2 Optimizations of the DistanceGeometry forcefield (#7600)
* First try at using DistViolationContribs

only the most basic of testing has been done

also add ForceField::distance2 to allow some optimizations

* allow testing using old approach

* optimization

At this point testUFFForceFieldHelpers fails since the check for std::max_element
in the e_contribs vector at Embedder.cpp:513 is now doing something totally different
(instead of a bunch of small distance violation contribs, we have one big one).
We'll need to come up with something for this.

With the benchmarking set that I'm using - 500 DG conformers for ~465 COD molecules
using 10 threads - this runs in almost 10% less time than master.

* backup;
builds, tests do not pass

* all tests pass except the old failure

* more constification

* backup/debugging

* add fourthdim contribs the same way

* tests now pass

* deprecations

* remove unused vars and code

* changes in response to review
2024-07-15 14:14:39 -04:00
nmaeder
6675315b85 Fix/kminimization (#7535)
* first try

* do over with @greglandrum: fix atomPairs, lower SP angle force constant.

* change test file for 'update parameters from JSON':'ETKDGv2'

* adapt length to fix

* remove overwritten random seed

* adapt test files to changes

* adapt amide test, check with Greg

* fix python tests and remove unused imports

* proposal for new test molecule

* remove double comparison, increase threshold. Check with greg

* remove TODO comments

* remove debugging statements

* same code for both since they are doing the same

* format docstring to make more readable

* remove todo comments

* add indentation to angle param

* adapt doctest to newly generated conformers

* fix test to pass with fewer failures and move mol to mol file for less cluttered test.

* a bit of modernization

* remove cerrs and format correcly

* reverted test to old behavior

* use insert and make force field contribs exception safe

---------

Co-authored-by: greg landrum <greg.landrum@gmail.com>
2024-07-08 15:29:45 +02:00
Greg Landrum
6bede685e0 Support atropisomers in the conformer generator (#7098)
* change a define to a "using"

* basic atropiosomer support for confgen

currently only supports bonds with two exo substituents on each end

* support systems with two exo bonds

* cleanup

* add test for #7109

Fixes #7109

* clean the tests up a bit
2024-02-06 15:48:25 +01:00
Greg Landrum
491fef231a DistanceGeometry: add flag to enforce trans amides (#3794)
* backup

* bug fix: ensure getTotalNumHs() alwasy considers neighbors

* make trans amides the default
ensure it works
cleanup expected tests

* note results-changing fix

* fix docs and run some clang-format

* cleanup in response to review
2021-03-01 13:26:28 +01: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
Francois Berenger
7ec8ec0bb9 Vdv radii from blue obelisk (#2154)
* updated atomic radii to follow the Blue Obelisk Data Repository

Ubuntu package bodr version 10-1; radii are from file
/usr/share/bodr/elements.xml

* typo

* use 2.0 as default VDW radius instead of 1.7

for elements missing from the Blue Obelisk Data Repository

* Document the atomic_data

* update expected test results

* update java tests

* allow a bit more slop when comparing confs

For cross-platform stability
2019-05-29 09:23:27 +02:00
Greg Landrum
8524652a86 Fixes #2246 (#2248)
* Fixes #2246

* Fixes #2247
2019-02-04 10:32:33 -05:00
sriniker
534a5293ef Improved regression test for ETKDG version 2 (#1640)
* 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

* regression test for ETKDG version 2 improved
2017-11-15 06:51:05 +01:00
Greg Landrum
cb710340a1 Support ETKDG from within the SWIG wrappers (#1010)
* add test files

* add seed to the mol name so that it is obvious

* add support (and tests) for ETKDG to Java
2016-08-08 11:08:55 +02: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
ptosco
dbf04ca926 The only relevant changes to implement Marcus Martin corrections
to original Rappe' UFF equations are in Code/ForceField/UFF/AngleBend.cpp
and Code/ForceField/UFF/BondStretch.cpp; the changes in
Code/ForceField/UFF/TorsionAngle.cpp are purely cosmetic.

Tests modified according to the small differences in geometries
and energies following the implementation of those corrections:
- Code/ForceField/UFF/testUFFForceField.cpp,
- Code/GraphMol/DistGeomHelpers/Wrap/testDistGeom.py,
- Code/GraphMol/DistGeomHelpers/testDgeomHelpers.cpp,
- Code/GraphMol/MolChemicalFeatures/Wrap/testChemicalFeatures.py,
- rdkit/Chem/Pharm3D/UnitTestEmbed.py

Coordinate files modified according to the small differences in
geometries following the implementation of those corrections:
- Code/GraphMol/DistGeomHelpers/test_data/initCoords.random.sdf
2013-09-24 11:29:33 +02:00
Greg Landrum
3afbb41cfb fix and test issue 3483968 2012-02-05 07:27:40 +00:00
Greg Landrum
37e9a09b77 fix and tests issue 3238580 2011-03-30 02:33:18 +00:00
Greg Landrum
3e0d9a75d0 fix and test sf.net issue 3019283 2010-06-22 05:08:00 +00:00
Greg Landrum
ec192d981e changes to robustify (and somewhat speed up) the optimizer. These will change results 2010-02-28 13:11:34 +00:00
Greg Landrum
74d4dba964 fix and test sf.net issue 2835784;
this should make embedded geometries of fused rings (and around rings)
much better
2009-10-02 04:58:50 +00:00
Greg Landrum
0a99a0155e merge revs 840:846 of Release_Q32008_1RC1 branch back to trunk 2008-09-30 16:29:53 +00:00
Greg Landrum
bdd617e81e convert this to an actual test 2008-09-29 12:42:56 +00:00
Greg Landrum
4d2132c120 merge in changes from uBLAS_8July2008 branch revs 747:760
This switches the rdkit default from using lapack++ to using boost.bindings
2008-09-27 06:59:17 +00:00
Greg Landrum
2620dcba2f first pass at constrained conformation generation 2008-07-15 05:31:45 +00:00
Greg Landrum
d8dfc1191a get more resistant to small roundoff-related problems 2008-01-15 17:16:26 +00:00
Greg Landrum
1bca002c97 fix a minor coordinate problem in the regressions (connected to new chirality handling) 2006-11-22 04:25:24 +00:00
Greg Landrum
75a79b6327 initial import 2006-05-06 22:20:08 +00:00