def fix_z_dir(job):
    """
    Rather than fixing all directions only fix the z-direction during an NPT simulation

    Args:
        job (LAMMPS): Lammps job object

    Returns:
        LAMMPS: Return updated job object
    """
    job.input.control["fix___ensemble"] = job.input.control["fix___ensemble"].replace(
        "x 0.0 0.0 1.0 y 0.0 0.0 1.0 z 0.0 0.0 1.0", "z 0.0 0.0 1.0"
    )
    return job