Open kevinkong98 opened 2 months ago
It already exists. It's the "bondrange" constraint of Table III in https://doi.org/10.1063/5.0197592
Can be defined in the toml via
[[calculation.constraints]]
bondrange = [9,13,3.0,4.2]
with 9 and 13 being the atoms and 3.0 and 4.2 being the lower and upper distance bounds in Angstrom.
Note that one [[calculation.constraints]]
block would be required per individual constraint and often it's easier to provide an xtb-style input file in addition to the toml if multiple such constraints are required. Within that, the same constraint can be defined with
$constrain
bondrange: 9,13,3.0,4.2
bondrange: 4,5,2.5,6.0
<...>
and specify the xtb-style input file within the main body of the toml xtbinput='constrain.inp'
, or via the command line with -cinp constrain.inp
.
However, be cautious, while this xtb-style format for bondrange works for CREST, xtb itself doesn't know it and will complain. Unfortunately this also rules out runtypes relying on the xtb binary, e.g. QCG, and version 2.12 legacy implementations.
To have the constraint one-sided, just set the lower bound to 0, or the upper one to something large, depending on which direction you need.
Looks like this (green plot, lower limit 1.5, upper one 2):
A one-sided constrain will be very useful during TS conformation search where you want to avoid certain bond formation leading to product but don't want to completely freeze the bond so some alternate reactivity modes could be discovered through dihedral angle change. It could also be useful for searching for isomers of TM complexes/intermediate where some ligands may couple if unconstrained.