地域密着型エリア広告配信リクルートの地域密着型広告ドコイク?アドネットワーク Ads by ドコイク?[無料でホームページを作成] [通報・削除依頼]
[無料でホームページを作成] [通報・削除依頼]

ABINIT(fold2Bloch)

------------------------------------------------------------------------------
fold2Bloch (Abinit ver.8.0.6 and later)
1) scf and band calculation (super cell)

□ case.files
-----
case.in
case.out
casei
caseo
casetmp
C.GGA_PBE-JTH.xml
Ti.GGA_PBE-JTH.xml
-----

□ case.in
-----
# Fe2VAl Supercell
# Generates a supercell with the multiplicity of 2:2:2 (x:y:z)

   prtcif   1       # If set to 1, a CIF file is output with the crystallographic data for the present run (cell size shape and atomic positions)

ndtset 2 # There will be two datasets here: SCF run and the band structure

# Dataset 2 : the band structure
iscf2    -2
getden2  -1 # get charge density from the 1st run
kptopt2  -5 # band structure plot with 5 intervals
ndivk2   10 10 1 10 10 # number of divisors for each interval

kptbounds2 -0.5  0.0  0.0  # L point
            0.0  0.0  0.0  # Gamma point
            0.5  0.0  0.0  # L point
           -0.5 -0.5  0.0  # X point
            0.0  0.0  0.0  # Gamma
            0.5  0.5  0.0  # X point

#tolwfr2  1.0d-12
tolwfr2  1.0d-6 #low accuracy, test, check, and tutorial case
enunit2  1             # Will output the eigenenergies in eV
                          
chkprim   0 # do not check for primitive cell

#  fband 0 # In case fband is 0.0d0, the code computes from the pseudopotential
          # files and the geometry data contained in the input file, the number
          # of electrons present in the system. Then, it computes the minimum
          # number of bands that can accommodate them, and use that value for _nband_

#Definition of the plane wave basis set
   ecut  15.0            # Maximum kinetic energy cutoff (Hartree)
pawecutdg 15 # PAW - Energy CUToff for the Double Grid

#Definition of the k-point grid
  ngkpt   2 2 2          # 2x2x2 Monkhorst-Pack grid
nshiftk   1              # Use one copy of grid only (default)
 shiftk   0.0  0.0  0.0  # Unshifted K-mesh

#Definition of the self-consistency procedure
# diemac   9.0            # Model dielectric preconditioner
#  nstep   999            # Maxiumum number of SCF iterations
 tolvrs   1.0d-6         # tolerance for potential residual

#Common input data (Cif2cell)
# Structural parameters
-----
2) abinit < case.files
3) energy_eig-abinit.sh
  For ubuntu, change [#! /bin/sh] to [#! /bin/bash]
  (/abinit/doc/tutorial/lesson_fold2Bloch/energy_eig-abinit.sh and plot_band.m)
4) fold2Bloch caseo_DS2_WFK 2:2:2
5) gedit ubs_dots.m
6) octave
7) ubs_dots
------------------------------------------------------------------------------

□ ubs_dots.m
----------
function ubs_dots
% Plot undolded band structure
%
% modified 21 Jan 2016
% modified  7 Jun 2016 (for octave and abinit(Ry -> Ha, ry2ev > ha2eV))
% importdata -> load, scatter -> ...

%% Init. parameters
KPATH = [1/2 0 0; ...
        0 0 0; ...
       1/2 1/2 0]; % k-point path
FOLDS = [2 2 2]; % multiplicity in the corresponding directions used when constructing the super-cell
KLABEL = {'L'; 'G'; 'X'};
finpt = 'Fe2VAlo.f2b'; % input file name
Ef = 0.37631; % Fermi (or HOMO) energy (hartree) form *.out
ERANGE = [Ef-1 Ef+0.4]; % energy range for plot (Ha)
ha2ev = 2*13.605698066; % Ha -> eV conversion factor
pwr = 1/1; % power for result plotting
         % 1 - linear scale, 1/2 - sqrt, etc.
         % 0 - folded bands (needs wth = 0)
msz = 10; % marker size for plot
lwdth = 0.5; % plot line width
PLTSZ = [1 1 600/1.5 300/1.5]; % plot size
wth = 0.05; % threshold weight
clrmp = jet;    % flipud(gray)
                % flipud(pink)
                % flipud(hot)
                % flipud(autumn)
                % cool
                % flipud(bone)
                % flipud(jet)
                % jet
G = [ -0.045895  0.045895  0.045895;
       0.045895 -0.045895  0.045895;
       0.045895  0.045895 -0.045895]; % Reciprocal latt. vect. from *.out


%% INITIALIZATION
[KEIG, EIG, W] = readinput(finpt); % read input data from file
% EIG - energy eigenvalues
% KEIG - k-list for eigenvalues
% W - list of characters

