-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b46691
commit 14f5516
Showing
5 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
&control | ||
title = ' Water Molecule ', | ||
calculation = 'cp', | ||
restart_mode = 'from_scratch', | ||
ndr = 51, | ||
ndw = 51, | ||
nstep = 100, | ||
iprint = 100, | ||
isave = 100, | ||
tstress = .TRUE., | ||
tprnfor = .TRUE., | ||
dt = 5.0d0, | ||
etot_conv_thr = 1.d-9, | ||
ekin_conv_thr = 1.d-4, | ||
prefix = 'h2o' | ||
verbosity = 'medium' | ||
/ | ||
&system | ||
ibrav = 14, | ||
celldm(1) = 12.0, | ||
celldm(2) = 1.0, | ||
celldm(3) = 1.0, | ||
celldm(4) = 0.0, | ||
celldm(5) = 0.0, | ||
celldm(6) = 0.0, | ||
nat = 3, | ||
ntyp = 2, | ||
nbnd = 4, | ||
ecutwfc = 80.0, | ||
/ | ||
&electrons | ||
emass = 400.d0, | ||
emass_cutoff = 2.5d0, | ||
orthogonalization = 'ortho', | ||
electron_dynamics = 'damp', | ||
electron_damping = 0.2 | ||
/ | ||
&ions | ||
ion_dynamics = 'none', | ||
ion_radius(1) = 0.8d0, | ||
ion_radius(2) = 0.8d0, | ||
/ | ||
ATOMIC_SPECIES | ||
O 16.0d0 O.blyp-mt.UPF | ||
H 1.00d0 H.blyp-vbc.UPF | ||
ATOMIC_POSITIONS (bohr) | ||
O 0.0099 0.0099 0.0000 0 0 0 | ||
H 1.8325 -0.2243 -0.0001 1 1 1 | ||
H -0.2243 1.8325 0.0002 1 1 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"structure": { | ||
"positions": [ | ||
[0.005238854365041, 0.005238854365041, 0.0], | ||
[0.9697172347411749, -0.11869444788673698, -5.2917720858999996e-5], | ||
[-0.11869444788673698, 0.9697172347411749, 0.00010583544171799999] | ||
], | ||
"species": { | ||
"names": ["O", "H"], | ||
"masses": [16.0, 1.0], | ||
"pseudo_file_names": ["O.blyp-mt.UPF", "H.blyp-vbc.UPF"] | ||
}, | ||
"cell": [ | ||
[6.350126503079999, 0.0, 0.0], | ||
[0.0, 6.350126503079999, 0.0], | ||
[0.0, 0.0, 6.350126503079999] | ||
], | ||
"atom_names": ["O", "H", "H"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"structure": { | ||
"positions": [ | ||
[0.005238854365041, 0.005238854365041, 0.0], | ||
[0.9697172347411749, -0.11869444788673698, -5.2917720858999996e-5], | ||
[-0.11869444788673698, 0.9697172347411749, 0.00010583544171799999] | ||
], | ||
"species": { | ||
"names": ["O", "H"], | ||
"masses": [16.0, 1.0], | ||
"pseudo_file_names": ["O.blyp-mt.UPF", "H.blyp-vbc.UPF"] | ||
}, | ||
"cell": [ | ||
[6.350126503079999, 0.0, 0.0], | ||
[0.0, 6.350126503079999, 0.0], | ||
[0.0, 0.0, 6.350126503079999] | ||
], | ||
"atom_names": ["O", "H", "H"] | ||
}, | ||
"k-points": { "type": "gamma" } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
&control | ||
calculation = 'relax', | ||
/ | ||
&system | ||
ibrav = 1, | ||
celldm(1) = 12.0, | ||
nat = 3, | ||
ntyp = 2, | ||
nbnd = 4, | ||
ecutwfc = 80, | ||
ecutfock=160, | ||
input_dft = 'X3LYP' | ||
exxdiv_treatment = 'gygi-baldereschi' | ||
x_gamma_extrapolation = .TRUE. | ||
/ | ||
&electrons | ||
/ | ||
&ions | ||
/ | ||
ATOMIC_SPECIES | ||
O 16.0d0 O.blyp-mt.UPF | ||
H 1.00d0 H.blyp-vbc.UPF | ||
ATOMIC_POSITIONS (bohr) | ||
O 0.0099 0.0099 0.0000 | ||
H 1.8325 -0.2243 -0.0001 | ||
H -0.2243 1.8325 0.0002 | ||
K_POINTS gamma |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import json | ||
from pathlib import Path | ||
|
||
import pytest | ||
from qe_tools.extractors import extract | ||
|
||
|
||
@pytest.mark.parametrize("parser", ["pw", "cp"]) | ||
def test_input_dict_extraction(parser: str): | ||
datadir = Path(__file__).resolve().parent / "data" | ||
filepath = datadir / f"{parser}.in" | ||
refpath = datadir / "extractor_ref" / f"{parser}.json" | ||
with open(refpath) as reference: | ||
assert extract(filepath.as_posix(), parser) == json.load(reference) |