From 0233b050f44d00949d68d8eacb23bf28a067a31a Mon Sep 17 00:00:00 2001 From: dalcorso Date: Mon, 21 Jul 2008 08:47:43 +0000 Subject: [PATCH] Added two checks to stop the phonon code in non implemented cases: lraman+GGA, fpol+noncolinear git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5056 c92efa57-630b-4861-b058-cf58834340f0 --- PH/phq_readin.f90 | 4 +++- PH/phq_setup.f90 | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/PH/phq_readin.f90 b/PH/phq_readin.f90 index e5d992d75..d069cf81d 100644 --- a/PH/phq_readin.f90 +++ b/PH/phq_readin.f90 @@ -41,7 +41,7 @@ SUBROUTINE phq_readin() USE output, ONLY : fildyn, fildvscf, fildrho USE disp, ONLY : nq1, nq2, nq3, iq1, iq2, iq3 USE io_files, ONLY : tmp_dir, prefix, trimcheck - USE noncollin_module, ONLY : i_cons + USE noncollin_module, ONLY : i_cons, noncolin USE ldaU, ONLY : lda_plus_u USE control_flags, ONLY : iverbosity, modenum USE io_global, ONLY : ionode @@ -198,6 +198,8 @@ SUBROUTINE phq_readin() IF (dek <= 0.d0) CALL errore ( 'phq_readin', ' Wrong dek ', 1) epsil = epsil .OR. lraman .OR. elop IF ( (lraman.OR.elop) .AND. fildrho == ' ') fildrho = 'drho' + IF (noncolin.and.fpol) & + CALL errore('phonon','noncolinear and fpol not programed',1) ! ! reads the q point (just if ldisp = .false.) ! diff --git a/PH/phq_setup.f90 b/PH/phq_setup.f90 index 201582f8a..04770221b 100644 --- a/PH/phq_setup.f90 +++ b/PH/phq_setup.f90 @@ -64,6 +64,7 @@ subroutine phq_setup char_mat, name_rap, gname, name_class, ir_ram USE rap_point_group_is, ONLY : code_group_is, gname_is use phcom + USE ramanm, ONLY : lraman, elop USE control_flags, ONLY : iverbosity, modenum USE funct, ONLY : dmxc, dmxc_spin, dmxc_nc, dft_is_gradient USE mp, ONLY : mp_max, mp_min @@ -105,6 +106,11 @@ subroutine phq_setup call start_clock ('phq_setup') ! + ! 0) A few checks + ! + IF (dft_is_gradient().and.(lraman.or.elop)) call errore('phq_setup', & + 'third order derivatives not implemented with GGA', 1) + ! ! 1) Computes the total local potential (external+scf) on the smooth grid ! call set_vrs (vrs, vltot, v%of_r, kedtau, v%kin_r, nrxx, nspin, doublegrid)