4.1.3. ReaxFF

This page describes the old interface to the standalone ReaxFF binary. As ReaxFF is now an AMS engine, you probably want to run it using AMSJob.

In the few simple examples below you can see how various types of ReaxFF calculations can be performed via PLAMS.

ReaxFF examples

class ReaxFFJob(molecule=None, name='plamsjob', settings=None, depend=None)[source]
static _convert_lattice(lattice)[source]

Convert a lattice expressed as three 3-dimensional vectors to (a, b, c, alpha, beta, gamma) format. Lengths of lattice vectors are expressed as a, b and c, angles between them as alpha, beta, gamma.

_get_ready()[source]

Prepare contents of the job folder for execution.

Use the parent method from SingleJob to produce the runscript and the input file (control). Then create ffield and geo files using, respectively, _write_ffield() and _write_geofile().

Then copy to the job folder all files listed in settings.input.external. The value of this key should either be a list of strings with paths to files or a dictionary (also Settings) with paths to files as values and names under which these files should be copied to the job folder as keys.

_write_ffield(ffield)[source]

Copy to the job folder a force field file indicated by ffield*.

ffield should be a string with a path to some external file or with a filename present in $ADFHOME/atomicdata/ForceFields/ReaxFF. The location of this search folder is defined by ffield_path class attribute).

Given file is always coied to the job folder as ffield, due to ReaxFF program requirements.

_write_geofile(molecule, filename, settings, description, lattice=False)[source]

Write to filename a geo-file describing molecule.

settings should be a Settings instance containing all the additional key-value pairs that should be present in the resulting geo-file. To obtain multiple occurrences of the same key in the geo-file, put all the values as a list in settings.

description is the default value for DESCRP key. It is used only if descrp key is not present in settings.

If lattice is True, the information about periodicity is printed to the resulting geo-file with CRYSTX key. If the supplied molecule does not contain lattice vectors (or contains less then 3 of them), this method will add them (and hence alter molecule!). The length of added vectors is defined by default_cell_size class attribute.

settings can also be a single string with a path to a file – in that case this file is copied as filename and all the rest of this method is skipped.

Note

If lattice is True and the lattice present in molecule does not follow ReaxFF convention (the third vector aligned with Z axis, the second one with YZ plane), this method will rotate the molecule to fulfill these requirements.

check()

Check if termination status variable from General section of main KF file equals NORMAL TERMINATION.

get_input()[source]

Produce the control file based on key-value pairs present in settings.input.control branch.

get_runscript()[source]

Generate a runscript.

Returned string is just $ADFBIN/reaxff, possibly prefixed with export NSCM=(number) if settings.runscript.nproc is present.

hash_input()[source]

Disable hashing for ReaxFF jobs.

It is a common task in molecular dynamics to run several trajectories with the same initial conditions. In such a case Rerun prevention would prevent second and all consecutive executions. Hence we decided to disable Rerun prevention for ReaxFF.

If you wish to bring it back, simply put ReaxFFJob.hash_input = SingleJob.hash_inputs somehwere at the beginning of your script.

load_reaxff_control(filename, keep_order=True)[source]

Return a Settings instance containing all data from an existing control file, indicated by filename.

If keep_order is True, the returned Settings instance is enriched with the _order key containing a list of all keys in the same order they were present in the loaded contol file.