LCOV - code coverage report
Current view: top level - io - nocoInputCheck.F90 (source / functions) Hit Total Coverage
Test: combined.info Lines: 15 46 32.6 %
Date: 2019-09-08 04:53:50 Functions: 1 1 100.0 %

          Line data    Source code
       1             : !--------------------------------------------------------------------------------
       2             : ! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
       3             : ! This file is part of FLEUR and available as free software under the conditions
       4             : ! of the MIT license as expressed in the LICENSE file in more detail.
       5             : !--------------------------------------------------------------------------------
       6             : 
       7             : MODULE m_nocoInputCheck
       8             : 
       9             :    CONTAINS
      10             : 
      11          11 :    SUBROUTINE nocoInputCheck(atoms,input,vacuum,noco)
      12             : 
      13             :       USE m_juDFT
      14             :       USE m_types
      15             : 
      16             :       IMPLICIT NONE
      17             : 
      18             :       TYPE(t_atoms),  INTENT(IN)    :: atoms
      19             :       TYPE(t_input),  INTENT(IN)    :: input
      20             :       TYPE(t_vacuum), INTENT(IN)    :: vacuum
      21             :       TYPE(t_noco),   INTENT(IN)    :: noco
      22             : 
      23             :       INTEGER itype
      24             :       LOGICAL l_relax_any
      25             : 
      26             : !---> make sure second variation is switched off
      27          11 :       IF (input%secvar) THEN
      28           0 :          WRITE (6,*) 'This non-collinear version of the flapw program'
      29           0 :          WRITE (6,*) 'cannot be used with the second variation!!'
      30           0 :          CALL juDFT_error("Second variation cannot be used!!!" ,calledby="nocoInputCheck")
      31             :       END IF
      32             : 
      33             : !---> make sure histogram method is used
      34          11 :       IF (input%gauss) THEN
      35           0 :          WRITE (6,*) 'This non-collinear version of the flapw program'
      36           0 :          WRITE (6,*) 'cannot be used with the Gaussian smearing for '
      37           0 :          WRITE (6,*) 'the Brillouin zone integration!!'
      38           0 :          WRITE (6,*) 'Please use the histogram method.'
      39           0 :          CALL juDFT_error("Only histogram Brillouin zone integration can be used!!!",calledby ="nocoInputCheck")
      40             :       END IF
      41             : 
      42             : !---> make sure force is switched off
      43          11 :       IF (input%l_f) THEN
      44           0 :          WRITE (6,*) 'This non-collinear version of the flapw program'
      45           0 :          WRITE (6,*) 'does not support force calculations.'
      46           0 :          CALL juDFT_error("force calculations not supported!!!",calledby="nocoInputCheck")
      47             :       END IF
      48             : 
      49             : !---> make sure nstm equals zero
      50          11 :       IF (vacuum%nstm.NE.0) THEN
      51           0 :          WRITE (6,*) 'This non-collinear version of the flapw program'
      52           0 :          WRITE (6,*) 'does not support STM calculations(nstm .NE. 0).'
      53           0 :          CALL juDFT_error("nstm /= 0 not supported!",calledby ="nocoInputCheck")
      54             :       END IF
      55             : 
      56             : !---> make sure starcoeff is switched off
      57             : !      IF (starcoeff) THEN
      58             : !         WRITE (6,*) 'This non-collinear version of the flapw program'
      59             : !         WRITE (6,*) 'does not support starcoefficients output.'
      60             : !     CALL juDFT_error("starcoefficients output (for STM) cannot be !!!"
      61             : !     generated
      62             : !      ENDIF
      63             : 
      64             : !---> make sure coretails are switched off
      65          11 :       IF (input%ctail) THEN
      66           0 :          WRITE (6,*) 'This non-collinear version of the flapw program'
      67           0 :          WRITE (6,*) 'cannot be used with the coretail option!! '
      68           0 :          CALL juDFT_error("Coretail option cannot be used!!!",calledby="nocoInputCheck")
      69             :       END IF
      70             : 
      71             : !---> make sure score is false
      72          11 :       IF (input%score) THEN
      73           0 :          WRITE (6,*) 'This non-collinear version of the flapw program'
      74           0 :          WRITE (6,*) 'cannot be used with the score option!! '
      75           0 :          CALL juDFT_error("score must be false!!!",calledby ="nocoInputCheck")
      76             :       END IF
      77             : 
      78             : !---> make sure that moments are not relaxed and constrained
      79          11 :       l_relax_any = .FALSE.
      80          32 :       DO itype = 1,atoms%ntype
      81          32 :          l_relax_any = l_relax_any.OR.noco%l_relax(itype)
      82             :       END DO
      83          11 :       IF (l_relax_any.AND.noco%l_constr) THEN
      84           0 :          WRITE (6,*)'The relaxation of the moment is switched on for at'
      85           0 :          WRITE (6,*)'least one atom. At the same time the constrained'
      86           0 :          WRITE (6,*)'moment option has been switched on!!!'
      87             : !          CALL juDFT_error("relaxation of moments and constraint are sw
      88             :       ENDIF
      89          11 :       if (l_relax_any.or.noco%l_constr) CALL judft_warn("Constraint moments and relaxations are untested in this version!")
      90             : !---> make sure that perp. component of mag. is calculated if needed
      91          11 :       IF ( (l_relax_any .or. noco%l_constr) .and. (.not. noco%l_mperp) ) THEN
      92           0 :          WRITE (6,*)'The relaxation of the moment is switched on for at'
      93           0 :          WRITE (6,*)'least one atom or the constrained moment option is'
      94           0 :          WRITE (6,*)'switched on. In either case, you need to set'
      95           0 :          WRITE (6,*)'l_mperp=T !!'
      96           0 :          CALL juDFT_error("Stop: Set l_mperp = T to relax or constrain the moments!!",calledby ="nocoInputCheck")
      97             :       ENDIF
      98             : !---> make sure l_constr is switched off in the case of spin spirals
      99          11 :       IF (noco%l_constr .and. noco%l_ss) THEN
     100           0 :          WRITE (6,*)'The constraint moment option is not implemeted'
     101           0 :          WRITE (6,*)'for spin spirals.'
     102           0 :          CALL juDFT_error("Stop: constraint not implemented for spin spirals!!",calledby ="nocoInputCheck")
     103             :       ENDIF
     104             : 
     105          11 :    END SUBROUTINE nocoInputCheck
     106             : 
     107             : END MODULE m_nocoInputCheck

Generated by: LCOV version 1.13