Run & CLI management¶
Routines handling the run of ADG.
- adg.run.attribute_directory(commands)[source]¶
Create missing directories and return the working directory.
- Parameters
commands (Namespace) – Flags for the run management.
- Returns
Path to the result folder.
- Return type
str
>>> com = argparse.Namespace() >>> >>> com.theory, com.order = 'BMBPT', 4 >>> com.with_3NF, com.nbody_observable, com.canonical = False, 2, False >>> >>> attribute_directory(com) 'BMBPT/Order-4_2body_observable' >>> >>> com.theory, com.order = 'BMBPT', 5 >>> com.with_3NF, com.nbody_observable, com.canonical = True, 3, False >>> >>> attribute_directory(com) 'BMBPT/Order-5_3body_observable_with3N' >>> >>> com.theory, com.order = 'MBPT', 3 >>> com.with_3NF, com.nbody_observable, com.canonical = False, 2, False >>> >>> attribute_directory(com) 'MBPT/Order-3' >>> >>> com.theory, com.order = 'BIMSRG', (1,2,3) >>> >>> attribute_directory(com) 'BIMSRG/Order_1_2_3'
- adg.run.clean_folders(directory, commands)[source]¶
Delete temporary files and folders.
- Parameters
directory (str) – Path to the output folder.
commands (Namespace) – Flags to manage the program’s run.
- adg.run.compile_manager(directory)[source]¶
Compile the program’s LaTeX ouput file.
- Parameters
directory (str) – Path to the ouput folder.
- adg.run.create_feynmanmp_files(diagrams, theory, directory, diag_type)[source]¶
Create and move the appropriate feynmanmp files to the right place.
- Parameters
diagrams (list) – The studied diagrams.
theory (str) – Name of the theory of interest.
directory (str) – Path to the result folder.
diag_type (str) – Type of studied diagrams used for drawing.
- adg.run.generate_diagrams(commands, id_generator)[source]¶
Return a list with diagrams of the appropriate type.
- Parameters
commands (Namespace) – Flags for the run management.
id_generator (UniqueID) – A unique ID number generator.
- Returns
All the diagrams of the appropriate Class and order.
- Return type
list
- adg.run.get_bimsrg_truncation_order(operator)[source]¶
Return the truncation order of a given operator from the user input.
- Parameters
operator (str) – The letter corresponding to the operator name.py
- Returns
The truncation rank of the operator.
- Return type
int
- adg.run.interactive_interface(commands)[source]¶
Run the interactive interface mode, return the appropriate commands.
- Parameters
commands (Namespace) – Flags for the run management.
- Returns
Flags initialized through keyboard input.
- Return type
Namespace
- adg.run.order_diagrams(diagrams, commands)[source]¶
Return the ordered unique diagrams with a dict of numbers per type.
- Parameters
diagrams (list) – The diagrams of the appropriate Class.
commands (Namespace) – Flags for the run management.
- Returns
First element is the list of ordered and unique diagrams. Second element is a dict with the number of diagrams per type. Third element is a dict with the identifiers of diagrams starting each output file section.
- Return type
tuple
- adg.run.parse_command_line(cli_args)[source]¶
Return run commands from the Command Line Interface.
- Parameters
cli_args – Command-line arguments submitted with the program.
- Returns
Appropriate commands to manage the program’s run.
- Return type
Namespace
- adg.run.prepare_drawing_instructions(directory, commands, diagrams, diagrams_time)[source]¶
Write FeynMP files for the different diagrams.
- Parameters
directory (str) – Path to the output folder.
commands (Namespace) – Flags for the run management.
diagrams (list) – All the diagrams of interest.
diagrams_time (list) – All the associated TSDs if appropriate.