flatspin.runner#

Dipole model runner

exception flatspin.runner.DeprecationError#
flatspin.runner.run(model, encoder='Sine', input=1, input_key=None, periods=100, spp=100, **params)#

Run a flatspin simulation

Parameters
  • model (SpinIce) – Model instance

  • encoder (string or Encoder) – Name of input encoder to use or Encoder instance. 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

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

flatspin.runner.run_and_save(model_class, params, outdir, data_format)#
flatspin.runner.run_local(dataset, verbose=True)#

Run on localhost

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

Run distributed on a cluster