Error importing model into MadGraph

Asked by ayon patra on 2018-08-18

Hi,

I am trying to import a model into MadGraph. The model files were generated by SARAH-4.8.6 but when I try to import the model into MadGraph_2.6.1 or 2.6.3.2, I get the following error message:

Command "import model ./models/LRTSUSYN" interrupted with error:
TypeError : bad operand type for unary -: 'NoneType'
Please report this bug on https://bugs.launchpad.net/mg5amcnlo
More information is found in 'MG5_debug'.
Please attach this file to your report.

The debug file has the following:

#************************************************************
#* MadGraph5_aMC@NLO *
#* *
#* * * *
#* * * * * *
#* * * * * 5 * * * * *
#* * * * * *
#* * * *
#* *
#* *
#* VERSION 2.6.3.2 2018-06-22 *
#* *
#* The MadGraph5_aMC@NLO Development Team - Find us at *
#* https://server06.fynu.ucl.ac.be/projects/madgraph *
#* *
#************************************************************
#* *
#* Command File for MadGraph5_aMC@NLO *
#* *
#* run as ./bin/mg5_aMC filename *
#* *
#************************************************************
set default_unset_couplings 99
set group_subprocesses Auto
set ignore_six_quark_processes False
set loop_optimized_output True
set loop_color_flows False
set gauge unitary
set complex_mass_scheme False
set max_npoint_for_channel 0
import model sm
define p = g u c d s u~ c~ d~ s~
define j = g u c d s u~ c~ d~ s~
define l+ = e+ mu+
define l- = e- mu-
define vl = ve vm vt
define vl~ = ve~ vm~ vt~
import model ./models/LRTSUSYN/
Traceback (most recent call last):
  File "/home/ayon/Software/MG5_aMC_v2_6_1/madgraph/interface/extended_cmd.py", line 1501, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/home/ayon/Software/MG5_aMC_v2_6_1/madgraph/interface/extended_cmd.py", line 1450, in onecmd_orig
    return func(arg, **opt)
  File "/home/ayon/Software/MG5_aMC_v2_6_1/madgraph/interface/master_interface.py", line 274, in do_import
    self.cmd.do_import(self, *args, **opts)
  File "/home/ayon/Software/MG5_aMC_v2_6_1/madgraph/interface/madgraph_interface.py", line 5213, in do_import
    complex_mass_scheme=self.options['complex_mass_scheme'])
  File "/home/ayon/Software/MG5_aMC_v2_6_1/models/import_ufo.py", line 215, in import_model
    model = import_full_model(model_path, decay, prefix)
  File "/home/ayon/Software/MG5_aMC_v2_6_1/models/import_ufo.py", line 359, in import_full_model
    ufo_model = ufomodels.load_model(model_path, decay)
  File "/home/ayon/Software/MG5_aMC_v2_6_1/models/__init__.py", line 51, in load_model
    __import__(path_split[-1])
  File "./models/LRTSUSYN/__init__.py", line 2, in <module>
    import particles
  File "./models/LRTSUSYN/particles.py", line 1193, in <module>
    gZpc = gZp.anti()
  File "./models/LRTSUSYN/object_library.py", line 138, in anti
    return Particle(-self.pdg_code, self.antiname, self.name, self.spin, newcolor, self.mass, self.width,
TypeError: bad operand type for unary -: 'NoneType'
                          MadGraph5_aMC@NLO Options
                          ----------------
        complex_mass_scheme : False
    default_unset_couplings : 99
                      gauge : unitary
         group_subprocesses : Auto
  ignore_six_quark_processes : False
           loop_color_flows : False
      loop_optimized_output : True
  low_mem_multicore_nlo_generation : False
     max_npoint_for_channel : 0
               stdout_level : 20 (user set)

                         MadEvent Options
                          ----------------
     automatic_html_opening : True
                    nb_core : None
        notification_center : True
                   run_mode : 2

                      Configuration Options
                      ---------------------
                        OLP : MadLoop
                    amcfast : amcfast-config
                   applgrid : applgrid-config
                auto_update : 7
         cluster_local_path : None
           cluster_nb_retry : 1
              cluster_queue : None (user set)
         cluster_retry_wait : 300
               cluster_size : 100
      cluster_status_update : (600, 30)
          cluster_temp_path : None
               cluster_type : condor
                    collier : None (user set)
               cpp_compiler : None
             crash_on_error : False
               delphes_path : ./Delphes
                 eps_viewer : None
        exrootanalysis_path : ./ExRootAnalysis
              f2py_compiler : None
                    fastjet : None (user set)
           fortran_compiler : None
                      golem : None (user set)
                 hepmc_path : None (user set)
                  hwpp_path : None (user set)
                     lhapdf : /home/ayon/Software/MG5_aMC_v2_6_1/HEPTools/lhapdf6/bin/lhapdf-config (user set)
          madanalysis5_path : /home/ayon/Software/MG5_aMC_v2_6_1/HEPTools/madanalysis5/madanalysis5 (user set)
           madanalysis_path : ./MadAnalysis
  mg5amc_py8_interface_path : /home/ayon/Software/MG5_aMC_v2_6_1/HEPTools/MG5aMC_PY8_interface (user set)
                      ninja : /home/ayon/Software/MG5_aMC_v2_6_1/HEPTools/lib (user set)
        output_dependencies : external
                      pjfry : None (user set)
            pythia-pgs_path : ./pythia-pgs
               pythia8_path : ./HEPTools/pythia8
                    samurai : None
               syscalc_path : ./SysCalc
                    td_path : ./td
                text_editor : None
                thepeg_path : None (user set)
                    timeout : 60
                web_browser : None

I will be much obliged if you please help me with the issue.

Thanks,
Ayon

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Mattelaer
Solved:
2018-08-18
Last query:
2018-08-18
Last reply:
2018-08-18

Hi,

Likely to be a SARAH issue.

Can you put here the defintion of the
gZp

particle since it seems that this is the problem (I would bet that that pdg code of that particle is not correctly define but this is just a bet)

Cheers,

Olivier

> On 18 Aug 2018, at 11:08, ayon patra <email address hidden> wrote:
>
> New question #672452 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/672452
>
> Hi,
>
> I am trying to import a model into MadGraph. The model files were generated by SARAH-4.8.6 but when I try to import the model into MadGraph_2.6.1 or 2.6.3.2, I get the following error message:
>
> Command "import model ./models/LRTSUSYN" interrupted with error:
> TypeError : bad operand type for unary -: 'NoneType'
> Please report this bug on https://bugs.launchpad.net/mg5amcnlo
> More information is found in 'MG5_debug'.
> Please attach this file to your report.
>
> The debug file has the following:
>
> #************************************************************
> #* MadGraph5_aMC@NLO *
> #* *
> #* * * *
> #* * * * * *
> #* * * * * 5 * * * * *
> #* * * * * *
> #* * * *
> #* *
> #* *
> #* VERSION 2.6.3.2 2018-06-22 *
> #* *
> #* The MadGraph5_aMC@NLO Development Team - Find us at *
> #* https://server06.fynu.ucl.ac.be/projects/madgraph *
> #* *
> #************************************************************
> #* *
> #* Command File for MadGraph5_aMC@NLO *
> #* *
> #* run as ./bin/mg5_aMC filename *
> #* *
> #************************************************************
> set default_unset_couplings 99
> set group_subprocesses Auto
> set ignore_six_quark_processes False
> set loop_optimized_output True
> set loop_color_flows False
> set gauge unitary
> set complex_mass_scheme False
> set max_npoint_for_channel 0
> import model sm
> define p = g u c d s u~ c~ d~ s~
> define j = g u c d s u~ c~ d~ s~
> define l+ = e+ mu+
> define l- = e- mu-
> define vl = ve vm vt
> define vl~ = ve~ vm~ vt~
> import model ./models/LRTSUSYN/
> Traceback (most recent call last):
> File "/home/ayon/Software/MG5_aMC_v2_6_1/madgraph/interface/extended_cmd.py", line 1501, in onecmd
> return self.onecmd_orig(line, **opt)
> File "/home/ayon/Software/MG5_aMC_v2_6_1/madgraph/interface/extended_cmd.py", line 1450, in onecmd_orig
> return func(arg, **opt)
> File "/home/ayon/Software/MG5_aMC_v2_6_1/madgraph/interface/master_interface.py", line 274, in do_import
> self.cmd.do_import(self, *args, **opts)
> File "/home/ayon/Software/MG5_aMC_v2_6_1/madgraph/interface/madgraph_interface.py", line 5213, in do_import
> complex_mass_scheme=self.options['complex_mass_scheme'])
> File "/home/ayon/Software/MG5_aMC_v2_6_1/models/import_ufo.py", line 215, in import_model
> model = import_full_model(model_path, decay, prefix)
> File "/home/ayon/Software/MG5_aMC_v2_6_1/models/import_ufo.py", line 359, in import_full_model
> ufo_model = ufomodels.load_model(model_path, decay)
> File "/home/ayon/Software/MG5_aMC_v2_6_1/models/__init__.py", line 51, in load_model
> __import__(path_split[-1])
> File "./models/LRTSUSYN/__init__.py", line 2, in <module>
> import particles
> File "./models/LRTSUSYN/particles.py", line 1193, in <module>
> gZpc = gZp.anti()
> File "./models/LRTSUSYN/object_library.py", line 138, in anti
> return Particle(-self.pdg_code, self.antiname, self.name, self.spin, newcolor, self.mass, self.width,
> TypeError: bad operand type for unary -: 'NoneType'
> MadGraph5_aMC@NLO Options
> ----------------
> complex_mass_scheme : False
> default_unset_couplings : 99
> gauge : unitary
> group_subprocesses : Auto
> ignore_six_quark_processes : False
> loop_color_flows : False
> loop_optimized_output : True
> low_mem_multicore_nlo_generation : False
> max_npoint_for_channel : 0
> stdout_level : 20 (user set)
>
> MadEvent Options
> ----------------
> automatic_html_opening : True
> nb_core : None
> notification_center : True
> run_mode : 2
>
> Configuration Options
> ---------------------
> OLP : MadLoop
> amcfast : amcfast-config
> applgrid : applgrid-config
> auto_update : 7
> cluster_local_path : None
> cluster_nb_retry : 1
> cluster_queue : None (user set)
> cluster_retry_wait : 300
> cluster_size : 100
> cluster_status_update : (600, 30)
> cluster_temp_path : None
> cluster_type : condor
> collier : None (user set)
> cpp_compiler : None
> crash_on_error : False
> delphes_path : ./Delphes
> eps_viewer : None
> exrootanalysis_path : ./ExRootAnalysis
> f2py_compiler : None
> fastjet : None (user set)
> fortran_compiler : None
> golem : None (user set)
> hepmc_path : None (user set)
> hwpp_path : None (user set)
> lhapdf : /home/ayon/Software/MG5_aMC_v2_6_1/HEPTools/lhapdf6/bin/lhapdf-config (user set)
> madanalysis5_path : /home/ayon/Software/MG5_aMC_v2_6_1/HEPTools/madanalysis5/madanalysis5 (user set)
> madanalysis_path : ./MadAnalysis
> mg5amc_py8_interface_path : /home/ayon/Software/MG5_aMC_v2_6_1/HEPTools/MG5aMC_PY8_interface (user set)
> ninja : /home/ayon/Software/MG5_aMC_v2_6_1/HEPTools/lib (user set)
> output_dependencies : external
> pjfry : None (user set)
> pythia-pgs_path : ./pythia-pgs
> pythia8_path : ./HEPTools/pythia8
> samurai : None
> syscalc_path : ./SysCalc
> td_path : ./td
> text_editor : None
> thepeg_path : None (user set)
> timeout : 60
> web_browser : None
>
> I will be much obliged if you please help me with the issue.
>
> Thanks,
> Ayon
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

ayon patra (ayonpatra84) said : #2

Dear Olivier,

  Thanks a lot for your suggestion. I was using wrong pdg numbers for several particles and hence those errors were arising. I have changed the pdg codes to their correct values in SARAH files and now it is running properly and I can import the model into MadGraph.

  Thanks once again.

Ayon

ayon patra (ayonpatra84) said : #3

Thanks Olivier Mattelaer, that solved my question.