def print_to_dump_file(head_content, atoms_struct, fname, mode='a'):
    """
    Writes the list of sequences to the given file in the specified format for a PDB.
    @param head_content: content to repeat for all files
    @param atoms_struct: The list atoms to write to file.
    @param fname: The location of the file to write.
    @param mode: to append or write new file
    """
    with open(fname, mode) as w_file:
        for line in head_content:
            w_file.write(line + '\n')
        for line in atoms_struct:
            w_file.write(' '.join(map(str, line)) + '\n')
        if mode == 'w':
            print('Wrote file: {}'.format(fname))
