Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5225369
Add fixed-cell i-PI socket driver
Jul 7, 2026
e0f70ca
Refactor i-PI socket driver into source_relax
Jul 9, 2026
fe2c2a3
Fix socket driver CI regressions
Jul 9, 2026
3635341
Reduce socket driver global dependencies
Jul 9, 2026
c86281f
Merge branch 'develop' into feature/fixed-cell-ipi-socket
Phorbol Jul 10, 2026
28ea99f
Merge branch 'develop' into feature/fixed-cell-ipi-socket
Phorbol Jul 19, 2026
5711ab3
Address socket i-PI review feedback
Jul 19, 2026
faafda3
Fix socket parameter docs sync
Jul 19, 2026
9f26e9f
Clarify socket endpoint address formats
Jul 19, 2026
7c5c0c6
Fix socket docs generation and launcher parsing
Jul 19, 2026
81a3885
Document socket running log behavior
Jul 20, 2026
5d75f42
Merge branch 'develop' into feature/fixed-cell-ipi-socket
Phorbol Jul 24, 2026
8b60f83
Merge upstream/develop into feature/fixed-cell-ipi-socket
Aug 3, 2026
666f654
docs: design fixed-cell i-PI hardening
Aug 5, 2026
bfc028b
docs: record ELPA 2026.02 genELPA compatibility issue
Aug 12, 2026
4dc207e
fix: use explicit i-PI wire integer type
Aug 3, 2026
9b63794
feat: add socket frame numerical contract
Aug 3, 2026
54ddefd
fix: enforce socket frame numerical thresholds
Aug 3, 2026
871efba
test: cover i-PI extras byte payloads
Aug 12, 2026
e16ca56
feat: support independent socket properties
Aug 12, 2026
1e10c59
test: fix socket driver integration linkage
Aug 12, 2026
9b2f362
fix: publish socket convergence and property metadata
Aug 13, 2026
c3f4b69
fix: align fixed socket convergence and property contract
Aug 13, 2026
af501b2
Merge upstream develop and resolve fixed-cell i-PI driver conflict
Sep 6, 2026
76ab2e9
Fix Makefile linkage for fixed-cell i-PI socket driver
Sep 6, 2026
9a527c5
Integrate fixed-cell socket hardening and validate frame consistency
Sep 6, 2026
8ff24b2
Fix CUSOLVERMp CUDA warning include
Sep 6, 2026
e8e0f9a
Sync socket parameter metadata with generated docs
Sep 7, 2026
29b18ac
Docs: clarify abacuslite README scope
Sep 7, 2026
46ec744
Docs: clarify abacuslite license and examples
Sep 7, 2026
881d444
Docs: explain socket workflow applicability
Sep 7, 2026
0925ae3
Merge branch 'develop' into feature/fixed-cell-ipi-socket
mohanchen Sep 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/advanced/input_files/input-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,7 @@
- relax: perform structure relaxation calculations, the relax_nmax parameter depicts the maximal number of ionic iterations
- cell-relax: perform cell relaxation calculations
- md: perform molecular dynamics simulations
- socket: run as a socket client for external drivers using the i-PI protocol
- get_pchg: obtain partial (band-decomposed) charge densities (for LCAO basis only). See out_pchg for more information
- get_wf: obtain real space wave functions (for LCAO basis only). See out_wfc_norm and out_wfc_re_im for more information
- get_s: obtain the overlap matrix formed by localized orbitals (for LCAO basis with multiple k points). the file name is SR.csr with file format being the same as that generated by out_mat_hs2
Expand Down Expand Up @@ -840,7 +841,12 @@
### chg_extrap

- **Type**: String
- **Description**: Charge extrapolation method for MD and relaxation calculations.
- **Description**: Charge extrapolation method for MD, relaxation, and socket-driven calculations.

When set to default, ABACUS chooses second-order for md, first-order for
relax/cell-relax/socket, and atomic for other calculations. Socket-driven
molecular dynamics can explicitly set second-order if the external driver
updates structures smoothly enough for second-order extrapolation.
- **Default**: default

### nb2d
Expand Down
8 changes: 7 additions & 1 deletion docs/parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ parameters:
* relax: perform structure relaxation calculations, the relax_nmax parameter depicts the maximal number of ionic iterations
* cell-relax: perform cell relaxation calculations
* md: perform molecular dynamics simulations
* socket: run as a socket client for external drivers using the i-PI protocol
* get_pchg: obtain partial (band-decomposed) charge densities (for LCAO basis only). See out_pchg for more information
* get_wf: obtain real space wave functions (for LCAO basis only). See out_wfc_norm and out_wfc_re_im for more information
* get_s: obtain the overlap matrix formed by localized orbitals (for LCAO basis with multiple k points). the file name is SR.csr with file format being the same as that generated by out_mat_hs2
Expand Down Expand Up @@ -328,7 +329,12 @@ parameters:
category: System variables
type: String
description: |
Charge extrapolation method for MD and relaxation calculations.
Charge extrapolation method for MD, relaxation, and socket-driven calculations.

