ezff.ffio - Methods to read/write forcefield files

This module provide methods to handle reading and writing forcefields

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
ffio.write_forcefield_file(filename, template_string, parameters, verbose=False)[source]

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

Parameters:
  • filename (str) – Name of the forcefield file to be written
  • template_string (str) – Text of the forcefield template
  • parameters (dict) – Numerical value of all decision variables in the form of variable:value pairs
  • verbose (bool) – Print one line confirming forcefield write-out