flatspin.runner

Dipole model runner

Module Contents

Functions

run(model, encoder='sin', input=1, input_key=None, periods=100, spp=100, temp=0, temp_func='interp', **params)

Run a flatspin simulation

run_and_save(model_class, params, outdir, data_format)

run_local(dataset)

Run on localhost

generate_script(template, outfile, **params)

run_dist(dataset, wait=True, max_jobs=1000)

Run distributed on a cluster

Attributes

deprecated_params

job_script_template

flatspin.runner.deprecated_params = ['sw_a', 'sw_alpha', 'temp_interp']
exception flatspin.runner.DeprecationError

Bases: Exception

Common base class for all non-exit exceptions.

flatspin.runner.run(model, encoder='sin', input=1, input_key=None, periods=100, spp=100, temp=0, temp_func='interp', **params)

Run a flatspin simulation

Parameters
  • model (SpinIce) – Model instance

  • encoder (string or Encoder) – Name of input encoder to use. See flatspin.encoder for a list of available encoders

  • input (float, array or string) – Input to be encoded float: constant input repeated periods times array: array of input to encode string: filename of table input data

  • input_key (int or str) – Index into input (table column)

  • periods (int) – Number of periods of the external field to run Only used if input is a float

  • spp (int) – Number of samples to save per input value

  • temp (float, array) – Temperature to be used float: constant temperature for whole run array: array of temperatures stretched to fit run

  • params (dict) – Params to pass to the encoder

flatspin.runner.run_and_save(model_class, params, outdir, data_format)
flatspin.runner.run_local(dataset)

Run on localhost

flatspin.runner.generate_script(template, outfile, **params)
flatspin.runner.job_script_template
flatspin.runner.run_dist(dataset, wait=True, max_jobs=1000)

Run distributed on a cluster