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.
-
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 createffield
andgeo
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 (alsoSettings
) 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 byffield_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 ifdescrp
key is not present in settings.If lattice is
True
, the information about periodicity is printed to the resulting geo-file withCRYSTX
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 bydefault_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 fromGeneral
section of main KF file equalsNORMAL TERMINATION
.
-
get_input
()[source]¶ Produce the
control
file based on key-value pairs present insettings.input.control
branch.
-
get_runscript
()[source]¶ Generate a runscript.
Returned string is just
$ADFBIN/reaxff
, possibly prefixed withexport NSCM=(number)
ifsettings.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.
-
static
-
load_reaxff_control
(filename, keep_order=True)[source]¶ Return a
Settings
instance containing all data from an existingcontrol
file, indicated by filename.If keep_order is
True
, the returnedSettings
instance is enriched with the_order
key containing a list of all keys in the same order they were present in the loadedcontol
file.