Commit Graph

17 Commits

Author SHA1 Message Date
Rachael Pirie
2e1d946f6d DCLV updates (#8756)
* first pass speed up of DCLV method

* drop to 320 surface points, add polar surface area v1

* suggested changes

* add John's GridKey implementation

* revert standard dots to float array

* pass simple variables by value

* stable pass radii as param

* final DCLV updates

- update max radius
- includeHs flag for polar surface area/volume
- fix silly include ligand mistake in checkExcludeAtoms
- update tests

* add missing break statements

* missing ;

* Greg changes 1

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

* Greg changes 2

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

* Greg changes 3

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

* Greg changes 4

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

* Greg changes 5

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

* Greg changes 6

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

* Greg changes 7

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

* Greg changes 7

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

* missing return false

* Greg changes 8

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

* fix incomplete doc string

* fix pytests

---------

Co-authored-by: greg landrum <greg.landrum@gmail.com>
2025-09-26 16:40:11 +02:00
Greg Landrum
4007e0c555 Fixes #7264 (#8696) 2025-08-12 16:27:18 +02: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
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
Greg Landrum
8e57151157 Fixes #6757 (#7664)
* assignStereochemistry() should call updatePropertyCache() if it is needed

* Fixes #6757

* update expectations in current tests

* add another test
2024-07-25 15:26:22 +02:00
Greg Landrum
1b6b126d55 Fixes #7364 (#7657) 2024-07-24 12:51:57 -04:00
Rachael Pirie
c651ca61de Dclv fix (#7480)
* fix for ligand only DCLV calcs

* formatting suggestion from review

---------

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2024-06-04 16:14:05 +02:00
Rachael Pirie
58023dd3b8 Add Double Cubic Lattice Volume (DCLV). (#7234)
* Add Double Cubic Lattice Volume (DCLV).

Method to compute the solvent accessible surface area and volume, van der Waals volume, compactness and packing density of a protein. Implemented from:  Frank Eisenhaber, Philip Lijnzaad, Patrick Argos, Chris Sander and Michael Scharf, "The Double Cubic Lattice Method: Efficient Approaches to Numerical Integration of Surface Area and Volume and to Dot Surface Contouring of Molecular Assemblies", Journal of Computational Chemistry, Vol. 16, No. 3, pp. 273-284, 1995.

* refactor

* DCLV is no longer a configuration option

* add to the docs

* standalone test has been removed

* reduce use of pointers as args

* DCLV to catch_tests

* update python wrapper

* add copyright statements

---------

Co-authored-by: greg landrum <greg.landrum@gmail.com>
2024-03-20 13:35:54 +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
David Cosgrove
aef426b247 Fix oxidation numbers calculation (#6266)
* Skip dative bonds when calculating oxidation numbers.

* Add extra test file.

---------

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2023-04-03 09:55:59 +02:00
Ric
bc8d2e7556 Fix build warnings (#6235)
* un/signed comparisons in molops

* reference in loop in EmbeddedFrag.cpp

* un/signed comparison in filtercatalogtest.cpp

* un/signed comparison in Descriptors/catch_tests.cpp

* un/signed comparisons in DetermineBonds.cpp

* drop unused 'params' arg from static functions in MolInterchange/Writer.cpp

* un/signed comparisons in MolDraw2D/catch_tests.cpp

* unused var in SubgraphUtils.cpp

* 'move' preventing copy ellision in CDXMLParser.cpp

* fix infinite recursive call in SubstructLibraryWrap.cpp
2023-03-30 19:21:51 +02:00
David Cosgrove
5fe20d270f Improved handling of organometallics (#6139)
* First stab at disconnecting organometallics the Syngenta way.

* Add support for Li and Na compounds, with tests.

* Correct docstrings.

* Add -1 valence to sodium.

* Add changes from PR 5997.

* Move declaration of disconnectOrganometallics.

* Re-factor tests for disconnectOrganometallics to read V3000 files rather than hard-code in file.

* Add optional options to constructor.

* Python wrapping for disconnectOrganometallics.

* Python tests.

* Correct docString.

* Test using in place overload of disconnect free function.

* options_ should not be a reference.

* Re-work the wrappers.

* Added test MOL files.

* Correct charge on iron atoms.

* Fix tests for charged iron.

* Added some more test complexes.

* Port Marco's oxidation number Python to C++ Descriptor.

* Rename functions.

* Another test.

* Python wrappers.

* Comment in test.

* Throws exception if atom-based function called with non-kekulized parent.

* Fix typo.

* Allow potassium as well.

* Whole molecule calculations for oxidation number only.
Rename prop to OxidationNumber.

* Add OxidationNumber to common_properties.

* Extra comment.

* When deleting atom, update any ENDPTS props on bonds.
Copied in from stale PR ExtraDoc.

* Added hapticBondsToDative with python wrapper.

* Extra test.

* Re-factor endpts parsing.

* Typo.

* Add function for haptic end points inc. Python wrapper.

* Add dative bonds in separate step.

* C++ version of dativeBondstoHaptic.

* Update test mols.

* Python wrapper.

* Fix indents in Python test script.

* Corrected expected test result.

* Only do non-metal to metal conversion of single bond to dative if the explicit valence of the non-metal allows it.

* Fix test broken in a non-material way by previous change.

* Export for DLL.

* Remove redundant function declaration.

* Dave hates Windows.

* Move hapticBondEndpoints to Molops::details.

* And take it out of the Python wrappers.

* Run yapf on reformatted test script.

* Get the DLL builds going.

* addDativeBond -> addHapticBond.

* Batch edits.

* Position arithmetic.

* setQuery.

* Dummy positions for all confs.

* Fix tests for dummy positions for all confs.

* Move tests to catch_organometallics.cpp.

* Modern docString.

* Change member variable names.

* sProp length, bonus batchEdit.

* Add options object to disconnectOrganometallics.

* Tidied license.
Atom precondition.

* GetIntProp.

* Test opts aren't defaults.

* Python wrapper for disconnectOrganometallics with options.

* Minor edit.

* Slightly random attempt to fix Java build.

* Response to review.

* Another stab at the doc strings.

---------

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2023-03-18 04:36:38 +01:00
Greg Landrum
9a2d1cd939 Fixes #5941 (#5942) 2023-01-14 08:54:30 -05:00
Greg Landrum
b05714d0d2 Fixes #5104 (#5114) 2022-03-23 08:19:15 -04:00
Greg Landrum
53523a4a11 support getNumAtoms and getNumHeavyAtoms in descriptors (#4200) 2021-06-04 11:48:07 -04:00
Greg Landrum
df2b6c8a8c Fixes #4167 (#4174) 2021-05-27 07:30:06 -04:00
Greg Landrum
1fe204841f Add Kier Phi descriptor (#3864)
* Add Kier Phi descriptor along with tests

* warn about hybridization
2021-03-06 09:40:27 -05:00