local structure optimization