ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
magnetism.h
Go to the documentation of this file.
1#ifndef MAGNETISM_H
2#define MAGNETISM_H
3
7
9{
10public:
11 // constructor and deconstructor
12 Magnetism();
13 ~Magnetism();
14
15 // notice : bcast (MPI operation) is done in unitcell
16 double *start_mag=nullptr;
17
18 // tot_mag : majority spin - minority spin (nelup - neldw).
19 double tot_mag;
20
21 double tot_mag_nc[3]={0.0};
22
23 double abs_mag;
24
25 void compute_mag(const double& omega,
26 const int& nrxx,
27 const int& nxyz,
28 const double* const * rho,
29 double* nelec_spin = nullptr);
30
31 ModuleBase::Vector3<double> *m_loc_=nullptr; //magnetization for each element along c-axis
32
33 double *angle1_=nullptr; //angle between c-axis and real spin std::vector
34
35 double *angle2_=nullptr; //angle between a-axis and real spin std::vector projection in ab-plane
36
37 double ux_[3]={0.0};
38
39 bool lsign_=false;
40
41private:
42
43 bool judge_parallel(const double a[3], const ModuleBase::Vector3<double> &b);
44
45};
46
47/*
48 A comment about variables nelup, neldw, multiplicity and tot_mag:
49 All these variables contain the same information and must be kept harmonized.
50 Variables nelup and neldw will be removed in future versions of the code.
51 Variables multiplicity and tot_mag, though redundent will probably
52 coexist since multiplicity is the more natural way (?)for defining the spin
53 configuratio in the quantum-chemistry community while tot_mag is
54 more natural (?) when dealing with extended systems.
55*/
56
57#endif
Definition magnetism.h:9
double tot_mag
Definition magnetism.h:19
bool lsign_
Definition magnetism.h:39
double * start_mag
Definition magnetism.h:16
double * angle2_
Definition magnetism.h:35
double * angle1_
Definition magnetism.h:33
double ux_[3]
Definition magnetism.h:37
Magnetism()
Definition sltk_atom_arrange_test.cpp:27
bool judge_parallel(const double a[3], const ModuleBase::Vector3< double > &b)
Definition magnetism.cpp:106
double abs_mag
Definition magnetism.h:23
double tot_mag_nc[3]
Definition magnetism.h:21
~Magnetism()
Definition sltk_atom_arrange_test.cpp:33
void compute_mag(const double &omega, const int &nrxx, const int &nxyz, const double *const *rho, double *nelec_spin=nullptr)
Definition magnetism.cpp:20
ModuleBase::Vector3< double > * m_loc_
Definition magnetism.h:31
3 elements vector
Definition vector3.h:22