public double reducedMass(char direction) {
        if (direction == 'x' || direction == 'a') {
            return 1 / (1 / mass_elx + 1 / mass_hhx);
        } else {
            return 1 / (1 / mass_elz + 1 / mass_hhz);
        }
    }