def _read_datafile_entry(spg, no, symbol, setting, f):
    """Read space group data from f to spg."""
    spg._no = no
    spg._symbol = symbol.strip()
    spg._setting = setting
    spg._centrosymmetric = bool(int(f.readline().split()[1]))
    # primitive vectors
    f.readline()
    spg._scaled_primitive_cell = np.array([
        list(map(float, f.readline().split())) 
        for i in range(3)],
        dtype='float')
    
    # primitive reciprocal vectors
    f.readline()
    spg._reciprocal_cell = np.array([list(map(int, f.readline().split())) 
                                        for i in range(3)],
                                       dtype=np.int)
    # subtranslations
    spg._nsubtrans = int(f.readline().split()[0])
    spg._subtrans = np.array([list(map(float, f.readline().split())) 
                              for i in range(spg._nsubtrans)],
                             dtype=np.float)
    # symmetry operations
    nsym = int(f.readline().split()[0])
    symop = np.array([list(map(float, f.readline().split())) for i in range(nsym)],
                     dtype=np.float)
    spg._nsymop = nsym
    spg._rotations = np.array(symop[:,:9].reshape((nsym,3,3)), dtype=np.int)
    spg._translations = symop[:,9:]
def _read_datafile_entry ( spg , no , symbol , setting , f ) : spg . _no = no spg . _symbol = symbol . strip ( ) spg . _setting = setting spg . _centrosymmetric = bool ( int ( f . readline ( ) . split ( ) [ 1 ] ) ) f . readline ( ) spg . _scaled_primitive_cell = np . array ( [ list ( map ( float , f . readline ( ) . split ( ) ) ) for i in range ( 3 ) ] , dtype = 'float' ) f . readline ( ) spg . _reciprocal_cell = np . array ( [ list ( map ( int , f . readline ( ) . split ( ) ) ) for i in range ( 3 ) ] , dtype = np . int ) spg . _nsubtrans = int ( f . readline ( ) . split ( ) [ 0 ] ) spg . _subtrans = np . array ( [ list ( map ( float , f . readline ( ) . split ( ) ) ) for i in range ( spg . _nsubtrans ) ] , dtype = np . float ) nsym = int ( f . readline ( ) . split ( ) [ 0 ] ) symop = np . array ( [ list ( map ( float , f . readline ( ) . split ( ) ) ) for i in range ( nsym ) ] , dtype = np . float ) spg . _nsymop = nsym spg . _rotations = np . array ( symop [ : , : 9 ] . reshape ( ( nsym , 3 , 3 ) ) , dtype = np . int ) spg . _translations = symop [ : , 9 : ]
Read space group data from f to spg.