Skip to content

Commit

Permalink
Format .jl files
Browse files Browse the repository at this point in the history
  • Loading branch information
singularitti authored Nov 3, 2023
1 parent 85c0f08 commit 5448190
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 59 deletions.
13 changes: 5 additions & 8 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using QuantumESPRESSOExpress
using Documenter

DocMeta.setdocmeta!(QuantumESPRESSOExpress, :DocTestSetup, :(using QuantumESPRESSOExpress); recursive=true)
DocMeta.setdocmeta!(
QuantumESPRESSOExpress, :DocTestSetup, :(using QuantumESPRESSOExpress); recursive=true
)

makedocs(;
modules=[QuantumESPRESSOExpress],
Expand All @@ -16,9 +18,7 @@ makedocs(;
),
pages=[
"Home" => "index.md",
"Manual" => [
"Installation guide" => "installation.md",
],
"Manual" => ["Installation guide" => "installation.md"],
# "API Reference" => "public.md",
"Developer Docs" => [
"Contributing" => "developers/contributing.md",
Expand All @@ -29,7 +29,4 @@ makedocs(;
],
)

deploydocs(;
repo="github.com/MineralsCloud/QuantumESPRESSOExpress.jl",
devbranch="main",
)
deploydocs(; repo="github.com/MineralsCloud/QuantumESPRESSOExpress.jl", devbranch="main")
52 changes: 22 additions & 30 deletions test/EquationOfStateWorkflow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,23 @@ using UnitfulAtomic
@testset "Load a configuration file: GaN" begin
dict = load("../examples/GaN/eos.yaml")
config = ExpandConfig{SCF}()(dict)
@test config.template == PWInput(
control = ControlNamelist(
pseudo_dir = "/home/qe/pseudo",
prefix = "GaN",
outdir = "./tmp",
@test config.template == PWInput(;
control=ControlNamelist(;
pseudo_dir="/home/qe/pseudo", prefix="GaN", outdir="./tmp"
),
system = SystemNamelist(
ibrav = 4,
celldm = [5.95484286816, nothing, 1.63011343669],
nat = 4,
ntyp = 2,
ecutwfc = 160,
system=SystemNamelist(;
ibrav=4,
celldm=[5.95484286816, nothing, 1.63011343669],
nat=4,
ntyp=2,
ecutwfc=160,
),
electrons = ElectronsNamelist(conv_thr = 1e-10),
atomic_species = AtomicSpeciesCard([
electrons=ElectronsNamelist(; conv_thr=1e-10),
atomic_species=AtomicSpeciesCard([
AtomicSpecies("Ga", 69.723, "Ga.pbe-dn-kjpaw_psl.1.0.0.UPF"),
AtomicSpecies("N", 14.007, "N.pbe-n-kjpaw_psl.1.0.0.UPF"),
]),
atomic_positions = AtomicPositionsCard(
atomic_positions=AtomicPositionsCard(
[
AtomicPosition("Ga", [0.666666667, 0.333333333, -0.000051966]),
AtomicPosition("N", [0.666666667, 0.333333333, 0.376481188]),
Expand All @@ -41,10 +39,10 @@ using UnitfulAtomic
],
"crystal",
),
k_points = KMeshCard(MonkhorstPackGrid([6, 6, 6], [1, 1, 1])),
k_points=KMeshCard(MonkhorstPackGrid([6, 6, 6], [1, 1, 1])),
)
@test config.trial_eos ==
BirchMurnaghan3rd(317.0u"bohr^3", 210u"GPa", 4, -612.43149513u"Ry")
BirchMurnaghan3rd(317.0u"bohr^3", 210u"GPa", 4, -612.43149513u"Ry")
@test config.fixed == [-5, 0, 5, 10, 15, 20, 25, 30] * u"GPa"
if !Sys.iswindows()
@test config.save_raw == config.root * "/raw.json"
Expand All @@ -56,24 +54,18 @@ end
@testset "Load a configuration file: Ge" begin
dict = load("../examples/Ge/eos.yaml")
config = ExpandConfig{SCF}()(dict)
@test config.template == PWInput(
control = ControlNamelist(pseudo_dir = "./pseudo", prefix = "Ge", outdir = "./"),
system = SystemNamelist(
ibrav = 2,
celldm = [7.957636],
nat = 2,
ntyp = 1,
ecutwfc = 55,
),
electrons = ElectronsNamelist(conv_thr = 1e-10),
atomic_species = AtomicSpeciesCard([
AtomicSpecies("Ge", 72.64, "Ge.pz-dn-kjpaw_psl.0.2.2.UPF"),
@test config.template == PWInput(;
control=ControlNamelist(; pseudo_dir="./pseudo", prefix="Ge", outdir="./"),
system=SystemNamelist(; ibrav=2, celldm=[7.957636], nat=2, ntyp=1, ecutwfc=55),
electrons=ElectronsNamelist(; conv_thr=1e-10),
atomic_species=AtomicSpeciesCard([
AtomicSpecies("Ge", 72.64, "Ge.pz-dn-kjpaw_psl.0.2.2.UPF")
]),
atomic_positions = AtomicPositionsCard(
atomic_positions=AtomicPositionsCard(
[AtomicPosition("Ge", [0, 0, 0]), AtomicPosition("Ge", [0.75, 0.75, 0.75])],
"crystal",
),
k_points = KMeshCard(MonkhorstPackGrid([6, 6, 6], [1, 1, 1])),
k_points=KMeshCard(MonkhorstPackGrid([6, 6, 6], [1, 1, 1])),
)
@test config.trial_eos == BirchMurnaghan3rd(300.44u"bohr^3", 74.88u"GPa", 4.82)
@test config.fixed == [-5, -2, 0, 5, 10, 15, 17, 20] * u"GPa"
Expand Down
42 changes: 21 additions & 21 deletions test/PhononWorkflow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,33 @@ using UnitfulAtomic
@test config.template.dfpt == PhInput(
"Phonon",
PhNamelist(;
verbosity = "high",
fildyn = "dyn",
outdir = "./tmp",
prefix = "Ge",
ldisp = true,
tr2_ph = 1e-14,
nq1 = 2,
nq2 = 2,
nq3 = 2,
amass = [72.64],
verbosity="high",
fildyn="dyn",
outdir="./tmp",
prefix="Ge",
ldisp=true,
tr2_ph=1e-14,
nq1=2,
nq2=2,
nq3=2,
amass=[72.64],
),
nothing,
)
@test config.template.q2r ==
Q2rInput(Q2rNamelist(; fildyn = "dyn", zasr = "crystal", flfrc = "fc.out"))
Q2rInput(Q2rNamelist(; fildyn="dyn", zasr="crystal", flfrc="fc.out"))
@test config.template.disp == MatdynInput(
MatdynNamelist(;
asr = "crystal",
amass = [72.64],
flfrc = "fc.out",
flfrq = "freq.out",
flvec = "modes.out",
dos = true,
q_in_band_form = false,
nk1 = 8,
nk2 = 8,
nk3 = 8,
asr="crystal",
amass=[72.64],
flfrc="fc.out",
flfrq="freq.out",
flvec="modes.out",
dos=true,
q_in_band_form=false,
nk1=8,
nk2=8,
nk3=8,
),
)
@test config.fixed == [-5, -2, 0, 5, 10, 15, 17, 20] * u"GPa"
Expand Down

0 comments on commit 5448190

Please sign in to comment.