Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • wslda wslda
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • wtools
  • wsldawslda
  • Wiki
  • Custom SLDAE functional

Custom SLDAE functional · Changes

Page history
Update Custom SLDAE functional authored Feb 19, 2026 by Gabriel Wlazłowski's avatar Gabriel Wlazłowski
Show whitespace changes
Inline Side-by-side
Custom-SLDAE-functional.md
View page @ 6212ad73
# Introduction # Introduction
Within W-SLDA Toolkit we provide a script for generating custom SLDA functional: `extensions/sldae/sldae-dev-tool.c` Within the W-SLDA Toolkit, we provide a script for generating a custom SLDA functional: `extensions/sldae/sldae-dev-tool.c`
Within the script user can provide its own formulas for: Within the script user can provide their own formulas for:
```c ```c
double ground_state_energy (int dn, double _x, int id []); double ground_state_energy (int dn, double _x, int id []);
double chemical_potential (int dn, double _x, int id []); double chemical_potential (int dn, double _x, int id []);
...@@ -10,10 +10,10 @@ double inverse_effective_mass (int dn, double _x, int id []); ...@@ -10,10 +10,10 @@ double inverse_effective_mass (int dn, double _x, int id []);
double pairing_gap (int dn, double _x, int id []); double pairing_gap (int dn, double _x, int id []);
``` ```
In return, the script generates a source file readable by W-SLDA Engine. Once the functional is created, it becomes available for all code within the toolkit. In return, the script generates a source file readable by the W-SLDA Engine. Once the functional is created, it becomes available for all code within the toolkit.
# Example: SLDAE with the effective mass equal 1 # Example: SLDAE with the effective mass equal to 1
The function for the computation of the effective mass has been modified to: The function for the computation of the effective mass has been modified to:
```c ```c
...@@ -84,7 +84,7 @@ Parameters written to: sldae_parameters.h ...@@ -84,7 +84,7 @@ Parameters written to: sldae_parameters.h
Creating file: sldae_parameters.txt Creating file: sldae_parameters.txt
``` ```
Once the functional is generated user should inspect content of file `sldae_parameters.txt`. It contains following columns: Once the functional is generated, the user should inspect the content of the file `sldae_parameters.txt`. It contains the following columns:
``` bash ``` bash
# 1: lambda=a*k_F # 1: lambda=a*k_F
# 2: ground_state_energy # 2: ground_state_energy
...@@ -100,7 +100,7 @@ Once the functional is generated user should inspect content of file `sldae_para ...@@ -100,7 +100,7 @@ Once the functional is generated user should inspect content of file `sldae_para
#12: c_functional #12: c_functional
#13: c_functional - PADE #13: c_functional - PADE
``` ```
In particular, it is important to confirm that PADE approximants correctly reproduce functions generated by analytical formulas. Note that W-SLDA Engine uses Pade approximants to deliver the highest performance. In particular, it is important to confirm that PADE approximants correctly reproduce functions generated by analytical formulas. Note that the W-SLDA Engine uses Pade approximants to deliver the highest performance.
```bash ```bash
[gabrielw@dell sldae]$ gnuplot [gabrielw@dell sldae]$ gnuplot
gnuplot> plot "sldae_parameters.txt" u 1:6 w l, "" u 1:7 w l gnuplot> plot "sldae_parameters.txt" u 1:6 w l, "" u 1:7 w l
...@@ -108,10 +108,10 @@ gnuplot> plot "sldae_parameters.txt" u 1:6 w l, "" u 1:7 w l ...@@ -108,10 +108,10 @@ gnuplot> plot "sldae_parameters.txt" u 1:6 w l, "" u 1:7 w l
``` ```
![image](uploads/1a057ed2aaa2adf039c3656e0c90e9b2/image.png) ![image](uploads/1a057ed2aaa2adf039c3656e0c90e9b2/image.png)
Finally, file `sldae_parameters.h` should be moved to folder `hpc-engine`. From now new SLDAE functional will be used when `FUNCTIONAL=SLDAE` is selected in predefines. Finally, file `sldae_parameters.h` should be moved to folder `hpc-engine`. From now on, the new SLDAE functional will be used when `FUNCTIONAL=SLDAE` is selected in predefines.
# Collection of own SLDAE-like functionals # Collection of own SLDAE-like functionals
The information about PADE approximants for functional coefficients loded to the engine through the file `hpc-engine\sldae_functional.h`, precisely: The information about PADE approximants for functional coefficients loaded to the engine through the file `hpc-engine\sldae_functional.h`, precisely:
```c ```c
// Select coefficients // Select coefficients
#ifdef SLDAE_FORCE_A1 #ifdef SLDAE_FORCE_A1
...@@ -121,5 +121,5 @@ The information about PADE approximants for functional coefficients loded to the ...@@ -121,5 +121,5 @@ The information about PADE approximants for functional coefficients loded to the
#include "sldae_parameters.h" #include "sldae_parameters.h"
#endif #endif
``` ```
User can modify this section to form that uploads a correct file with the desired set of coefficients. The user can modify this section to upload a correct file with the desired set of coefficients.
Clone repository

Content of Documentation
Official webpage
W-BSK Toolkit