@classmethod
def get_dperp_apar(cls, x, apar, r=1):
    """
        calculate inplane lattice parameter and the out of plane lattice plane
        spacing (of the atomic planes!) from composition and relaxation

        Parameters
        ----------
        x :     float
            chemical composition parameter
        apar :  float
            inplane lattice parameter of the material below the current layer
            (onto which the present layer is strained to). This value also
            served as a reference for the relaxation parameter.
        r :     float
            relaxation parameter. 1=relaxed, 0=pseudomorphic

        Returns
        -------
        dperp : float
            perpendicular d-spacing
        apar :  float
            inplane lattice parameter
        """
    abulk = cls.abulk(x)
    aparl = apar + (abulk - apar) * r
    dperp = abulk * (1 + cls.poisson_ratio(x) * (1 - aparl / abulk)) / 4.0
    return dperp, aparl
