Note
Functions for opening, editing, and saving Langmuir checkpoint files.
Module author: Adam Gagorik <adam.gagorik@gmail.com>
A class to open Langmuir checkpoint files.
Attribute | Description |
---|---|
electrons | list of int |
holes | list of int |
traps | list of int |
defects | list of int |
trapPotentials | list of float |
fluxState | list of int |
randomState | list of int |
parameters | Parameters |
Parameters: | handle (str) – filename or file object; Can be None. |
---|
Create checkpoint from image file. You can also pass another checkpoint object, a dictionary, or key=value pairs. The parameters will be updated accordingly.
Parameters: | image (str) – name of image file |
---|
Load checkpoint from a file.
Parameters: | handle (str) – filename or file object |
---|
>>> chk = lm.checkpoint.CheckPoint()
>>> chk.load('out.chk')
Save checkpoint to a file.
Parameters: | handle (str) – filename or file object |
---|
>>> chk = lm.checkpoint.CheckPoint()
>>> chk.save('sim.inp')
Forget all stored information.
>>> chk = lm.checkpoint.CheckPoint()
>>> chk.clear()
Load checkpoint file.
Parameters: | handle (str) – filename or file object |
---|---|
Returns: | checkpoint object |
Return type: | Checkpoint |
>>> chk = lm.checkpoint.load('out.chk')
Load the last checkpoint file found in the working directory.
Parameters: | work (str) – directory to look in |
---|---|
Returns: | checkpoint object |
Return type: | Checkpoint |
>>> chk = lm.checkpoint.load_last('/home/adam/simulations')