5 Commits

Author SHA1 Message Date
Greg Landrum
d12932f13e support bond property lists in SDF (#8778)
* backup
builds but no tests

* deprecate old form

* initial basic tests for bond property lists

* Tests pass

Fixes #8777

* add deprecations to release notes

* - avoid computing size of a constant at runtime
- replace multiple instances of a numeric constant with a literal constant
- avoid unnecessary copying of strings in iterations and function calls

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2025-09-17 16:17:12 +02:00
Brian Kelley
ef234130f8 Optimize GetPropsFromDict: use tags for conversion (#6355)
* Optimize GetPropsFromDict, use tags for conversion, not the try and fail technique

* Autoconvert strings to ints and bools if possible

* Add autoConvert option to GetPropsAsDict default=true

* Update Code/GraphMol/Wrap/props.hpp

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

* change autoConvert to autoConvertStrings, add failed datatype conversion notices

* Fix Invariant usage

* Fix namespace for string

* Add GetProp(key, autoConvert) to allow for converting only what you want

* Make TestSetProps private

* Get _TestSetProps from rdmolops

---------

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
Co-authored-by: Brian Kelley <bkelley@relaytx.com>
2023-05-25 09:50:08 -04: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
Brian Kelley
0f18dba0ed Fix/rdprop integer conversions (#4194)
* Allow int->int64 conversions

* Add original python test

* Add self to class method

* Quick cout to see what the error really is

* Add overflow checks to integer conversions in getProp

* Fix conversions, convert to ValueError in python for bad conversions

* Trigger tests to run again

* Revert "Quick cout to see what the error really is"

This reverts commit 70feea687e.
2021-06-08 04:19:35 +02:00
Greg Landrum
180c15fe0e support reading/writing atom props from SD files (#2297)
* first crude pass

* fix a deprecation

* change naming scheme, support bools

* add standalone function

* add a default value for missings

* support long lines

* stupid typo

* make operator[] work

* revisit missing value handling

* modify missing value handling

* switch to an alternate scheme for specifying missing values

* clang-format

* First pass at property list parser
still needs more tests

* add test for processMolPropertyLists

* get this working as part of the ForwardSDMolSupplier

* first pass at python wrappers and tests

* clang-format run

* add creation of property lists at the mol level

* wrap long lines on output

* remove PoC implementation

* fix python wrappers

* remove out-of-date reference to the Python PoC

* changes in response to review
2019-03-03 13:17:13 -05:00