Commit Graph

30 Commits

Author SHA1 Message Date
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
nmaeder
a45d4d9857 New contribs for DG (#7711)
* add angles and distances

* add Inversions

* add torsiona angle contribs

* use new contribs in test

* use new inversion and torsion contribs in dg

* use new distance contribs in dg

* use new angle constraints in dg

* use new constraints in FF tests

* update docstrings

* remove unused import

* include new contribs

* cleanup includes

* make changes requested by @greglandrum

* use std::move instead of release
2024-08-21 06:06:58 +02:00
nmaeder
3f3ff3858a Refactor distgeom minimizations (#7652)
* refactor skeleton

* fix contribs

* adapt documentation

* clarify function names

* make variable names more readable and update documentation

* switch boost dynamic bitset with std::vector<bool>

* clearer const name

* fix typo and go back to dynamic bitset

* go back to old function signature

* add inline overload with fewer arguments

* remove unecessary doc lines and add tol to distance directly in function call

* use constexpr for known distance force constant

* update documentation

* enhance documentation

* english

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

* make changes requested by @greglandrum

* make all constexprs

---------

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2024-07-25 06:14:12 +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
6f3275f927 Fixes #7181 (#7206)
* Fixes #7181

adds a new constrainedAtoms member to the etkdgdetails structure which is used to propagate info about the coordMap into the ETK minimizations

* Update Code/DistGeom/DistGeomUtils.cpp

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>

* Update Code/DistGeom/DistGeomUtils.cpp

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>

---------

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
2024-03-12 04:47:22 +01:00
hjuinj
8857bf8a69 Add custom distance bounds parameter for ETKDG conformer generation (#4516)
* add custom parameter  to tune the relative weights of distance bounds to all the other force terms during ETKDG conformer generation

* fixes as per reviewer comments
2021-09-16 12:32:10 +02: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
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
636a0f6e69 Cleanup a bunch of compiler warnings (#1697)
* remove a bunch of compiler warnings

* remove some more warnings on windows (there are still plenty to go...)
2017-12-22 12:59:52 +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
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
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Greg Landrum
2a75463959 get rid of some more warnings 2015-11-14 09:21:05 +01:00
Sereina
26ab552232 fixes based on code review 2015-10-21 14:51:53 +02:00
Sereina
ac7ef34f05 ETKDG implementation 2015-10-20 13:51:43 +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
Greg Landrum
43dc95bfea fix issue 3528136 2012-05-20 08:54:08 +00:00
Greg Landrum
f3fbef45c5 update copyright statements 2010-09-26 17:04:37 +00:00
Greg Landrum
c1c356fa30 reflect changes in eigenvects code 2008-06-26 05:50:02 +00:00
Greg Landrum
64d21b0e6a properly support FF dimensions other than 3 2008-01-04 07:22:27 +00:00
Greg Landrum
0e456c8afa DistGeom/ and
GraphMol/DistGeomHelpers/: 
  Support generating random initial coordinates of atoms as an alternative to embedding. This has so far only been tested on windows (all tests pass) and it needs to be optimized (particularly force field parameters). 
  Other changes here are primarily cosmetic code cleanups.
2007-12-29 06:16:39 +00:00
Greg Landrum
8cf2d4f6c0 minor cleanup/polishing changes 2006-11-22 05:32:18 +00:00
Santosh Putta
e582071e05 changes to enable chiral embedding of points 2006-11-22 00:56:56 +00:00
Santosh Putta
9bb9b8fc91 PointPtrVect changed to Point3DPtrVect 2006-10-19 23:26:15 +00:00
Greg Landrum
5d03333c22 setup svn keywords (should have done this before import... grn) 2006-05-06 22:54:39 +00:00
Greg Landrum
75a79b6327 initial import 2006-05-06 22:20:08 +00:00