211 Commits

Author SHA1 Message Date
Kevin Boyd
232e4ffc84 Add Getter functions to MMFF property python interface (#9254) 2026-04-30 17:06:31 +02:00
Greg Landrum
e35f7db009 Cleanup/get atoms and bonds (#9243) 2026-04-18 05:22:09 +02:00
Greg Landrum
9d1b988799 Fixes #9143 (#9195)
* Fixes #9143
There is still some weirdness in the matching of ET bonds in macrocycles, but it is not connected to this change.

* adjust test to work on win (and mac?)

* tweak expected results for win ci
2026-03-24 10:03:02 +01:00
Ricardo Rodriguez
7b7a8a4e17 Refactor iostreams includes (#8846)
* refactor iostreams includes

* restore ostream to MonomerInfo.cpp
2025-10-08 16:08:01 +02:00
Niels Maeder
d13b002d2d update default ET version to 2 in getExperimentalTorsions (#8798)
* update et version to 2

* Add comment in the release notes.
2025-09-24 05:56:35 +02:00
Vandan Revanur
cded6cc4e0 ForceFieldHelpers: fix “No Python class registered” error (#8800)
Fixes github issue #8597.

* UFFGetMoleculeForceField was returning
PyForceField* before the class was registered via rdForceField,
which caused “No Python class registered” errors in Python when
using multiple conformers.

* This patch forces rdForceField to be
imported during rdForceFieldHelpers module init, ensuring the
class is always registered before helper functions are used.

* Add unit test
2025-09-23 06:03:57 +02:00
Greg Landrum
f4012abbcd Small cleanups of the MMFF94 code (#8593)
* progress, passes tests, needs more optimization

* passes tests

* minor

* cleanup
set diagonal elements of matrix

* replace numeric consts with enum

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-06-24 08:07:51 +02:00
Eisuke Kawashima
26033b6578 style: apply modernize-use-override (#8137)
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2025-04-25 12:24:58 +02:00
Greg Landrum
1891a26fe3 Fixes Github #7901 (#8264)
* does not work

* basically works
(at least it seems to)
needs more tesing and verification

* optimization and improved tests

passes local tests

* response to review
2025-02-13 12:46:56 +01:00
Kevin Boyd
af6347963f Condense MMFF Contribs into single contrib per type. (#8175)
* Condense MMFF electrostatics and contrib instances.

Previously, a separate contrib had been added for each common term.
Each of these required a separate allocation, and a separate dynamic dispatch
on call. This change moves to an SOA style, making data access contiguous and
drastically reducing the number of calls.

* Make suggested copyright fixes and svn artifact removals
2025-01-29 06:18:09 +01:00
Greg Landrum
fa048eacc5 Replace GetImplicitValence() and GetExplicitValence() with GetValence() (#7926) 2025-01-28 21:09:03 +01:00
Hussein Faara
44364fd982 remove no-op macros and dead code (pt 4) (#8037)
* remove no-op macros and dead code (pt 4)

* review comments
2025-01-26 07:49:50 +01:00
Greg Landrum
a7404cdd91 Do the announced deprecations (#7910)
* remove MMFF:setMMFFAromaticity()

* remove AtomPairs.Utils.NumPiElectrons()

* remove the deprecated DistGeom contrib files

* document removed stuff
2024-10-11 06:42:18 +02:00
Ricardo Rodriguez
0164ac7fae Fix some more mem errors in 2024.09.1 (#7899)
* fixes

* do not leak MolCatalogParams

* do not leak points on align failures

* give python ownership of pointers returned in getFingerprintsHelper

* clean up ScaffoldNetwork ptr if createNetworkHelper fails

* manage FF ptrs during construction

* wire in ownsBondInvGenerator in getMorganGenerator

* manage weights in rdMolAlign CalcRMS

* fix ownership of matches list/tuple in generateRmsdTransMatchPyTuple

* manage stream in createForwardSupplier during construction

* drop redundant Point3D allocations in GetUSRDistributionsFromPoints

* fix signed comparison mismatch
2024-10-10 16:08:50 +02:00
Greg Landrum
da6cd73168 Run clang-format across everything (#7849)
* run clang-format-18 across Code/*.cpp and Code/*.h

* run clang-format-18 across External
2024-09-26 13:39:02 +02:00
Juuso Lehtivarjo
9824a9d964 Expose MMFF aromaticity model for SetAromaticity (#7765)
* Expose MMFF aromaticity model for SetAromaticity

* Test, backward compatibility, missing AromaticityModel wrapper
2024-09-18 05:59:02 +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
685e781b54 Allow creation of an empty forcefield (#7494)
* add posibility to create a force field that does not have any contributions.

* move to FFConvenience.h and add C++ tests

* deallocate memory

* use range based for loop

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

* Making adjustments according to the review of @greglandrum

* undo unintentional formatting

* replace TEST_ASSERT with CHECK

---------

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2024-06-08 05:18:22 +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
Riccardo Vianello
d6e8e473c1 fix GCC 13.2 warnings about redundant move in return statement (#7029) 2024-01-09 09:29:33 +01:00
Paolo Tosco
0a3fe92528 fixes #6728 (#6755)
Co-authored-by: ptosco <paolo.tosco@novartis.com>
2023-09-27 17:01:53 +02:00
Juuso Lehtivarjo
9ef7081ece Add inlines to ForceFieldHelpers header functions (#6356) 2023-05-13 06:45:56 +02:00
Ric
880a8e5725 Reformat Python code for 2023.03 release (#6294)
* run yapf

* run isort

---------

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2023-04-28 06:53:56 +02:00
Ric
58d135a874 Reformat C/C++ code ahead of 2023.03 release (#6295)
* format files

* format template files too
2023-04-28 04:42:35 +02:00
Greg Landrum
4eabb532e8 Create getExperimentalTorsions() function (#5969)
* a bit of minor refactoring

* create API function to get experimental torsion bonds

* put the torsion index in the dictionary
in this case it's silly to return tuples to python

* allow passing an EmbedParameters object from python

* capture the torsion index too

* add an atomIndices component
we should typedef the torsionBonds type

* test torsion index

* changers in response to review

* changes in response to review

* fix merge mistake
2023-01-25 12:15:04 +01:00
Greg Landrum
e322928028 swap boost::tuple to std::tuple (#5851) 2022-12-16 16:01:19 +01:00
Greg Landrum
0147cd8201 Fixes #5210 (#5408)
* revert duplicate chunk in release notes

* replace deprecated ifdefs
This one gets rid of USE_BUILTIN_POPCNT and RDK_THREADSAFE_SS
use RDK_OPTIMIZE_POPCNT or RDK_BUILD_THREADSAFE_SSS instead

* get rid of BUILD_COORDGEN_SUPPORT from ROMol.i

* fix a stupid typo

* update release notes
2022-07-11 11:20:03 +02:00
Greg Landrum
cd74dc2207 Initial support for non-tetrahedral stereochemistry (#5084)
* very basics: actually parsing the new atom stereochem features

* add some input verification for the chiral permutations

* fix a typo
add quadruple bond SMILES/SMARTS extension

* add forgotten files

* patch from Roger

* add Roger's parsing examples

* typo

* new tests

* adjusted version of next PR from Roger:
- add SP2D hybridization for square planar (this may change)
- some modernizationof Chirality.cpp
- stop using < HybridizationType in Chirality.cpp (should probably do this elsewhere too)
- improved handling of hybridization assignment for new stereochem
- handle new stereo/hybridization in UFF
- tests for the above

* perception of non-tetrahedral stereo from 3D (from Roger S)
Basic testing of SP and TB based on opensmiles docs

* potential fixes for octahedral assignment
more tests

* docs update
need way more!

* map the TH tags directly to @ tags

* very basics of SMILES writing
this does not work with anything that changes the permutation order
like canonicalization or writing things in rings.

* start to support the getChiralAcross API

* more testing

* consistency

* add hasNonTetrahedralStereo() and getIdealAngleBetweenLigands()

* assignStereochemistry should only remove non-tetrahedral stereo

* re-simplify those tests

* cleanup matrix stream output

* initial pass at supporting nontet stereo in distgeom

* backup

* start on the reference docs

* TBP reference

* first pass at Oh finished

* update SP section

* more doc updates

* fix a typo

* add param to not remove Hs connected to non-tetrahedral atoms

* VERY basic coord generation for square planar

* TBP basics

* basic OH depiction

* start testing missing ligands
allow non-tet stereo in rings (ugly, but correct)

* add new TBP functions from Roger

* update depiction code for new API

* backup, the new tests work so far

* Finish the TB tests

* OH tests pass too

* cleanup

* first pass at getting correct SMILES with reordering
need way more testing than this

* ensure permutation 0 is correctly preserved

* some progress towards adding non-tetrahedral stereo to StereoInfo

* doc update

* add non-tet chiral classes to python wrappers

* make sure removeAllHs also gets neighbors of non-tetrahedral centers
more testing

* a bit of depictor cleanup

* make the assignment from 3D more tolerant
more testing

* improve the bulk testing

* cleanup

* remove a bit of redundant code

* ensure we don't write bogus permutation values to SMILES

* fix some rebase problems

* allow assignStereochemistryFrom3D() to be called without sanitization

* allow disabling the non-tetrahedral stereo when it's not explicit

* get that working on windows too
2022-05-20 09:07:16 +02:00
Eisuke Kawashima
ba6d8e0d3b clang-tidy: readability-simplify-boolean-expr (#4639) 2022-03-17 13:50:50 +01:00
Greg Landrum
fd1752e006 disable Info and Debug logs by default (#5065)
* disable the info and debug logs by default

* adjust tests to the newly disabled logs

* add LogStateSetter

* namespace reorg

* add some tests

* remove vestigial code

* switch to using std::vector
2022-03-12 10:04:28 +01:00
Eisuke Kawashima
27f711a658 Run clang-tidy (readability-braces-around-statements) (#4977)
https://github.com/rdkit/rdkit/pull/3024#discussion_r526549843
2022-03-10 08:00:10 +01:00
Eisuke Kawashima
11532089de Run clang-format against cpp (#4358) 2021-10-20 04:25:27 +02:00
Greg Landrum
157df3c296 fix a thread-safety bug in the UFF parameter acquisition (#4553) 2021-09-29 09:31:36 +02: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
Greg Landrum
69b143edd0 Swap from RDUNUSED_PARAM to unnamed parameters (#4433)
* cleanup

* more cleanup
2021-08-24 17:19:46 -04:00
jasondbiggs
5065340b20 a few doxygen comment fixes (#4368)
* collection of doxygen fixes

* more files with fixed doxygen comments

* more doxygen fixes

* more doxygen fixes

* last set of doxygen comment fixes

Co-authored-by: Jason Biggs <jasonb@wolfram.com>
2021-08-09 04:58:01 +02:00
Eisuke Kawashima
b9a5be5a2d miscellaneous updates (#4284)
* Remove accidentally tracked files and unset x flag

* Ignore ComicNeue

* Unify test tag to `reader`

* Trivial destructors

* Bump CMAKE_CXX_STANDARD to 14 (#4165)
2021-07-13 06:57:29 +02:00
Eisuke Kawashima
013ba4f21d Run clang-tidy (modernize-use-override) (#4251) 2021-07-01 05:18:56 +02:00
Eisuke Kawashima
78aac3c1bc Run clang-format against header files (#4143) 2021-06-08 07:57:51 +02:00
Paolo Tosco
8b90876577 fixes #3824 (#3949)
Co-authored-by: Paolo Tosco <paolo.tosco@novartis.com>
2021-03-19 04:57:28 +01:00
Greg Landrum
a3b6a10c54 revised version of #3894 (#3903)
* backup

* solves the problem

* expand the testing

* document new constant

* changes in response to review
2021-03-09 17:38:06 +01:00
Greg Landrum
e5c4e87633 Revert "ConfGen: Macrocycle torsion terms not being used with fused macrocycles (#3894)" (#3902)
This reverts commit 971e195b5b.
2021-03-09 14:41:43 +01:00
Greg Landrum
971e195b5b ConfGen: Macrocycle torsion terms not being used with fused macrocycles (#3894)
* backup

* solves the problem

* expand the testing

* document new constant
2021-03-09 14:36:12 +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
Greg Landrum
5747c4f283 Issue a warning when embedding a molecule with no Hs (#3807)
* add "needsHs()" query

* add warning for embedding without Hs

* add H checks to UFF and MMFF as well;
a small amount of cleanup in the MMFF atom typing
2021-02-22 06:57:50 +01:00
Ric
703fe5a225 Remove boost::foreach from public headers (#3820)
* remove include from headers

* update implementation files

* completely remove BOOST_FOREACH (#7)

* convert those changes to use auto

* get rid of all usage of BOOST_FOREACH

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2021-02-17 14:15:48 +01:00
Greg Landrum
c0a62388a2 switch to using target_compile_definitions instead of add_definitions (#3350)
* switch to using target_compile_definitions instead of add_definitions

* missed one
2020-08-21 04:49:07 +02:00
Greg Landrum
45b9aef28b clang-tidy modernize-use-default-member-init and modernize-use-emplace (#3190)
* run clang-tidy with modernize-use-default-member-init

* results from modernize-use-emplace

* one uniform initialization per line
otherwise SWIG is unhappy

Co-authored-by: Brian Kelley <fustigator@gmail.com>
2020-05-28 09:07:58 +02:00
Eisuke Kawashima
75f03412ef Modernize deprecated header inclusion (#3137) 2020-05-04 10:40:57 +02:00
Ric
66a38d3751 Address build warnings (#3082)
* do not throw in desctructor

* remove unused var; reserve

* provide operator= for DiscreteValueVect

* provide operator= for SparseIntVect

* remove unknown 'omp' #pragmas; refactor loop

* remove unused var

* remove unused variables

* give EmbeddedAtom a default constructor & early exit on self assignç

* handle unused vars/args

* catch exception by ref

* address unused args

* fix signed type comparison; refactor extra checks

* remove unused variable

* suppress switch fallthtough warning

* handle signed type comparison

* handle signed type comparison

* potentially uninitialized vars

* fix abs() of bool

* unused vars in catch statements

* remove unused variables

* python::list returns will be copied

* give ValidationMethod constructor & virtual destructor

* remove extra semicolon
2020-04-17 14:40:15 +02:00