Moving simulations from 0.6.* to 0.7.0

Some small but significant changes have been made to a couple of aspects in 0.7.0, which means that there are potential incompatibilities between files generated in/for 0.6.*. The most commonplace of these issues are described individually below, along with instructions to fix the incompatibilities.

Input File

Parameters for Nodes

Error Message

Unrecognised keyword 'Real' found while parsing Parameters node.

Cause

The Parameters node had its keywords simplified in 0.7.0, so there are no longer separate versions of Real and Integer. Both are covered by the new keyword Parameter, which accepts both integer or floating-point values

Resolution

In any Parameters blocks, change any Real or Integer keywords to Parameter. For example:

  Generator
    Parameters
      Real  rho  1.000000e-02
    EndParameters
    ...

becomes

  Generator
    Parameters
      Parameter  rho  1.000000e-02
    EndParameters
    ...

Restart File

Configuration Definitions

Error Message

Reading Configuration 'MyConfiguration'...
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stod
Aborted (core dumped)

Cause

The restart file now stores both the requested and actual (applied) size factors of the configuration, rather than just the applied value, leading to a failure when converting the arguments.

Resolution

If you search for the word “Configuration” in the restart file, you should find a section like this:

Configuration  'MyConfiguration'
'MyConfiguration'  1000  # nMolecules
4.506218e+01 4.506218e+01 4.506218e+01  6.7  False
9.000000e+01 9.000000e+01 9.000000e+01
...

The value of 6.7 is the applied size factor. This line must be modified to repeat the value:

4.506218e+01 4.506218e+01 4.506218e+01  6.7  6.7  False

Types of Data Items

Error Message

GenericList::create() doesn't know how to create an item of type 'SOME_TYPE'

Cause

Several legacy storage classes are being replaced with STL-based equivalents, which results in the names of the types in the restart file changing.

Resolution

Restart files can be edited / search-replaced to have the correct data types based on the list below.

  • Any occurrences of Array<double> should be modified to use std::vector<double> instead. Note that while the Array class is being retired, the Array2D and Array3D classes will be maintained.

Manually editing the restart file with a good text editor is all that is required, but a more practical solution would be to use a command-line tool such as sed, if available. Changes can then be made with a command such as:

sed "s/Array<double>/std::vector<double>/g" old.restart > new.restart

I found another problem while moving my simulations to 0.7.0. The error message is the following:

I’m wondering about the cause and how I could solve this problem.

This happens because the Array<double> class is being replaced - changing any data items in the restart file that have (partial) type of Array<double> to std::vector<double> should fix things. In this particular case, Array2D<Array<double>> would become Array2D<std::vector<double>>. I’ve updated the pinned answer at the top to reflect this as well.