"Output" raises KeyError(0,)

Asked by Vincent Groff

I have imported a model I wrote myself in FeynRules.
I've generated the interaction I want which worked fine.
However, once I run "output blah" MG crashes with a KeyError.

Here is the debug log:
Traceback (most recent call last):
  File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/madgraph/interface/extended_cmd.py", line 1412, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/madgraph/interface/extended_cmd.py", line 1367, in onecmd_orig
    return func(arg, **opt)
  File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/madgraph/interface/master_interface.py", line 287, in do_output
    self.cmd.do_output(self, line, *args, **opts)
  File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/madgraph/interface/madgraph_interface.py", line 7433, in do_output
    self.finalize(nojpeg, flaglist=flaglist)
  File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/madgraph/interface/madgraph_interface.py", line 7720, in finalize
    wanted_couplings)
  File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/madgraph/iolibs/export_v4.py", line 3313, in convert_model
    wanted_lorentz, wanted_couplings)
  File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/madgraph/iolibs/export_v4.py", line 879, in convert_model
    aloha_model.write(write_dir, 'Fortran')
  File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/aloha/create_aloha.py", line 1010, in write
    abstract_routine.write(output_dir, language)
  File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/aloha/create_aloha.py", line 89, in write
    text = writer.write(mode=mode, **opt)
  File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/aloha/aloha_writers.py", line 241, in write
    core_text = self.define_expression()
  File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/aloha/aloha_writers.py", line 765, in define_expression
    formatted = self.write_obj(numerator.get_rep([0]))
  File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/aloha/aloha_lib.py", line 1095, in get_rep
    return self[tuple(indices)]
KeyError: (0,)

Thanks for all your help,

Vincent

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Vincent Groff
Solved:
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi,

Looks like that (at least) one of your lorentz structure is badly defined.
Looks like that the indices present in the lorentz structure are not the one expected.

Cheers,

Olivier

> On Jan 13, 2017, at 13:33, Vincent Groff <email address hidden> wrote:
>
> New question #439035 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/439035
>
> I have imported a model I wrote myself in FeynRules.
> I've generated the interaction I want which worked fine.
> However, once I run "output blah" MG crashes with a KeyError.
>
> Here is the debug log:
> Traceback (most recent call last):
> File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/madgraph/interface/extended_cmd.py", line 1412, in onecmd
> return self.onecmd_orig(line, **opt)
> File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/madgraph/interface/extended_cmd.py", line 1367, in onecmd_orig
> return func(arg, **opt)
> File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/madgraph/interface/master_interface.py", line 287, in do_output
> self.cmd.do_output(self, line, *args, **opts)
> File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/madgraph/interface/madgraph_interface.py", line 7433, in do_output
> self.finalize(nojpeg, flaglist=flaglist)
> File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/madgraph/interface/madgraph_interface.py", line 7720, in finalize
> wanted_couplings)
> File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/madgraph/iolibs/export_v4.py", line 3313, in convert_model
> wanted_lorentz, wanted_couplings)
> File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/madgraph/iolibs/export_v4.py", line 879, in convert_model
> aloha_model.write(write_dir, 'Fortran')
> File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/aloha/create_aloha.py", line 1010, in write
> abstract_routine.write(output_dir, language)
> File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/aloha/create_aloha.py", line 89, in write
> text = writer.write(mode=mode, **opt)
> File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/aloha/aloha_writers.py", line 241, in write
> core_text = self.define_expression()
> File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/aloha/aloha_writers.py", line 765, in define_expression
> formatted = self.write_obj(numerator.get_rep([0]))
> File "/mt/home/vgroff/Downloads/MG5_aMC_v2_5_2/aloha/aloha_lib.py", line 1095, in get_rep
> return self[tuple(indices)]
> KeyError: (0,)
>
> Thanks for all your help,
>
> Vincent
>
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Vincent Groff (vgroff) said :
#2

Indeed, the last bits of output before MG crashes is:
ALOHA: aloha creates VSS1 routines
ALOHA: aloha creates VVSS1 routines
so it must be VVSS1 causing it to crash.

So where would I be looking for the Lorentz structure? Im guessing in Lorentz.py?

Lorentz.py looks like:

VSS1 = Lorentz(name = 'VSS1',
               spins = [ 3, 1, 1 ],
               structure = 'P(1,2) - P(1,3)')

VVSS1 = Lorentz(name = 'VVSS1',
                spins = [ 3, 3, 1, 1 ],
                structure = '1')

Which looks like it's what I need.
The propagator of this vertex is just 2*i*g_{uv} (which seems to be done in couplings.py) so "1" seems correct.
Perhaps there is another way of writing this structure?

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#3

Hi,

> The propagator of this vertex is just 2*i*g_{uv} (which seems to be done in couplings.py) so “1" seems correct.

I’m not sure what you mean by “propagator” of a vertex. (For me a propagator is associated to a particle not to a vertex)
In any case, your lorentz structure is associated to two vector particle. Therefore you should have two lorentz indices associate to that structure.
If I use “g_{uv}” as structure then you will need:

> VVSS1 = Lorentz(name = 'VVSS1',
> spins = [ 3, 3, 1, 1 ],
> structure = ‘Metric(1,2)’)

Cheers,

Olivier

> On Jan 13, 2017, at 15:47, Vincent Groff <email address hidden> wrote:
>
> Question #439035 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/439035
>
> Status: Answered => Open
>
> Vincent Groff is still having a problem:
> Indeed, the last bits of output before MG crashes is:
> ALOHA: aloha creates VSS1 routines
> ALOHA: aloha creates VVSS1 routines
> so it must be VVSS1 causing it to crash.
>
> So where would I be looking for the Lorentz structure? Im guessing in
> Lorentz.py?
>
> Lorentz.py looks like:
>
> VSS1 = Lorentz(name = 'VSS1',
> spins = [ 3, 1, 1 ],
> structure = 'P(1,2) - P(1,3)')
>
> VVSS1 = Lorentz(name = 'VVSS1',
> spins = [ 3, 3, 1, 1 ],
> structure = '1')
>
> Which looks like it's what I need.
> The propagator of this vertex is just 2*i*g_{uv} (which seems to be done in couplings.py) so "1" seems correct.
> Perhaps there is another way of writing this structure?
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Vincent Groff (vgroff) said :
#4

Brilliant.

Thank you so much,
Vincent