Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
209d95e
Initial implementation of surface dipole
davidbowler May 18, 2022
60f9cb8
Add input parameters and correct small error
davidbowler May 19, 2022
9a68f8d
Added energy terms
davidbowler May 19, 2022
3ace86c
Finalising surface dipole correction
davidbowler Jun 6, 2022
ab601c1
Merge pull request #388 from OrderN/release-1.4
davidbowler Dec 18, 2024
27fff5f
remove a bug in writing cube files
tsuyoshi38 Jan 8, 2025
a51da51
Merge pull request #389 from OrderN/master
davidbowler Jan 8, 2025
b24500e
Merge pull request #391 from OrderN/bugfix-write_cube_file
tsuyoshi38 Jan 8, 2025
3624b7b
added XC_LibXC_v7_module.f90 for libxc_7.0.0
tsuyoshi38 Jan 9, 2025
94520a1
Instead of adding XC_LibXC_v7_module.f90, using f03 interface in *v5_…
tsuyoshi38 Jan 14, 2025
57e93d7
Modified system/system.gha.make
tsuyoshi38 Jan 14, 2025
868ab6d
Merge pull request #393 from OrderN/f-libxc7.0.0
tsuyoshi38 Jan 14, 2025
5a536fb
Updates to cell constraints and how they are applied
davidbowler Jan 20, 2025
ac5aeed
Updated documentation for constrained cell optimisation
davidbowler Jan 21, 2025
aa6ce9f
Modify -lxcf90 by -lxcf03 to link with libXC
AugustinLu Jan 24, 2025
08b70e4
Merge pull request #398 from OrderN/f-ubuntu-libxc
AugustinLu Jan 24, 2025
34e73a2
Merge pull request #395 from OrderN/f-cell-opt-constraint
davidbowler Jan 24, 2025
6c97680
Introduced new files to use ELPA
tsuyoshi38 Feb 5, 2025
02aaae8
modified ELPAModule.f90
tsuyoshi38 Feb 6, 2025
80a1506
pDOS with MSSFs (still there would be some bug)
ayakon Feb 6, 2025
1b991b7
pDOS with MSSFs (in PostProcessing)
ayakon Feb 6, 2025
051d8b7
Some bugs (ex. type of elpa_API) are removed.
tsuyoshi38 Feb 6, 2025
075a65c
pDOS with MSSFs: introducing aSs_in_sSs_range etc.
ayakon Feb 6, 2025
24fa731
system.*.make have been updated for ELPA
tsuyoshi38 Feb 6, 2025
d961c16
Tidy up unnecessary variables
davidbowler Feb 6, 2025
8fa1eeb
Tidying code
davidbowler Feb 7, 2025
cb68516
Merge pull request #399 from OrderN/f-proj_ELPA
tsuyoshi38 Feb 7, 2025
0e102d1
Allow specification of band numbers
davidbowler Feb 10, 2025
078f822
Change to overlap matrix used in pDOS for MSSF
davidbowler Feb 12, 2025
097837f
Tidying up code
davidbowler Feb 12, 2025
5a7231a
Tidying up code
ayakon Feb 13, 2025
208b65b
Merge branch 'develop' into f-dipole-correction
davidbowler Feb 14, 2025
4a9f9cf
Merge pull request #403 from OrderN/f-pDOS_MSSFs
ayakon Feb 17, 2025
4a18ff9
Merge pull request #401 from OrderN/bug-fix-choose-band-densities
davidbowler Feb 17, 2025
3c4d9ed
Fast forward onto develop and finish implementation
davidbowler Feb 18, 2025
6b9b340
Tidy up dipole correction and add documentation
davidbowler Feb 20, 2025
3425e14
Added test for surface dipole
davidbowler Feb 20, 2025
b630f43
Add Conquest_out.ref for dipole test
davidbowler Feb 20, 2025
049ac20
Surface dipole correction
davidbowler Feb 26, 2025
7caf918
Implement correction to S-Pulay force and stress
davidbowler Mar 20, 2025
7c425ff
Update reference output for linear scaling test
davidbowler Mar 21, 2025
32725f8
Merge pull request #409 from OrderN/bugfix-correct-force-stress
davidbowler Mar 28, 2025
ddcea1a
fixed a bug in reading .ion files with PostProcessCQ.
ayakon Jul 3, 2025
d8899c4
Merge pull request #412 from OrderN/bugfix_reading_PAO_in_PostProcessCQ
ayakon Jul 9, 2025
1f05748
Update installing.rst
davidbowler Dec 8, 2025
3f85717
Merge pull request #421 from OrderN/spack-link-patch
davidbowler Dec 8, 2025
4092524
a bug in BasisGeneration/schro_module.f90 for f-electrons is removed.
tsuyoshi38 Feb 4, 2026
0814a9c
Add cell volume output
davidbowler Feb 4, 2026
3e82eb0
Merge pull request #423 from OrderN/bugfix_f_MakeIonFiles
tsuyoshi38 Feb 5, 2026
825908f
Boundary in the DOS calculations has been changed (PostProcess).
tsuyoshi38 Feb 5, 2026
d7637a0
Changed the maximum line length to be read from Conquest_input from 1…
ayakon Feb 6, 2026
b8e056e
Merge pull request #428 from OrderN/f-change-line-length
ayakon Feb 6, 2026
edbe8c3
Adjust default sigma for DOS
davidbowler Feb 6, 2026
a362683
Merge pull request #425 from OrderN/f-output-cell-volume
davidbowler Feb 6, 2026
94904aa
Merge pull request #426 from OrderN/debug-DOS_boundary
davidbowler Feb 6, 2026
0204c75
Change version number and date
davidbowler Feb 9, 2026
f566eb7
Add options to allow ELPA to use GPUs
davidbowler Feb 9, 2026
2f38371
Update public status of new ELPA GPU flag
davidbowler Feb 9, 2026
3933067
Added missing elpa setup_gpu call
davidbowler Feb 9, 2026
5859449
Added very brief instructions for ELPA and GPUs
davidbowler Feb 9, 2026
61cd402
Fixed potential array overflow in alloc_recv_array
davidbowler Feb 10, 2026
ef7d092
Merge pull request #432 from OrderN/bugfix-ON-NPT-MD
davidbowler Feb 10, 2026
5f1d7ee
Add citations for LibXC
davidbowler Feb 11, 2026
efaea41
Merge pull request #434 from OrderN/f-add-citations-libxc
davidbowler Feb 11, 2026
754ca85
Merge pull request #430 from OrderN/f-ELPA-GPU
davidbowler Feb 24, 2026
8fb7c2b
Merge branch 'develop' into release-1.5
davidbowler Feb 24, 2026
fbf301f
Update LibXC instructions and linking
davidbowler Feb 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ jobs:
mpirun -np ${{matrix.np}} ../../bin/Conquest
cat Conquest_out

