The cumulant method in diffraction analysis of polyatomic molecules