Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

Commit 7a54d51

Browse files
# This is a combination of 6 commits.
# This is the 1st commit message: updates the descriptive comments for the biquadratic hamiltonia constructor to be consistent with updated argument names # This is the commit message #2: Update swfiles/+sw_classes/biquadratic_hamiltonian.m Use more descriptive names for the biquadratic hamiltonian constructor Co-authored-by: Anders Markvardsen <[email protected]> # This is the commit message #3: Renames the arguments of the hamiltonian class constructor to better reflect its meaning # This is the commit message #4: Wrote a brief description of the variable 'nChunks' # This is the commit message #5: adds a description of nHkl as a comment # This is the commit message #6: Update swfiles/+sw_classes/magnetic_structure.m Provides a brief comment on the 'magnetic_structure' class Co-authored-by: Duc Le <[email protected]>
1 parent e3bed3e commit 7a54d51

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

swfiles/+sw_classes/biquadratic_hamiltonian.m

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
methods
44
function self = biquadratic_hamiltonian(JJ, dR, atom1, atom2, u, v, S_mag)
55
% Calculates the biquadratic Hamiltonian
6-
% Syntax: bq_ham = sw_classes.biquadratic_hamiltonia(JJ, dR, i, j, u, v, S_mag)
6+
% Syntax: bq_ham = sw_classes.biquadratic_hamiltonia(JJ, dR, atom1, atom2, u, v, S_mag)
77
% Inputs:
8-
% JJ % The biquadratic couplings (1 x nCoupling vector)
9-
% dR % The difference position vector between atom i and j
10-
% i % The i indices (1 x nCoupling vector)
11-
% j % The j indices (1 x nCoupling vector)
12-
% u % The u vectors (zed in original code, 3 x nMagExt)
13-
% v % The v vectors (eta in original code, 3 x nMagExt)
14-
% Smag % The magnetic moment magnitude (1 x nMagExt vector)
15-
8+
% JJ % The biquadratic couplings (1 x nCoupling vector)
9+
% dR % The difference position vector between atom i and j
10+
% atom1 % The atom1 indices (1 x nCoupling vector)
11+
% atom2 % The atom2 indices (1 x nCoupling vector)
12+
% u % The u vectors (zed in original code, 3 x nMagExt)
13+
% v % The v vectors (eta in original code, 3 x nMagExt)
14+
% S_mag % The magnetic moment magnitude (1 x nMagExt vector)
15+
1616
self.dR = dR;
1717
self.nMagExt = max([atom1 atom2]);
1818
JJ = transpose(JJ);
@@ -21,7 +21,7 @@
2121

2222
% In this case the coupling constants JJ are scalars
2323
% (In the bilinear Hamiltonian they are 3x3 matrices)
24-
% So we just compute the uv factors converting from
24+
% So we just compute the uv factors converting from
2525
% the spins in the rotating to boson operators here
2626
bqM = sum(v(atom1,:) .* v(atom2,:), 2);
2727
bqN = sum(v(atom1,:) .* u(atom2,:), 2);
@@ -59,4 +59,3 @@
5959
end
6060
end
6161
end
62-

swfiles/+sw_classes/hamiltonian.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@
1515
methods
1616
function self = hamiltonian(JJ, dR, atom1, atom2, u, v, S_mag)
1717
% Calculates the (bilinear) Hamiltonian: sum_ij Si x Jij x Sj
18-
% Syntax: ham = sw_classes.hamiltonia(JJ, dR, i, j, u, v, S_mag)
18+
% Syntax: ham = sw_classes.hamiltonia(JJ, dR, atom1, atom2, u, v, S_mag)
1919
% Inputs:
2020
% JJ % The magnetic couplings (3 x 3 x nCoupling array)
2121
% dR % The difference position vector between atom i and j
22-
% i % The i indices (1 x nCoupling vector)
23-
% j % The j indices (1 x nCoupling vector)
22+
% atom1 % The atom1 indices (1 x nCoupling vector)
23+
% atom2 % The atom2 indices (1 x nCoupling vector)
2424
% u % The u vectors (zed in original code, 3 x nMagExt)
2525
% v % The v vectors (eta in original code, 3 x nMagExt)
26-
% Smag % The magnetic moment magnitude (1 x nMagExt vector)
27-
26+
% S_mag % The magnetic moment magnitude (1 x nMagExt vector)
27+
2828
% Don't know why we need to do this, but otherwise need to take a conj later
2929
u = conj(u); % (or the equations don't match Toth & Lake...)
3030

@@ -56,7 +56,7 @@
5656

5757
% The upper right block B^ij in eq (26) of Toth & Lake:
5858
BC0 = SiSj.*squeeze(sum(sum(uT_i.*JJ.*u_j,2),1));
59-
idxB = [atom1' (atom2' + nMagExt)]; % For upper right block
59+
idxB = [atom1' (atom2' + nMagExt)]; % For upper right block
6060

6161
self.subblocks = {AD0 2*BC0 conj(AD0)};
6262
self.subidx = [idxA1; idxB; idxD1];

swfiles/+sw_classes/magnetic_structure.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
classdef magnetic_structure < handle
2+
% Class to handle information required by the spin wave calculations from the magnetic structure
23
properties
34
S % Magnetic moments, 3xN array; N=number of spins
45
k % Magnetic propagation vector, 3x1 vector

swfiles/+sw_classes/qvectors.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
classdef qvectors < handle
22
properties
33
hkl
4-
nChunk
4+
nChunk % number of times to process (by taking into account the avalable memory)
55
end
66
properties(SetAccess=private)
7-
nHkl
7+
nHkl % number of hkl points to calculate for (scalar)
88
hklIdx
99
end
1010
methods

0 commit comments

Comments
 (0)