Preparation of protein and ligand structures