def run_zeopp(self): """It performs the full zeopp calculation for all components.""" if self.ctx.mode == 'standalone' or self.ctx.mode == 'geom_only': zeopp_inputs = self.exposed_inputs(ZeoppCalculation, 'zeopp') dict_merge( zeopp_inputs, { 'metadata': { 'label': "ZeoppResSaVolpoBlock", }, 'structure': self.inputs.structure, 'atomic_radii': self.inputs.zeopp.atomic_radii, }) for key, value in self.ctx.components.get_dict().items(): comp = value['name'] dict_merge( zeopp_inputs, { 'parameters': ZeoppParameters( dict=self.ctx.components[key]['zeopp']), 'metadata': { 'call_link_label': 'run_zeopp_' + comp } }) running = self.submit(ZeoppCalculation, **zeopp_inputs) zeopp_label = "zeopp_{}".format(comp) self.report( "Running zeo++ res, sa, volpo, and block calculation<{}>". format(running.id)) self.to_context(**{zeopp_label: running})
def run_isotherms(self): """Compute isotherms at different temperatures.""" # create inputs: exposed are code and metadata inputs = self.exposed_inputs(HTSWorkChain) inputs['raspa_base']['raspa']['block_pocket'] = {} inputs['geometric'] = self.ctx.geom for comp in self.ctx.comps: if self.ctx.geom['geometric_output'][comp]['Number_of_blocking_spheres'] > 0: inputs['raspa_base']["raspa"]["block_pocket"][comp + "_block_file"] = self.ctx.geom_only.outputs['block_files__' + comp + '_block_file'] # Update the parameters with only one temperature and submit for index, temp in enumerate(self.inputs.parameters['temperature_list']): self.ctx.parameters_singletemp = get_parameters_singletemp(index, self.inputs.parameters) dict_merge( inputs, { 'metadata': { 'label': "Isotherm_{}".format(index), 'call_link_label': 'run_isotherm_{}'.format(index), }, 'parameters': self.ctx.parameters_singletemp } ) running = self.submit(HTSWorkChain, **inputs) self.ctx.current_T_index += 1 self.to_context(**{'isotherm_{}'.format(index): running})
def run_zeopp_res(self): """ It performs the zeopp pore diameter calculation. """ zeopp_input = self.exposed_inputs(ZeoppCalculation, 'zeopp') self.ctx.zeopp_param['zeopp_res'] = self.ctx.default_zeopp_params dict_merge( zeopp_input, { 'metadata': { 'label': "Zeopp Pore Diameter Calculation", 'call_link_label': 'run_zeopp_res' }, 'structure': self.inputs.structure, 'atomic_radii': self.inputs.zeopp.atomic_radii, 'parameters': modify_zeopp_parameters(self.ctx.parameters, ** self.ctx.zeopp_param) }) res = self.submit(ZeoppCalculation, **zeopp_input) self.report( "pk: <{}> | Submitted Zeo++ Pore Diameter Calculation".format( res.pk)) return ToContext(zeopp_res=res)
def run_geometric(self): """Perform Zeo++ block and VOLPO calculation with IsothermWC.""" # create inputs: exposed are code and metadata inputs = self.exposed_inputs(HTSWorkChain) dict_merge( inputs, { 'metadata': { 'label': "IsothermGeometric", 'call_link_label': 'run_geometric', }, } ) running = self.submit(HTSWorkChain, **inputs) self.report("Computing common gemetric properties") return ToContext(geom_only=running)
def run_zeopp(self): """It performs the full zeopp calculation for all components.""" zeopp_inputs = self.exposed_inputs(ZeoppCalculation, 'zeopp') dict_merge( zeopp_inputs, { 'metadata': { 'label': "ZeoppResSaVolpoBlock", 'call_link_label': 'run_zeopp' }, 'structure': self.inputs.structure, 'atomic_radii': self.inputs.zeopp.atomic_radii, 'parameters': ZeoppParameters(dict=self.ctx.components['comp1']['zeopp']), }) running = self.submit(ZeoppCalculation, **zeopp_inputs) self.report( "Running zeo++ res, sa, volpo, and block calculation<{}>".format( running.id)) return ToContext(zeopp=running)
def run_zeopp_visvoro(self): """ It performs the visVoro calculation. """ zeopp_input = self.exposed_inputs(ZeoppCalculation, 'zeopp') dict_merge( zeopp_input, { 'metadata': { 'label': "Zeopp Pore Diameter Calculation", }, 'structure': self.inputs.structure, }) zeopp_input['structure'] = self.inputs.structure zeopp_input['metadata']['label'] = "Zeopp visVoro Calculation" self.ctx.components = update_components( self.inputs.components, self.ctx.zeopp_res.outputs.output_parameters) # All together submission! for key in self.ctx.components.keys(): self.ctx.zeopp_param[ 'zeopp_visvoro'] = self.ctx.default_zeopp_params self.ctx.zeopp_param['probe'] = Str(key) self.ctx.zeopp_param['components'] = self.ctx.components dict_merge( zeopp_input, { 'metadata': { 'call_link_label': 'run_zeopp_visvoro_' + key }, 'parameters': modify_zeopp_parameters(self.ctx.parameters, ** self.ctx.zeopp_param) }) visvoro = self.submit(ZeoppCalculation, **zeopp_input) zeopp_label = "zeopp_{}".format(key) self.to_context(**{zeopp_label: visvoro})