%% MAIN
L = [];
ENE = [];
WGHT = [];
for i=1 : 3
    G(i,:)=G(i,:)*FOLDS(i); % rescale reciprocal lattice vectors
end                         % from supercell to primitive cell
dl = 0; % cumulative length of the path
KPATH = coordTransform(KPATH,G);
KEIG = coordTransform(KEIG,G);
XTICKS = [0];
for ikp = 1 : size(KPATH,1)-1
    B = KPATH(ikp,:) - KPATH(ikp+1,:);
    dk = sqrt(dot(B,B));
    XTICKS = [XTICKS; XTICKS(ikp)+dk];
    for j = 1 : length(EIG)
        if EIG(j) > ERANGE(1) && EIG(j) < ERANGE(2) && W(j) >= wth
            dist = dp2l( KEIG(j,:) , KPATH(ikp,:) , KPATH(ikp+1,:) );
            if dist < eps % k-point is on the path
                A = KPATH(ikp,:) - KEIG(j,:);
                x = dot(A,B)/dk;
                if x > 0  &&  x-dk < eps % k-point is within the path range
                    L = [L; x+dl]; % append k-point coordinate along the path
                    ENE = [ENE; EIG(j)]; % append energy list
                    WGHT = [WGHT; W(j)];
                end
            end
        end
    end
    dl = dl + dk;
end
if isempty(L)
    msg = ['No eigenvalues are selected for the plot. ', ...
        'The likely reason is that the energy range is ', ...
        'too restrictive (check ERANGE), or no k-points are located ', ...
        'on the path selected (check KPATH)'];
    error(msg);
end


%% Plot results
hFig = figure(1);

% Fig 1(a)
subplot(1,2,1);
set(hFig, 'Position', PLTSZ, 'PaperPositionMode','auto')
map = colormap(clrmp);
WGHTRS = rescale(WGHT,pwr);
scatter(L,(ENE-Ef)*ha2ev, WGHTRS*msz, WGHTRS,lwdth);
hold on;
axis([0 max(L) min((ENE-Ef)*ha2ev) max((ENE-Ef)*ha2ev)])
yticks = get(gca,'ytick');
set(gca,'YTick',yticks);
for i = 1 : length(yticks)
    newYTick{i} = sprintf('%1.1f',yticks(i));
end
set(gca,'YTickLabel',newYTick);
hline = plot([0 XTICKS(end)],[0 0]); % Fermi level
set(hline,'Color','k','LineStyle','--');
set(gca,'XTick',XTICKS);
set(gca,'XTickLabel',KLABEL);
set(gca,'XGrid','on', 'GridLineStyle','-');
caxis([0 1]); % normalize intensities to 1
xlabel('Wave vector')
ylabel('Energy (eV)')
axis([0 max(L) min((ENE-Ef)*ha2ev) max((ENE-Ef)*ha2ev)])
box on
hold off

% Fig 1(b)
subplot(1,2,2);
DAT = linspace(0,1,10);
DATX = ones(size(DAT));
DATRS = rescale(DAT,pwr);
scatter(DATX,DAT, DATRS*msz, DATRS,lwdth);
caxis([0 1])
ylabel('Spectral weight')

% SAVE plot as *.eps
print( [finpt '.eps'], '-depsc')

% -------------------------------------------------------------------------
function W = coordTransform(V,G)
% transform vector V(:,3) in G(3,3) coord. system -> W(:,3) in Cartesian coordinates
% G vector elements are in columns!
W = zeros(size(V));
G = G'; % transform G
for i = 1:length(V)
    W(i,:) = G(1,:)*V(i,1) + G(2,:)*V(i,2) + G(3,:)*V(i,3);
end;
% -------------------------------------------------------------------------
function WRESCL = rescale(W,pwr)
% rescale weights using a power functio W^pwr
WRESCL=W.^(pwr); % rescale if needed to enhance
WRESCL = WRESCL + eps; % need eps to make plot "heapy"
% -------------------------------------------------------------------------
function [KEIG, EIG, W] = readinput(filename)
% read input data
DATA = load(filename);
KEIG = DATA(:,1:3);
EIG = DATA(:,4);
W = DATA(:,5);
% -------------------------------------------------------------------------
function RES = dp2l(X0,X1,X2) % distance from point {X0} to line {X1}-{X2}
% see http://mathworld.wolfram.com/Point-LineDistance3-Dimensional.html
denom = X2 - X1;
denomabs = sqrt(dot(denom,denom));
if denomabs < eps
    display(X1); display(X2);
    error('X1 = X2');
end;
numer = cross( X0-X1 , X0-X2 );
numerabs = sqrt(dot(numer,numer));
RES = numerabs/denomabs;
% -------------------------------------------------------------------------
----------
------------------------------------------------------------------------------
アクセス数
ページビュー数