When set to default, ABACUS chooses second-order for md, first-order for
relax/cell-relax/socket, and atomic for other calculations. Socket-driven
molecular dynamics can explicitly set second-order if the external driver
updates structures smoothly enough for second-order extrapolation.
default_value: default
unit: ""
availability: ""
Expand Down
15 changes: 11 additions & 4 deletions source/source_io/module_parameter/read_input_item_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void ReadInput::item_system()
}
{
Input_Item item("calculation");
item.annotation = "scf; relax; md; cell-relax; nscf; get_s; get_wf; get_pchg; gen_bessel; gen_opt_abfs; test_memory; test_neighbour";
item.annotation = "scf; relax; md; socket; cell-relax; nscf; get_s; get_wf; get_pchg; gen_bessel; gen_opt_abfs; test_memory; test_neighbour";
item.category = "System variables";
item.type = "String";
item.description = R"(Specify the type of calculation.
Expand All @@ -85,6 +85,7 @@ void ReadInput::item_system()
* relax: perform structure relaxation calculations, the relax_nmax parameter depicts the maximal number of ionic iterations
* cell-relax: perform cell relaxation calculations
* md: perform molecular dynamics simulations
* socket: run as a socket client for external drivers using the i-PI protocol
Comment thread
mohanchen marked this conversation as resolved.
Outdated
* get_pchg: obtain partial (band-decomposed) charge densities (for LCAO basis only). See out_pchg for more information
* get_wf: obtain real space wave functions (for LCAO basis only). See out_wfc_norm and out_wfc_re_im for more information
* get_s: obtain the overlap matrix formed by localized orbitals (for LCAO basis with multiple k points). the file name is SR.csr with file format being the same as that generated by out_mat_hs2
Expand All @@ -102,6 +103,7 @@ void ReadInput::item_system()
std::vector<std::string> callist = {"scf",
"relax",
"md",
"socket",
"cell-relax",
"nscf",
"get_s",
Expand Down Expand Up @@ -266,7 +268,7 @@ void ReadInput::item_system()
item.description = "If set to True, calculate the force at the end of the electronic iteration.";
item.default_value = "False";
item.reset_value = [](const Input_Item& item, Parameter& para) {
std::vector<std::string> use_force = {"cell-relax", "relax", "md"};
std::vector<std::string> use_force = {"cell-relax", "relax", "md", "socket"};
std::vector<std::string> not_use_force = {"get_wf", "get_pchg", "get_s"};
if (std::find(use_force.begin(), use_force.end(), para.input.calculation) != use_force.end())
{
Expand Down Expand Up @@ -873,7 +875,12 @@ Available options are:
item.annotation = "atomic; first-order; second-order; dm:coefficients of SIA";
item.category = "System variables";
item.type = "String";
item.description = "Charge extrapolation method for MD and relaxation calculations.";
item.description = R"(Charge extrapolation method for MD, relaxation, and socket-driven calculations.

When set to default, ABACUS chooses second-order for md, first-order for
relax/cell-relax/socket, and atomic for other calculations. Socket-driven
molecular dynamics can explicitly set second-order if the external driver
updates structures smoothly enough for second-order extrapolation.)";
item.default_value = "default";
read_sync_string(input.chg_extrap);
item.reset_value = [](const Input_Item& item, Parameter& para) {
Expand All @@ -882,7 +889,7 @@ Available options are:
para.input.chg_extrap = "second-order";
}
else if (para.input.chg_extrap == "default"
&& (para.input.calculation == "relax" || para.input.calculation == "cell-relax"))
&& (para.input.calculation == "relax" || para.input.calculation == "cell-relax" || para.input.calculation == "socket"))
{
para.input.chg_extrap = "first-order";
}
Expand Down
5 changes: 5 additions & 0 deletions source/source_io/test_serial/read_input_item_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,11 @@ TEST_F(InputTest, Item_test)
it->second.reset_value(it->second, param);
EXPECT_EQ(param.input.chg_extrap, "first-order");

param.input.chg_extrap = "default";
param.input.calculation = "socket";
it->second.reset_value(it->second, param);
EXPECT_EQ(param.input.chg_extrap, "first-order");

param.input.chg_extrap = "default";
param.input.calculation = "none";
it->second.reset_value(it->second, param);
Expand Down
17 changes: 12 additions & 5 deletions source/source_main/driver_run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,26 +59,33 @@ void Driver::driver_run()
unitcell::check_atomic_stru(ucell, PARAM.inp.min_dist_coef);

//! 2: initialize the ESolver (depends on a set-up ucell after `setup_cell`)
Input_para socket_esolver_inp = PARAM.inp;
const bool socket_mode = (socket_esolver_inp.calculation == "socket");
if (socket_mode)
{
socket_esolver_inp.calculation = "scf";
Comment thread
mohanchen marked this conversation as resolved.
Outdated
}
const Input_para& esolver_inp = socket_mode ? socket_esolver_inp : PARAM.inp;

this->init_hardware();

ModuleESolver::ESolver* p_esolver = ModuleESolver::init_esolver(PARAM.inp, ucell);
ModuleESolver::ESolver* p_esolver = ModuleESolver::init_esolver(esolver_inp, ucell);

//! 3: initialize Esolver and fill json-structure
p_esolver->before_all_runners(ucell, PARAM.inp);
p_esolver->before_all_runners(ucell, esolver_inp);

// this Json part should be moved to before_all_runners, mohan 2024-05-12
#ifdef __RAPIDJSON
Json::gen_stru_wrapper(&ucell);
#endif

const std::string cal = PARAM.inp.calculation;

//! 4: different types of calculations
const std::string cal = PARAM.inp.calculation;
if (cal == "md")
{
Run_MD::md_line(ucell, p_esolver, PARAM);
}
else if (cal == "scf" || cal == "relax" || cal == "cell-relax" || cal == "nscf")
else if (cal == "scf" || cal == "relax" || cal == "cell-relax" || cal == "nscf" || cal == "socket")
{
Relax_Driver rl_driver;
rl_driver.relax_driver(p_esolver, ucell, PARAM.inp, GlobalV::ofs_running);
Expand Down
2 changes: 2 additions & 0 deletions source/source_relax/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ add_library(
relax
OBJECT
relax_data.cpp
ipi_socket.cpp
Comment thread
mohanchen marked this conversation as resolved.
Outdated
socket_driver.cpp
cg_base.cpp
relax_driver.cpp
relax_sync.cpp
Expand Down
Loading
Loading