# 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
    #First two records are positions in y and z
    rec_ = rec+3

    # plot ! note the parent parameter
    x = []; y = []; z = []
    for i in range(nz):
        if (i%2 == 0):
            d = -1
        else:
            d = 1
        x.append(r[rec_,::d,i])
        y.append(r[0,::d,i])
        z.append(r[1,::d,i])

    for j in range(ny):
        if (j%2 == 0):
            d = -1
        else:
            d = 1
        x.append(r[rec_,j,::d])
        y.append(r[0,j,::d])
        z.append(r[1,j,::d,])

    x = np.array(x)#.ravel()
    y = np.array(y)#.ravel()
    z = np.array(z)#.ravel()

    return x, y, z



# 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

    #First two records are positions in y and z
    rec_ = rec+3

    # plot ! note the parent parameter
    x = []; y = []; z = []
    for i in range(nz):
        if (i%2 == 0):
            d = -1
        else:
            d = 1
        x.append(r[rec_,::d,i])
        y.append(r[0,::d,i])
        z.append(r[1,::d,i])

    for j in range(ny):
        if (j%2 == 0):
            d = -1
        else:
            d = 1
        x.append(r[rec_,j,::d])
        y.append(r[0,j,::d])
        z.append(r[1,j,::d,])

    x = np.array(x)#.ravel()
    y = np.array(y)#.ravel()
    z = np.array(z)#.ravel()

    return x, y, z



class MolAllPostProc(PostProc):