valence
#
Convert SMIRNOFF valence parameters into tensors.
Modules:
-
smee
–Differentiably evaluate energies of molecules using SMIRNOFF force fields
Functions:
-
strip_constrained_bonds
–Remove bonded interactions between distance-constrained atoms.
-
strip_constrained_angles
–Remove angle interactions between angles where all three atoms are constrained
-
convert_valence_handlers
–Convert a list of SMIRNOFF valence handlers into a tensor potential and
strip_constrained_bonds
#
strip_constrained_bonds(
parameter_maps: list[ValenceParameterMap],
constraints: list[set[tuple[int, int]]],
)
Remove bonded interactions between distance-constrained atoms.
Parameters:
-
parameter_maps
(list[ValenceParameterMap]
) –The parameter maps to strip.
-
constraints
(list[set[tuple[int, int]]]
) –The distanced constrained bonds to exclude for each parameter map.
Source code in smee/converters/openff/valence.py
strip_constrained_angles
#
strip_constrained_angles(
parameter_maps: list[ValenceParameterMap],
constraints: list[set[tuple[int, int]]],
)
Remove angle interactions between angles where all three atoms are constrained with distance constraints.
Parameters:
-
parameter_maps
(list[ValenceParameterMap]
) –The parameter maps to strip.
-
constraints
(list[set[tuple[int, int]]]
) –The distanced constrained bonds to exclude for each parameter map.
Source code in smee/converters/openff/valence.py
convert_valence_handlers
#
convert_valence_handlers(
handlers: list[SMIRNOFFCollection],
handler_type: str,
parameter_cols: tuple[str, ...],
) -> tuple[TensorPotential, list[ValenceParameterMap]]
Convert a list of SMIRNOFF valence handlers into a tensor potential and associated parameter maps.
Notes
This function assumes that all parameters come from the same force field
Parameters:
-
handlers
(list[SMIRNOFFCollection]
) –The list of SMIRNOFF valence handlers to convert.
-
handler_type
(str
) –The type of valence handler being converted.
-
parameter_cols
(tuple[str, ...]
) –The ordering of the parameter array columns.
Returns:
-
tuple[TensorPotential, list[ValenceParameterMap]]
–The potential containing tensors of the parameter values, and a list of parameter maps which map the parameters to the interactions they apply to.