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]¶ -
check()¶ Check if
termination statusvariable fromGeneralsection of main KF file equalsNORMAL TERMINATION.
-
get_input()[source]¶ Produce the
controlfile based on key-value pairs present insettings.input.controlbranch.
-
get_runscript()[source]¶ Generate a runscript.
Returned string is just
$ADFBIN/reaxff, possibly prefixed withexport NSCM=(number)ifsettings.runscript.nprocis 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_inputssomehwere at the beginning of your script.
-
_get_ready()[source]¶ Prepare contents of the job folder for execution.
Use the parent method from
SingleJobto produce the runscript and the input file (control). Then createffieldandgeofiles 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_pathclass 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
Settingsinstance 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
DESCRPkey. It is used only ifdescrpkey is not present in settings.If lattice is
True, the information about periodicity is printed to the resulting geo-file withCRYSTXkey. 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_sizeclass 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
Trueand 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.
-
-
load_reaxff_control(filename, keep_order=True)[source]¶ Return a
Settingsinstance containing all data from an existingcontrolfile, indicated by filename.If keep_order is
True, the returnedSettingsinstance is enriched with the_orderkey containing a list of all keys in the same order they were present in the loadedcontolfile.