Package madgraph :: Package interface :: Module madgraph_interface :: Class MadGraphCmd
[hide private]
[frames] | no frames]

Class MadGraphCmd

source code

                  object --+        
                           |        
        extended_cmd.HelpCmd --+    
                               |    
                       HelpToCmd --+
                                   |
                  object --+       |
                           |       |
       extended_cmd.CheckCmd --+   |
                               |   |
                CheckValidForCmd --+
                                   |
                  object --+       |
                           |       |
    extended_cmd.CompleteCmd --+   |
                               |   |
                  CompleteForCmd --+
                                   |
              object --+           |
                       |           |
   extended_cmd.CheckCmd --+       |
                           |       |
              object --+   |       |
                       |   |       |
    extended_cmd.HelpCmd --+       |
                           |       |
              object --+   |       |
                       |   |       |
extended_cmd.CompleteCmd --+       |
                           |       |
             cmd.Cmd --+   |       |
                       |   |       |
   extended_cmd.BasicCmd --+       |
                           |       |
            extended_cmd.Cmd --+   |
                               |   |
                     CmdExtended --+
                                   |
                                  MadGraphCmd
Known Subclasses:

The command line processor of MadGraph

Nested Classes [hide private]

Inherited from CheckValidForCmd: RWError

Inherited from CmdExtended: ConfigurationError, InvalidCmd

Instance Methods [hide private]
 
preloop(self)
Initializing before starting the main loop
source code
 
__init__(self, mgme_dir='', *completekey, **stdin)
add a tracker of the history
source code
 
do_quit(self, line)
Do quit
source code
 
do_add(self, line)
Generate an amplitude for a given process and add to existing amplitudes
source code
 
do_define(self, line, log=True)
Define a multiparticle
source code
 
do_display(self, line, output=sys.stdout)
Display current internal status
source code
 
multiparticle_string(self, key)
Returns a nicely formatted string for the multiparticle
source code
 
do_tutorial(self, line)
Activate/deactivate the tutorial mode.
source code
 
draw(self, line)
draw the Feynman diagram for the given process
source code
 
do_check(self, line)
Check a given process or set of processes
source code
 
do_generate(self, line)
Generate an amplitude for a given process
source code
 
extract_process(self, line, proc_number=0, overall_orders={})
Extract a process definition from a string.
source code
 
extract_particle_ids(self, args)
Extract particle ids from a list of particle names.
source code
 
optimize_order(self, pdg_list)
Optimize the order of particles in a pdg list, so that similar particles are next to each other.
source code
 
extract_decay_chain_process(self, line, level_down=False)
Recursively extract a decay chain process definition from a string.
source code
 
do_import(self, line)
Import files with external formats
source code
 
import_ufo_model(self, model_name)
import the UFO model
source code
 
process_model(self)
Set variables _particle_names and _couplings for tab completion, define multiparticles
source code
 
import_mg4_proc_card(self, filepath)
read a V4 proc card, convert it and run it in mg5
source code
 
add_default_multiparticles(self)
add default particle from file interface.multiparticles_default.txt
source code
 
do_install(self, line)
Install optional package from the MG suite.
source code
 
set_configuration(self, config_path=None, test=False)
assign all configuration variable from file ./input/mg5_configuration.txt.
source code
 
check_for_export_dir(self, filepath)
Check if the files is in a valid export directory and assign it to export path if if is
source code
 
do_launch(self, line)
Ask for editing the parameter and then Execute the code (madevent/standalone/...)
source code
 
do_load(self, line)
Not in help: Load information from file
source code
 
do_save(self, line, check=True)
Not in help: Save information to file
source code
 
do_set(self, line, log=True)
Set an option, which will be default for coming generations/outputs
source code
 
do_open(self, line)
Open a text file/ eps file / html file
source code
 
do_output(self, line)
Initialize a new Template or reinitialize one
source code
 
export(self, nojpeg=False, main_file_name='')
Export a generated amplitude to file
source code
 
finalize(self, nojpeg, online=False)
Make the html output, write proc_card_mg5.dat and create madevent.tar.gz for a MadEvent directory
source code
 
do_help(self, line)
propose some usefull possible action
source code

Inherited from HelpToCmd: help_add, help_check, help_define, help_display, help_generate, help_import, help_install, help_launch, help_load, help_open, help_output, help_save, help_set, help_tutorial

Inherited from CheckValidForCmd: check_add, check_check, check_define, check_display, check_draw, check_generate, check_import, check_install, check_launch, check_load, check_open, check_output, check_process_format, check_save, check_set, find_import_type, find_output_type, get_default_path

Inherited from CompleteForCmd: aloha_complete_output, complete_add, complete_check, complete_define, complete_display, complete_draw, complete_generate, complete_import, complete_install, complete_launch, complete_load, complete_open, complete_output, complete_save, complete_set, complete_tutorial, find_restrict_card, model_completion

