The MLFF_inference.py script
The MLFF_inference.py script can be used to perform a few basic inference tasks with machine learning force fields (MLFFs). These tasks include single point evaluation, geometry or lattice ,and molecular dynamics simulations. The advantage of molecular dynamics simulations with MLFF_inference.py is the ability to handle small unit cells. For larger systems, Desmond is highly recommended.
The command syntax is:
$SCHRODINGER/run MLFF_inference.py [options]
For a complete list of options, see MLFF_inference.py Command Help or run the command with the –--help option. A few simple examples are given below.
Simple examples
Every execution of MLFF_inference.py requires specification of an MLFF as well as a geometry, specified by a maestro file. This file can contain one or more structures. The script can take a HOST command to specify a compute host. By default all jobs are run on the HOST serially unless the --distribute option is supplied, in which case jobs will be distributed on either the HOST or SUBHOST, if supplied. If a GPU is available it will be used unless double precision is requested (--precision double).
Single point evaluation
To evaluate the single point energy of systems with a MLFF, one only needs to specify the MLFF to use and provide one or more geometries in a maestro file.
$SCHRODINGER/run MLFF_inference.py -–model Organic_Crystals_MPNICE <input file>
An output maestro file ending in _singlepoint will be written and store the predicted energies.
Geometry optimization
To optimize one or more molecules, one only needs to add the flag ––optimize. In this case the optimized structures will be written to a maestro file ending in _optimized.
$SCHRODINGER/run MLFF_inference.py -–model Organic_MPNICE --optimize <input file>
If the input molecule has periodic boundary conditions defined (by chorus properties) it will be treated as such. In such cases one can also optimize the lattice parameters by additionally specifying --optimize-cell.
Molecular Dynamics
Molecular dynamics simulations are requested by specifying the duration of the simulation, in picoseconds by specifying --total-time. The NVE, NVT and NPT ensembles are supported. An example of running 1 ns of NPT dynamics at 298K and 1 atmosphere of pressure is given below.
$SCHRODINGER/run MLFF_inference.py -–model Inorganic_MPNICE -–temperature 298.0 –-presure 1.0 --total-time 1000.0 --time-step 0.5 --ensemble NPT <input file>
In this case a file ending in _traj will be written, which stores frames along the trajectory.