예제 #1
0
 def test_expand(self):
     spec = get_spec('GW')
     tests = SingleAbinitGWWorkFlow(structure, spec).convs
     tests_out = {'nscf_nbands': {'test_range': (50,),
                                  'control': 'gap', 'method': 'set_bands', 'level': 'nscf'},
                  'ecut': {'test_range': (28, 32, 36, 40, 44),
                           'control': 'e_ks_max', 'method': 'direct', 'level': 'scf'},
                  'ecuteps': {'test_range': (4, 8, 12, 16, 20),
                              'control': 'gap', 'method': 'direct', 'level': 'sigma'}}
     self.assertEqual(expand(tests, 1), tests_out)
     spec.data['code'] = 'VASP'
     spec.update_code_interface()
     tests = GWG0W0VaspInputSet(structure, spec).convs
     tests_out = {'ENCUTGW': {'test_range': (200, 400, 600, 800), 'control': 'gap', 'method': 'incar_settings'}}
     self.assertEqual(expand(tests, 1), tests_out)
예제 #2
0
 def test_expand(self):
     self.maxDiff = None
     spec = get_spec('GW')
     tests = SingleAbinitGWWork(structure, spec).convs
     tests_out = {
         'nscf_nbands': {
             'test_range': (40, ),
             'control': 'gap',
             'method': 'set_bands',
             'level': 'nscf'
         },
         'ecut': {
             'test_range': (52, 48, 44),
             'control': 'e_ks_max',
             'method': 'direct',
             'level': 'scf'
         },
         'ecuteps': {
             'test_range': (4, 8, 12, 16, 20),
             'control': 'gap',
             'method': 'direct',
             'level': 'sigma'
         }
     }
     self.assertEqual(expand(tests, 1), tests_out)
     spec.data['code'] = 'VASP'
     spec.update_code_interface()
     tests = GWG0W0VaspInputSet(structure, spec).convs
     tests_out = {
         'ENCUTGW': {
             'test_range': (200, 400, 600, 800),
             'control': 'gap',
             'method': 'incar_settings'
         }
     }
     self.assertEqual(expand(tests, 1), tests_out)
예제 #3
0
__author__ = "Michiel van Setten"
__copyright__ = " "
__version__ = "0.9"
__maintainer__ = "Michiel van Setten"
__email__ = "*****@*****.**"
__date__ = "May 2014"

import os
import os.path

from pymatgen.io.gwwrapper.datastructures import get_spec

MODULE_DIR = os.path.dirname(os.path.abspath(__file__))

if __name__ == "__main__":
    counter = 0
    #load_ps()
    spec_in = get_spec('GW')
    try:
        spec_in.read_from_file('spec.in')
    except (IOError, OSError):
        try:
            spec_in.read_from_file('$HOME/.abinit/abipy/spec.in')
        except (IOError, OSError):
            pass
        pass
    spec_in.update_interactive()
    spec_in.test()
    spec_in.write_to_file('spec.in')
    spec_in.loop_structures('i')
예제 #4
0
from __future__ import unicode_literals, division, print_function

#!/usr/bin/env python

"""
Script to store GW results for VASP and ABINIT in a database.
"""

__author__ = "Michiel van Setten"
__copyright__ = " "
__version__ = "0.9"
__maintainer__ = "Michiel van Setten"
__email__ = "*****@*****.**"
__date__ = "May 2014"

import os
import os.path

from pymatgen.io.gwwrapper.datastructures import get_spec
from pymatgen.io.gwwrapper.helpers import load_ps

MODULE_DIR = os.path.dirname(os.path.abspath(__file__))


if __name__ == "__main__":
    load_ps()
    counter = 0
    spec_in = get_spec('GW')
    spec_in.read_from_file('spec.in')
    spec_in.loop_structures('s')
예제 #5
0
from __future__ import unicode_literals, division, print_function

"""
Script process the GW output generated by GWsetup using VASP or ABINIT.
"""

__author__ = "Michiel van Setten"
__copyright__ = " "
__version__ = "0.9"
__maintainer__ = "Michiel van Setten"
__email__ = "*****@*****.**"
__date__ = "May 2014"

import os
import os.path

from pymatgen.io.gwwrapper.datastructures import get_spec

MODULE_DIR = os.path.dirname(os.path.abspath(__file__))

if __name__ == "__main__":
    if os.path.isfile('plots'):
        os.remove('plots')
    if os.path.isfile('plot-fits'):
        os.remove('plot-fits')
    spec = get_spec('GW')
    spec.read_from_file('spec.in')
    print('Found setup for ', spec.get_code())
    spec.loop_structures('o')
예제 #6
0
# coding: utf-8

from __future__ import unicode_literals, division, print_function
"""
Script process the GW output generated by GWsetup using VASP or ABINIT.
"""

__author__ = "Michiel van Setten"
__copyright__ = " "
__version__ = "0.9"
__maintainer__ = "Michiel van Setten"
__email__ = "*****@*****.**"
__date__ = "May 2014"

import os
import os.path

from pymatgen.io.gwwrapper.datastructures import get_spec

MODULE_DIR = os.path.dirname(os.path.abspath(__file__))

if __name__ == "__main__":
    if os.path.isfile('plots'):
        os.remove('plots')
    if os.path.isfile('plot-fits'):
        os.remove('plot-fits')
    spec = get_spec('GW')
    spec.read_from_file('spec.in')
    print('Found setup for ', spec.get_code())
    spec.loop_structures('o')
예제 #7
0
 def test_GWget_spec(self):
     spec = get_spec('GW')
     self.assertIsInstance(spec, GWSpecs)
예제 #8
0
 def test_GWget_spec(self):
     spec = get_spec('GW')
     self.assertIsInstance(spec, GWSpecs)