Skip to content

Geometry operations#359

Open
3dot141592 wants to merge 2 commits into
crosslinkingfrom
geometry-operations
Open

Geometry operations#359
3dot141592 wants to merge 2 commits into
crosslinkingfrom
geometry-operations

Conversation

@3dot141592
Copy link
Copy Markdown
Collaborator

@3dot141592 3dot141592 commented Apr 21, 2026

Description

Introduces new geometric functions:

  • extract_points_from_cif: extracts the atom coordinates for a given residue range
  • build_convex_hull: builds a 3D convex hull mesh
  • meshes_intersect: checks whether two triangle meshes intersect
  • meshes_distance: calculates the minimum Euclidean distance between two triangle meshes

Changes

Added new librarys trimesh 4.11.5 and python-fc 0.7.0.11.
Added geometry_operations.py.

PR checklist

Development

  • If necessary, I have updated the documentation (README, docstrings, etc.)
  • If necessary, I have created / updated tests.

Mergeability

  • main-branch has been merged into local branch to resolve conflicts
  • The tests and linter have passed AFTER local merge
  • The backend code has been formatted with black
  • The frontend code has been formatted with pnpm format and checked with pnpm lint

Code review

  • I have self-reviewed my code.
  • At least one other developer reviewed and approved the changes

@3dot141592 3dot141592 requested review from Elena-kal and jorisfu April 21, 2026 14:22
@3dot141592 3dot141592 changed the base branch from main to crosslinking April 21, 2026 14:23
@github-actions
Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  backend/protzilla/data_analysis
  geometry_operations.py 1-182
Project Total  

This report was generated by python-coverage-comment-action

@3dot141592 3dot141592 self-assigned this Apr 22, 2026
Copy link
Copy Markdown
Collaborator

@jorisfu jorisfu left a comment

Choose a reason for hiding this comment

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

Looks generally good as a starting point for the upcoming stuff, wouldn't merge yet though as we have not finally decided on how we do the 3D stuff

:param residue_range: inclusive residue interval as [start, end]
:param chain_id: optional chain identifier. If given, the function will filter by
_atom_site.label_asym_id or _atom_site.auth_asym_id when available.
:return: array of n points und x, y, z coordinates. (n, 3)
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.

Suggested change
:return: array of n points und x, y, z coordinates. (n, 3)
:return: array of n points and x, y, z coordinates. (n, 3)

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.

3 participants