Inherited from CmdExtended: get_history_header, postcmd

Inherited from extended_cmd.Cmd: ask, check_answer_in_input_file, check_stored_line, clean_history, correct_splitting, default, define_child_cmd_interface, do_EOF, do_exit, do_history, emptyline, exec_cmd, import_command_file, nice_config_error, nice_error_handling, nice_user_error, onecmd, postloop, precmd, run_cmd, stop_on_keyboard_stop, store_line, write_configuration

Inherited from extended_cmd.CheckCmd: check_history

Inherited from extended_cmd.HelpCmd: help_EOF, help_help, help_history, help_quit

Inherited from extended_cmd.CompleteCmd: complete_history

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Inherited from extended_cmd.BasicCmd: complete, deal_multiple_categories, getTerminalSize, print_suggestions

Inherited from cmd.Cmd: cmdloop, columnize, complete_help, completedefault, completenames, get_names, parseline, print_topics

Static Methods [hide private]

Inherited from extended_cmd.Cmd: list_completion, path_completion, split_arg, timed_input

Class Variables [hide private]
  writing_dir = '.'
  _display_opts = ['particles', 'interactions', 'processes', 'di...
  _add_opts = ['process']
  _save_opts = ['model', 'processes', 'options']
  _tutorial_opts = ['start', 'stop']
  _check_opts = ['full', 'permutation', 'gauge', 'lorentz_invari...
  _import_formats = ['model_v4', 'model', 'proc_v4', 'command', ...
  _install_opts = ['pythia-pgs', 'Delphes', 'MadAnalysis', 'ExRo...
  _v4_export_formats = ['madevent', 'standalone', 'matrix']
  _export_formats = ['madevent', 'standalone', 'matrix', 'standa...
  _set_options = ['group_subprocesses', 'ignore_six_quark_proces...
  _curr_model = None
hash(x)
  _curr_amps = []
  _curr_matrix_elements = ...
  _curr_fortran_model = None
hash(x)
  _curr_cpp_model = None
hash(x)
  _curr_exporter = None
hash(x)
  _done_export = False

Inherited from CmdExtended: config_debug, debug_output, error_debug, keyboard_stop_msg, next_possibility

Inherited from extended_cmd.Cmd: history_header

Inherited from cmd.Cmd: doc_header, doc_leader, identchars, intro, lastcmd, misc_header, nohelp, prompt, ruler, undoc_header, use_rawinput

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

preloop(self)

source code 

Initializing before starting the main loop

Overrides: cmd.Cmd.preloop

__init__(self, mgme_dir='', *completekey, **stdin)
(Constructor)

source code 

add a tracker of the history

Overrides: cmd.Cmd.__init__

do_quit(self, line)

source code 

Do quit

Overrides: extended_cmd.Cmd.do_quit

do_display(self, line, output=sys.stdout)

source code 

Display current internal status

Overrides: extended_cmd.Cmd.do_display

extract_process(self, line, proc_number=0, overall_orders={})

source code 

Extract a process definition from a string. Returns a ProcessDefinition.

extract_particle_ids(self, args)

source code 

Extract particle ids from a list of particle names. If there are | in the list, this corresponds to an or-list, which is represented as a list of id lists. An or-list is used to allow multiple required s-channel propagators to be specified (e.g. Z/gamma).

optimize_order(self, pdg_list)

source code 
Optimize the order of particles in a pdg list, so that
similar particles are next to each other. Sort according to:
1. pdg > 0, 2. spin, 3. color, 4. mass > 0

extract_decay_chain_process(self, line, level_down=False)

source code 

Recursively extract a decay chain process definition from a string. Returns a ProcessDefinition.

set_configuration(self, config_path=None, test=False)

source code 

assign all configuration variable from file ./input/mg5_configuration.txt. assign to default if not define

do_save(self, line, check=True)

source code 

Not in help: Save information to file

Overrides: extended_cmd.Cmd.do_save

do_help(self, line)

source code 

propose some usefull possible action

Overrides: cmd.Cmd.do_help

Class Variable Details [hide private]

_display_opts

Value:
['particles',
 'interactions',
 'processes',
 'diagrams',
 'diagrams_text',
 'multiparticles',
 'couplings',
 'lorentz',
...

_check_opts

Value:
['full', 'permutation', 'gauge', 'lorentz_invariance']

_import_formats

Value:
['model_v4', 'model', 'proc_v4', 'command', 'banner']

_install_opts

Value:
['pythia-pgs', 'Delphes', 'MadAnalysis', 'ExRootAnalysis']

_export_formats

Value:
['madevent',
 'standalone',
 'matrix',
 'standalone_cpp',
 'pythia8',
 'aloha']

_set_options

Value:
['group_subprocesses',
 'ignore_six_quark_processes',
 'stdout_level',
 'fortran_compiler']

_curr_matrix_elements

Value:
{
    'matrix_elements': []
}