QuaLiKiz-Pythontools
Public Member Functions | List of all members
qualikiz_tools.qualikiz_io.inputfiles.QuaLiKizPlan Class Reference

Defines how to generate QuaLiKiz input files from a QuaLiKizXpoint base. More...

Inheritance diagram for qualikiz_tools.qualikiz_io.inputfiles.QuaLiKizPlan:
Inheritance graph
[legend]
Collaboration diagram for qualikiz_tools.qualikiz_io.inputfiles.QuaLiKizPlan:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, kwargs)
 Initialize the QuaLiKizPlan. More...
 
def calculate_dimx (self)
 Calculate the amount of xpoints, also known as dimx. More...
 
def calculate_dimxn (self)
 Calculate dimxn. More...
 
def edge_generator (self, xlike_meta=None)
 Generates the points on the edge of a hyperrectangle. More...
 
def parallel_generator (self, xlike_meta=None)
 
def rect_generator (self, xlike_meta=None)
 
def extract_dimx_meta (self, metadata)
 
def setup (self, metadata=None)
 Set up the QuaLiKiz scan. More...
 
def setup_scan (self, scan_names, scan_list)
 Set up a QuaLiKiz scan. More...
 
def to_json (self, filename)
 Dump the QuaLiKiz plan to json file. More...
 
def from_json (cls, filename)
 Load the QuaLiKiz plan from json. More...
 
def from_defaults (cls)
 

Detailed Description

Defines how to generate QuaLiKiz input files from a QuaLiKizXpoint base.

This class can be used to define a scan plan, in other words, over which values will be scanned in the QuaLiKiz run. This is given in the form of a xpoint base and a strategy how the exact points will be generated from this base. Usually this is a line or its N-D equivalent the edges of a hyperrectangle, or a hyperrectangle itself.

Constructor & Destructor Documentation

◆ __init__()

def qualikiz_tools.qualikiz_io.inputfiles.QuaLiKizPlan.__init__ (   self,
  kwargs 
)

Initialize the QuaLiKizPlan.

Parameters
scan_dictDictionary with as keys the names of the variables to be scanned and as values the values to be scanned. Use an OrderedDict to conserve ordering.
scan_typeHow the points are generated. Currently accepts 'hyperedge' and 'hyperrect'.
xpoint_baseThe QuaLiKizXpoint used as base for the generation

Member Function Documentation

◆ calculate_dimx()

def qualikiz_tools.qualikiz_io.inputfiles.QuaLiKizPlan.calculate_dimx (   self)

Calculate the amount of xpoints, also known as dimx.

This depends on the scan_type

◆ calculate_dimxn()

def qualikiz_tools.qualikiz_io.inputfiles.QuaLiKizPlan.calculate_dimxn (   self)

Calculate dimxn.

◆ edge_generator()

def qualikiz_tools.qualikiz_io.inputfiles.QuaLiKizPlan.edge_generator (   self,
  xlike_meta = None 
)

Generates the points on the edge of a hyperrectangle.

◆ extract_dimx_meta()

def qualikiz_tools.qualikiz_io.inputfiles.QuaLiKizPlan.extract_dimx_meta (   self,
  metadata 
)

◆ from_defaults()

def qualikiz_tools.qualikiz_io.inputfiles.QuaLiKizPlan.from_defaults (   cls)

◆ from_json()

def qualikiz_tools.qualikiz_io.inputfiles.QuaLiKizPlan.from_json (   cls,
  filename 
)

Load the QuaLiKiz plan from json.

Reconstruct the QuaLiKiz plan based on the given json file. Backwards compatibility is not guaranteed, so preferably generate the json with the same version as which you load it with.

◆ parallel_generator()

def qualikiz_tools.qualikiz_io.inputfiles.QuaLiKizPlan.parallel_generator (   self,
  xlike_meta = None 
)

◆ rect_generator()

def qualikiz_tools.qualikiz_io.inputfiles.QuaLiKizPlan.rect_generator (   self,
  xlike_meta = None 
)

◆ setup()

def qualikiz_tools.qualikiz_io.inputfiles.QuaLiKizPlan.setup (   self,
  metadata = None 
)

Set up the QuaLiKiz scan.

Pass the binary generator the correct generator depending on the scan_type

◆ setup_scan()

def qualikiz_tools.qualikiz_io.inputfiles.QuaLiKizPlan.setup_scan (   self,
  scan_names,
  scan_list 
)

Set up a QuaLiKiz scan.

scan_names should be the names of the parameters being scanned over. This is a list with the same length of list-like objects generated by scan_list. Scan_list should be a generator (or list of lists) that generates the values matching the values of the scan_names.

◆ to_json()

def qualikiz_tools.qualikiz_io.inputfiles.QuaLiKizPlan.to_json (   self,
  filename 
)

Dump the QuaLiKiz plan to json file.

The QuaLiKiz plan, including the xpoint base, can be fully recontructed later using the from_json function


The documentation for this class was generated from the following file: