SelfConsistent

  Copyright (C) 2009-2015 Peter Rakyta, Ph.D.
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see http://www.gnu.org/licenses/.

Description

A class to evaluate self-consistent potentials depending on electron (spin resolved) densities. To ensure the convergence, in each iteration a new electron density array is created by weighting the previously calculated electron densities.

Available

EQuUs v4.8 or later

Usage Examples

Class references

Syntax

object = SelfConsistent(Opt, varargin)

Parameters
Opt An instance of the structure Opt.
varargin Optional parameters given by a sequence ...'name', value,... . Possible parameters are:
  • resume

    Logical value. If true, the iteration continues with the loaded data, or false (default) otherwise.
  • outFileName

    The filename to save the calculated data. If it is empty (default) no data are exported.
  • silent

    Logical value. Set true to suppress the output messages, or false (default) otherwise.
  • magnetizaion_direction

    Set +/- 1 to prescribe the magnetization direction, or set empty (default) to not lock the magnetization direction.
  • tolerance

    Tolerance of the convergence test.

Attributes (public)

  • density

    An array containing the current density.
  • junction_sites

    structure describing the geometry of the sites.
  • filling_factor

    The calculated filling factor.
  • magnetizaion_direction

    The prescribed magnezitaion direction (+1/-1).
  • magnetization

    The current magnetization.

Attributes (protected)

  • silent

    Logical value. Set true to suppress the output messages, or false (default) otherwise.
  • tolerance

    Tolerance of the convergence test.
  • interpy

    The interpolated values of fhandle over the elements of interpq.
  • MaxIter

    Maximal number of iterations
  • resume

    Logical value. If true, the iteration continues with the loaded data, or false (default) otherwise.
  • densities_iterations

    A list containing previously calculated densities.
  • delta_densities_iterations

    An array containing the difference between previously calculated densities.
  • magnetization_iterations

    An array containing previously calculated magnetizations.
  • varargin

    list of optional parameters (see http://www.mathworks.com/help/matlab/ref/varargin.html for details).
  • outFileName

    The filename to export the calculated data.

Methods (public)

Methods (protected)

SelfConsistent::runSelfConsistentIterations

Description

Runs the self-consistent iterations to obtain the elemets of the self-consistent densities for spin-up and spin-down electrons

Syntax

object.runSelfConsistentIterations( fhandle )

Parameters
fhandle The function handle to be used to calculate the electron density in a given iteration step: [density, junction_sites] = fhandle( ), where density is the density, and junction_sites describes the geometry of the system. For example se .....




SelfConsistent::Reset

Description

Resets the class members.

Syntax

object.Reset( )




SelfConsistent::Write

Description

Sets the value of an attribute in the object.

Syntax

object.Write(MemberName, input)

Parameters
MemberName The name of the attribute to be set.
input The value to be set.




SelfConsistent::Read

Description

Query for the value of an attribute in the object.

Syntax

ret = object.Read(MemberName)

Parameters
MemberName The name of the attribute.


Return
ret The value of the attribute.




SelfConsistent::Clear

Description

Clears the value of an attribute in the object.

Syntax

object.Clear(MemberName)

Parameters
MemberName The name of the attribute.




SelfConsistent::Initialize

Description

Initializes class attributes.

Syntax

object.Initialize( )




SelfConsistent::NewIterationInput

Description

Creates input for the next self-consistent iteration

Syntax

object.NewIterationInput()




SelfConsistent::ConvergenceTest

Description

Tests the convergence of the self-consistent iterations.

Syntax

object.ConvergenceTest()




SelfConsistent::InputParsing

Description

Parses the optional parameters for the class constructor.

Syntax

object.InputParsing(varargin)

Parameters
varargin Optional parameters given by a sequence ...'name', value,... . Possible parameters are:
  • resume

    Logical value. If true, the iteration continues with the loaded data, or false (default) otherwise.
  • outFileName

    The filename to save the calculated data. If it is empty (default) no data are exported.
  • silent

    Logical value. Set true to suppress the output messages, or false (default) otherwise.
  • magnetizaion_direction

    Set +/- 1 to prescribe the magnetization direction, or set empty (default) to not lock the magnetization direction.
  • tolerance

    Tolerance of the convergence test.