3.3. ReaxFF: Convert old file format

AMS2021 and earlier supported ReaxFF parametrizations using different file formats than ParAMS. This tutorial shows how to convert from the old formats to the new ParAMS format:

Old File

+

(Optional File)

=

New File

geo

control

job_collection.yaml

trainset.in

training_set.yaml

ffield

params

parameter_interface.yaml

Example files are located in $AMSHOME/scripting/scm/params/examples/import_old_ReaxFF.

3.3.1. Convert geo (and control) to job_collection.yaml

The old geo format distinguishes between:

  • single-point (RUTYPE SINGLE POINT),

  • geometry optimization (RUTYPE MAXIT 100, where 100 is the maximum number of iterations), and

  • “normal runs” (RUTYPE NORMAL RUN). The meaning of NORMAL RUN is defined in the control file.

The conversion automatically reads and writes:

  • The system charge (only one MOLCHARGE line is allowed),

  • The atomic positions, and

  • Bond and angle constraints (the force constants are approximately converted to the AMS format).

In the ParAMS GUI, select File → Open and browse to the geo file.

../_images/RxFF_old_format_import.png

This adds the jobs to the job collection (and also reads control, trainset.in, ffield and params if they are present in the same directory).

../_images/RxFF_old_format.png

Important

When importing your own files: If a control file is not found then any jobs with RUTYPE NORMAL RUN get converted to single point jobs. To change them to geometry optimization, select the jobs you want to change on the Jobs panel, double-click in the Details column for one of them. In the AMS Settings text box, type:

Task GeometryOptimization
GeometryOptimization
  MaxIterations 30
  PretendConverged Yes
End

Then click OK. See also the FAQ entry on MaxIterations and PretendConverged.

3.3.2. Convert trainset.in to training_set.yaml

File → Open the trainset.in file.

This reads in the training set (and also reads control, geo, ffield and params if they are present in the same directory).

3.3.3. Convert ffield (and params) to parameter_interface.yaml

The ffield file contains the force field parameters and their values. The old params file (unrelated to ParAMS) contains the parameters to optimize and their allowed range of values.

File → Open and choose the params or ffield files.

Alternatively:

Parameters → Use ReaxFF ‘params’.

This reads the parameter files (and also reads control, trainset.in and geo if they are present in the same directory).

3.3.4. Using convert.py

convert.py provides the stand-alone methods detailed above, but it can also be used as a script to bulk convert a directory of old files to the new format. The new files will be placed in a new directory called converted_to_params within the original directory.

"$AMSBIN/amspython" convert.py path/to/old/reaxff/files