Calculation of conformations of organic molecules