Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 15, 2024
1 parent 2ec0e3a commit 1071d3a
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/aiidalab_qe/app/submission/global_settings/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,17 +262,17 @@ def _estimate_min_cpus(
Maximum time limit. Default is 12 hours.
`scf_cycles` : `int`, optional
Reference number of SCF cycles in a relaxation. Default is 5.
The default values n0, v0, num_cpus0, t0 and scf_cycles are taken from the simulation of SiO2 bulk
The default values n0, v0, num_cpus0, t0 and scf_cycles are taken from the simulation of SiO2 bulk
example structure present in the app, following a moderate protocol. We then used the formula
num_cpus = num_cpus0 * (n/n0)^3 * (v/v0)^(3/2) * (scf_cycles * t0)/tmax
assuming that the number of CPUs scales with the number of atoms as power of 3, the volume of the system as power of 3/2,
assuming that the number of CPUs scales with the number of atoms as power of 3, the volume of the system as power of 3/2,
the number of SCF cycles and the time of a single SCF cycle. The power dependence was then adjusted to match the
other reference calculations done on bulk SiO2, Silicon and Gold, using different number of cpus.
NOTE: this is a very rough estimate and should be used as a guideline only.
Returns
-------
`int`
Expand All @@ -282,6 +282,10 @@ def _estimate_min_cpus(

return int(
np.ceil(
num_cpus0 * (n / n0) ** 3 * (v / v0) ** (3/2) * (scf_cycles * t0) / tmax
num_cpus0
* (n / n0) ** 3
* (v / v0) ** (3 / 2)
* (scf_cycles * t0)
/ tmax
)
)

0 comments on commit 1071d3a

Please sign in to comment.