In the TYK2 system, we restrained rotatable bonds in the ligand using dihedral restraints after noticing that slow rotamer sampling led to poor convergence. We adapted the thermodynamic cycle to account for the contribution of these restraints. In step A (Figure ) the noninteracting ligand B (green) was inserted from the standard state having all its rotatable bonds restrained. Then, dihedral restraints on the interacting ligand A (magenta) were turned on simultaneously with the Boresch-style restraints (step B). The next step is identical to that in the original protocol, except that it has dihedral angles on both ligands restrained. In step D the restraints on ligand B (green) are released and in step E the non-interacting ligand A with its rotatable bonds restrained was transferred to the solvent. The interactions of ligand A were then turned back on in the solvent and the dihedral restraints were released. Similarly, in the hydration free energy calculations of ligand B, first the dihedral restraints were turned on, followed by the decoupling of the ligand and then non-interacting ligand B was inserted into the binding site in step A as described above.