# Path: mpinterfaces/utils.py
# def is_converged(directory):
#     """
#     Check if a relaxation has converged.
# 
#     Args:
#         directory (str): path to directory to check.
# 
#     Returns:
#         boolean. Whether or not the job is converged.
#     """
# 
#     try:
#         return Vasprun('{}/vasprun.xml'.format(directory)).converged
#     except:
#         return False


import os
import operator
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from math import sqrt
from scipy.spatial import Delaunay, ConvexHull
from pymatgen.core.composition import Composition
from pymatgen.core.structure import Structure
from pymatgen.core.sites import PeriodicSite
from pymatgen.core.periodic_table import Element
from pymatgen.io.vasp.outputs import Vasprun
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
from mpinterfaces.utils import is_converged
from __future__ import print_function, division, unicode_literals


matplotlib.use('Agg')





__author__ = "Michael Ashton"
__copyright__ = "Copyright 2017, Henniggroup"
__maintainer__ = "Michael Ashton"

# Path: mpinterfaces/utils.py
# def is_converged(directory):
#     """
#     Check if a relaxation has converged.
# 
#     Args:
#         directory (str): path to directory to check.
# 
#     Returns:
#         boolean. Whether or not the job is converged.
#     """
# 
#     try:
#         return Vasprun('{}/vasprun.xml'.format(directory)).converged
#     except:
#         return False


# Path: mpinterfaces/mat2d/intercalation/analysis.py
import os
import operator
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from math import sqrt
from scipy.spatial import Delaunay, ConvexHull
from pymatgen.core.composition import Composition
from pymatgen.core.structure import Structure
from pymatgen.core.sites import PeriodicSite
from pymatgen.core.periodic_table import Element
from pymatgen.io.vasp.outputs import Vasprun
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
from mpinterfaces.utils import is_converged

from __future__ import print_function, division, unicode_literals


matplotlib.use('Agg')





__author__ = "Michael Ashton"
__copyright__ = "Copyright 2017, Henniggroup"
__maintainer__ = "Michael Ashton"

__email__ = "ashtonmv@gmail.com"