- name: Run test 008
working-directory: ${{github.workspace}}/testsuite/test_008_surface_dipole
run: |
mpirun -np ${{matrix.np}} ../../bin/Conquest
cat Conquest_out

- name: Check test results
working-directory: ${{github.workspace}}/testsuite
run: pytest test_check_output.py
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ DOI for the specific version you have used in any given study.

## Version number

CONQUEST is now at version 1.4 (tag:v1.4)
CONQUEST is now at version 1.5 (tag:v1.5)
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@

# General information about the project.
project = u'CONQUEST'
copyright = u'2018-2024, CONQUEST Developers'
copyright = u'2018-2026, CONQUEST Developers'
author = u'CONQUEST Developers'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'1.4'
version = u'1.5'
# The full version, including alpha/beta/rc tags.
release = u'1.4'
release = u'1.5'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
50 changes: 49 additions & 1 deletion docs/groundstate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ for the block size of the matrix, specify the following two variables.
Diag.BlockSizeC 20

Note that these two numbers should be the same when padding
(and when using ELPA which will be introduced to CONQUEST soon).
(and when using ELPA as described below).
We suggest that an appropriate value is between 20 and 200, but
this should be tested.

Expand All @@ -197,6 +197,26 @@ like to remove it, set the following variable.
Diag.PaddingHmatrix F


