You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`SPARC-X-API` is an [ASE](https://wiki.fysik.dtu.dk/ase/)-compatible Python API for the density functional theory (DFT) code [SPARC](https://github.com/SPARC-X/SPARC). It offers:
8
17
9
18
1. ASE-compatible I/O format for SPARC files
10
-
2. A JSON API interfacing with SPARC's C-code for parameter validation and conversion
11
-
3. A comprehensive calculator interface for SPARC.
19
+
2. A JSON Schema interfacing with SPARC's C-code for parameter validation and conversion
20
+
3. A comprehensive calculator interface for SPARC with socket-communication support.
21
+
22
+
23
+
[Fig. 1](#fig-1-schematic-drawing-for-the-architecture-of-the-sparc-x-api-package) provides an overlook of the components of `SPARC-X-API` and its relation with the SPARC C-code.
24
+
25
+
#### Fig. 1 Schematic drawing for the architecture of the `SPARC-X-API` package
*Disclaimer: The socket communication feature in SPARC and SPARC-X-API are experimental and subject to changes until the release of v2.0 SPARC-X-API.*
363
380
364
381
### Overview
365
-
Experienced users can now harness the power of SPARC and SPARC-X-API's
382
+
Experienced users can harness the power of SPARC and SPARC-X-API's
366
383
socket communication layer to build efficient and flexible
367
384
computational workflows. By integrating a socket communication
368
385
interface directly into SPARC, users can significantly reduce the
369
386
overhead typically associated with file I/O during calculation
370
387
restarts. This feature is particularly beneficial for tasks involving
371
388
repetitive operations like structural optimization and saddle point
372
389
searches, where traditional file-based communication can become a
373
-
bottleneck.
390
+
bottleneck. The underlying software architecture is shown in [Fig. 3](#fig-3-sparc-electronic-calculations-with-socket-communication-across-hybrid-computing-platforms):
391
+
392
+
#### Fig. 3. SPARC electronic calculations with socket communication across hybrid computing platforms
**Requirements**: the SPARC binary must be manually compiled from the source
376
400
code with [socket
@@ -389,15 +413,18 @@ adheres to the [i-PI protocol](https://github.com/i-pi/i-pi)
389
413
standard. Specifically, we implement the original i-PI protocol within
390
414
the SPARC C-source code, while the python SPARC-X-API uses a
391
415
backward-compatible protocol based on i-PI. The dual-mode design is aimed for both low-level and
392
-
high-level interfacing of the DFT codes, providing the following features:
416
+
high-level interfacing of the DFT codes, providing the following features as shown in [Fig. 4](#fig-4-overview-of-the-sparc-protocol-as-an-extension-to-the-standard-i-pi-protocol):
417
+
418
+
#### Fig. 4. Overview of the SPARC protocol as an extension to the standard i-PI protocol.
Based on the scenarios, the socket communication layer can be accessed via the following approaches as shown in [Fig. 5](#fig-5-different-ways-of-using-sparcs-socket-mode):
393
422
394
-
1.**Unified Interface**: A consistent interface for both client and server codes, simplifying user interaction across different modes.
395
-
2.**Versatile Operation Modes:** Supports various modes (Local-only, Client, Server) to cater to diverse computational needs.
396
-
3.**Seamless Calculation Restart:** Automates the restarting process on the client side, enhancing user convenience.
423
+
#### Fig. 5. Different ways of using SPARC's socket mode.
0 commit comments