Skip to content

Common base class#21

Draft
stratixs wants to merge 9 commits into
biotite-dev:masterfrom
stratixs:base-class
Draft

Common base class#21
stratixs wants to merge 9 commits into
biotite-dev:masterfrom
stratixs:base-class

Conversation

@stratixs
Copy link
Copy Markdown

@stratixs stratixs commented May 6, 2026

Adds a base class for all Elastic Network models.

Specific changes:

  1. Creation of a base class for both GNM and ANM to bundle shared code. Both share the same initialization, the same covariance calculation and the same calls to some NMA functions.
  2. Introducing Eigenvalues/-vectors as model attributes. When calculating the covariance matrix using numpy.pinv they get calculated anyway (principle SVD). They can be stored so that they can be reused across the different NMA calculation.
  3. Faster calculation of the adjacency matrix/pairs and moving the Kirchhoff/Hessian calculation into the base class.
  4. I updated the dependencies and updated the information on how to install the dev environment. I introduced type information so that static analyzer can aid in the development process (I found a few errors because of this).

Remarks:

  • All the changes are backwards compatible. No existing code will break.
  • I extended some test cases and plan on extending even more to bump up the test coverage.
  • In general: Speedup and (loss of) Accuracy will be the main evaluation focus of my Bachelor Thesis. But I do not have any results yet.

The goal of this pull request: Discussion of the proposed structural changes to the code base. Are they in line with the coding philosophy of the project or do they change to much?

@stratixs stratixs marked this pull request as draft May 6, 2026 13:02
@stratixs
Copy link
Copy Markdown
Author

stratixs commented May 6, 2026

At the moment some tests are failing but I am working on that.

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