Commit 7b4477d0 authored by Alberto Garcia's avatar Alberto Garcia Committed by Alberto
Browse files

M(4.1): New simd construct for Bloch, release cosmetics, tests

test: reduced test requirements for SOC
mnt: prepared and fixed links in *.tex files
bug: fixed writing Ef to .nc file in corner cases
Rename to and remove old-style file
bug: allowed slabdipolecorrection to accept empty values
mnt: added new simd construct for Bloch
doc: added debug options for gfortran and intel
parents b56206b3 573fc2f9
# Script for preparing a release
# of SIESTA.
# Script for preparing a release of SIESTA.
# Script-author:
# Nick R. Papior, 2016
......@@ -12,7 +11,7 @@
# ./ --prev-tag v3.2 --tag v4.0 \
# --out siesta-4.0
# which creates the file:
# siesta-releases/siesta-4.0.tar.gz
# ../siesta-releases/siesta-4.0.tar.gz
# We encourage that the prev-tag is ALWAYS the previous
# stable release tag (also for beta releases!).
......@@ -65,19 +64,18 @@ pushd $main_dir
# repository (or at least it should be)
_reldir=$(dirname $main_dir)/siesta-releases
# Get default output file (siesta-<>.tar.gz)
function _git_tag_cmd {
git tag --list 'v*' --sort=-v:refname
# Get the previous major release tag
_prev_tag=$(_git_tag_cmd | head -2 | tail -1)
# Get the latest tag
_tag=$(_git_tag_cmd | head -1)
# Get default output file (siesta-<>.tar.gz)
# Default to latest tag
_def_tag=$(_git_tag_cmd | head -1)
function has_tag {
local tag=$1
......@@ -98,12 +96,13 @@ function help {
echo "$0 creates a release of the SIESTA code at the tip-tag"
echo ""
echo "The following options may be used to control the archive."
echo "The following options may be used to control the release archive."
echo ""
echo " --prev-tag instead of selecting the second-latest tag, choose this tag as the"
echo " reference tag for creating a diff with regards to the --tag tag [git tag --list 'v*' --sort=-v:refname]"
echo " --tag instead of selecting the latest tag, choose this tag as the"
echo " reference tag for creating a release archive [git tag --list 'v*' --sort=-v:refname]"
echo " reference tag for creating a release archive [$_def_tag]"
echo " --head creates a release without signing, and sets tag to HEAD and out to"
echo " a unique identifier [git describe --abbrev], useful for making release for"
echo " sample groups or individuals without a proper release"
echo " --out the default output file is siesta-<tag>.tar.gz. Do *not* specify tar.gz, "
echo " --no-sign do not sign the output files (useful for test-runs)"
echo " --help|-h show this help."
......@@ -171,18 +170,9 @@ while [ $# -gt 0 ]; do
# Check that the tag exists
if [ $(has_tag $_prev_tag) -eq 1 ]; then
echo ""
echo "$0 could not find tag: '$_prev_tag' in the tags list."
echo ""
echo "The available tags are:"
_git_tag_cmd | sed 's/^\(.*\)/ \1/g'
exit 1
......@@ -201,6 +191,12 @@ while [ $# -gt 0 ]; do
if [ $_head -eq 1 ]; then
_tag=$(git describe --abbrev)
# Get default output file (siesta-<>.tar.gz)
if [ -z "$_out" ]; then
......@@ -211,11 +207,8 @@ if [ -z "$_out" ]; then
echo "Chosen tags are:"
echo " previous tag: $_prev_tag"
echo " release tag : $_tag"
echo "Creating out file:"
echo " $_out.tar.gz"
echo "Chosen release tag is: $_tag"
echo "Creating out file: $_out.tar.gz"
echo ""
echo "Waiting 1 second before creating release... (Ctrl^C kills the sequence)"
sleep 1
......@@ -262,18 +255,6 @@ pushd $_reldir
tar xfz $_out.tar.gz ; rm $_out.tar.gz
# Create the changes files
# This is necessary to do here as the previous
# siesta versions may not have the tags related.
echo "##############################################"
echo " Detailed Changes between $_prev_tag and $_tag"
echo "##############################################"
echo ""
git log --first-parent --pretty=" commit: %H%n Author [Date]: %an [%ad]%n Title: %s%n%b" v4.1-b4...v4.1-rc1 | sed -e '/Signed-off-by/{d;d;}'
} > $_reldir/$_out/CHANGES_DETAILED
# Go into the release directory where all work will be done
pushd $_reldir
......@@ -287,7 +268,8 @@ printf "%s" "$_tag" >
pushd Docs
# Update manual information that is version/date dependent
_date=$(date +"%B %d, %Y")
# Here we select the date of the tag which is the appropriate thing.
_date=$(date -d "$(git log -n1 --format="%ci" v4.1-b2)" +"%B %d, %Y")
sed -s -i -e "s/\\date{.*}/\\date{$_date}/" siesta.tex tbtrans.tex
# Version tags in the pdf-title
sed -s -i -e "s/\\providecommand\\softwareversion{.*}/\\providecommand\\softwareversion{$_tag}/" siesta.tex tbtrans.tex
......@@ -303,7 +285,7 @@ make clean
# Also do not ship the release script
# Remove all .git related files
rm -f .git*
rm -rf .git*
# Create signatures and move files
for f in *.pdf ; do
......@@ -189,3 +189,19 @@ url = {},
volume = {100},
year = {2019}
author = {García,Alberto and Papior,Nick and Akhtar,Arsalan and Artacho,Emilio and Blum,Volker and Bosoni,Emanuele and Brandimarte,Pedro and Brandbyge,Mads and Cerdá,J. I. and Corsetti,Fabiano and Cuadrado,Ramón and Dikan,Vladimir and Ferrer,Jaime and Gale,Julian and García-Fernández,Pablo and García-Suárez,V. M. and García,Sandra and Huhs,Georg and Illera,Sergio and Korytár,Richard and Koval,Peter and Lebedeva,Irina and Lin,Lin and López-Tarifa,Pablo and Mayo,Sara G. and Mohr,Stephan and Ordejón,Pablo and Postnikov,Andrei and Pouillon,Yann and Pruneda,Miguel and Robles,Roberto and Sánchez-Portal,Daniel and Soler,Jose M. and Ullah,Rafi and Yu,Victor Wen-zhe and Junquera,Javier },
title = {Siesta: Recent developments and applications},
journal = {The Journal of Chemical Physics},
volume = {152},
number = {20},
pages = {204108},
year = {2020},
doi = {10.1063/5.0005077},
URL = {},
eprint = {}
......@@ -168,7 +168,7 @@
{\Large \printdate}
{\Large \url{}}
{\Large \url{}}
\siesta\ Steering Committee:
......@@ -214,7 +214,7 @@
\siesta\ is Copyright \copyright\ 1996-2019 by The Siesta Group
\siesta\ is Copyright \copyright\ 1996-2021 by The Siesta Group
......@@ -304,7 +304,7 @@ which still uses many of the algorithms developed by them.
output and execution features of \siesta, but is not really a
tutorial introduction to the program. Interested users can find
tutorial material prepared for \siesta\ schools and workshops at
the project's web page} \url{}.
the project's web page} \url{}
\textbf{NOTE: See the description of changes in the logic of the SCF loop}
......@@ -344,7 +344,7 @@ time and memory scale linearly with the number of atoms.
Simulations with several hundred atoms are feasible with
modest workstations.
It is written in Fortran 95 and memory is allocated dynamically.
It is written in Fortran 2003 and memory is allocated dynamically.
It may be compiled for serial or parallel execution (under MPI).
......@@ -470,10 +470,17 @@ Extensive review of applications as of summer 2003.
Description of the original \tsiesta\ method (prior to 4.1).
``Siesta: Recent developments and applications'',
Alberto Garc\'\ia, \emph{et al.}, J. Chem. Phys. \textbf{152}, 204108
Extensive review of applications and developments as of 2020.
For more information you can visit the web page
......@@ -587,6 +594,32 @@ Warning: Type mismatch between actual argument at (1) and actual argument at (2)
% use.
\subsection{Debug options}
Being able to build \siesta\ in debug mode is crucial for finding bugs
and debugging builds.
When changing build flags in the \file{arch.make} file it is
imperative to clean the build directory. Please do a \shell{make
clean} then do \shell{make}.
For GFortran, use the following flags:
FFLAGS = -Og -g -pedantic -Wall -fcheck=all -fbacktrace -Warray-bounds -Wunused -Wuninitialized
For Intel, use the following flags:
FFLAGS = -Og -g -check bounds -traceback -fp-model strict
This will make \siesta\ run significantly slower. Please report any
crashes to the developer team at
......@@ -780,7 +813,7 @@ installation scripts finishes by telling \emph{what} to add to the
Example variables
# OpenBLAS (OpenBLAS will default to build in LAPACK 3.6)
# OpenBLAS (OpenBLAS will default to build in LAPACK)
LIBS += -L/opt/openblas/lib -lopenblas
# or for MKL
LIBS += -L/opt/intel/.../mkl/lib/intel64 -lmkl_lapack95_lp64 ...
......@@ -932,7 +965,7 @@ libraries
where \shell{<>} are any libraries that MUMPS depend on.
\index{External library!PEXSI}%
The PEXSI library may be used with \siesta\ for exa-scale
......@@ -8676,7 +8709,7 @@ References:
{Maximally Localized Wannier Functions. \\
Interface with the \textsc{wannier90} code}
\program{wannier90} ( is a code to generate
\program{wannier90} (\url{}) is a code to generate
maximally localized wannier functions according to the original
Marzari and Vanderbilt recipe.
......@@ -8690,7 +8723,7 @@ A complete list of examples and tests (including molecules, metals,
semiconductors, insulators, magnetic systems, plotting of Fermi surfaces
or interpolation of bands), can be downloaded from
\textbf{NOTE}: The Bloch functions produced by a first-principles code
have arbitrary phases that depend on the number of processors
......@@ -8880,8 +8913,8 @@ or interpolation of bands), can be downloaded from
makes the system neutral. This background charge is constant at
points of the mesh near the atoms, and zero at points far from the
atoms. This simulates situations like doped slabs, where the extra
electrons (holes) are compensated by oposite charges at the material
(the ionized dopant impurities), but not at the vacuum. This serves
electrons (holes) are compensated by opposite charges at the material
(the ionized dopant impurities), but not at the vacuum. This serves
to simulate properly doped systems in which there are large portions
of vacuum, such as doped slabs.
......@@ -8968,8 +9001,8 @@ or interpolation of bands), can be downloaded from
uncorrected calculation (i.e., with an exagerated dipole), the first
iteration might use a compensating field that is too big, with the
risk of taking the system out of the convergence basin. In that
case, it is advisable to use the
\fdf{SCF.Mix!First}\index{Slab dipole correction} option to request a mix of the input and
case, it is advisable to use the \fdf{SCF.Mix!First}\index{Slab
dipole correction} option to request a mix of the input and
output density matrices after that first iteration.
\note \fdf*{charge} and \fdf*{vacuum} will for many systems yield
......@@ -10041,7 +10074,7 @@ implemented, selected by
Appart from being able to act as a force subroutine for a driver
program that uses module fsiesta, \siesta\ is also prepared to
communicate with the i-PI code (see
To do this, \siesta\ must be started after i-PI (it acts as a client
of i-PI, communicating with it through Inet or Unix sockets), and
the following lines must be present in the .fdf data file:
......@@ -13849,7 +13882,7 @@ of the most commonly encountered things.
In the \texttt{Util/Scripting} directory we provide an experimental
python scripting framework built on top of the ``Atomic Simulation
Environment'' (see \texttt{}) by the Campos
Environment'' (see \url{}) by the CAMD
group at DTU, Denmark.
(NOTE: ``ASE version 2'', not the new version 3, is needed)
......@@ -13906,10 +13939,11 @@ any problem, or would like to offer a suggestion for improvement,
please follow the instructions in the file
Since \siesta\ has moved to Launchpad you are encouraged to follow the
instructions presented at:
Since \siesta\ has moved to
\url{} you are encouraged to
follow the instructions by pressing ``New Issue'' and selecting
``Bug'' in the Description drop-down. Also please follow the debug
build options, see Sec.~\ref{sec:build:debug}
......@@ -62,7 +62,7 @@
{\Large \printdate}
{\Large \url{}}
{\Large \url{}}
......@@ -75,7 +75,7 @@
\section*{Contributors to \tbtrans}
\addcontentsline{toc}{section}{Contributors to \tbtrans}
\tbtrans\ is Copyright \copyright\ 2016-2019 by Nick R. Papior. The
\tbtrans\ is Copyright \copyright\ 2016-2021 by Nick R. Papior. The
original \tbtrans\ code was implemented by Mads Brandbyge, Jose
L. Mozos, Jeremy Taylor, Pablo Ordejon and Kurt Stokbro. The current
\tbtrans\ is implemented by the following contributors:
** The contents of this file are being progressively put in
** Docs/
# X.Y #
Release notes for next Siesta
*** Backward-compatibility issues
* The transiesta executable has been deprecated. Please use
siesta --electrode
for electrode calculations. For regular transiesta runs, there
is no need for the specific executable. Details were given in the
4.1-b4 release.
*** New features
- Enabled custom k-points in PDOS and SCF calculations.
- Added the CheSS solver as a new solution method. This is
a linear scaling solver which calculates the density matrix and the
energy density matrix.
- Added the Cold-smearing method for zero-temperature limit
with smearing.
- TDDFT implemented by R. Ullah via older code from
D. Sanchez-Portal.
# #
# 4.1 #
# #
Release notes for siesta 4.1 version
--- Default changes:
TranSiesta/TBtrans eta values are now default to 1meV
TranSiesta equilibrium contours now default to using the "right" scheme
Maximum l for KB projectors is now automatically set to the highest l
in the PS file. This may result in slight changes.
Stress-tensor-voigt is now printing in the correct Voigt representation.
prior versions of Siesta did not follow Voigt representation.
Please see manual entry MD.RemoveIntramolecularPressure for a description.
--- Siesta is now developed on the GitLab platform:
Siesta's orphan packages are developed here:
--- Enabled dipole correction calculation from the Hartree potential in the vacuum region
See entry Slab.DipoleCorrection for additional information.
--- Removed a small memory leak (from siesta_init)
--- Enabled parallel-over-k for NC/SOC calculations
--- Fixed bug for writing eigenvalues when NumberOfOrbitals was used (together with NC/SOC)
--- Fixed printing Voronoi and Hirshfeld charges if user requsted LDOS calculations
--- Fixed cell transpose when using socket calculations (only important for skewed cells)
--- Added citation information to output (end of run)
--- Allowed Mesh.Sizes as list input so users can specify their own Mesh size
--- Fixed *.nc writes, fixes lp:1810279.
--- Fixes polarization issue with Bessel orbitals
--- Removed BSC_CELLXC since the BSC distribution could result in better
performance. It is now part of the SiestaXC code.
--- Lots of updates for documentation
--- Precision problem in the vibra utility is fixed, lp:1816719
--- Added wavefunction tools for spin-orbit calculations.
Now denchar and stm utilities can process spin-orbit output.
--- Removed *ALL* OMP collapse statements, Intel 2019 is buggy.
--- TranSiesta/TBtrans changes:
-- Much more efficient dq implementation for fixing charge fluctuations
-- Fixed TBtrans calculations with spin-flags (i.e. TB-only)
-- Allow E-field for 1-electrode calculations, this allows 1-electrode
capacitor setups
-- Fixed bug in voltage potential which was severe for capacitor like setups.
It also changes regular TS runs.
-- Added TSFA[C] files which show forces on atoms in the device region
-- Added TS-only energies, that is energies calculated from DM/H are
now only using the updated elements of the respective regions.
-- Fixed a bug in TBtrans when piping input
-- Much faster Bloch expansions in transiesta/tbtrans calculations
Using tiling will now result in extremely fast self-energy calculations
-- Allowed complex contours in tbtrans calculations via negative eta values
and user defined energy contours, the precision of outputted contours
is also increased to the maximum field width.
-- Changed Eta defaults in electrodes
-- Enabled usage of external truly infinite electrodes (real-space self-energies)
-- Fixed contour file output which is now usable for various post-processing
-- Fixed tbtrans command line arguments, lp:1829974
-- Added delta-Ef to the electrode block to specify off-set in electrodes.
Mainly useful for semi-conducting electrodes.
-- Added separate energies for NEGF calculation, now the TranSiesta energies
are more divided and should be more comperable since they are calculated
on the updated sub-set.
# 4.1 #
T b-4 T
Release notes for siesta 4.1-b4 beta version
--- Default changes:
MeshCutoff has been increased to 300 Ry (from 100)
MaxSCFIterations has been increased to 1000 (from 50)
SCFMustConverge is now default true (from false)
--- Added developer documentation found in Docs/developer
Both ford (preferred) and Doxygen may be used
--- Generally increased precision in many output files
--- Lots of fixes and updates for the Lua/flook interaction
--- Auxiliary supercell handling when reading DM matrices:
Siesta can now read and convert nearly *any* DM matrix and make it
match the used sparse pattern.
--- Fixed minor inconsistencies when handling Bessel basis
--- Updated all diagonalization routines
- ELPA and MRRR for k-point sampling.
- Less memory usage
--- Fixed bug on reading *.ion* files (lp:1751723)
--- Updated internal integration table sizes (slightly increased precision)
--- PDOS files now also contain the fermi-level such that tools may easily
align the energy to 0.
--- Added more digits to dDmax which may be relevant when performing
Spin-Orbit/Non-Collinear calculations.
--- Fixed bug related to writing out non-collinear spin eigenvalues,
and also for spin-orbit. (lp:1708634)
--- Fixed parallel PDOS calculations of non-colinear and spin-orbit.
--- Added calculated charges to the Lua interface (check the charges
while running).
--- Fixed lots of compilation issues related to the utilities
(lp:1712317, lp:1712319, lp:1711850)
--- Fix for reading a ghost basis (lp:1736455, lp:1738425)
--- Fix when fdf-input lines are too long. Instead of discarding the
remaining line, fdf now "dies" to inform users of possible erroneous
input. (lp:1728281)
--- Fixed Monkhorst-Pack displacements when the displacement was larger
than 1 (lp:1721479)
--- Fix for possible heap allocated arrays (Intel compilers) (lp:1704370)
--- Ensured many files to be closed properly at the end of the runs.
--- Added basic compiler information to the siesta/transiesta/tbtrans
header (compiler output)
--- Performing SOC calculations does not not require all species
to have SOC contributions.
--- TranSiesta / TBtrans changes:
-- Disk-space reduction when mixing non-periodic and periodic electrodes
-- Now tiling is also enabled for Bloch expansions. This is actually faster
than repetitions, so users should prefer tiling the electrodes
-- TranSiesta is now intrinsic to the Siesta executable. An
electrode should now be calculated using 'siesta --electrode'
The TranSiesta executable still exists but is nothing but 'siesta --electrode'
-- Many bug-fixes related to pivoting tables; this should only
change the effective BTD matrices, and has no relevance to the
accuracy of the calculations
-- Huge performance increase in TBtrans in many different parts of the code
-- Bug-fix for out-of-core calculations for spin-polarized TBT.Spin 2 calculations
-- Fixed the default 2-terminal Poisson ramp. The ramp is now
defaulted to be positioned in the central region.
TS.Poisson ramp-central
-- Small memory reduction by de-allocating unused siesta memory when
entering transiesta.
-- Fixed the box Poisson for N-electrode calculations when using
skewed electrodes. Thanks to Azar Ostovan and Thomas Frederiksen.
-- Fixed tbtrans setup for bias-window-only calculations. Now the contours
are correctly interpreted.
-- Fixed tbtrans AVCEIG output.
-- Change TBtrans DOS output such that there is no normalization
-- Enabled tbtrans 1-orbital calculations in the BTD matrices.
-- Fixed sign-convention changes in orbital-currents. Now they are
checked and works together with sisl (>0.9).
-- Allowed external GF files for the self-energies. This is mainly beneficial
for TBtrans as we can add external electrodes *anywhere* in the device.
Say Buttiker-probes.
-- Bugfix when the left electrode was set to -|V|/2 (the default |V|/2 is
-- Added much more output to the TBT*.nc files; electrode information is now
complete, and also the BTD matrices are written.
-- Enabled tbtrans -fdf TBT.Analyze which runs all pivoting schemes, this
may be very beneficial to run with tbtrans before performing calculations.
Choosing the correct pivoting scheme can be really important!
-- Enabled output file on tbtrans command line:
tbtrans --out TBT.out RUN.fdf
is (more or less) equivalent to:
tbtrans RUN.fdf > TBT.out
-- Made Fermi charge correction more aggressive for faster convergence.
-- TBtrans can now calculate DM, COOP and COHP curves. They are calculated
in the supercell picture and can thus be analyzed cross-boundary as well.
They are calculated both from the Green function and the spectral function.
The coming >0.9.3 release of sisl will enable this analysis.
-- Fixed TBtrans DOS (Green) calculations when performing k-point calculations. There
can be small differences when comparing Green function DOS between this version
and prior versions. The bug is only present when time-reversal-symmetry is applied.