Package generic_fns :: Module state
[hide private]
[frames] | no frames]

Module state

source code

Module for reading and writing the relax program state.

Functions [hide private]
str or None
determine_format(file)
Determine the format of the state file.
source code
 
load_pickle(file)
Load the program state from the pickled file.
source code
 
load_state(state=None, dir=None, verbosity=1, force=False)
Function for loading a saved program state.
source code
 
save_state(state=None, dir=None, compress_type=1, verbosity=1, force=False, pickle=False)
Function for saving the program state.
source code
Variables [hide private]
  ds = The relax data storage obje...
  status = Status()
  __package__ = 'generic_fns'

Imports: dump, load, search, Relax_data_store, reset, RelaxError, open_read_file, open_write_file, Status


Function Details [hide private]

determine_format(file)

source code 

Determine the format of the state file.

Parameters:
  • file (file object) - The file object representing the state file.
Returns: str or None
The state format. This can be 'xml' or 'pickle'.

load_pickle(file)

source code 

Load the program state from the pickled file.

Parameters:
  • file (file object) - The file object containing the relax state.

load_state(state=None, dir=None, verbosity=1, force=False)

source code 

Function for loading a saved program state.

Parameters:
  • state (str) - The saved state file.
  • dir (str) - The path of the state file.
  • verbosity (int) - The verbosity level.
  • force (bool) - If True, the relax data store will be reset prior to state loading.

save_state(state=None, dir=None, compress_type=1, verbosity=1, force=False, pickle=False)

source code 

Function for saving the program state.

Parameters:
  • state (str) - The saved state file.
  • dir (str) - The path of the state file.
  • verbosity (int) - The verbosity level.
  • force (bool) - Boolean argument which if True causes the file to be overwritten if it already exists.
  • compress_type (int) - The compression type. The integer values correspond to the compression type: 0, no compression; 1, Bzip2 compression; 2, Gzip compression.

Variables Details [hide private]

ds

Value:
The relax data storage object.

Data pipes:
  None

Data store objects:
  __dict__ <type 'dict'>: dict() -> new empty dictionary
  __doc__ <type 'str'>: The relax data storage object.
...