# Path: qcl/find.py
# def tag(referencefile):
# def fromtag(tofind, tag):
# 
# Path: qcl/parse.py
# def parse(source):
#     """ Guess the identity of a particular file or data type and parse it.
# 
#         :source: Single file or data structure with some molecular data contained within
# 
#         :returns: ccData object with the molecular data parsed from source
# 
#         TODO
#     """
#     pass
# 
# Path: qcl/write.py
# def xyzfile(ccdata, fname, append=False):
# def _xyzfile(ccdata):
# def inputfiles(ccdatas, templatefiles, path='./', indexed=False):
# def inputfile(ccdata, templatefile, inpfile=None):
# def _qcheminputfile(ccdata, templatefile, inpfile):
# def _qchemfsminputfile(ccdatas, templatefile, inpfile):
# def _mopacinputfile(ccdata, templatefile, inpfile):


from subprocess import check_output
from qcl import find, parse, write
import os
import shlex
    import six
"""Openbabel conformer generation wrapper - Maybe use Pybel someday"""

# TODO - sometimes obabel conformation generation bugs out
#        consider converting to zmatrix prior to conformer generation
try:
except ImportError:
    raise ImportError("Cannot import six")


def obconformer(xyzfile, conformerfile=None, nconf=1000):
    """ Python wrapper for openbabel call to conformer
    Using the genetic algorithm variation

    :xyzfile: xyzfile to use as start for conformer generation
    :returns: Nothing, but outputs to conformers/species-conformers
    """
    if not conformerfile:
        tag = find.tag(xyzfile)

# Path: qcl/find.py
# def tag(referencefile):
# def fromtag(tofind, tag):
# 
# Path: qcl/parse.py
# def parse(source):
#     """ Guess the identity of a particular file or data type and parse it.
# 
#         :source: Single file or data structure with some molecular data contained within
# 
#         :returns: ccData object with the molecular data parsed from source
# 
#         TODO
#     """
#     pass
# 
# Path: qcl/write.py
# def xyzfile(ccdata, fname, append=False):
# def _xyzfile(ccdata):
# def inputfiles(ccdatas, templatefiles, path='./', indexed=False):
# def inputfile(ccdata, templatefile, inpfile=None):
# def _qcheminputfile(ccdata, templatefile, inpfile):
# def _qchemfsminputfile(ccdatas, templatefile, inpfile):
# def _mopacinputfile(ccdata, templatefile, inpfile):


# Path: qcl/obconformers.py
from subprocess import check_output
from qcl import find, parse, write
import os
import shlex
    import six

"""Openbabel conformer generation wrapper - Maybe use Pybel someday"""

# TODO - sometimes obabel conformation generation bugs out
#        consider converting to zmatrix prior to conformer generation
try:
except ImportError:
    raise ImportError("Cannot import six")


def obconformer(xyzfile, conformerfile=None, nconf=1000):
    """ Python wrapper for openbabel call to conformer
    Using the genetic algorithm variation

    :xyzfile: xyzfile to use as start for conformer generation
    :returns: Nothing, but outputs to conformers/species-conformers
    """
    if not conformerfile:
        tag = find.tag(xyzfile)

        conformerfile = find.fromtag('obconformer', tag)