program DL_POLY_Change_Coordinate_C
    implicit none                              !implicit(说明用某一字母开头的变量为指定的类型)
    integer i, levcfg, imcon, megatm, index, steps
    real, PARAMETER :: K=0                     !parameter(为常量命名，即用一个符号代表一个常量)
    real, PARAMETER :: P=18466
    character *20 atmnam, systemname
    real timestep, time
    real X1, X2, X3, Y1, Y2, Y3, Z1, Z2, Z3
    real Cx(P), Cy(P), Cz(P), Vx(P), Vy(P), Vz(P), Fx(P), Fy(P), Fz(P)    
    open(20, file = 'CONFIG', status = 'unknown')       !打开一个输出文件
    open(1, file = 'REVCON', status = 'unknown')        !打开文件，并读取
    read(1, *) systemname
    write(20, "(A10)") systemname
    read(1, *) levcfg, imcon, megatm
    write(20, "(I10, I10, I10, I10, F20.10, F20.10)") levcfg, imcon, megatm
    read(1, *) X1, X2, X3, Y1, Y2, Y3, Z1, Z2, Z3
    write(20, "(F20.10, F20.10, F20.10)") Z3, X2, X3
    write(20, "(F20.10, F20.10, F20.10)") Y1, X1, Y3
    write(20, "(F20.10, F20.10, F20.10)") Z1, Z2, Y2
    do i = 1, P
        read(1,*) atmnam, index, Cx(i), Cy(i), Cz(i)
        write(20, "(A8, I10)") atmnam, index
        write(20, "(F20.10, F20.10, F20.10)") Cz(i), Cx(i), Cy(i)           !坐标变换
    end do
    end