Skip to content

Constitutional descriptor added#642

Open
pkacprzak5 wants to merge 1 commit into
mordredfrom
pk-constitutional
Open

Constitutional descriptor added#642
pkacprzak5 wants to merge 1 commit into
mordredfrom
pk-constitutional

Conversation

@pkacprzak5

Copy link
Copy Markdown
Collaborator

Changes

Constitutional descriptor added and wired to calculator of mordred

Checklist before requesting a review

  • Docstrings added/updated in public functions and classes
  • Tests added, reasonable test coverage (at least ~90%, make test-coverage)
  • Sphinx docs added/updated and render properly (make docs and see docs/_build/index.html)

@pkacprzak5 pkacprzak5 requested review from FloudMe77, OlaszPL and j-adamczyk and removed request for j-adamczyk, mjste and my-alaska July 13, 2026 02:11
count=mol_hydrogens.GetNumAtoms(),
)
sums = _CARBON_NORMALIZED_PROPERTIES[:, atomic_numbers].sum(axis=1)
means = sums / atomic_numbers.size if atomic_numbers.size else np.full(8, np.nan)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can assume there is at least 1 atom

],
dtype=np.float64,
)
carbon_values = property_values[:, [6]]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why [6] instead of just 6?

assert_allclose(values, expected, rtol=1e-6, equal_nan=True)


def test_constitutional_is_connected_to_calculator():

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be a pretty expensive test. Let's remove this for now, and later consider how to wire together individual tests and calculator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants