Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undo change of filenames #581

Merged
merged 1 commit into from
Jun 12, 2023
Merged
Changes from all commits
Commits
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
34 changes: 17 additions & 17 deletions src/sisl/io/orca/tests/test_out.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@


def test_tags(sisl_files):
f = sisl_files(_dir, 'molecule.out')
f = sisl_files(_dir, 'molecule.output')
out = outSileORCA(f)
assert out.na == 2
assert out.no == 62
assert out.completed()

def test_read_electrons(sisl_files):
f = sisl_files(_dir, 'molecule.out')
f = sisl_files(_dir, 'molecule.output')
out = outSileORCA(f)
N = out.read_electrons(all=True)
assert N[0, 0] == 7.999998537730
Expand All @@ -31,13 +31,13 @@ def test_read_electrons(sisl_files):
assert N[1] == 6.999998987209

def test_charge_name(sisl_files):
f = sisl_files(_dir, 'molecule.out')
f = sisl_files(_dir, 'molecule.output')
out = outSileORCA(f)
for name in ['mulliken', 'MULLIKEN', 'loewdin', 'Lowdin', 'LÖWDIN']:
assert out.read_charge(name=name) is not None

def test_charge_mulliken_atom(sisl_files):
f = sisl_files(_dir, 'molecule.out')
f = sisl_files(_dir, 'molecule.output')
out = outSileORCA(f)
C = out.read_charge(name='mulliken', projection='atom', all=True)
S = out.read_charge(name='mulliken', projection='atom', spin=True, all=True)
Expand All @@ -58,7 +58,7 @@ def test_charge_mulliken_atom(sisl_files):
assert S[1] == 0.312207

def test_lowedin_atom(sisl_files):
f = sisl_files(_dir, 'molecule.out')
f = sisl_files(_dir, 'molecule.output')
out = outSileORCA(f)
C = out.read_charge(name='loewdin', projection='atom', all=True)
S = out.read_charge(name='loewdin', projection='atom', spin=True, all=True)
Expand All @@ -79,7 +79,7 @@ def test_lowedin_atom(sisl_files):
assert S[1] == 0.339673

def test_charge_mulliken_reduced(sisl_files):
f = sisl_files(_dir, 'molecule.out')
f = sisl_files(_dir, 'molecule.output')
out = outSileORCA(f)
C = out.read_charge(name='mulliken', projection='orbital', all=True)
S = out.read_charge(name='mulliken', projection='orbital', spin=True, all=True)
Expand Down Expand Up @@ -116,7 +116,7 @@ def test_charge_mulliken_reduced(sisl_files):
assert S[0] == 0.685743

def test_charge_loewdin_reduced(sisl_files):
f = sisl_files(_dir, 'molecule.out')
f = sisl_files(_dir, 'molecule.output')
out = outSileORCA(f)
C = out.read_charge(name='loewdin', projection='orbital', all=True)
S = out.read_charge(name='loewdin', projection='orbital', spin=True, all=True)
Expand All @@ -139,7 +139,7 @@ def test_charge_loewdin_reduced(sisl_files):
assert C[0] == 0.723113

def test_charge_mulliken_full(sisl_files):
f = sisl_files(_dir, 'molecule.out')
f = sisl_files(_dir, 'molecule.output')
out = outSileORCA(f)
C = out.read_charge(name='mulliken', projection='orbital', reduced=False, all=True)
S = out.read_charge(name='mulliken', projection='orbital', reduced=False, spin=True, all=True)
Expand All @@ -156,7 +156,7 @@ def test_charge_mulliken_full(sisl_files):
assert S[8] == 0.006429

def test_charge_loewdin_full(sisl_files):
f = sisl_files(_dir, 'molecule.out')
f = sisl_files(_dir, 'molecule.output')
out = outSileORCA(f)
C = out.read_charge(name='loewdin', projection='orbital', reduced=False, all=True)
S = out.read_charge(name='loewdin', projection='orbital', reduced=False, spin=True, all=True)
Expand All @@ -173,7 +173,7 @@ def test_charge_loewdin_full(sisl_files):
assert S[8] == 0.005159

def test_charge_atom_unpol(sisl_files):
f = sisl_files(_dir, 'molecule2.out')
f = sisl_files(_dir, 'molecule2.output')
out = outSileORCA(f)
C = out.read_charge(name='mulliken', projection='atom', all=True)
S = out.read_charge(name='mulliken', projection='atom', spin=True, all=True)
Expand All @@ -190,7 +190,7 @@ def test_charge_atom_unpol(sisl_files):
assert S is None

def test_charge_orbital_reduced_unpol(sisl_files):
f = sisl_files(_dir, 'molecule2.out')
f = sisl_files(_dir, 'molecule2.output')
out = outSileORCA(f)
C = out.read_charge(name='mulliken', projection='orbital', all=True)
S = out.read_charge(name='mulliken', projection='orbital', spin=True, all=True)
Expand All @@ -216,15 +216,15 @@ def test_charge_orbital_reduced_unpol(sisl_files):
assert S is None

def test_charge_orbital_full_unpol(sisl_files):
f = sisl_files(_dir, 'molecule2.out')
f = sisl_files(_dir, 'molecule2.output')
out = outSileORCA(f)
C = out.read_charge(name='mulliken', projection='orbital', reduced=False)
S = out.read_charge(name='mulliken', projection='orbital', reduced=False, spin=True)
assert C is None
assert S is None

def test_read_energy(sisl_files):
f = sisl_files(_dir, 'molecule.out')
f = sisl_files(_dir, 'molecule.output')
out = outSileORCA(f)
E = out.read_energy(all=True)
assert len(E) == 2
Expand All @@ -233,14 +233,14 @@ def test_read_energy(sisl_files):
assert pytest.approx(E.total) == -3532.4784695729268

def test_read_energy_vdw(sisl_files):
f = sisl_files(_dir, 'molecule2.out')
f = sisl_files(_dir, 'molecule2.output')
out = outSileORCA(f)
E = out.read_energy()
assert E.vdw != 0
assert pytest.approx(E.total) == -3081.2640328972802

def test_read_orbital_energies(sisl_files):
f = sisl_files(_dir, 'molecule.out')
f = sisl_files(_dir, 'molecule.output')
out = outSileORCA(f)
E = out.read_orbital_energies(all=True)
assert pytest.approx(E[0][0, 0]) == -513.8983
Expand All @@ -256,7 +256,7 @@ def test_read_orbital_energies(sisl_files):
assert pytest.approx(E[61, 0]) == 1173.4259

def test_read_orbital_energies_unpol(sisl_files):
f = sisl_files(_dir, 'molecule2.out')
f = sisl_files(_dir, 'molecule2.output')
out = outSileORCA(f)
E = out.read_orbital_energies(all=True)
assert pytest.approx(E[0][0]) == -513.0978
Expand All @@ -269,7 +269,7 @@ def test_read_orbital_energies_unpol(sisl_files):
assert pytest.approx(E[61]) == 1171.5967

def test_multiple_calls(sisl_files):
f = sisl_files(_dir, 'molecule2.out')
f = sisl_files(_dir, 'molecule2.output')
out = outSileORCA(f)
N = out.read_electrons(all=True)
assert len(N) == 2
Expand Down