ezff.ffio - Methods to read/write forcefield files

This module provide methods to handle reading and writing forcefields

ffio.generate_forcefield(template_string, parameters, FFtype=None, outfile=None)[source]

Generate a new forcefield from the template by replacing variables with numerical values

Parameters:
  • template_string (str) – Text of the forcefield template
  • parameters (dict) – Numerical value of all decision variables in the form of variable:value pairs
  • FFtype (string) – Type of forcefield being optimized. (e.g. reaxff, sw, lj, etc.)
ffio.read_forcefield_template(template_filename)[source]

Read-in the forcefield template. The template is constructed from a functional forcefield file by replacing all optimizable numerical values with variable names enclosed within dual angled brackets << and >>.

Parameters:template_filename (str) – Name of the forcefield template file to be read-in
ffio.read_variable_bounds(filename, verbose=False)[source]

Read permissible lower and upper bounds for decision variables used in forcefields optimization

Parameters:
  • filename (str) – Name of text file listing bounds for each decision variable that must be optimized
  • verbose (bool) – Print all variables read-in