Repository navigation
Implementation of compliance elements and reusable internal coordinate infrastructure - #1446
Conversation
32ddcc8 to
f92016d
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Pure-procedure compilation blockers and correctness/coverage gaps remain in the new internal-coordinate and compliance paths.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 3
Open (6)
ERROR STOP is invalid in pure get_bmatrix · New Linear coord_angle dispatch omits required bend coordinates · New ERROR STOP is invalid in pure new_redundant · New print_compl applies incorrect mass-unit conversion · New Empty neighbour list causes maxval on zero-sized arrays · New GFN1 linear-water regression test is not registered · New
What changed in this PR
This PR adds compliance-matrix calculation from Cartesian Hessians, reusable redundant internal-coordinate infrastructure, and refactors model-Hessian configuration.
Changes:
- Adds covalent neighbour graphs, redundant coordinates, and Wilson B-matrix assembly.
- Integrates compliance reporting into numerical Hessian workflows.
- Updates model-Hessian constructors and expands regression tests.
| File | Description |
|---|---|
test/unit/test_model_hessian.f90 |
Updates model-Hessian constructor tests. |
test/unit/test_hessian.f90 |
Adds compliance and internal-coordinate tests. |
test/unit/test_bmatrix.f90 |
Expands linear-bend finite-difference tests. |
src/type/neighbourlist.f90 |
Adds covalent neighbour generation. |
src/type/calculator.f90 |
Uses configured Swart Hessian construction. |
src/optimizer.f90 |
Updates model-Hessian allocation and calls. |
src/model_hessian/type.f90 |
Simplifies the model-Hessian interface. |
src/model_hessian/{swart,lindh,internal,gff}.f90 |
Adds constructors and configuration-backed computation. |
src/meson.build |
Registers internals and compliance sources. |
src/internals/* |
Adds graph and redundant-coordinate infrastructure. |
src/hessian.F90 |
Invokes compliance reporting after numerical Hessians. |
src/compliance.f90 |
Implements compliance calculation and output. |
src/CMakeLists.txt |
Registers new sources. |
src/bmatrix.f90 |
Adds generic B-matrix assembly and linear-bend helpers. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| type(graph_type), intent(in) :: graph | ||
| !> Cartesian reference coordinates, dimension (3, graph%n), in the length | ||
| !> unit the coordinate values are reported in | ||
| real(wp), intent(in) :: xyz(:, :) |
There was a problem hiding this comment.
Wouldn't it be better to take a structure object in here instead of moving around its components?
There was a problem hiding this comment.
to keep the signature as simple as possible and to minimize dependencies (this method only needs the cartesian coords, no need to import also the molecule type) i think it's preferable to pass only the single attribute.
2eab9dc to
d82ad80
Compare
Signed-off-by: lmseidler <seidler118@gmail.com>
Signed-off-by: lmseidler <seidler118@gmail.com>
Signed-off-by: lmseidler <seidler118@gmail.com>
Signed-off-by: Leopold Seidler <seidler118@gmail.com>
Signed-off-by: Leopold Seidler <seidler118@gmail.com>
Signed-off-by: Leopold Seidler <seidler118@gmail.com>
Signed-off-by: Leopold Seidler <seidler118@gmail.com>
Signed-off-by: lmseidler <seidler118@gmail.com>
Signed-off-by: lmseidler <seidler118@gmail.com>
Signed-off-by: lmseidler <seidler118@gmail.com>
…lculation Signed-off-by: lmseidler <seidler118@gmail.com>
Signed-off-by: lmseidler <seidler118@gmail.com>
Signed-off-by: lmseidler <seidler118@gmail.com>
Signed-off-by: lmseidler <seidler118@gmail.com>
Signed-off-by: lmseidler <seidler118@gmail.com>
Signed-off-by: lmseidler <seidler118@gmail.com>
Signed-off-by: lmseidler <seidler118@gmail.com>
Signed-off-by: Leopold Seidler <seidler118@gmail.com>
d82ad80 to
cb0f304
Compare
| ! noise | ||
| Hp = 0.5_wp * (H + transpose(H)) | ||
|
|
||
| ! Hp = (1 - Q Q^T) Hp (1 - Q Q^T) |
There was a problem hiding this comment.
Is this actually our mctc_gemm interface? Don't we have anything shorter (also for Lapack?)
Signed-off-by: lmseidler <seidler118@gmail.com>
Signed-off-by: lmseidler <seidler118@gmail.com>
Signed-off-by: lmseidler <seidler118@gmail.com>
Signed-off-by: lmseidler <seidler118@gmail.com>
| *--o1nh*:: | ||
| perform the numerical hessian calculation using the ODLR approximation (O1NumHess) | ||
|
|
||
| Hessian runs automatically perform a compliance analysis for nonperiodic |
There was a problem hiding this comment.
Sorry just saw it now. Please indent this part (and maybe reduce a bit this is quite long)
Signed-off-by: lmseidler <seidler118@gmail.com>
Signed-off-by: lmseidler <seidler118@gmail.com>


The goal of this PR is to introduce the calculation of compliance elements from the Cartesian Hessian. In the process I'll also implement a robust internal coordinate implementation, which can later be used to replace redundant code in different modules (intmodes, geosum) in a separate PR.
Edit: there is also potential to further reduce redundant code in model Hessian infrastructure but this needs some special internal coordinate generation rules and is beyond the scope of this PR. Added a TODO though.