def _read_fragments(size, length, dir='.'):
 filename = (((dir + '/') + _FRAGMENT_FILE) % (size, length))
 with open(filename, 'r') as fp:
  flist = []
  fid = 0
  for l in fp.readlines():
   if ((l[0] == '*') or (l[0] == '\n')):
    continue
   sl = l.split()
   if (sl[1] == '------'):
    f = Fragment(length, fid)
    flist.append(f)
    fid += 1
    continue
   coord = numpy.array([float(x) for x in sl[0:3]])
   f.add_residue('XXX', coord)
 return flist

def _read_fragments ( size , length , dir = '.' ) : filename = ( ( ( dir + '/' ) + _FRAGMENT_FILE ) % ( size , length ) ) with open ( filename , 'r' ) as fp : flist = [ ] fid = 0 for l in fp . readlines ( ) : if ( ( l [ 0 ] == '*' ) or ( l [ 0 ] == '\n' ) ) : continue sl = l . split ( ) if ( sl [ 1 ] == '------' ) : f = Fragment ( length , fid ) flist . append ( f ) fid += 1 continue coord = numpy . array ( [ float ( x ) for x in sl [ 0 : 3 ] ] ) f . add_residue ( 'XXX' , coord ) return flist
read a fragment spec file (available from u{URL} and return a list of fragment objects .