Go to :ref:`top <groundstate>`

.. _gs_diag_elpa:

Using ELPA
~~~~~~~~~~

`ELPA <https://elpa.mpcdf.mpg.de/>`_ is an alternative to ScaLAPACK for
diagonalisation which can show better parallelisation, and allows use of
GPU cards for acceleration (though the GPU implementation in CONQUEST is
at a very early stage). To enable ELPA and GPUs, set the following tags:

::

Diag.UseELPA T
Diag.ELPA_GPU T

Some care is needed in the balance between MPI processes and number of GPUs
on the compute nodes: careful testing is important.

Go to :ref:`top <groundstate>`.

.. _gs_on:
Expand Down Expand Up @@ -410,6 +430,34 @@ beyond the valence electrons.

Go to :ref:`top <groundstate>`.

.. _gs_surf_dip:

Surface dipole correction
-------------------------

If your simulation involves a slab calculation, then unless the slab is
perfectly symmetrical there can be a dipole moment which gives an unphysical
field across the periodic cell even for a neutral system. A correction can be applied, following the
method outlined in :cite:`g-Neugebauer1992,g-Bengtsson1999` (where we use the energy from the
Bengtsson paper, which is correct). This method *only* works for slab
calculations, and calculates a dipole correction potential, placing the
necessary discontinuity in the vacuum. The user can specify the location
of the discontinuity (in *fractional* coordinates), or the code will place it at the point where the
planar averaged density is a minimum (which is a good way to find the
centre of the vacuum).

::

SC.SurfaceDipoleCorrection T/F
SC.SurfaceNormal x, y, or z
SC.DiscontinuityLocation (*real*)

It is also possible to write out the planar-averaged potential and charge density
(averaged in the plane perpendicular to the surface normal) using the parameter
``SC.OutputAveragePotential T/F``. This generates the file ``AveragedPotential.dat``.

Go to :ref:`top <groundstate>`.

.. _gs_spin:

Spin polarisation
Expand Down
17 changes: 9 additions & 8 deletions docs/input_tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -951,25 +951,26 @@ AtomMove.OptCell.Constraint (*string*)

*Fixing a single cell dimension:*

a: Fix the x-dimension of the simulation box
``a``: Fix the x-dimension of the simulation cell

b: Fix the y-dimension of the simulation box
``b``: Fix the y-dimension of the simulation cell

c: Fix the z-dimension of the simulation box
``c``: Fix the z-dimension of the simulation cell

*Fixing multiple cell dimensions:*

any combination of the above separated by a space character. e.g: "a b" fixes
both the x and y dimensions of the simulation box

Any combination of the above separated by a space character. e.g: ``a b`` fixes
both the x- and y-dimensions of the simulation cell.

*Fixing Ratios:*

Any combination of a, b or c separated by a "/" character. e.g "c/a" fixes
the initial ratio of the z-dimension to the x-direction.
Any combination of a, b or c separated by a "/" character, e.g ``c/a`` fixes
the initial ratio of the z-dimension to the x-dimension.

*Global scaling factor:*

volume: minimize the total energy by scaling each simulation box dimension by
``volume``: minimize the total energy by scaling each simulation cell dimension by
the same global scaling factor. Search directions are set by the mean stress.

AtomMove.TestSpecificForce (*integer*)
Expand Down
18 changes: 14 additions & 4 deletions docs/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ a working MPI installation including a Fortran90 compiler (often
can be obtained from `the netlib repository <http://www.netlib.org/scalapack/>`_ if
you need to compile it)

Additionally, Conquest can use LibXC if it is available (v4.x or
later).
Additionally, Conquest can use `ELPA <https://elpa.mpcdf.mpg.de/index.html>`_ as an
alternative to ScaLAPACK (with GPU implementations also available).
It will also use `LibXC <https://libxc.gitlab.io/>`_ if it is
available (v4.x or later) :cite:`i-Lehtola:2018le`.

The library locations are set in the ``system.make`` file in the ``src/system``
directory, along with other parameters needed for compilation. The default file
Expand Down Expand Up @@ -112,7 +114,7 @@ and load the ``Conquest`` executable to ``PATH`` with

