コード例 #1
0
def test_read_aluminum(tmpdir, aluminum_file):
    from pylada.espresso import read_structure
    espresso = Pwscf()
    espresso.read(aluminum_file)
    structure = read_structure(aluminum_file)
    check_aluminum_functional(tmpdir, espresso)
    check_aluminum_structure(structure)
コード例 #2
0
ファイル: test_pwscf.py プロジェクト: pylada/pylada-light
def test_read_aluminum(tmpdir, aluminum_file):
    from pylada.espresso import read_structure

    espresso = Pwscf()
    espresso.read(aluminum_file)
    structure = read_structure(aluminum_file)
    check_aluminum_functional(tmpdir, espresso)
    check_aluminum_structure(structure)
コード例 #3
0
#
#  PyLaDa is free software: you can redistribute it and/or modify it under the terms of the GNU
#  General Public License as published by the Free Software Foundation, either version 3 of the
#  License, or (at your option) any later version.
#
#  PyLaDa is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
#  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
#  Public License for more details.
#
#  You should have received a copy of the GNU General Public License along with PyLaDa.  If not, see
#  <http://www.gnu.org/licenses/>.
###############################
# -*- coding: utf-8 -*-
from pylada.espresso import Pwscf
from tempfile import NamedTemporaryFile
from pylada.espresso.tests.fixtures import check_aluminum_functional, check_aluminum_structure
from pylada.espresso import read_structure
from py.path import local
from sys import stdin
pwscf = Pwscf()
with NamedTemporaryFile(mode="w") as file:
    file.write(stdin.read())
    file.flush()
    pwscf.read(file.name)
    structure = read_structure(file.name)

check_aluminum_functional(local(), pwscf)
check_aluminum_structure(structure)
pwscf.pseudos_do_exist(structure)
print("JOB IS DONE!")