Commit Graph

327 Commits

Author SHA1 Message Date
Greg Landrum
7467fe005f Fixes #8508 (#8514)
* Fixes #8508

* suggestion from review

* Update inchi.cpp
2025-05-11 05:10:18 +02:00
Yakov Pechersky
1356292c08 Set default Eigen3 version to 3.4.0 (#8477)
That is C++20 compatible

Fixes #8476
2025-05-05 09:00:20 +02:00
David Cosgrove
2de1dabdc1 ShapeInput from subset of atoms in molecule (#8449)
* Make shape on subset of atoms in molecule.
Optional radius for dummy atoms.

* Re-factor.
Add ShapeInputOptions.

* Python wrapper for options.

* Add non-standard radii option.
Add function to align a shape on a shape.
Add function to align conformer based on shape-shape transformation.

* Python wrappers for AlignShapes and TransformConformer.

* Add the new thing for Python options.

* Add option for excluding atoms from color features.
No partial color features if using atomSubset.

* In AlignShapes, don't change the fit shape (apart from transforming it) in case it will be used again.

* Rename it AlignShape to be consistent with AlignMolecule.

* Response to review.

* Undo clang-format

* Fix botched merge.

* Typo.

---------

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2025-04-27 06:51:53 +02:00
David Cosgrove
fee128300c Only apply transformation to reference centre when overlaying molecule onto molecule. (#8463) 2025-04-25 10:57:32 +02:00
David Cosgrove
a88ef96b33 Set useCutOff in PrepareConformer. (#8446) 2025-04-16 12:14:59 +02:00
David Cosgrove
4ea67c70a5 Support pickling Shape inputs (#8434)
* Stash for transfer.

* Basic serialization.

* Serialization of ShapeInput.

* Default c'tor and operator=.

* Response to review.

* Add cmake to macOS CI image.

* Add make, not cmake.

* Conditional serialization test.

---------

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2025-04-14 18:03:50 +02:00
Greg Landrum
8eb02b8bed switch to C++20 (#8039)
* c++20 builds working

* get MolStandardize building with clang19

* get FMCS building with clang-19

* set cxx version to c++20

* remove a few more compiler warnings

* bump min boost version, CI cleanup

* boost 1.81 is not available from conda-forge

* remove unused constants

* bump linux version for CI

* remove another unused variable

* fix (hopefully) cartridge CI builds

* simplify cartridge environment

* try postgresql14 in CI

* start the postgresql service

* change the columns used in the pandastools nbtest

* remove missed merge conflict artifact

* get github4823 test to pass with numpy 2.2

* remove a compiler warning/error with g++13
2025-04-09 11:57:17 +02:00
David Cosgrove
73382748bc Fix indexing of heavy atoms in PubChemShape (#8417)
* Fix indexing of heavy atoms.

* Increment j. Doh!

* Add include guard for the hpp.

---------

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2025-04-08 09:41:46 +02:00
Paolo Tosco
d8dc968eaa Avoid a segfault in CoordGen when a double bond has stereo spec but no stereo atoms (#8415)
* avoid a segfault in CoordGen when a double bond has stereo spec but no stereo atoms

* changes in response to review

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-04-08 09:32:59 +02:00
Paolo Tosco
030bd976de bump MaeParser version to 1.3.2 (enable building without boost::iostreams) (#8404)
Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-04-02 15:56:14 +02:00
Paolo Tosco
71c4103475 Suppress large amounts of 'BOOST_NO_CXX98_FUNCTION_BASE macro redefined' warnings in clang/emcc builds (#7747) 2025-03-29 20:04:58 +01:00
Greg Landrum
32608ae0b4 Atoms bonded to metal atoms should always have their H counts explicit in SMILES (#8318)
* refactor the code to determine whether or not an atom is in brackets

* move the definition of isMetal to QueryOps

* atoms bound to metals in SMILES should always be in square brackets

Implementation and some test updates

needs confirmation that all of tests run

* basic tests pass

* java tests pass

* update js tests

* doc updates

* Update Code/GraphMol/catch_graphmol.cpp

Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com>

* Update Code/GraphMol/SmilesParse/test.cpp

Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com>

* finish fixing tests

* bump yaehmop version to allow compilation to work

---------

Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com>
2025-03-29 07:26:03 +01:00
Ricardo Rodriguez
55dc5c73e3 fix inchi conversion leak 1 (#8291) 2025-02-24 17:14:38 +01:00
Ricardo Rodriguez
1a67fefcc6 mem fixes (#8276) 2025-02-20 05:59:30 +01:00
Yakov Pechersky
b9f7d4787b When ignoring tetrahedral chirality for inchi, case on degree, not valence (#8266)
Fixes #8238
Fixes #8239
Modification of #8126
2025-02-13 19:14:57 +01:00
Greg Landrum
fa048eacc5 Replace GetImplicitValence() and GetExplicitValence() with GetValence() (#7926) 2025-01-28 21:09:03 +01:00
Rubén Chaves
cf8e7692fa Update InChi links (#8187)
For the user manual https://www.inchi-trust.org/download/104/InChI_UserGuide.pdf can be also used, but is an older one.
2025-01-20 17:20:49 +01:00
Greg Landrum
162fb9a7ec some cmake cleanups (#8171)
* Fixes #8139

* Fixes #8138
2025-01-15 16:19:48 +01:00
Greg Landrum
e6a45a8d17 Fixes two out-of-bounds bugs in the InChI wrapper (#8126) 2024-12-25 21:32:35 +01:00
Greg Landrum
5aed3d886b Fixes #8096 (#8104)
* add test

* Fixes #8096

* change in response to review
2024-12-16 16:59:13 +01:00
Greg Landrum
a4cdf5d21d Fixes #8092 (#8094)
* Fixes #8092
cross-platform file stuff is just soooooo fun

* response to review

* works on windows
2024-12-15 05:58:03 +01:00
Jessica Braun
e66be93f1b fixing the doc string in the shape alignment code (#8040) 2024-11-26 17:13:46 +01:00
Greg Landrum
112fc3e453 improve defaults for the shape-based alignment (#8029) 2024-11-23 03:58:04 +01:00
Greg Landrum
e7b79fe4f9 Fix probe molecule transformation for ShapeAlign (#8016)
* fix output molecule transformation bug

* fix test mistake
2024-11-22 09:23:48 -05:00
Paolo Tosco
614116a398 Make sure that FreeSASA can be built as DLL on Windows (#7985)
* - Make sure that FreeSASA can be built as DLL on Windows (MSVC & MinGW
compilers)
- avoid an unnecessary code patch by using only a .def file for
  exporting symbols

* get the Windows DLL build to work with either MSVC or MinGW compilers
2024-11-20 16:17:11 +01:00
Greg Landrum
cf29f0895f Documentation updates (#7933)
* doc updates

* add rdShapeAlign to the docs

* fix shape docs

* let's not add too much here, revert deprecation

* response to review
2024-10-19 17:19:59 +02:00
Yakov Pechersky
470df8cd2f FindPython Development.Module instead of Development (#7881)
* FindPython Development.Module instead of Development

`Development` grabs `Development.Embed` since CMake 3.18
which is too much, and doesn't work on a manylinux build context

* Set CMake minimum version to 3.18
2024-10-17 08:22:18 +02:00
UENO, M.
070f07c974 Update PUBCHEMSHAPE_URL and remove patch code (#7900) 2024-10-07 16:17:58 +02:00
Ricardo Rodriguez
ea7f51f3b1 Fix some mem errors in 2024.09.1 (#7867) 2024-10-03 16:05:43 +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
Paolo Tosco
4cc3d759ce avoid pubchem-align3d build failure on g++ >=13 (#7817)
Co-authored-by: ptosco <paolo.tosco@novartis.com>
2024-09-16 06:14:35 +02:00
Greg Landrum
da2a9242bf Provide an RDKit wrapper around pubchem-align3d (#7798)
* initial support for pubchem-align3d

* works, passes the tests

* bump commit we are using

* update readme

* disable pubchem shape for limited depedencies build

* comment from review

* get windows dll builds working

* stupid oversight

* changes in response to review
get rid of the "using namespace std"
test that the alignment is re-entrant
2024-09-14 06:08:24 +02:00
Greg Landrum
67f507a15c Some cmake cleanup work (#7720)
* cmake modernization

- get rid of some warnings
- switch to what I hope is the correct way of doing things
- bump min cmake version to 3.16
- bump min boost version to 1.70

This builds on linux

* remove some usages of PYTHON_EXECUTABLE

* remove old-school python usage from coverage tests

* remove unused CI file

* bump boost version for windows builds to 1.84

* still trying to get the ci builds working

* typo

* eventually the CI will work

* robustify some tests
2024-08-16 17:11:31 +02:00
Greg Landrum
b1663052b8 Remove Descriptors as a dependency of many other RDKit libraries (#7700)
* move mol weight and formula calculators to MolOps and refactor them a bit.
The descriptors are still there and should remain.

* remove other unnecessary dependencies on Descriptors

* Update adapter.cpp

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

---------

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
2024-08-13 13:22:43 +02:00
Greg Landrum
4e0c7d4f67 allow static builds to work with clang and no coordgen (#7416) 2024-05-08 22:26:38 -04:00
Greg Landrum
31f11952e0 Fix #7311: problem with InChI for phosphinic acid (#7419)
* backup

* remove default valence for Tl
2024-05-03 21:23:37 +02:00
Greg Landrum
9367e207d5 remove some warnings with -Wextra (#7339) 2024-04-11 11:01:59 +02:00
Paolo Tosco
3353491ae6 - avoid rebuilding FreeSASA at every build for no good reason (#7245)
- avoid prepending an #include to freesasa.h for no good reason

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2024-03-16 07:35:08 +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
Ric
d86d30ed1e fix build with external coordgen library (#6947) 2023-11-30 14:58:19 +01:00
Paolo Tosco
2b4202867e Add Python modules to generate stubs and automatically patch docstrings (#6919)
* - added gen_rdkit_stubs Python module to generate rdkit-stubs
- added patch_rdkit_docstrings Python module to patch existing C++ sources to fix docstrings missing self parameter and add named parameters taken from C++ signatures where possible
- added rdkit-stubs/CMakeLists.txt to build rdkit-stubs as part of the RDKit build
- added an option to CMakeLists.txt to enable building rdkit-stubs as part of the RDKit build (defaults to OFF)

* fixed CMakeLists.txt, rdkit-stubs/CMakeLists.txt and a doctest

* - added missing cmp_func parameter
- fixed case with overloads with optional parameters
- do not trim params if expected_param_count == -1
- add dummy parameter names if we could not find any
- keep into account member functions when making up parameter names
- address __init__ and make_constructor __init__ functions
- fix incorrectly assigned staticmethods

* patched sources

* address residual few remarks

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2023-11-30 04:54:18 +01:00
Greg Landrum
8892fb160a Fix minimal build, allow building without boost::serialization (#6932)
* make sure that we can build without boost iostreams or seralization

adds some "private" variables on the python side to check for these compilation flags

* get out minimal cmake version correct

* get minimallib js building

installs an up-to-date cmake
also updates the version of boost being used for the minimallib
adds extra argument to allow the repo to be specified
2023-11-23 05:57:05 +01:00
Greg Landrum
2957ab4576 switch to catch2 v3 (#6898)
* switch to catch2 v3
Fixes #6894

* fix a couple of problems noticed in the CI builds

* more warning cleanup

* changes in response to review
2023-11-15 06:45:42 +01:00
Greg Landrum
f797113a16 cmake cleanup (#6814)
* add RDKIT_CFFI_STATIC option
minimallib cmake cleanup

* clean up a lot of boost::iostreams nonsense

* find_package(boost cleanup

* update the swig wrappers

* updates to psql

* get the Qt demo working again

* fix? coordgen

* only use std::regex in moldraw2d test

this is consistent with the other tests

* cleanup the serialization stuff too
2023-11-10 15:32:54 +01:00
Greg Landrum
63c7e85046 Update CI, remove some warnings (#6882)
* ci updates

* forgotten update

* inch by inch

* remove unused variable

* try a gcc bump

* get rid of a bunch of unused-but-set errors in clang16

* be more selective

* disable a test in an obsolete module which is mysteriously failing
2023-11-09 13:14:00 -05:00
Greg Landrum
ab152a4ed1 Switch over to using pytest to run the python tests (#5916)
* misc adaptations/modernizations
plus a few changes to allow pytest discovery

* get the recap unittests running

* pytest config updates

* all tests pass

* integrate the pytest stuff into ctest

* integrate Projects dir
better cmake integration

* ci build env updates

* ignore more files

* remove six.py

* cleanup UnitTestPandasTools

* cleanup pytest

* remove obsolete use of rdkit.six from doctests

* update release notes

* mysterious CI fix

* add conftest to remove some tests

* remove the old python-based testing infrastructure

---------

Co-authored-by: Ric <ricrogz@gmail.com>
2023-11-03 14:39:24 +01:00
Ric
aa02c9afb0 Fixes #6633 (#6643)
* add a test

* add fix

* ignore incorrect stereo bonds from inchi
2023-08-23 06:18:14 +02:00
Paolo Tosco
4e5a989422 update avalontools version to incorporate bug fixes (#6513)
* - fixed a crash in Avalon occurring when an atom idx in the bond table is out of bounds
- removed 0-padding ahead of parsing bond line as it is unnecessary and potentially harmful
- forked Avalon so it can be patched more conveniently

* updated the Avalon pre-relase number and updated the checksum

* updated pre-release number and checksum

* moved the Avalon fork under RDKit organization
updated checksum and release

---------

Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
2023-07-14 12:58:18 +02:00
Greg Landrum
41d0139c4b Fixes #6172 (#6388) 2023-05-23 16:09:52 +02:00
Greg Landrum
2fba0f52c5 bump yaehmop version (#6330) 2023-05-04 05:08:56 +02:00