Freeze selected bond distances or atom coordinates

Hi! I have a periodic crystalline material containing only Si and O atoms, with an organic molecule with a F atom occluded within the material. During optimization, the F atom, which is bonded to a benzylic C, has a tendency to move away from the C, whether to bond with Si, or to bond to some other part of the molecule. I currently use the fix_molecule and noauto keywords.

Is there a way to keep the F bonded to the benzylic C? I was thinking to fix the distance between the C and F atoms, but could not find keywords for it, except maybe connect? An alternative would be to fix the F atom’s coordinates. Could you advise on the best way forward and its implementation?

Thank you!

As you’ve specified “noauto” then the molecule keywords (mole, molmec, molq) won’t automatically find any bonds (assuming you’ve also given one of these) and so the molecule functionality won’t do anything unless you specify the bonds explicitly with “connect”. Assuming you have a sensible molecular force field for your organic then this should help keep F away from C. If not, then you need to add a repulsive non-bonded term for F-Si to the force field.