 program DL_POLY_CONFIG
    implicit none                              !implicit(˵����ĳһ��ĸ��ͷ�ı���Ϊָ��������)
    real, PARAMETER :: K = 0                   !parameter(Ϊ��������������һ�����Ŵ���һ������)
    real, PARAMETER :: cell = 30.0            !���ӱ߳�
    integer, PARAMETER :: P = 1533            !ԭ������
    integer, PARAMETER :: levcfg = 0
    integer, PARAMETER :: imcon = 2
    character *20 atmnam 
    real Cx, Cy, Cz
    integer i
    open(20, file = 'CONFIG', status = 'unknown')     !��һ������ļ�
    open(1, file = 'Water box.txt', status = 'unknown')     !���ļ�������ȡ
    write(20, "(I10, I10, I10)") levcfg, imcon, P
    write(20, "(F20.10, F20.10, F20.10)") cell, K, K
    write(20, "(F20.10, F20.10, F20.10)") K, cell, K
    write(20, "(F20.10, F20.10, F20.10)") K, K, cell
    do i = 1, P
        read(1,*) atmnam, Cx, Cy, Cz
        write(20, "(A8, I10)") atmnam, i
        write(20, "(F20.3, F20.3, F20.3)") Cx, Cy, Cz
    end do
    end