stko.GulpUFFMDOptimizer
- class stko.GulpUFFMDOptimizer(gulp_path, metal_FF=None, metal_ligand_bond_order=None, output_dir=None, integrator='stochastic', ensemble='nvt', temperature=300, equilbration=1.0, production=10.0, timestep=1.0, N_conformers=10, opt_conformers=True, save_conformers=False)[source]
Bases:
GulpUFFOptimizerApplies forcefield MD that can handle metal centres.
- Parameters:
metal_FF (dict[int, str] | None) – Dictionary with metal atom forcefield assignments. Key:
int: atomic number. Value:str: UFF4MOF forcefield type.metal_ligand_bond_order (str | None) – Bond order to use for metal-ligand bonds. Defaults to half, but using resonant can increase the force constant for stronger metal-ligand interactions.
output_dir (Path | str | None) – The name of the directory into which files generated during the calculation are written, if
Nonethenuuid.uuid4()is used.integrator (str) – Integrator for GULP to use. Defaults to ‘stochastic’.
ensemble (str) – Ensemble for GULP to use. Defaults to ‘nvt’.
temperature (float) – Temperature to run simulation at in Kelvin. Defaults to 300.
equilbration (float) – Time spent equilibrating system in ps. Defaults to 1.0.
production (float) – Time spent running production simulation of system in ps. Defaults to 10.0.
timestep (float) – Timestep of simulation in fs. Defaults to 1.0.
N_conformers (int) – Number of conformers to sample. Defaults to 10.
opt_conformers (bool) – Whether or not to optimise each conformer using UFF4MOF. Defaults to
True.save_conformers (bool) – Whether or not to save to file each conformer. Defaults to
False.
Notes
By default,
optimize()will run a MD run using the UFF4MOF. This forcefield requires some explicit metal atom definitions, which are determined by the user.This code was originally written for use with Gulp 5.1 on Linux and has not been officially tested on other versions and operating systems. Make sure to sanity check the output.
Examples
Conformer searching is often useful, so we have provided an interface to MD simulations using GULP and UFF4MOF. A conformer search can be run at high temperature, where N conformers are extracted at constant intervals throughtout the simulation and optimized using UFF4MOF. The lowest energy conformer is returned. After these MD steps, it is crucial to reoptimize the resultant structure using a better forcefield or a more robust method!
gulp_MD = stko.GulpUFFMDOptimizer( gulp_path='path/to/gulp', metal_FF={46: 'Pd4+2'}, temperature=300, N_conformers=10, opt_conformers=True, ) gulp_MD.assign_FF(cage) cage = gulp_MD.optimize(cage)
Methods
Assign forcefield types to molecule.
Optimize mol.
Optimize mol and unit_cell.
- assign_FF(mol)
Assign forcefield types to molecule.
- Parameters:
mol (Molecule) – The molecule to be optimized.
- Return type:
None
- optimize(mol)[source]
Optimize mol.
- Parameters:
mol (MoleculeT) – The molecule to be optimized.
- Returns:
The optimized molecule.
- Return type:
MoleculeT