Skip to content

Commit

Permalink
minor bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tsdev committed Dec 12, 2017
1 parent ae5eff8 commit 03e6d88
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/docgenerator/docgen.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
swver = sw_version;
outPath = '~/spinwdoc_git';
docPath = '~/spinw_git/docs';
upload = false;
recalc = false;
upload = true;
recalc = true;

%% generate help

Expand Down
2 changes: 1 addition & 1 deletion docs/source/02_introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The symbolic calculation mode also needs the [Symbolic Math Toolbox](https://www

### Installation

The latest version of SpinW can be downloaded from [https://github.com/tsdev/spinw/releases](https://github.com/tsdev/spinw/releases. Steps to install:
The latest version of SpinW can be downloaded from [https://github.com/tsdev/spinw/releases](https://github.com/tsdev/spinw/releases). Steps to install:
* extract the `.zip` file into any local folder
* add the folder to the Matlab search path using `addpath(genpath(MYSPINWFOLDER))`
* recommended to copy the above command into the `startup.m` file
Expand Down
4 changes: 2 additions & 2 deletions docs/source/04_magstr.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ mathjax: true

If the expectation value of the spin operator is non-zero ($\langle \mathbf{S}\rangle\neq 0$) the spin vectors will make a pattern that can be mathematically best described by its Fourier transform. A concise description of this topic can be found in the article [A. Wills: Magnetic structures and their determination using group theory](https://doi.org/10.1051/jp4:2001906).

To define a magnetic structure first we need to find the correct magnetic unit cell. Although in magnetic structure determination most often the magnetic and the crystallographic unit cells are identical, in SpinW it is possible to define a magnetic supercell, that is the multiples of the crystallographic unit cell. This can help sometimes to optimize the spin wave calculation and gives more flexibility to test new models without changing the crystal structure. The magnetic structure is stored in the [spinw.mag_str] property of the SpinW class with the `nExt` subfield (`int32` type) storing the size of the magnetic supercell in units of the crystallographic unit cell. By default the magnetic supercell is identical to the crystallographic one which is given by `nExt=[1 1 1]`.
To define a magnetic structure first we need to find the correct magnetic unit cell. Although in symmetry analysis of magnetic structures the magnetic and the crystallographic unit cells are identical, in SpinW no symmetry analysis of magnetic structures is not possible. SpinW will analyze magnetic structures based on the classical energy of a given spin Hamiltonian. It is also possible in SpinW to define a magnetic supercell, that is the multiples of the crystallographic unit cell. This can help sometimes to optimize the spin wave calculation and gives more flexibility to test new models without changing the crystal structure. The magnetic structure is stored in the [spinw.mag_str] property of the SpinW class with the `nExt` subfield (`int32` type) storing the size of the magnetic supercell in units of the crystallographic unit cell. By default the magnetic supercell is identical to the crystallographic one which is given by `nExt=[1 1 1]`.

Once we defined the magnetic unit cell, the
Once we defined the magnetic unit cell, the magnetic structure is given by a complex spin vector on each magnetic site and a propagation vector. The real spin vector at a given site $i$ in the $l$th unit cell is given by



Expand Down
3 changes: 3 additions & 0 deletions external/symbol.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@

if ~isempty(idx)
S = cList(idx);
if nargin>1 && any(strcmp(noError,{'copy' 'c'}))
clipboard('copy',S);
end
elseif isempty(idx) && nargin>1 && noError==2
S = sName;
elseif isempty(idx) && nargin>1 && noError
Expand Down
4 changes: 2 additions & 2 deletions swfiles/+swplot/export.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ function export(varargin)
% `'filename'`
% : String, name of the image file. Image type will be determined
% based on the extension. Supported graphics formats:
% * `.png` Raster image.
% * `.eps` Vector image.
% * `png` Raster image.
% * `eps` Vector image.
%
% If no filename provided, the function returns without printing.
%
Expand Down
2 changes: 1 addition & 1 deletion swfiles/+swplot/plotbond.m
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@
switch param.linestyle
case 'auto'
lineStyle0 = (cellfun(@(C)C(end),lLabel)=='-')+1;
case {'--' '-'}
case {'--' '-' ':' '-.'}
lineStyle0 = param.linestyle;
otherwise
error('plotbond:WrongInput','The given lineStyle string is illegal!')
Expand Down

0 comments on commit 03e6d88

Please sign in to comment.