apply_nbfix¶
- mbuild_polybuild.toolbox.apply_nbfix(structure, filename, filetype='json', units='real')[source]¶
Apply non-bonded interaction fixes to a structure using parameters from a file.
- Parameters:
structure (mb.Compound) – The structure object with a forcefield already applied.
filename (str) – Name of the file containing parameters.
filetype (str, optional, default=”json”) – File type to import (e.g., “json”).
units (str, optional, default=”real”) – Unit system for parameters. “real” converts between kcal/mol and angstroms.
- Returns:
The input structure with updated parameters.
- Return type:
mb.Compound
Examples
>>> from mbuild import Compound >>> structure = Compound() >>> updated_structure = apply_nbfix(structure, "params.json")