Skip to content

diff fingerprint#200

Open
redrodeo03 wants to merge 2 commits into
mainfrom
mosaic-1
Open

diff fingerprint#200
redrodeo03 wants to merge 2 commits into
mainfrom
mosaic-1

Conversation

@redrodeo03
Copy link
Copy Markdown
Collaborator

Description

Fix #(issue)

image implemented rdkit fingerprinting and computed the concatenated vector

Type of change

Please check the option that is related to your PR.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
    • In this case, we recommend to discuss your modification on GitHub issues before creating the PR
  • Documentations (modification for documents)

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

@redrodeo03 redrodeo03 marked this pull request as ready for review April 15, 2026 15:47
Copy link
Copy Markdown
Collaborator

@riya-singh28 riya-singh28 left a comment

Choose a reason for hiding this comment

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

This PR needs minor changes. @ARY2260 Please do a final pass after the changes.

prod = result[block : 2 * block]
diff = result[2 * block : 3 * block]

np.testing.assert_array_equal(diff, prod - reac)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If prod and reac are floating-point arrays, tiny numerical differences can break this. Please consider using np.testing.assert_allclose(diff, prod - reac, rtol=1e-6)

np.testing.assert_array_equal(diff, np.zeros(block))


def test_diff_values_are_minus1_zero_or_plus1():
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@redrodeo03 Please add a docstring explaining this test.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@redrodeo03 You can consider renaming this file to test_feat.py since it contains tests related to both diff_fingerprint.py and rdkit_fingerprint.py files.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

diff_fingerprint actually used rdkit_fingerprint too, I thought it would avoid confusion, i'll make the change if you still think its necessary!

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