def __loadPar( self, parname ):
"""
Frealign files normally have 16 columns, with any number of comment lines that start with 'C'
"""
# Ergh, cannot have trailing comments with np.loadtxt?
self.parCol = [b"N", b"PSI", b"THETA", b"PHI", b"SHX", b"SHY", b"MAG", b"FILM", b"DF1", b"DF2", \
b"ANGAST", b"OCC", b"LogP", b"SIGMA", b"SCORE", b"CHANGE" ]
self.par = pandas.read_table( parname, engine='c', sep=' ', header=None, names =self.parCol, quotechar='C' )
#self.par.append( np.loadtxt( parname, comments=b'C' ) )
# TODO: split into a dictionary?
# TODO: read comments as well
# TODO: use pandas instead?
#self.parCol = {b"N":0, b"PSI":1, b"THETA":2, b"PHI":3, b"SHX":4, b"SHY":5, b"MAG":6, b"FILM":7, b"DF1":8, b"DF2":9,
# b"ANGAST":10, b"OCC":11, b"LogP":12, b"SIGMA":13, b"SCORE":14, b"CHANGE":15 }
#self.parComments = np.loadtxt( parname, comments=b' ' )
评论列表
文章目录