Skip to content

09_Saving_Results

Jens Thomas edited this page Jul 20, 2020 · 5 revisions

9 Saving Results and Extracting Coordinates

By default, Ambuild does not save any data or coordinates. The dump command is used to save the current state of the cell at various intervals. This is done using:

mycell.dump()

The dump command creates a python .pkl.gz file that will be named step_X.pkl where X is a number that will increment each time that the dump command is called.

In order to extract coordinates the ab_util.py script (/opt/ambuild/ambuild/ab_util.py) can be used. The script should be called with the path to the .pkl file as the first argument, e.g.

/opt/ambuild/ambuild/ab_util.py step_X.pkl.gz
The util script will then create a .xyz file of the coordinates and a .cml file suitable for viewing with Avogadro2.

The ab_util script also accepts a "--fragments" or "-f" argument, which tells the script to write out files for each fragment separately. This is done as follows:

/opt/ambuild/ambuild/ab_util.py -f step_X.pkl.gz
The ab_util script also accepts a "--blocks" or "-b" argument, which tells the script to write out separate files for each block in the cell. This is done as follows:
/opt/ambuild/ambuild/ab_util.py -b step_X.pkl.gz

Clone this wiki locally