用VASP跑完AIMD后,想用RINGS(http://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”,不知道问题出在哪里,怎么解决?
! 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.
! 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:
! "http://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')
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")')
else
if(t_p .eq. 0) write (6, '(" => No Periodic Boundary Conditions applied")')
endif
read (10, *) Nom1, FRAC
if (FRAC) then
if(t_p .eq. 0) write (6, '(" => Atomic positions in fractional coordinates")')
else
if(t_p .eq. 0) write (6, '(" => Atomic positions in real coordinates")')
endif
read (10, *) Nom1, CALC_GR
if(t_p .eq. 0) then
if (CALC_GR) write (6, '(" => Calculate g(r) radial distribution functions")')
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)")')
CALC_GR=.true.
endif
if(t_p .eq. 0) then
if (CALC_SQ) write (6, '(" => Calculate S(q) structure factor from FFT[g(r)]")')
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")')
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]")')
CALC_SK=.true.
endif
if(t_p .eq. 0) then
if (CALC_GK) write (6, '(" => Calculate g(r) from FFT[S(k) Debye]")')
endif
read (10, *) Nom1, CALC_MSD
if(t_p .eq. 0) then
if (CALC_MSD) write (6, '(" => Calculate Mean Square Displacement MSD")')
endif
read (10, *) Nom1, MSDEA
if(t_p .eq. 0) then
if (MSDEA) write (6, '(" => Calculate single atom MSDs")')
endif
read (10, *) Nom1, CALC_BONDS
if(t_p .eq. 0) then
if (CALC_BONDS) write (6, '(" => Calculate bond properties")')
endif
read (10, *) Nom1, CALC_ANG
if(t_p .eq. 0) then
if (CALC_ANG) write (6, '(" => Calculate angles distribution")')
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")')
if (CALC_CHAINS .and. CTLT .eq. 0)then
write (6, '(3x," => Using all atoms as nodes")')
elseif (CALC_CHAINS .and. (CTLT.le.NSP .and. CTLT.gt.0)) then
write (6, '(3x," => Using species ",I2," as nodes")') CTLT
elseif (CALC_CHAINS) then
write (6, '(" Problem in ''options'' file => check chains statistics options")')
STOP
endif
if (CALC_CHAINS .and. AAAA .and. ACAC) then
write (6, '(" Problem in ''options'' file => check chains statistics options")')
write (6, '(" Problem in ''options'' file => AAAA, ABAB or none, not both !")')
STOP
endif
if (CALC_CHAINS .and. AAAA) write (6, '(3x," => Pure AAAA chains")')
if (CALC_CHAINS .and. ACAC) write (6, '(3x," => Pure ABAB chains")')
if (CALC_CHAINS .and. ISOLATED) write (6, '(3x," => Only 1-(2)n-1 coordinations chains")')
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")')
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")')
if (CALC_RINGS .and. LTLT .eq. 0)then
write (6, '(3x," => Using all atoms as nodes")')
elseif (CALC_RINGS .and. (LTLT.le.NSP .and. LTLT.gt.0)) then
write (6, '(3x," => Using species ",I2," as nodes")') LTLT
elseif (CALC_RINGS) then
write (6, '(" Problem in ''options'' file => check rings statistics options")')
STOP
endif
if (CALC_RINGS .and. ABAB) write (6, '(3x," => Pure ABAB rings")')
if (CALC_RINGS .and. CALC_R0) write (6, '(3x," => Find all rings in the simulation box")')
if (CALC_RINGS .and. CALC_R1) write (6, '(3x," => King''s rings statistics")')
if (CALC_RINGS .and. CALC_R2) write (6, '(3x," => Guttman''s rings statistics")')
if (CALC_RINGS .and. CALC_R3) write (6, '(3x," => King''s + homopolar bonds rings statistics")')
if (CALC_RINGS .and. CALC_R4) write (6, '(3x," => Guttman''s + homopolar bonds rings statistics")')
if (CALC_RINGS .and. CALC_PRINGS) write (6, '(3x," => Primitive rings statistics")')
if (CALC_RINGS .and. CALC_STRINGS) write (6, '(3x," => Strong rings statistics")')
if (CALC_RINGS .and. BARYCROUT) write (6, '(3x," => Output OpenDX rings barycenters positions")')
if (CALC_RINGS .and. CALC_RPROP) write (6, '(3x," => Compute detailed rings properties")')
if (CALC_RINGS .and. .not.CALC_BONDS) then
write (6, '(" Changing option => Bond properties are needed to compute rings statistics")')
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")')
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")')
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")')
endif
read (10, *) Nom1, DXOUT
if(t_p .eq. 0) then
if (DXOUT) then
write (6, '(" => Ouptut OpenDX .dx file(s)")')
write (6, '(" Main file = ''SYSTEM.dx''")')
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")')
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")')
write (6, '(3x," if rings search options are not changed")')
write (6, '(3x," Uing atomic mass as color map instead")')
endif
else
if(t_p .eq. 0) write (6, '(3x," => Using atomic ring factor as color map")')
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")')
write (6, '(3x," if rings search options are not changed")')
write (6, '(3x," Uing atomic mass as color map instead")')
endif
else
if(t_p .eq. 0) write (6, '(3x," => Using Delta ring factor as color map")')
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")')
endif
read (10, *) Nom1, VACOUT
if (DXOUT .and. VACOUT) then
if(t_p .eq. 0) write (6, '(3x," => Voids visualization using OpenDX")')
if (.not.(CALC_VAC)) then
if(t_p .eq. 0) write (6, '(" Changing option => Evaluate voids distribution is needed to visualize voids")')
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")')
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")')
if (.not.(CALC_BONDS)) then
if(t_p .eq. 0) then
write (6, '(" Changing option => Bond properties are needed to visualize tetrahedra")')
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")') NVALT
if (.not.CALC_MSD) then
if (t_p .eq. 0) write (6, '(" Changing option => MSD has to be computed to output trajectories")')
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")')
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)