# Input files¶

In order to optimize a ReaxFF forcefield, the files listed below must be present in the directory where the reaxff program is executed.

*iopt*– file containing a line of text with a single number on it. If the number is 6 then the first partial derivatives of the error function with respect to force-field parameters will be computed by finite difference. This option requires 2*N + 1 error function evaluations, where N is the number of variable force-field parameters. If iopt=8, then both the first and the seconds derivatives will be calculated. The eigenvalues and eigenvectors of the obtained Hessian matrix will also be computed. In this case, N^2 + N + 1 function evaluations will be done. Note: calculation of the derivatives can be very slow so make sure you run it on as many processors as possible. A rule of thumb is that the number of processor cores should be equal or larger than the number of variable parameters.*ffield*– the initial force-field file.*ffield_bool*– contains 1.0 or 0.0 as a flag whether the corresponding value is to be variable or not (this file has the same format as ffield).*trainset.in*– file with test values, the same as in the original reaxff force-field optimization, see page 27 of the ReaxFF User Manual.*geo*– file with test geometries in the BGF format, the same as in the original reaxff force-field optimization. Geometries of different molecules in this file must be concatenated.*control*– in addition to general ReaxFF control parameters it also contains the FFOptimizer-related ones explained below.