The build can be customized by adding options to the
`Spack spec <https://spack.readthedocs.io/en/latest/basic_usage.html#specs-dependencies>`_ ``conquest``.
The CONQUEST package includes variants for OpenMP support and different matrix multiplication kernels; more details can be found in the `Spack CONQUEST package <https://spack.readthedocs.io/en/latest/package_list.html#conquest>`_.
The CONQUEST package includes variants for OpenMP support and different matrix multiplication kernels; more details can be found in the `Spack CONQUEST package <https://packages.spack.io/package.html?name=conquest>`_.

Installing on Ubuntu
-----------
Expand Down Expand Up @@ -192,7 +194,7 @@ Prepare makefile
# Choose LibXC version: v4 (deprecated) or v5/6 (v5 and v6 have the same interface)
# XC_LIBRARY = LibXC_v4
XC_LIBRARY = LibXC_v5
XC_LIB = -lxcf90 -lxc
XC_LIB = -lxcf03 -lxc
XC_COMPFLAGS = -I\${HOME}/local/include -I/usr/local/include

# Set FFT library
Expand Down Expand Up @@ -223,5 +225,13 @@ Compile CONQUEST

dos2unix ./makedeps # For Windows Subsystem for Linux (WSL), there may be some incompatibilities thus file conversion is recommended.
make # Or make -j`nproc` for parallel compilation using all available cores

Go to :ref:`top <install>`

.. bibliography:: references.bib
:cited:
:labelprefix: I
:keyprefix: i-
:style: unsrt

Go to :ref:`top <install>`
36 changes: 33 additions & 3 deletions docs/references.bib
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
%% This BibTeX bibliography file was created using BibDesk.
%% http://bibdesk.sourceforge.net/
%% https://bibdesk.sourceforge.io/


%% Created for David Bowler at 2019-12-20 09:46:12 +0000
%% Created for David Bowler at 2026-02-11 11:22:57 +0000


%% Saved with string encoding Unicode (UTF-8)



@article{Lehtola:2018le,
author = {Lehtola, Susi and Steigemann, Conrad and Oliveira, Micael J. T. and Marques, Miguel A. L.},
doi = {10.1016/j.softx.2017.11.002},
journal = {SoftwareX},
pages = {1--5},
title = {Recent developments in libxc —A comprehensive library of functionals for density functional theory},
volume = {7},
year = {2018}}

