Skip to content

Commit 4066253

Browse files
authored
Docs: delay release of deltaspin due to bugs (#4146)
1 parent 7fdd771 commit 4066253

77 files changed

Lines changed: 10 additions & 30444 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/advanced/input_files/input-main.md

Lines changed: 0 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -370,16 +370,6 @@
370370
- [tau](#tau)
371371
- [sigma\_k](#sigma_k)
372372
- [nc\_k](#nc_k)
373-
- [Deltaspin](#deltaspin)
374-
- [sc\_mag\_switch](#sc_mag_switch)
375-
- [decay\_grad\_switch](#decay_grad_switch)
376-
- [sc\_thr](#sc_thr)
377-
- [nsc](#nsc)
378-
- [nsc\_min](#nsc_min)
379-
- [sc\_scf\_nmin](#sc_scf_nmin)
380-
- [alpha\_trial](#alpha_trial)
381-
- [sccut](#sccut)
382-
- [sc\_file](#sc_file)
383373
- [Quasiatomic Orbital (QO) analysis](#quasiatomic-orbital-qo-analysis)
384374
- [qo\_switch](#qo_switch)
385375
- [qo\_basis](#qo_basis)
@@ -3474,128 +3464,6 @@ These variables are used to control the usage of implicit solvation model. This
34743464

34753465
[back to top](#full-list-of-input-keywords)
34763466

3477-
## Deltaspin
3478-
3479-
These variables are used to control the usage of deltaspin functionality.
3480-
3481-
### sc_mag_switch
3482-
3483-
- **Type**: boolean
3484-
- **Description**: the switch of deltaspin functionality
3485-
- 0: no deltaspin
3486-
- 1: use the deltaspin method to constrain atomic magnetic moments
3487-
- **Default**: 0
3488-
3489-
### decay_grad_switch
3490-
3491-
- **Type**: boolean
3492-
- **Description**: the switch of decay gradient method
3493-
- 0: no decay gradient method
3494-
- 1: use the decay gradient method and set ScDecayGrad in the file specified by `sc_file`. ScDecayGrad is an element dependent parameter, which is used to control the decay rate of the gradient of the magnetic moment.
3495-
- **Default**: 0
3496-
3497-
### sc_thr
3498-
3499-
- **Type**: Real
3500-
- **Description**: the threshold of the spin constraint atomic magnetic moment
3501-
- **Default**: 1e-6
3502-
- **Unit**: Bohr Mag (\muB)
3503-
3504-
### nsc
3505-
3506-
- **Type**: Integer
3507-
- **Description**: the maximum number of steps in the inner lambda loop
3508-
- **Default**: 100
3509-
3510-
### nsc_min
3511-
3512-
- **Type**: Integer
3513-
- **Description**: the minimum number of steps in the inner lambda loop
3514-
- **Default**: 2
3515-
3516-
### sc_scf_nmin
3517-
3518-
- **Type**: Integer
3519-
- **Description**: the minimum number of outer scf loop before initializing lambda loop
3520-
- **Default**: 2
3521-
3522-
### alpha_trial
3523-
3524-
- **Type**: Real
3525-
- **Description**: initial trial step size for lambda in eV/uB^2
3526-
- **Default**: 0.01
3527-
- **Unit**: eV/uB^2
3528-
3529-
### sccut
3530-
3531-
- **Type**: Real
3532-
- **Description**: restriction of step size in eV/uB
3533-
- **Default**: 3
3534-
- **Unit**: eV/uB
3535-
3536-
### sc_file
3537-
3538-
- **Type**: String
3539-
- **Description**: the file in json format to specify atomic constraining parameters. An example of the sc_file json file is shown below for the `nspin 4` case:
3540-
3541-
```json
3542-
[
3543-
{
3544-
"element": "Fe",
3545-
"itype": 0,
3546-
"ScDecayGrad": 0.9,
3547-
"ScAtomData": [
3548-
{
3549-
"index": 0,
3550-
"lambda": [0, 0, 0],
3551-
"target_mag": [2.0, 0.0, 0.0],
3552-
"constrain": [1,1,1]
3553-
},
3554-
{
3555-
"index": 1,
3556-
"lambda": [0, 0, 0],
3557-
"target_mag_val": 2.0,
3558-
"target_mag_angle1": 80.0,
3559-
"target_mag_angle2": 0.0,
3560-
"constrain": [1,1,1]
3561-
}
3562-
]
3563-
}
3564-
]
3565-
```
3566-
3567-
and
3568-
3569-
```json
3570-
[
3571-
{
3572-
"element": "Fe",
3573-
"itype": 0,
3574-
"ScDecayGrad": 0.9,
3575-
"ScAtomData": [
3576-
{
3577-
"index": 0,
3578-
"lambda": 0.0,
3579-
"target_mag": 2.0,
3580-
"constrain": 1
3581-
},
3582-
{
3583-
"index": 1,
3584-
"lambda": 0,
3585-
"target_mag": 2.0,
3586-
"constrain": 1
3587-
}
3588-
]
3589-
}
3590-
]
3591-
```
3592-
3593-
for `nspin 2` case. The difference is that `lambda`, `target_mag`, and `constrain` are scalars in `nspin 2` case, and are vectors in `nspin 4` case.
3594-
3595-
- **Default**: none
3596-
3597-
[back to top](#full-list-of-input-keywords)
3598-
35993467
## Quasiatomic Orbital (QO) analysis
36003468

36013469
These variables are used to control the usage of QO analysis. QO further compress information from LCAO: usually PW basis has dimension in million, LCAO basis has dimension below thousand, and QO basis has dimension below hundred.

docs/advanced/scf/spin.md

Lines changed: 0 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -28,47 +28,6 @@ If **"ocp=1"** and **"ocp_set"** is set in INPUT file, the occupations of states
2828
2. **"nupdown"**
2929
If **"nupdown"** is set to non-zero, number of spin-up and spin-down electrons will be fixed, and Fermi energy level will split to E_Fermi_up and E_Fermi_down. By the way, total magnetization will also be fixed, and will be the value of **"nupdown"**.
3030

31-
3. DeltaSpin
32-
The `DeltaSpin` function as proposed by Zefeng Cai and Ben Xu, et al. [arXiv:2208.04551v6](https://arxiv.org/abs/2208.04551) has been implemented in ABACUS in the LCAO basis for the `nspin 2` case. In order to use this function, the following parameters are needed to be set in the input file, for example:
33-
```
34-
#deltaspin
35-
sc_mag_switch 1
36-
decay_grad_switch 0
37-
sc_thr 1e-7
38-
nsc 150
39-
nsc_min 2
40-
sc_file sc.json
41-
alpha_trial 0.01
42-
sccut 3
43-
```
44-
The explanation of each input paramters has been explained in the [Noncollinear Spin Polarized Calculations](#noncollinear-spin-polarized-calculations) section.
45-
46-
An example of the sc_file json file is shown below:
47-
```json
48-
[
49-
{
50-
"element": "Fe",
51-
"itype": 0,
52-
"ScDecayGrad": 0.9,
53-
"ScAtomData": [
54-
{
55-
"index": 0,
56-
"lambda": 0.0,
57-
"target_mag": 2.0,
58-
"constrain": 1
59-
},
60-
{
61-
"index": 1,
62-
"lambda": 0,
63-
"target_mag": 2.0,
64-
"constrain": 1
65-
}
66-
]
67-
}
68-
]
69-
```
70-
Please refer the [Noncollinear Spin Polarized Calculations](#noncollinear-spin-polarized-calculations) section for the explanation of each input paramters. The difference is that `lambda`, `target_mag`, and `constrain` are scalars instead of vectors. Simple examples are provided in the `abacus-develop/examples/spin_polarized` directory.
71-
7231
## Noncollinear Spin Polarized Calculations
7332
The spin non-collinear polarization calculation corresponds to setting **"noncolin 1"**, in which case the coupling between spin up and spin down will be taken into account.
7433
In this case, nspin is automatically set to 4, which is usually not required to be specified manually.
@@ -88,54 +47,6 @@ The SOC effect is considered but the magnetic moment is limited to the Z directi
8847
- noncolin=1 lspinorb=1 :
8948
The SOC effect and non-collinear magnetic moment are both calculated.
9049

91-
### Constraint Spin functionality for noncollinear spin polarized calculations
92-
93-
The `DeltaSpin` function as proposed by Zefeng Cai and Ben Xu, et al. [arXiv:2208.04551v6](https://arxiv.org/abs/2208.04551) has been implemented in ABACUS in the LCAO basis. In order to use this function, the following parameters are needed to be set in the input file, for example:
94-
```
95-
#deltaspin
96-
sc_mag_switch 1
97-
decay_grad_switch 1
98-
sc_thr 1e-7
99-
nsc 150
100-
nsc_min 2
101-
sc_file sc.json
102-
alpha_trial 0.01
103-
sccut 3
104-
```
105-
106-
107-
`sc_mag_switch` is the switch of deltaspin functionality; `decay_grad_switch` is the switch of decay gradient method; `sc_thr` is the threshold of the spin constraint atomic magnetic moment in unit of Bohr Mag (\muB); `nsc` is the number of self-consistent iterations; `nsc_min` is the minimum number of self-consistent iterations; `sc_file` is the file name of the spin constraint parameters; `alpha_trial` is the initial trial step size for lambda in eV/uB^2; `sccut` restriction of step size in eV/uB.
108-
109-
An example of the sc_file json file is shown below:
110-
```json
111-
[
112-
{
113-
"element": "Fe",
114-
"itype": 0,
115-
"ScDecayGrad": 0.9,
116-
"ScAtomData": [
117-
{
118-
"index": 0,
119-
"lambda": [0, 0, 0],
120-
"target_mag": [2.0, 0.0, 0.0],
121-
"constrain": [1,1,1]
122-
},
123-
{
124-
"index": 1,
125-
"lambda": [0, 0, 0],
126-
"target_mag_val": 2.0,
127-
"target_mag_angle1": 80.0,
128-
"target_mag_angle2": 0.0,
129-
"constrain": [1,1,1]
130-
}
131-
]
132-
}
133-
]
134-
```
135-
136-
The sc_file json file is a list of elemental data in total. For each element, the user should specify its name, the `itype` parameter should be in accord with `STRU` file and start from 0. `ScDecayGrad` is a parameter for each element in unit of (uB^2/eV), this parameter needs to be determined for different element, for example, 0.9 uB^2/eV is an appropriate value for BCC-Fe according to Zefeng Cai's tests. `ScAtomData` specifies spin constraining parameters for each atom, the `index` starts from 0 and corresponds atomic order in the `STRU` file. `lambda` is a 3d vector for each atom, and it is recommended to set to [0.0, 0.0, 0.0] for all atoms. Users have two optional choices to set the target magnetic moments for each atom, i.e., by a 3d vector or by angles. If the `target_mag` is set, the `target_mag_val` and `target_mag_angle1` and `target_mag_angle2` will be ignored. The `target_mag` is a 3d vector in unit of Bohr Mag (\muB), and the `target_mag_val` is a scalar value in unit of Bohr Mag (\muB), `target_mag_angle1` and `target_mag_angle2` are two angles in unit of degree. The `constrain` is a 3d vector, if the corresponding element is set to 1, the corresponding component of the magnetic moment will be constrained, otherwise, it will be free. Note that the initial atomic magnetic moments are still set in the `STRU` file. Simple examples are provided in the `abacus-develop/examples/noncollinear` directory. One should set `noncolliear` to 1 to run the DeltaSpin function, `lspinorb=1` is not mandatory, but it is recommended to set to 1 to get more accurate results.
137-
138-
13950
## For the continuation job
14051
- Continuation job for "nspin 1" need file "SPIN1_CHG.cube" which is generated by setting "out_chg=1" in task before. By setting "init_chg file" in new job's INPUT file, charge density will start from file but not atomic.
14152
- Continuation job for "nspin 2" need files "SPIN1_CHG.cube" and "SPIN2_CHG.cube" which are generated by "out_chg 1" with "nspin 2", and refer to spin-up and spin-down charge densities respectively. It should be note that reading "SPIN1_CHG.cube" only for the continuation target magnetic moment job is not supported now.

examples/noncollinear/BCC_Fe_NC_deltaspin/INPUT

Lines changed: 0 additions & 30 deletions
This file was deleted.

examples/noncollinear/BCC_Fe_NC_deltaspin/KPT

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/noncollinear/BCC_Fe_NC_deltaspin/STRU

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)