def do_add(self, line, *args, **opt): args = self.split_arg(line) # Check the validity of the arguments self.check_add(args) if args[0] == 'model': return self.add_model(args[1:]) elif args[0] != 'process': raise self.InvalidCmd( "The add command can only be used with process or model") else: line = ' '.join(args[1:]) proc_type = self.extract_process_type(line) if proc_type[1] not in ['real', 'LOonly']: run_interface.check_compiler(self.options, block=False) self.validate_model(proc_type[1]) #now generate the amplitudes as usual #self.options['group_subprocesses'] = 'False' collect_mirror_procs = False ignore_six_quark_processes = self.options['ignore_six_quark_processes'] if ',' in line: myprocdef, line = mg_interface.MadGraphCmd.extract_decay_chain_process( self, line) if myprocdef.are_decays_perturbed(): raise MadGraph5Error("Decay processes cannot be perturbed") else: myprocdef = mg_interface.MadGraphCmd.extract_process(self, line) self.proc_validity(myprocdef, 'aMCatNLO_%s' % proc_type[1]) # if myprocdef['perturbation_couplings']!=['QCD']: # message = ""FKS for reals only available in QCD for now, you asked %s" \ # % ', '.join(myprocdef['perturbation_couplings'])" # logger.info("%s. Checking for loop induced") # new_line = ln # # # raise self.InvalidCmd("FKS for reals only available in QCD for now, you asked %s" \ # % ', '.join(myprocdef['perturbation_couplings'])) try: self._fks_multi_proc.add( fks_base.FKSMultiProcess(myprocdef, collect_mirror_procs, ignore_six_quark_processes, OLP=self.options['OLP'])) except AttributeError: self._fks_multi_proc = fks_base.FKSMultiProcess( myprocdef, collect_mirror_procs, ignore_six_quark_processes, OLP=self.options['OLP'])
def do_add(self, line, *args,**opt): args = self.split_arg(line) # Check the validity of the arguments self.check_add(args) if args[0] == 'model': return self.add_model(args[1:]) elif args[0] != 'process': raise self.InvalidCmd("The add command can only be used with process or model") else: line = ' '.join(args[1:]) proc_type=self.extract_process_type(line) if proc_type[1] != 'real': run_interface.check_compiler(self.options, block=False) self.validate_model(proc_type[1]) #now generate the amplitudes as usual #self.options['group_subprocesses'] = 'False' collect_mirror_procs = False ignore_six_quark_processes = self.options['ignore_six_quark_processes'] if ',' in line: myprocdef, line = mg_interface.MadGraphCmd.extract_decay_chain_process(self,line) if myprocdef.are_decays_perturbed(): raise MadGraph5Error("Decay processes cannot be perturbed") else: myprocdef = mg_interface.MadGraphCmd.extract_process(self,line) self.proc_validity(myprocdef,'aMCatNLO_%s'%proc_type[1]) if myprocdef['perturbation_couplings']!=['QCD']: raise self.InvalidCmd("FKS for reals only available in QCD for now, you asked %s" \ % ', '.join(myprocdef['perturbation_couplings'])) try: self._fks_multi_proc.add(fks_base.FKSMultiProcess(myprocdef, collect_mirror_procs, ignore_six_quark_processes, OLP=self.options['OLP'])) except AttributeError: self._fks_multi_proc = fks_base.FKSMultiProcess(myprocdef, collect_mirror_procs, ignore_six_quark_processes, OLP=self.options['OLP'])
def do_add(self, line, *args, **opt): args = self.split_arg(line) # Check the validity of the arguments self.check_add(args) if args[0] == 'model': return self.add_model(args[1:]) elif args[0] != 'process': raise self.InvalidCmd( "The add command can only be used with process or model") else: line = ' '.join(args[1:]) proc_type = self.extract_process_type(line) if proc_type[1] not in ['real', 'LOonly']: run_interface.check_compiler(self.options, block=False) #validate_model will reset self._generate_info; to avoid #this store it geninfo = self._generate_info self.validate_model(proc_type[1], coupling_type=proc_type[2]) self._generate_info = geninfo #now generate the amplitudes as usual #self.options['group_subprocesses'] = 'False' collect_mirror_procs = False ignore_six_quark_processes = self.options['ignore_six_quark_processes'] if ',' in line: myprocdef, line = mg_interface.MadGraphCmd.extract_decay_chain_process( self, line) if myprocdef.are_decays_perturbed(): raise MadGraph5Error("Decay processes cannot be perturbed") else: myprocdef = mg_interface.MadGraphCmd.extract_process(self, line) self.proc_validity(myprocdef, 'aMCatNLO_%s' % proc_type[1]) self._curr_proc_defs.append(myprocdef) # if myprocdef['perturbation_couplings']!=['QCD']: # message = ""FKS for reals only available in QCD for now, you asked %s" \ # % ', '.join(myprocdef['perturbation_couplings'])" # logger.info("%s. Checking for loop induced") # new_line = ln # # # raise self.InvalidCmd("FKS for reals only available in QCD for now, you asked %s" \ # % ', '.join(myprocdef['perturbation_couplings'])) ## # if the new nlo process generation mode is enabled, the number of cores to be # used has to be passed # ncores_for_proc_gen has the following meaning # 0 : do things the old way # > 0 use ncores_for_proc_gen # -1 : use all cores if self.options['low_mem_multicore_nlo_generation']: if self.options['nb_core']: self.ncores_for_proc_gen = int(self.options['nb_core']) else: self.ncores_for_proc_gen = -1 else: self.ncores_for_proc_gen = 0 # this is the options dictionary to pass to the FKSMultiProcess fks_options = { 'OLP': self.options['OLP'], 'ignore_six_quark_processes': self.options['ignore_six_quark_processes'], 'ncores_for_proc_gen': self.ncores_for_proc_gen } try: self._fks_multi_proc.add( fks_base.FKSMultiProcess(myprocdef, fks_options)) except AttributeError: self._fks_multi_proc = fks_base.FKSMultiProcess( myprocdef, fks_options)
def do_add(self, line, *args,**opt): args = self.split_arg(line) # Check the validity of the arguments self.check_add(args) if args[0] == 'model': return self.add_model(args[1:]) elif args[0] != 'process': raise self.InvalidCmd("The add command can only be used with process or model") else: line = ' '.join(args[1:]) proc_type=self.extract_process_type(line) if proc_type[1] not in ['real', 'LOonly']: run_interface.check_compiler(self.options, block=False) self.validate_model(proc_type[1]) #now generate the amplitudes as usual #self.options['group_subprocesses'] = 'False' collect_mirror_procs = False ignore_six_quark_processes = self.options['ignore_six_quark_processes'] if ',' in line: myprocdef, line = mg_interface.MadGraphCmd.extract_decay_chain_process(self,line) if myprocdef.are_decays_perturbed(): raise MadGraph5Error("Decay processes cannot be perturbed") else: myprocdef = mg_interface.MadGraphCmd.extract_process(self,line) self.proc_validity(myprocdef,'aMCatNLO_%s'%proc_type[1]) # if myprocdef['perturbation_couplings']!=['QCD']: # message = ""FKS for reals only available in QCD for now, you asked %s" \ # % ', '.join(myprocdef['perturbation_couplings'])" # logger.info("%s. Checking for loop induced") # new_line = ln # # # raise self.InvalidCmd("FKS for reals only available in QCD for now, you asked %s" \ # % ', '.join(myprocdef['perturbation_couplings'])) ## # if the new nlo process generation mode is enabled, the number of cores to be # used has to be passed # ncores_for_proc_gen has the following meaning # 0 : do things the old way # > 0 use ncores_for_proc_gen # -1 : use all cores if self.options['low_mem_multicore_nlo_generation']: if self.options['nb_core']: self.ncores_for_proc_gen = int(self.options['nb_core']) else: self.ncores_for_proc_gen = -1 else: self.ncores_for_proc_gen = 0 # this is the options dictionary to pass to the FKSMultiProcess fks_options = {'OLP': self.options['OLP'], 'ignore_six_quark_processes': self.options['ignore_six_quark_processes'], 'ncores_for_proc_gen': self.ncores_for_proc_gen} try: self._fks_multi_proc.add(fks_base.FKSMultiProcess(myprocdef,fks_options)) except AttributeError: self._fks_multi_proc = fks_base.FKSMultiProcess(myprocdef,fks_options)