def write_cssr(ofile, c):
    """ Write the Crys in .cssr file format"""
    print('                               %.3f  %.3f  %.3f' % (c.length[0],
        c.length[1], c.length[2]), file=ofile)
    print(
        '                %.3f   %.3f   %.3f   SPGR =  1 P 1         OPT = 1' %
        (c.angle_deg[0], c.angle_deg[1], c.angle_deg[2]), file=ofile)
    print('%d   0' % c.natom, file=ofile)
    print('0 %s       : %s' % ('xxxxxxx', 'xxxxxxx'), file=ofile)
    for i in range(c.natom):
        print('%4d %3s %8.5f %8.5f %8.5f    0  0  0  0  0  0  0  0  %7.5f' %
            (i + 1, c.atom_element[i], c.atom_fract[i][0], c.atom_fract[i][
            1], c.atom_fract[i][2], c.atom_charge[i]), file=ofile)
    return
