forked from abacusmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 152
Feature: ABACUS light-weight ASE plugin implementation #6950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kirk0830
wants to merge
20
commits into
deepmodeling:develop
Choose a base branch
from
kirk0830:ase-abacus-plugin
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
Author
|
20260204: it works with ABACUS LTS version, the parser for latest version is to be implemented. |
fix(io): 移除legacyio.py中已弃用的read_istate函数 test: 添加xtest.sh测试脚本和测试文件 ci: 配置GitHub Actions工作流实现自动化测试 docs: 更新示例脚本包括DOS计算、约束MD、MTD和常规MD refactor(core): 清理未完成的restart测试代码 style: 统一文件格式和代码风格
添加测试用例验证从running_log文件中正确读取电子求解器类型和能带信息。同时包含对轨迹、力和应力读取功能的测试。
修改测试文件路径和预期值以匹配新的测试数据文件nspin4-gamma-mddump,该文件包含2帧数据而非原来的11帧,且alat_in_angstrom值不同
修复测试方法命名错误,将read_*改为test_read_*以正确执行测试 添加对轨迹、力和应力读取功能的详细测试断言 更新应力测试以匹配实际单位转换逻辑
添加对读取结果中原子和k点类型的断言检查,确保返回的Atoms对象及其计算器属性类型正确
- 在xtest.sh中添加set -e以确保错误时退出 - 修复generalio.py中的类型提示和路径处理 - 更新legacyio.py以支持非共线磁矩读取 - 添加新的测试文件并更新测试用例 - 修正KPT文件读写逻辑
refactor(core): 重构核心测试用例,使用临时目录并简化测试逻辑 feat(ksampling): 添加k路径生成功能,集成seekpath库 docs(examples): 更新带结构示例,引用seekpath并简化代码
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR checklist
Code review will be requested after the following checklist is completed:
What's changed: abacuslite
Background and Motivation
With the rapid development of computational materials science, an increasing number of DFT software packages and machine learning force fields are being developed. In the past, the approach of merging all calculator implementations into the main ASE (Atomic Simulation Environment) branch has placed significant maintenance burden on the ASE development team.
This has led us to rethink the best way to integrate ABACUS with ASE. After careful consideration, we decided to develop a lightweight, plugin-style calculator implementation that can be maintained independently.
Key Advantages of This Approach
Reduced Maintenance Burden: By maintaining our own calculator implementation, we alleviate the workload on the ASE development team while ensuring we can quickly adapt to changes in ABACUS.
Simplified Maintenance: Unlike forking and modifying ASE, this plugin-based approach significantly reduces the maintenance cost of periodically pulling changes from the main ASE branch.
Improved Consistency: We plan to integrate this implementation into our PR testing workflow. When ABACUS output formats change, our CI/CD pipeline will force developers to adapt the code here, ensuring consistency between ABACUS core code and this calculator implementation.
Version Compatibility: This implementation is designed to work with most ASE versions, eliminating the previous restrictions to specific ASE versions.
Introduction
abacuslite is a lightweight plugin for ABACUS (Atomic-orbital Based Ab-initio Computation at UStc), implementing the ASE (Atomic Simulation Environment) calculator interface.
Key Features
Special notes
As designed, abacuslite only supports SCF (Self-Consistent Field) related functionality, returning energy, forces, stress, etc. All other functionalities including relaxation, transition state searching, molecular dynamics, etc. are designed to call the implementation in ASE.
Installation
Installation is very simple, just execute the following command in the project root directory:
pip install .Usage Examples
Please refer to the example scripts in the
examplesfolder. Recommended learning path:More usage examples will be provided in future versions.
Authors
Contact
If you have any questions or suggestions, please contact us through:
Relationship with pyabacus
One may concern about the possible overlap and conflict with the pyabacus, the relationship with pyabacus is declared below:
Pyabacus is the package aimed for calling ABACUS in the Pythonic way, which benefits from the module design of ABACUS so that there are functionalities can be compiled individually as the callable libraries. Enabled by Pybind, those libraries can be imported directly in Python, the data is made possible to exchange between the C++ and Python in runtime. Therefore it is something like the implementation of a part of ABACUS.
abacuslite is the package for interfacing with the ASE ecosystem. By the uniformed interface and data structure, it is possible to utilize the various algorithms implemented in ASE, including structural relaxation, transition state searching, etc., therefore there is no overlap between the pyabacus and abacuslite, instead, it will be possible in the future that abacuslite call pyabacus to perform calculation, rather than executing the "mpirun -np X abacus" by the AbacusProfile instance (In ASE, the "Profile" is designed as the interface for the program to interact with the file i/o system and computing environment).