Update interface to use NQCBase.Structure type. #4
Conversation
115e76b to
bca7897
Compare
bca7897 to
93652df
Compare
|
CI tests should now pass, I've bumped the minimum NQCBase version to fit with changes here. |
There was a problem hiding this comment.
Pull request overview
Updates the ASE interface to align with the new NQCBase.Structure return type, and adjusts Python module loading to a runtime __init__ pattern.
Changes:
- Change
convert_from_ase_atomsto returnNQCBase.Structureinstead of a tuple. - Update ASE Python module import to be initialized in
__init__()and accessed via aRef. - Update tests and tighten
NQCBasecompat (and bump package version).
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/NQCDInterfASE.jl |
Switches conversion output to NQCBase.Structure; updates ASE import initialization. |
test/runtests.jl |
Updates the test entrypoint to use the package module name. |
test/ase.jl |
Updates assertions to validate NQCBase.Structure fields, adds multi-frame type checks. |
Project.toml |
Updates version and NQCBase compat constraint. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -31,9 +35,9 @@ function convert_to_ase_atoms(atoms::Atoms, R::Vector{<:Matrix}, cell::AbstractC | |||
| end | |||
There was a problem hiding this comment.
The PR description mentions supporting direct conversion using the new NQCBase.Structure type, but convert_to_ase_atoms currently only accepts (atoms, positions, cell) inputs. If the intent is to allow convert_to_ase_atoms(::NQCBase.Structure), add an overload that forwards to the existing methods (and update tests/docs accordingly), or adjust the PR description if that support is out of scope.
There was a problem hiding this comment.
This is actually a good suggestion, but since Structure.info doesn't enforce specific types, the conversion of info contents into a good pythonic representation should be up to the user.
If we add a
Structuretype to NQCBase PR, the ASE interface should return converted structures in this type, and support direct conversion as well as conversion from individual atoms, positions and cells.This PR makes breaking changes compared to previous versions - reflect
this in version changes