# Path: postproclib/postproc.py
# class PostProc:
# 
#     def __str__(self):
#         string =  ('\nAvailable outputs in ' + self.resultsdir + ' include:\n\n')
#         string += ('\t{0:^24s}\t{1:>10s}\n'.format('field', 'records'))
#         #string += ('\t{0:^24s}\t{1:^10s}\n'.format('-'*24, '-'*10))
#         for key,field in sorted(self.plotlist.items()):
#             line = '\t{0:<24s}=\t{1:>10f},\n'.format(key, field.maxrec)
#             string += line
#         return string 
# 
# Path: postproclib/pplexceptions.py
# class NoResultsInDir(Exception):
#     pass


import numpy as np
import os
import struct
import glob
    import matplotlib.pyplot as plt
from scipy.io import FortranFile
from .headerdata import *
from .postproc import PostProc
from .pplexceptions import NoResultsInDir
    from mpl_toolkits import mplot3d
        for fname in self.potentialfiles:
            if (glob.glob(self.resultsdir+fname)):
                self.fields_present.append(fname)
            if (glob.glob(self.resultsdir+fname+'.*')):
                self.fields_present.append(fname.strip().split('.')[0])

        self.fieldfiles1 = list(set(self.fields_present) & set(self.potentialfiles))

        try:
            Header1 = MDHeaderData(self.resultsdir)
        except IOError:
            raise NoResultsInDir

        if 'final_state' in (self.fieldfiles1):
            fs = final_state(resultsdir+"./final_state")
            self.plotlist.update({'final_state':fs})

        if 'vmd_out.dcd' in (self.fieldfiles1):
            vmdr = VMDReader(resultsdir, fname="vmd_out")
            self.plotlist.update({'vmd_out.dcd':vmdr})

        if 'vmd_temp.dcd' in (self.fieldfiles1):
            vmdr = VMDReader(resultsdir, fname="vmd_temp")
            self.plotlist.update({'vmd_temp.dcd':vmdr})

        if 'all_cluster.xyz' in (self.fieldfiles1):
            xyz = XYZReader(resultsdir, fname="all_cluster")
            self.plotlist.update({'all_cluster.xyz':xyz})

        if (len(self.plotlist) == 0):

# Path: postproclib/postproc.py
# class PostProc:
# 
#     def __str__(self):
#         string =  ('\nAvailable outputs in ' + self.resultsdir + ' include:\n\n')
#         string += ('\t{0:^24s}\t{1:>10s}\n'.format('field', 'records'))
#         #string += ('\t{0:^24s}\t{1:^10s}\n'.format('-'*24, '-'*10))
#         for key,field in sorted(self.plotlist.items()):
#             line = '\t{0:<24s}=\t{1:>10f},\n'.format(key, field.maxrec)
#             string += line
#         return string 
# 
# Path: postproclib/pplexceptions.py
# class NoResultsInDir(Exception):
#     pass


# Path: postproclib/mdmols.py
import numpy as np
import os
import struct
import glob
    import matplotlib.pyplot as plt
from scipy.io import FortranFile
from .headerdata import *
from .postproc import PostProc
from .pplexceptions import NoResultsInDir
    from mpl_toolkits import mplot3d

        for fname in self.potentialfiles:
            if (glob.glob(self.resultsdir+fname)):
                self.fields_present.append(fname)
            if (glob.glob(self.resultsdir+fname+'.*')):
                self.fields_present.append(fname.strip().split('.')[0])

        self.fieldfiles1 = list(set(self.fields_present) & set(self.potentialfiles))

        try:
            Header1 = MDHeaderData(self.resultsdir)
        except IOError:
            raise NoResultsInDir

        if 'final_state' in (self.fieldfiles1):
            fs = final_state(resultsdir+"./final_state")
            self.plotlist.update({'final_state':fs})

        if 'vmd_out.dcd' in (self.fieldfiles1):
            vmdr = VMDReader(resultsdir, fname="vmd_out")
            self.plotlist.update({'vmd_out.dcd':vmdr})

        if 'vmd_temp.dcd' in (self.fieldfiles1):
            vmdr = VMDReader(resultsdir, fname="vmd_temp")
            self.plotlist.update({'vmd_temp.dcd':vmdr})

        if 'all_cluster.xyz' in (self.fieldfiles1):
            xyz = XYZReader(resultsdir, fname="all_cluster")
            self.plotlist.update({'all_cluster.xyz':xyz})

        if (len(self.plotlist) == 0):

            raise NoResultsInDir