######################################################
#  Ben Palmer University of Birmingham 2020
#  Free to use
######################################################

from configs import configs
from pwscf_inout import pwscf_inout
from atom_config import atom_config
from pwscf_exec import pwscf_exec

class for_fit:
  
  @staticmethod
  def run():
    print("run")
    
    # Template file    
    g.ffd['template'] = g.inp['template']['file']
    
    # Load settings
    for k in g.inp['settings'].keys():
      if(k in g.ffd.keys()):
        g.ffd[k] = g.inp['settings'][k]
    
    
    # Load configs
    configs.load_from_inp()

    # Load Template
    template = pwscf_input()
    template.load(g.ffd['template'])
    template.set_dirs()
    template.save("input_template.in", g.dirs['templates'])    
    

    
    runfiles = configs.to_file(g.dirs['templates'] + '/' + "input_template.in", g.dirs['configs'])
    
    run_pw = True
    if('run' in g.inp.keys()):
      if('option' in g.inp['run'].keys()):
        run_pw = std.option(g.inp['run']['option'])
        
    if(run_pw):
      log, files_out, run_list = pwscf_exec.execute(runfiles)
    
    
    #print(runfiles)
    
    
    
    
    
    
    
967d5d2b55858c6420e7a56ac2f337347266f459
<mask token>

<mask token>


class for_fit:
    <mask token>

<mask token>


class for_fit:

    @staticmethod
    def run():
        print('run')
        g.ffd['template'] = g.inp['template']['file']
        for k in g.inp['settings'].keys():
            if k in g.ffd.keys():
                g.ffd[k] = g.inp['settings'][k]
        configs.load_from_inp()
        template = pwscf_input()
        template.load(g.ffd['template'])
        template.set_dirs()
        template.save('input_template.in', g.dirs['templates'])
        runfiles = configs.to_file(g.dirs['templates'] + '/' +
            'input_template.in', g.dirs['configs'])
        run_pw = True
        if 'run' in g.inp.keys():
            if 'option' in g.inp['run'].keys():
                run_pw = std.option(g.inp['run']['option'])
        if run_pw:
            log, files_out, run_list = pwscf_exec.execute(runfiles)

from configs import configs
from pwscf_inout import pwscf_inout
from atom_config import atom_config
from pwscf_exec import pwscf_exec


class for_fit:

    @staticmethod
    def run():
        print('run')
        g.ffd['template'] = g.inp['template']['file']
        for k in g.inp['settings'].keys():
            if k in g.ffd.keys():
                g.ffd[k] = g.inp['settings'][k]
        configs.load_from_inp()
        template = pwscf_input()
        template.load(g.ffd['template'])
        template.set_dirs()
        template.save('input_template.in', g.dirs['templates'])
        runfiles = configs.to_file(g.dirs['templates'] + '/' +
            'input_template.in', g.dirs['configs'])
        run_pw = True
        if 'run' in g.inp.keys():
            if 'option' in g.inp['run'].keys():
                run_pw = std.option(g.inp['run']['option'])
        if run_pw:
            log, files_out, run_list = pwscf_exec.execute(runfiles)

######################################################
#  Ben Palmer University of Birmingham 2020
#  Free to use
######################################################

from configs import configs
from pwscf_inout import pwscf_inout
from atom_config import atom_config
from pwscf_exec import pwscf_exec

class for_fit:
  
  @staticmethod
  def run():
    print("run")
    
    # Template file    
    g.ffd['template'] = g.inp['template']['file']
    
    # Load settings
    for k in g.inp['settings'].keys():
      if(k in g.ffd.keys()):
        g.ffd[k] = g.inp['settings'][k]
    
    
    # Load configs
    configs.load_from_inp()

    # Load Template
    template = pwscf_input()
    template.load(g.ffd['template'])
    template.set_dirs()
    template.save("input_template.in", g.dirs['templates'])    
    

    
    runfiles = configs.to_file(g.dirs['templates'] + '/' + "input_template.in", g.dirs['configs'])
    
    run_pw = True
    if('run' in g.inp.keys()):
      if('option' in g.inp['run'].keys()):
        run_pw = std.option(g.inp['run']['option'])
        
    if(run_pw):
      log, files_out, run_list = pwscf_exec.execute(runfiles)
    
    
    #print(runfiles)
    
    
    
    
    
    
    