module 'CT_couplings' has no attribute 'R2GC_173_1'

Asked by Zhaowei Song

When I was importing a NLO UFO model I create with Feynrules,I encountered this problem:
UFOError : invalid syntax (object_library.py, line 268)
Then I imported the same model again,I see this problem:
UFOError : 'CT_couplings' has no attribute 'R2GC_173_1'
All these also happen when I generated a NLO UFO model with SMQCD.nlo given by feynrules authors.
What can I do

Question information

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

Well it likely means that your model does not follow the UFO convention...
If you think that the UFO convention is correct for your model, you can put it smewhere online (or send it to me at <email address hidden> <mailto:<email address hidden>> with a link to this issue (707051).
And i can then take a look if this is a MG5aMC issue or a wrong model.

Cheers,

Olivier

> On 20 Jun 2023, at 17:30, Zhaowei Song <email address hidden> wrote:
>
> New question #707051 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/707051
>
> When I was importing a NLO UFO model I create with Feynrules,I encountered this problem:
> UFOError : invalid syntax (object_library.py, line 268)
> Then I imported the same model again,I see this problem:
> UFOError : 'CT_couplings' has no attribute 'R2GC_173_1'
> All these also happen when I generated a NLO UFO model with SMQCD.nlo given by feynrules authors.
> What can I do
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

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

Thanks for the model,

The first time they are an error within the error:
The debug file stated it:
models.import_ufo.InvalidModel: Some couplings have '1' order.
                    This is not allowed in MG.
                    Please defines an additional coupling to your model

During handling of the above exception, another exception occurred:
...
  File "/Users/omattelaer/Documents/git_workspace/version3/models/__init__.py", line 78, in load_model
    raise UFOError(str(error))
models.UFOError: invalid syntax (object_library.py, line 268)

and the second time, the code crash only with the first error (not sure to understand the reason why sometimes the error handling generates a new issue).

But in any case, with the model that you send me you have an issue with the coupling order of some coupling.
Which is per say allowed by the UFO but not allowed by MG5aMC (since it is typically the sign of a mistake within the model)

Cheers,

Olivier

Revision history for this message
Zhaowei Song (zhaowei12345678) said :
#3

Thanks again for your attention.
Would you mind telling me a more detailed solution to this problem?I am not sure what I should do.

Revision history for this message
Zhaowei Song (zhaowei12345678) said :
#4

I just replaced the coupling.py file with one in LO UFO model with the same Lagrangrian.This coupling.py does not have couplings with '1' order.
And the result is:UFOError : module 'couplings' has no attribute 'GC_169'
I am confused for not finding GC_169 in any coupling file

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

That I do not reproduce:

INFO: model loaded from PYTHONPATH: /Users/omattelaer/Desktop/UFOMODEL/Tutorial_NLO
INFO: load particles
INFO: load vertices
CRITICAL: Model with non QCD emission of gluon (found 1 of those).
  This type of model is not fully supported within MG5aMC.
  Restriction on LO dynamical scale and MLM matching/merging can occur for some processes.
  Use such features with care.
DEBUG: MG5 converter defines FFS5 to ProjM(2,1) + ProjP(2,1)
DEBUG: MG5 converter defines FF5 to P(-1,1)*Gamma(-1,2,-2)*ProjM(-2,1) + P(-1,1)*Gamma(-1,2,-2)*ProjP(-2,1)
DEBUG: MG5 converter defines FF6 to ProjM(2,1) + ProjP(2,1)
DEBUG: MG5 converter defines VVVV11 to Metric(1,4)*Metric(2,3) + Metric(1,3)*Metric(2,4) + Metric(1,2)*Metric(3,4)
DEBUG: MG5 converter defines VVVV12 to Metric(1,4)*Metric(2,3) + Metric(1,3)*Metric(2,4)
DEBUG: MG5 converter defines VVVV13 to Metric(1,4)*Metric(2,3) + Metric(1,2)*Metric(3,4)
DEBUG: model prefixing takes 0.022951841354370117
INFO: Change particles name to pass to MG5 convention
Kept definitions of multiparticles p / j / l+ / l- / vl / vl~ unchanged
Defined multiparticle all = g ghg ghg~ a gha gha~ ve vm vt ve~ vm~ vt~ u c t d s b u~ c~ t~ d~ s~ b~ z w+ ghz ghwp ghwm h w- ghz~ ghwp~ ghwm~ e- mu- ta- e+ mu+ ta+

Are you sure that you did not unpack the UFO within the models directory and not within a sub-directory?

Cheers,

Olivier

PS:
[Tutorial_NLO]$ grep GC_169 . -rin
 ./Tutorial_NLO.log:75: >>>> Non positive interaction order QED found for coupling GC_169.
./couplings.py:320:GC_169 = Coupling(name = 'GC_169',
./couplings.py~:320:GC_169 = Coupling(name = 'GC_169',
Binary file ./__pycache__/couplings.cpython-311.pyc matches
Binary file ./__pycache__/vertices.cpython-311.pyc matches
./vertices.py:58: couplings = {(0,0):C.GC_169})

Revision history for this message
Zhaowei Song (zhaowei12345678) said :
#6

Thank you for your answer
I just change all "1" order to QED in coupling.py with the original Tutorial.NLO.but the error:module 'CT_couplings' has no attribute 'R2GC_173_1'still exist
This is content of debug file,I wonder what lead to this problem and what I can do to fix it.

Traceback (most recent call last):
  File "/home/parallels/Downloads/MG5_aMC_v3.4.0.RC2/MG5_aMC_v3_4_0_RC2/models/__init__.py", line 76, in load_model
    __import__(path_split[-1])
  File "/home/parallels/Downloads/MG5_aMC_v3.4.0.RC2/MG5_aMC_v3_4_0_RC2/models/Tutorial_NLO/__init__.py", line 38, in <module>
    import CT_vertices
  File "/home/parallels/Downloads/MG5_aMC_v3.4.0.RC2/MG5_aMC_v3_4_0_RC2/models/Tutorial_NLO/CT_vertices.py", line 18, in <module>
    couplings = {(0,2,4):C.R2GC_173_1,(0,0,0):C.R2GC_179_9,(0,0,2):C.R2GC_179_10,(0,0,3):C.R2GC_179_11,(0,0,5):C.R2GC_179_12,(0,0,6):C.R2GC_179_13,(0,0,7):C.R2GC_179_14,(0,1,1):C.R2GC_176_4})
AttributeError: module 'CT_couplings' has no attribute 'R2GC_173_1'

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

The model that you send me has it:

[Tutorial_NLO]$ grep R2GC_173_1 . -rin
./CT_couplings.py:12:R2GC_173_1 = Coupling(name = 'R2GC_173_1',
Binary file ./__pycache__/CT_couplings.cpython-311.pyc matches
Binary file ./__pycache__/CT_vertices.cpython-311.pyc matches
./CT_vertices.py:18: couplings = {(0,2,4):C.R2GC_173_1,(0,0,0):C.R2GC_179_9,(0,0,2):C.R2GC_179_10,(0,0,3):C.R2GC_179_11,(0,0,5):C.R2GC_179_12,(0,0,6):C.R2GC_179_13,(0,0,7):C.R2GC_179_14,(0,1,1):C.R2GC_176_4})

and I do not reproduce your error neither with the LTS version or with the latest version...
Since you use a old release candidate version, maybe one think to test is to use one of the above version?

Cheers,

Olivier

Can you help with this problem?

Provide an answer of your own, or ask Zhaowei Song for more information if necessary.

To post a message you must log in.