def simple(pot_family, import_from, queue, code, computer, no_import): load_dbenv_if_not_loaded() from aiida.orm import CalculationFactory, Code if not no_import: click.echo('importing POTCAR files...') with cli_spinner(): import_pots(import_from, pot_family) pot_cls = get_data_cls('vasp.potcar') pot_si = pot_cls.find_one(family=pot_family, full_name='Si') vasp_calc = CalculationFactory('vasp.vasp')() vasp_calc.use_structure(create_structure_Si()) vasp_calc.use_kpoints(create_kpoints()) vasp_calc.use_parameters(create_params_simple()) code = Code.get_from_string('{}@{}'.format(code, computer)) vasp_calc.use_code(code) vasp_calc.use_potential(pot_si, 'Si') vasp_calc.set_computer(code.get_computer()) vasp_calc.set_queue_name(queue) vasp_calc.set_resources({ 'num_machines': 1, 'num_mpiprocs_per_machine': 20 }) vasp_calc.label = 'Test VASP run' vasp_calc.store_all() vasp_calc.submit()
def run(): code = Code.get_from_string('wait') calc = CalculationFactory('wait.wait')() calc.use_code(code) calc.set_resources(dict(num_machines=1, tot_num_mpiprocs=1)) calc.set_withmpi(False) calc.set_computer(Computer.get('localhost')) calc.store_all() calc.submit() print('Submitted calculation', calc.pk)
def run(): code = Code.get_from_string('wait_remote') calc = CalculationFactory('wait.wait')() calc.use_code(code) calc.set_resources(dict(num_machines=1, tot_num_mpiprocs=1)) calc.set_withmpi(False) calc.set_computer(Computer.get('monch')) calc.set_queue_name('dphys_compute') calc.set_resources({'num_machines': 1}) calc.store_all() calc.submit() print('Submitted calculation', calc.pk)
def run_wswannier(): input_archive = get_input_archive() code = Code.get_from_string('Wannier90_2.1.0') calc = CalculationFactory('vasp.wswannier')() calc.use_code(code) # Monch calc.set_resources(dict(num_machines=1, tot_num_mpiprocs=1)) calc.set_computer(Computer.get('Monch')) calc.set_queue_name('express_compute') calc.use_data(input_archive) # hard-code parameters for InSb test calc.use_settings( ParameterData(dict=dict( num_wann=14, num_bands=36, dis_num_iter=1000, num_iter=0, dis_win_min=-4.5, dis_win_max=16., dis_froz_min=-4., dis_froz_max=6.5, write_hr=True, use_ws_distance=True, write_xyz=True, write_tb=True, projections=[['In : s; px; py; pz'], ['Sb : px; py; pz']], spinors=True, unit_cell_cart=[[0., 3.2395, 3.2395], [3.2395, 0., 3.2395], [3.2395, 3.2395, 0.]], bands_plot=True, atoms_cart=[['In', 0., 0., 0.], ['Sb', 1.61975, 1.61975, 1.61975]], mp_grid='6 6 6', kpoints=[ list(reversed(x)) for x in itertools. product((0., 1 / 6, 2 / 6, 0.5, -2 / 6, -1 / 6), repeat=3) ], kpoint_path=[ ['G', 0, 0, 0, 'L', 0.5, 0.5, 0.5], ]))) calc.store_all() calc.submit() print('Submitted calculation', calc.pk)