Optimisation¶
UFF4MOF geometry optimisation via gulp_setup's atom-typing backend:
cage_isomer_builder.utils.optimise.
UFF4MOFCalculator ¶
Bases: Calculator
ASE Calculator evaluating the UFF4MOF energy/forces via OpenMM.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bond_matrix
|
(ndarray, shape(n_atoms, n_atoms))
|
Symmetric bond-order matrix (0 = no bond). |
required |
mmtypes
|
sequence of str
|
UFF4MOF type name for each atom (e.g. |
required |
uff_db
|
dict[str, UFFAtomParams]
|
Parameter table from
:func: |
required |
charges
|
(ndarray, shape(n_atoms))
|
Fixed per-atom partial charges (elementary charge units). When
given, a Coulomb term ( |
None
|
Source code in cage_isomer_builder/utils/optimise.py
run_uff4mof_optimisation ¶
run_uff4mof_optimisation(atoms, bond_matrix, fmax: float = 0.05, steps: int = 500, optimizer_cls=None, trajectory: Optional[str] = None, charges: Optional[ndarray] = None)
Relax a molecular geometry with ASE using a UFF4MOF (OpenMM) calculator.
UFF atom types are assigned automatically from bond_matrix via
:func:gulp_setup.mmanalysis.analyze_mm (a heuristic cost function over
local coordination number, angle and radius - see that module for
details); the bond matrix itself is taken as-is, never re-derived from
geometry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
atoms
|
Atoms
|
Starting geometry. Any constraint already set on |
required |
bond_matrix
|
(ndarray, shape(len(atoms), len(atoms)))
|
Symmetric bond-order matrix, e.g. from
:func: |
required |
fmax
|
float
|
Force convergence threshold in eV/Angstrom. |
0.05
|
steps
|
int
|
Maximum number of optimisation steps. |
500
|
optimizer_cls
|
ASE optimizer class
|
Any ASE |
None
|
trajectory
|
str
|
File path for an ASE |
None
|
charges
|
(ndarray, shape(len(atoms)))
|
Fixed per-atom partial charges forwarded to
:class: |
None
|
Returns:
| Type | Description |
|---|---|
Atoms
|
Optimised structure (a copy - the input |