Hi Carsten,
yes ligand has good geometry initially, i.e. after I generate it. During
placement in coot and refinement in phenix it gets a bit distorted. In general I see these kind of problems in saturated, substituted ring systems using medium resolution < 2.0 A. The density is not clear enough to restrict the conformations of these ring systems, since it is basically enclosed in a round blob of density. So the real space refinement in coot and refinement in phenix take liberty from the freedom given in the restraints (Sorry had to paraphrase DVD here...) to fit the ligand in the ambiguous density.
We have a tool for quick real-space refinement that's geared towards making the geometry ideal in the end. I'm not sure it is useful in your situation, but may be worth a try. It works like this: mmtbx.lockit your.pdb your_refine_001_map_coeffs.mtz map.coeff_labels.f=2FOFCWT,PH2FOFCWT coordinate_refinement.run=True atom_selection='resname LIG' It works in two stages. First it attempts to maximize the real-space weight allowing for a significant (but not totally unreasonable) distortion of the geometry. This is meant to move the ligand into the density. In the second stage it scales down the "best" real-space weight and runs a number of real-space refinements until the selected atoms do not move anymore. The expected result is nearly ideal geometry. The procedure is usually very quick. If it turns out to be useful we could integrate it into phenix.refine, to be run after reciprocal-space refinement. The mmtbx.lockit command is not as user-friendly as phenix.refine. It only works with mtz files, you have to manually specify the mtz labels, and the error messages may be unhelpful. Also be sure there is a valid CRYST1 card in your pdb file. Ralf