USPEX 10.6 manual

5.4 Interfacing USPEX with Arbitrary External Codes (DFT / MD / ML Engines)

USPEX can now interface with any external simulation or machine-learning code. Users can integrate custom DFT, MD, ML, or other computational engines directly into the USPEX workflow.

To enable an external code:

  1. Set the code number to 99 in the abinitioCode block of INPUT.txt.

  2. Define the execution command in the commandExecutable block.

See EX38 for a detailed example.

To read calculation results, users should implement extraction of the target property using the user-defined property interface described in section 5.3.

Files provided by USPEX to the external code

For each structure, USPEX automatically generates the following files:

  • parameters.json

    • Contains important geometrical and calculation parameters that may be required by the external code.

  • geom.in

    • Structure file in POSCAR format.

  • userInput${step}

    • User-defined input parameters for each calculation step (e.g. userInput_5 for step 5). userInput${step} files are automatically copied into usercode.in which serves as the main input file for the external code.

Example 1: Using only a user-defined external code

% abinitioCode
99 99 99
% ENDabinit

% commandExecutable
user_external_code < usercode.in > usercode.out
% EndExecutable

Example 2: Combining GULP and a user-defined code

% abinitioCode
3 3 3 3 99
% ENDabinit

% commandExecutable
gulp < input > output
gulp < input > output
gulp < input > output
gulp < input > output
user_external_code < usercode.in > usercode.out
% EndExecutable