Skip to content

Drop pose-variant absolute coordinates from native-3d descriptors - #112

Merged
roshan2004 merged 1 commit into
mainfrom
drop-pose-variant-descriptors
Jun 8, 2026
Merged

Drop pose-variant absolute coordinates from native-3d descriptors#112
roshan2004 merged 1 commit into
mainfrom
drop-pose-variant-descriptors

Conversation

@roshan2004

Copy link
Copy Markdown
Owner

Closes the descriptors review. The native-3d preset emitted six absolute-coordinate columns — centroid_x/y/z and center_of_mass_x/y/z — recorded in the input file's coordinate frame. They are translation- and rotation-variant: two identical molecules placed differently in their files get different feature values, letting a model learn the arbitrary input frame. In a table whose stated purpose is fixed-size ML features, that is a footgun. Size and shape are already captured frame-independently by radius_of_gyration, dim_x/y/z, principal_moments, and the gyration-tensor shape scalars.

Changes

  • Remove the six columns from the descriptor emission, the empty-structure path, and the native-3d name list — so preset=None and preset="native-3d" stay consistent. Width drops 80 → 74.
  • native-basic and rdkit-basic are unaffected.
  • CHANGELOG entry under Changed (Breaking); a regression test pins the columns' absence (named preset, descriptor_feature_names, and the default preset=None output).

Verification

This came out of an empirical review of the shape descriptors. I also checked the related claim that asphericity/acylindricity are redundant with relative_shape_anisotropy — across 23 shape-diverse molecules, leave-one-out R² against the principal-moments block was 0.65 / 0.93 / negative respectively (all below the 0.96 redundancy bar, and mutually uncorrelated), so those were kept. Only the pose-variant coordinates are removed here.

Note

This is a breaking change to the native-3d schema. It is recorded under [Unreleased]; it warrants a 0.15.0 → 0.16.0 bump whenever the next release is cut (left out of this PR).

Full suite: 867 passed, 21 skipped. ruff check clean.

The native-3d preset emitted centroid_x/y/z and center_of_mass_x/y/z:
absolute coordinates in the input file's frame, so translation- and
rotation-variant. Two identical molecules placed differently produced
different features, letting a model learn the arbitrary input frame --
a footgun in a table whose purpose is fixed-size ML features. Size and
shape are already captured frame-independently by radius_of_gyration,
dim_x/y/z, principal_moments and the gyration-tensor shape scalars.

Remove all six from the emission, the empty-structure path, and the
native-3d name list, so preset=None and preset="native-3d" stay
consistent (width 80 -> 74). Nothing internal, tested or documented
depended on them. native-basic and rdkit-basic are unaffected.

Breaking change to the native-3d schema; noted in CHANGELOG. A
regression test pins the columns' absence.
@roshan2004
roshan2004 merged commit d34a929 into main Jun 8, 2026
11 checks passed
@roshan2004
roshan2004 deleted the drop-pose-variant-descriptors branch June 8, 2026 20:05
@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@roshan2004 roshan2004 mentioned this pull request Jun 8, 2026
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.

1 participant