@article{Torralba:2009nr,
author = {Torralba, Antonio S and Bowler, David R and Miyazaki, Tsuyoshi and Gillan, Michael J},
doi = {10.1021/ct8005425},
Expand Down Expand Up @@ -679,3 +689,23 @@ @article{Boys:1970aa
year = {1970},
doi = {10.1080/00268977000101561},
pages = {553}}
@article{Bengtsson1999,
title = {Dipole correction for surface supercell calculations},
author = {Bengtsson, Lennart},
journal = {Phys. Rev. B},
volume = {59},
issue = {19},
pages = {12301--12304},
year = {1999},
doi = {10.1103/PhysRevB.59.12301}
}
@article{Neugebauer1992,
title = {Adsorbate-substrate and adsorbate-adsorbate interactions of Na and K adlayers on Al(111)},
author = {Neugebauer, J\"org and Scheffler, Matthias},
journal = {Phys. Rev. B},
volume = {46},
issue = {24},
pages = {16067--16080},
year = {1992},
doi = {10.1103/PhysRevB.46.16067}
}
14 changes: 13 additions & 1 deletion docs/strucrelax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,15 @@ coordinates* (``AtomMove.OptCellMethod 1``) using the following input:

Note that stress is in GPa and enthalpy is in Ha by default.

It is possible to apply constraints to the cell when optimising it, using the
flag ``AtomMove.OptCell.Constraint``. The constraint takes three different possible
forms: fixing one or two of the cell lengths (e.g. ``AtomMove.OptCell.Constraint a`` or
``AtomMove.OptCell.Constraint a b``); fixing the ratio between two cell lengths
(e.g. ``AtomMove.OptCell.Constraint c/a``); and varying only the volume but not the
cell shape (``AtomMove.OptCell.Constraint volume``). Fixing the ratio between two
cell lengths does not determine the minimisation fully: we choose to maintain the
*average* stress in the two directions as well as the ratio.

Go to :ref:`top <strucrelax>`.

.. _sr_both:
Expand All @@ -147,7 +156,10 @@ allows *orthorhombic* unit cells). This can be done by setting
AtomMove.EnthalpyTolerance 1E-5
AtomMove.StressTolerance 0.1

Note that stress is in GPa and enthalpy is in Ha by default.
Note that stress is in GPa and enthalpy is in Ha by default. It is possible
to apply constraints to the simulation cell as described above, but this will
require extra care from the user to ensure that the simulation proceeds as
desired.

The enthalpy will generally converge much more rapidly than the force
and stress, and that it may be necessary to tighten ``minE.SCTolerance``
Expand Down
7 changes: 5 additions & 2 deletions src/DMMinModule.f90
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ subroutine lateDM(ndone, n_L_iterations, done, deltaE, vary_mu, &
flag_mix_L_SC_min, &
flag_fix_spin_population, nspin, &
spin_factor, flag_dump_L, &
flag_SpinDependentSF, min_layer
flag_SpinDependentSF, min_layer, mu_DMM
use timer_module, only: cq_timer,start_timer, &
stop_print_timer, WITH_LEVEL
use io_module, only: dump_matrix, return_prefix
Expand Down Expand Up @@ -877,6 +877,7 @@ subroutine lateDM(ndone, n_L_iterations, done, deltaE, vary_mu, &
if (ndone > n_L_iterations) &
call cq_abort('lateDM: too many L iterations', ndone, n_L_iterations)

mu_DMM = zero
do spin = 1, nspin
do i = 1, maxpulayDMM
mat_Lstore(i,spin) = allocate_temp_matrix(Lrange,0)
Expand All @@ -888,7 +889,6 @@ subroutine lateDM(ndone, n_L_iterations, done, deltaE, vary_mu, &
matSphi(spin) = allocate_temp_matrix(Lrange,0)
mat_temp(spin) = allocate_temp_matrix(TLrange,0)
end do

! Update the charge density if flag is set
min_layer = min_layer - 1
if (flag_mix_L_SC_min) then
Expand Down Expand Up @@ -931,6 +931,7 @@ subroutine lateDM(ndone, n_L_iterations, done, deltaE, vary_mu, &
call matrix_product(mat_temp(spin), matT(spin_SF), matSphi(spin), mult(TL_T_L))
e_dot_n(spin) = matrix_product_trace(matSM3(spin), matphi(spin))
n_dot_n(spin) = matrix_product_trace(matSphi(spin), matphi(spin))
mu_DMM(spin) = e_dot_n(spin) / n_dot_n(spin)
if (inode == ionode .and. iprint_DM + min_layer >= 3) then
write(io_lun, '(4x,a,i1,") ",f16.6)') &
trim(prefix)//" e.n (spin=", spin, e_dot_n(spin)
Expand Down Expand Up @@ -1057,6 +1058,7 @@ subroutine lateDM(ndone, n_L_iterations, done, deltaE, vary_mu, &
mult(TL_T_L))
e_dot_n(spin) = matrix_product_trace(matSM3(spin), matphi(spin))
n_dot_n(spin) = matrix_product_trace(matSphi(spin), matphi(spin))
mu_DMM(spin) = e_dot_n(spin) / n_dot_n(spin)
end do
if (flag_fix_spin_population) then
do spin = 1, nspin
Expand Down Expand Up @@ -1185,6 +1187,7 @@ subroutine lateDM(ndone, n_L_iterations, done, deltaE, vary_mu, &
matSphi(spin), mult(TL_T_L))
e_dot_n(spin) = matrix_product_trace(matSM3(spin), matphi(spin))
n_dot_n(spin) = matrix_product_trace(matSphi(spin), matphi(spin))
mu_DMM(spin) = e_dot_n(spin) / n_dot_n(spin)
end do
if (flag_fix_spin_population) then
do spin = 1, nspin
Expand Down
Loading