xnn.ffnn.models.ffield.read_ffield#

xnn.ffnn.models.ffield.read_ffield(path)[source]#

Read a ReaxFF parameter library.

Parameters:

path (str or Path) – Either a .json file (a ReaxFF-nn library, possibly with network weights, or one written by FFieldLibrary.save()), or a .frc force-field spec understood by find_forcefield(): a field shipped with xnn by name ("CHO_cho_2008", "reaxff/CHO_cho_2008"), a .frc path, or "<path>.frc:<variant>".

Returns:

The parsed library.

Return type:

FFieldLibrary

Raises:

FileNotFoundError – If the spec matches nothing.