当前位置: 首页 > 第一原理 >R.I.N.G.S. code运行报错

R.I.N.G.S. code运行报错

作者 量子海洋
来源: 小木虫 450 9 举报帖子
+关注

用VASP跑完AIMD后,想用RINGS(https://rings-code.sourceforge.net/)处理下数据,按照官网的example写好输入input(重命名为my-input)和options文件,也吧XDATCAR放在了data文件夹里,在终端中运行 rings my-input 出现报错“At line 230 of file input.f90 (unit = 10, file = 'options')
Fortran runtime error: Bad logical value while reading item 2”,不知道问题出在哪里,怎么解决? 返回小木虫查看更多

今日热帖
  • 精华评论
  • get-it

    At line 230 of file input.f90 (unit = 10, file = 'options')
    它叫你检查options 230行

  • 量子海洋

    引用回帖:
    3楼: Originally posted by get-it at 2021-07-28 16:43:58
    At line 230 of file input.f90 (unit = 10, file = 'options')
    它叫你检查options 230行

    options文件没有230行,是input.f90文件的第230行,但是我不知道是什么问题,以下是input.f90文件。

    ! Copyright

    ! The University Montpellier 2, a scientific, cultural and professional
    ! public establishment whose registered office is at
    ! Place Eugène Bataillon - 34095 Montpellier CEDEX 05 - France.
    ! N° SIREN 193 410 883, APE Code 803Z
    ! represented by its President, Danièle HERIN.

    ! Authors : Dr. Sébastien Le Roux (sebastien.leroux@ipcms.unistra.fr)
    !           Pr. Philippe Jund (pjund@univ-montp2.fr)

    ! This software is a computer program whose purpose is to analyse
    ! the results of molecular dynamics simulations.
    ! This code is named R.I.N.G.S “Rigorous Investigation of Networks
    ! Generated using Simulations” and its main feature is the analysis of
    ! the connectivity using ring statistics.

    ! This software is governed by the CeCILL-B license under French law and
    ! abiding by the rules of distribution of free software.
    ! You can  use, modify and/ or redistribute the software under the terms
    ! of the [CeCILL|CeCILL-B|CeCILL-C] license as circulated by CEA, CNRS
    ! and INRIA at the following URL:
    ! "https://www.cecill.info".

    ! As a counterpart to the access to the source code and  rights to copy,
    ! modify and redistribute granted by the license, users are provided only
    ! with a limited warranty  and the software's author, the holder of the
    ! economic rights,  and the successive licensors have only limited
    ! liability.

    ! In this respect, the user's attention is drawn to the risks associated
    ! with loading,  using,  modifying and/or developing or reproducing the
    ! software by the user in light of its specific status of free software,
    ! that may mean  that it is complicated to manipulate,  and  that  also
    ! therefore means  that it is reserved for developers  and  experienced
    ! professionals having in-depth computer knowledge. Users are therefore
    ! encouraged to load and test the software's suitability as regards their
    ! requirements in conditions enabling the security of their systems and/or
    ! data to be ensured and,  more generally, to use and operate it in the
    ! same conditions as regards security.

    ! The fact that you are presently reading this means that you have had
    ! knowledge of the CeCILL-B license and that you accept its terms.

    SUBROUTINE READ_INPUT

    !
    ! Read the user input file and the 'options' file
    !

    USE PARAMETERS
    USE EXTRA

    LOGICAL :: CALC_R=.false.

    open (unit=9, file=NOM_FILE, action='read', status='old')

      read (9, *)
      read (9, *)
      read (9, *)
      read (9, *) SYSTLABEL
      if (DEBUGINP) write (6, *) SYSTLABEL
      read (9, *) NA
      if (DEBUGINP) write (6, *) NA
      read (9, *) NSP
      if (DEBUGINP) write (6, *) NSP
    !allocate (S_LENGTH(NSP), STAT=ERR)
    !if (ERR .ne. 0) then
    !   write (6, 001) t_p, "S_LENGTH"
    !  STOP
    !endif
    allocate (LABEL(NSP), STAT=ERR)
    if (ERR .ne. 0) then
       write (6, 001) t_p, "LABEL"
      STOP
    endif
    !allocate (M_SS(NSP), STAT=ERR)
    !if (ERR .ne. 0) then
    !   write (6, 001) t_p, "M_SS"
    !endif
    !allocate (R_DW(NSP), STAT=ERR)
    !if (ERR .ne. 0) then
    !   write (6, 001) t_p, "R_DW"
    !endif

      do i=1, NSP
        LABEL(i)=""
      enddo
    !    S_LENGTH(i)=0.0d0
    !    M_SS(i)=0.0d0
    !    R_DW(i)=0.0d0
      read (9, *) LABEL!, S_LENGTH(i), M_SS(i), R_DW(i)
      if (DEBUGINP) then
        do i=1, NSP
          write (6, *) LABEL(i)!, S_LENGTH(i), M_SS(i), R_DW(i)
        enddo
      endif
      read (9, *) NS
      if (DEBUGINP) write (6, *) NS
      do i=1,3
      do j=1, 3
        lvect(i,j)=0.0d0
      enddo
      enddo
      read (9, *) LATTYPE
      if (LATTYPE .eq. 1) then
        read (9, *) lvect(1,1), lvect(1,2), lvect(1,3)
        if (DEBUGINP) write (6, *) lvect(1,1), lvect(1,2), lvect(1,3)
        read (9, *) lvect(2,1), lvect(2,2), lvect(2,3)
        if (DEBUGINP) write (6, *) lvect(2,1), lvect(2,2), lvect(2,3)
        read (9, *) lvect(3,1), lvect(3,2), lvect(3,3)
        if (DEBUGINP) write (6, *) lvect(3,1), lvect(3,2), lvect(3,3)
      else
        read (9, *) modv(1), modv(2), modv(3)
        if (DEBUGINP) write (6, *) modv(1), modv(2), modv(3)
        ALPHA=0.0d0
        BETA=0.0d0
        GAMA=0.0d0
        read (9, *) ALPHA, BETA, GAMA
        if (DEBUGINP) write (6, *) ALPHA, BETA, GAMA
      endif
      DELTA_T=0.0d0
      read (9, *) DELTA_T
      if (DEBUGINP) write (6, *) DELTA_T
      read (9, *) DATA_FORM
      if (DEBUGINP) write (6, *) DATA_FORM
      if (DATA_FORM .eq. "MSF&quot then
        read (9, 106) MSF_ROOT
        if (DEBUGINP) write (6, 106) MSF_ROOT
        read (9, *) FIRST_INDEX
        if (DEBUGINP) write (6, *) FIRST_INDEX
        read (9, *) LAST_INDEX
        if (DEBUGINP) write (6, *) LAST_INDEX
        read (9, *) NSBG
        if (NSBG .eq. 0) NSBG=1
        if (DEBUGINP) write (6, *) NSBG
      else
        read (9, *) NOM_FILE
        if (DEBUGINP) write (6, *) NOM_FILE
        if (DATA_FORM.eq."VAS" .or. DATA_FORM.eq."TRJ&quot then
          allocate (NBSPBS(NSP), STAT=ERR)
          if (ERR .ne. 0) then
            write (6, 001) t_p, "NBSPBS"
            STOP
          endif
          do i=1, NSP
            read (9, *) LABEL(i), NBSPBS(i)
            if (DEBUGINP) write (6, *) LABEL(i), NBSPBS(i)
          enddo
        else if (DATA_FORM.eq."PDB" .and. NS.gt.1) then
          write (6, '("Error: for PDB files the number of steps, NS, must be 1&quot')
          STOP
        endif
      endif
      read (9, *) NUMBER_OF_DELTA_R
      NUMBER_OF_DELTA_R=2*NUMBER_OF_DELTA_R
      if (DEBUGINP) write (6, *) NUMBER_OF_DELTA_R
      read (9, *) NUMBER_OF_Q_POINTS
      if (DEBUGINP) write (6, *) NUMBER_OF_Q_POINTS
      QMAX=0.0d0
      read (9, *) QMAX
      if (DEBUGINP) write (6, *) QMAX
      SIGMA_LISS=0.0d0
      read (9, *) SIGMA_LISS
      if (DEBUGINP) write (6, *) SIGMA_LISS
      read (9, *) NUMBER_OF_DELTA_ANG
      if (DEBUGINP) write (6, *) NUMBER_OF_DELTA_ANG
      read (9, *) NDV
      if (DEBUGINP) write (6, *) NDV
      read (9, *) TAILLE_REF
      TAILLD=2*TAILLE_REF
      if (TAILLD .lt. 3) then
        write (6, '(" Changing option =>  Max. ring size must be >= 3&quot')
        TAILLD=4
        TAILLE_REF=2
      endif
      if (DEBUGINP) write (6, *) TAILLE_REF
      read (9, *) TAILLC
      if (TAILLC .lt. 2) then
        write (6, '(" Changing option =>  Max. chain length must be >= 2&quot')
        TAILLC=2
      endif
      if (DEBUGINP) write (6, *) TAILLC

      read (9, *)
      NL=NSP*(NSP+1)/2
      allocate (GCUT(NSP,NSP), STAT=ERR)
      if (ERR .ne. 0) then
         write (6, 001) t_p, "GCUT"
        STOP
      endif

      do i=1, NL

        read (9, *) A1, A2, DC
        if (DEBUGINP) write (6, *) A1, " ", A2, DC
        j=1
        do while (LABEL(j) .ne. A1)

          j=j+1

        enddo
        l=1
        do while (LABEL(l) .ne. A2)

          l=l+1

        enddo

        GCUT(j,l)=0.0d0
        GCUT(l,j)=0.0d0
        GCUT(j,l)=DC
        GCUT(l,j)=DC

      enddo

      Gr_cutoff=0.0d0
      read (9, *) ATOT, Gr_cutoff
      if (DEBUGINP) write (6, *) ATOT, Gr_cutoff

    close (9)

    ! Now read 'options' file

      open (unit=10, file="options", action="read", status='old')
      if(t_p .eq. 0) write (6, '(/,"==========      Options      ==========",/)')
      read (10, *)
      read (10, *)
      read (10, *)
      read (10, *) Nom1, PBC
      if (PBC) then
        if(t_p .eq. 0) write (6, '("  =>  Periodic Boundary Conditions applied&quot')
      else
        if(t_p .eq. 0) write (6, '("  =>  No Periodic Boundary Conditions applied&quot')
      endif
      read (10, *) Nom1, FRAC
      if (FRAC) then
        if(t_p .eq. 0) write (6, '("  =>  Atomic positions in fractional coordinates&quot')
      else
        if(t_p .eq. 0) write (6, '("  =>  Atomic positions in real coordinates&quot')
      endif
      read (10, *) Nom1, CALC_GR
      if(t_p .eq. 0) then
        if (CALC_GR) write (6, '("  =>  Calculate g(r) radial distribution functions&quot')
      endif
      read (10, *) Nom1, CALC_SQ
      if (CALC_SQ .and. .not.(CALC_GR)) then
        if(t_p .eq. 0) write (6, '(" Changing option =>  Calculate g(r) is needed to compute S(q)&quot')
        CALC_GR=.true.
      endif
      if(t_p .eq. 0) then
        if (CALC_SQ) write (6, '("  =>  Calculate S(q) structure factor from FFT[g(r)]&quot')
      endif
      read (10, *) Nom1, CALC_SK
      if(t_p .eq. 0) then
        if (CALC_SK) write (6, '("  =>  Calculate S(k) structure factor from Debye equation&quot')
      endif
      read (10, *) Nom1, CALC_GK
      if (CALC_GK .and. .not.(CALC_SK)) then
        if(t_p .eq. 0) write (6, '(" Changing option =>  Calculate S(k) Debye is needed to compute g(r) from FFT[S(k) Debye]&quot')
        CALC_SK=.true.
      endif
      if(t_p .eq. 0) then
        if (CALC_GK) write (6, '("  =>  Calculate g(r) from FFT[S(k) Debye]&quot')
      endif
      read (10, *) Nom1, CALC_MSD
      if(t_p .eq. 0) then
        if (CALC_MSD) write (6, '("  =>  Calculate Mean Square Displacement MSD&quot')
      endif
      read (10, *) Nom1, MSDEA
      if(t_p .eq. 0) then
        if (MSDEA) write (6, '("  =>  Calculate single atom MSDs&quot')
      endif
      read (10, *) Nom1, CALC_BONDS
      if(t_p .eq. 0) then
        if (CALC_BONDS) write (6, '("  =>  Calculate bond properties&quot')
      endif
      read (10, *) Nom1, CALC_ANG
      if(t_p .eq. 0) then
        if (CALC_ANG) write (6, '("  =>  Calculate angles distribution&quot')
      endif
    ! Chains statistics:
      read (10, *) Nom1, CALC_CHAINS
      read (10, *)
      read (10, *) Nom1, CTLT
      read (10, *) Nom1, AAAA
      read (10, *) Nom1, ACAC
      read (10, *) Nom1, ISOLATED
      if(t_p .eq. 0) then
        if (CALC_CHAINS) write (6, '("  =>  Calculate chains statistics&quot')
        if (CALC_CHAINS .and. CTLT .eq. 0)then
          write (6, '(3x," =>  Using all atoms as nodes&quot')
        elseif (CALC_CHAINS .and. (CTLT.le.NSP .and. CTLT.gt.0)) then
          write (6, '(3x," =>  Using species ",I2," as nodes&quot') CTLT
        elseif (CALC_CHAINS) then
          write (6, '(" Problem in ''options'' file => check chains statistics options&quot')
          STOP
        endif
        if (CALC_CHAINS .and. AAAA .and. ACAC) then
          write (6, '(" Problem in ''options'' file => check chains statistics options&quot')
          write (6, '(" Problem in ''options'' file => AAAA, ABAB or none, not both !&quot')
          STOP
        endif
        if (CALC_CHAINS .and. AAAA) write (6, '(3x," =>  Pure AAAA chains&quot')
        if (CALC_CHAINS .and. ACAC) write (6, '(3x," =>  Pure ABAB chains&quot')
        if (CALC_CHAINS .and. ISOLATED) write (6, '(3x," =>  Only 1-(2)n-1 coordinations chains&quot')
        if (CALC_CHAINS .and. .not.(CALC_BONDS)) then
          if(t_p .eq. 0) then
            write (6, '(" Changing option =>  Bond properties are needed to compute chains statistics&quot')
          endif
          CALC_BONDS=.true.
        endif
      endif
      read (10, *)
    ! Rings statistics:
      read (10, *) Nom1, CALC_R
      read (10, *)
      read (10, *) Nom1, LTLT
      read (10, *) Nom1, ABAB
      read (10, *) Nom1, CALC_R0
      read (10, *) Nom1, CALC_R1
      read (10, *) Nom1, CALC_R2
      read (10, *) Nom1, CALC_R3
      read (10, *) Nom1, CALC_R4
      read (10, *) Nom1, CALC_PRINGS
      read (10, *) Nom1, CALC_STRINGS
      read (10, *) Nom1, BARYCROUT
      read (10, *) Nom1, RING_P1
      read (10, *) Nom1, RING_P2
      read (10, *) Nom1, RING_P3
      read (10, *) Nom1, RING_P4
      read (10, *) Nom1, RING_P5
      if (CALC_R .and. (CALC_R0.or.CALC_R1.or.CALC_R2.or.CALC_R3.or.CALC_R4.or.CALC_PRINGS.or.CALC_STRINGS)) then
        CALC_RINGS=.true.
        if (CALC_R1.or.CALC_R2.or.CALC_R3.or.CALC_R4) DOAMPAT=.true.
      else
        CALC_RINGS=.false.
        ABAB=.false.
      endif
      if (RING_P1 .or. RING_P2 .or. RING_P3 .or. RING_P4 .or. RING_P5) then
        CALC_RPROP=.true.
      else
        CALC_RPROP=.false.
      endif
      if(t_p .eq. 0) then
        if (CALC_RINGS) write (6, '("  =>  Calculate rings statistics&quot')
        if (CALC_RINGS .and. LTLT .eq. 0)then
          write (6, '(3x," =>  Using all atoms as nodes&quot')
        elseif (CALC_RINGS .and. (LTLT.le.NSP .and. LTLT.gt.0)) then
          write (6, '(3x," =>  Using species ",I2," as nodes&quot') LTLT
        elseif (CALC_RINGS) then
          write (6, '(" Problem in ''options'' file => check rings statistics options&quot')
          STOP
        endif
        if (CALC_RINGS .and. ABAB) write (6, '(3x," =>  Pure ABAB rings&quot')
        if (CALC_RINGS .and. CALC_R0) write (6, '(3x," =>  Find all rings in the simulation box&quot')
        if (CALC_RINGS .and. CALC_R1) write (6, '(3x," =>  King''s rings statistics&quot')
        if (CALC_RINGS .and. CALC_R2) write (6, '(3x," =>  Guttman''s rings statistics&quot')
        if (CALC_RINGS .and. CALC_R3) write (6, '(3x," =>  King''s + homopolar bonds rings statistics&quot')
        if (CALC_RINGS .and. CALC_R4) write (6, '(3x," =>  Guttman''s + homopolar bonds rings statistics&quot')
        if (CALC_RINGS .and. CALC_PRINGS) write (6, '(3x," =>  Primitive rings statistics&quot')
        if (CALC_RINGS .and. CALC_STRINGS) write (6, '(3x," =>  Strong rings statistics&quot')
        if (CALC_RINGS .and. BARYCROUT) write (6, '(3x," =>  Output OpenDX rings barycenters positions&quot')
        if (CALC_RINGS .and. CALC_RPROP) write (6, '(3x," =>  Compute detailed rings properties&quot')
        if (CALC_RINGS .and. .not.CALC_BONDS) then
          write (6, '(" Changing option =>  Bond properties are needed to compute rings statistics&quot')
          CALC_BONDS=.true.
        endif
      endif
      read (10, *)
      read (10, *) Nom1, CALC_VAC
      if(t_p .eq. 0) then
        if (CALC_VAC) write (6, '("  =>  Calculate voids distribution&quot')
      endif
      if (CALC_VAC .and. .not.(CALC_BONDS)) then
        if(t_p .eq. 0) then
          write (6, '(" Changing option =>  Bond properties are needed to evaluate void distribution&quot')
        endif
        CALC_BONDS=.true.
      endif
      read (10, *)
      read (10, *)
      read (10, *)
      read (10, *) Nom1, EVOLOUT
      if(t_p .eq. 0) then
        if (EVOLOUT) write (6, '("  =>  Ouptut calculations results for each MD steps&quot')
      endif
      read (10, *) Nom1, DXOUT
      if(t_p .eq. 0) then
        if (DXOUT) then
          write (6, '("  =>  Ouptut OpenDX .dx file(s)&quot')
          write (6, '("      Main file = ''SYSTEM.dx''&quot')
        endif
      endif
      read (10, *)
      read (10, *) Nom1, RADOUT
      if (DXOUT .and. RADOUT) then
        if(t_p .eq. 0) write (6, '(3x," =>  Using atomic radius as color map&quot')
        IDOUT=.false.
      endif
      read (10, *) Nom1, RNGOUT
      if (DXOUT .and. RNGOUT) then
        if (LTLT .ne. 0) then
          if(t_p .eq. 0) then
            write (6, '(3x," =>  Atomic ring factor can''t be used as color map&quot')
            write (6, '(3x,"     if rings search options are not changed&quot')
            write (6, '(3x,"     Uing atomic mass as color map instead&quot')
          endif
        else
          if(t_p .eq. 0) write (6, '(3x," =>  Using atomic ring factor as color map&quot')
          IDOUT=.false.
          FACTATPNA=.true.
        endif
      endif
      read (10, *) Nom1, DRNGOUT
      if (DXOUT .and. DRNGOUT) then
        if (LTLT .ne. 0) then
          if(t_p .eq. 0) then
            write (6, '(3x," =>  Delta ring factor can''t be used as color map&quot')
            write (6, '(3x,"     if rings search options are not changed&quot')
            write (6, '(3x,"     Uing atomic mass as color map instead&quot')
          endif
        else
          if(t_p .eq. 0) write (6, '(3x," =>  Using Delta ring factor as color map&quot')
          IDOUT=.false.
          FACTATPNA=.true.
        endif
      endif
      if (DXOUT .and. IDOUT) then
        if(t_p .eq. 0) write (6, '(3x," =>  Using atomic mass as color map&quot')
      endif
      read (10, *) Nom1, VACOUT
      if (DXOUT .and. VACOUT) then
        if(t_p .eq. 0) write (6, '(3x," =>  Voids visualization using OpenDX&quot')
        if (.not.(CALC_VAC)) then
          if(t_p .eq. 0) write (6, '(" Changing option =>  Evaluate voids distribution is needed to visualize voids&quot')
          CALC_VAC=.true.
          if (.not.(CALC_BONDS)) then
            if(t_p .eq. 0) then
              write (6, '(" Changing option =>  Bond properties are needed to evaluate voids distribution&quot')
            endif
            CALC_BONDS=.true.
          endif
        endif
      endif
      read (10, *) Nom1, DXTETRA
      if (DXOUT .and. DXTETRA) then
        if(t_p .eq. 0) write (6, '(3x," =>  Tetrahedra visualization using OpenDX&quot')
          if (.not.(CALC_BONDS)) then
            if(t_p .eq. 0) then
              write (6, '(" Changing option =>  Bond properties are needed to visualize tetrahedra&quot')
            endif
            CALC_BONDS=.true.
          endif
      endif
      read (10, *) Nom1, PATHDX
      if (PATHDX) then
        if(t_p .eq. 0) write (6, '(3x," =>  Trajectories of the ",I4," particles of highest MSD&quot') NVALT
        if (.not.CALC_MSD) then
          if (t_p .eq. 0) write (6, '(" Changing option =>  MSD has to be computed to output trajectories&quot')
          CALC_MSD=.true.
        endif
        if (.not.MSDEA) then
          if (t_p .eq. 0) write (6, '(" Changing option =>  MSD for single atoms have to be computed to output trajectories&quot')
          MSDEA=.true.
        endif
      endif
      read (10, *)
      read (10, *) Nom1, NOM_OUT
      if(t_p .eq. 0) write (6, '(/,"========      End Options      ========",//)')

      close (10)

    !101 FORMAT (I4)
    !102 FORMAT (I2)
    !103 FORMAT (I5)
    !104 FORMAT (f15.10)
    !105 FORMAT (A3)
    106 FORMAT (A13)
    !107 FORMAT (I10)
    !109 FORMAT (A17)
    !111 FORMAT (A2,2x,f9.6)
    !113 FORMAT (A15)
    !114 FORMAT (f7.5)
    001 FORMAT (/," Allocation Problem -> No space left ?! :: node ",i3," READ_INPUT allocation of ",A15)

    END SUBROUTINE READ_INPUT

  • get-it

    抱歉了,我也不太熟。
    https://sourceforge.net/p/rings- ... il.com/#msg33203770

    我看到rings官网有人问了同样的问题,不过似乎没有回答。

  • 量子海洋

    引用回帖:
    5楼: Originally posted by get-it at 2021-07-29 21:10:50
    抱歉了,我也不太熟。
    https://sourceforge.net/p/rings-code/mailman/rings-code-news/thread/CALA6MD8rEa-3tYqJR7Xqz5NCtmSZaXnPP%2BNyYUx1W%3DUFuB-4yw%40mail.gmail.com/#msg33203770

    我看到rings官网有人问 ...

    好的,谢谢你。

  • 我是Alun

    引用回帖:
    6楼: Originally posted by 量子海洋 at 2021-07-30 10:10:52
    好的,谢谢你。...

    您好,我运行时候报错 Number of species in step  1 has changed, see input file line 3
    请问您有遇到这种情况吗?该如何解决?

  • 风卷木叶

    RINGS 怎么用呀 ?

猜你喜欢
下载小木虫APP
与700万科研达人随时交流
  • 二维码
  • IOS
  • 安卓