def write_circle_mesh_kpoints(center=[0, 0, 0], radius=0.1, resolution=20):
    """
    Create a circular mesh of k-points centered around a specific
    k-point and write it to the KPOINTS file. Non-circular meshes
    are not supported, but shouldn't be too hard to code. All
    k-point weights are 1.

    Args:
        center (list): x, y, and z coordinates of mesh center.
            Defaults to Gamma.
        radius (float): Size of the mesh in inverse Angstroms.
        resolution (int): Number of mesh divisions along the
            radius in the 3 primary directions.
    """
    kpoints = []
    step = radius / resolution
    for i in range(-resolution, resolution):
        for j in range(-resolution, resolution):
            if i ** 2 + j ** 2 <= resolution ** 2:
                kpoints.append([str(center[0] + step * i), str(center[1] + 
                    step * j), '0', '1'])
    with open('KPOINTS', 'w') as kpts:
        kpts.write('KPOINTS\n{}\ndirect\n'.format(len(kpoints)))
        for kpt in kpoints:
            kpts.write(' '.join(kpt))
            kpts.write('\n')
