TABLE OF CONTENTS


ABINIT/mkradim [ Functions ]

[ Top ] [ Functions ]

NAME

 mkradim

FUNCTION

  Not so trivial subroutine to make dimensionless real space
  primitive translations rprim(3,3) from dimentional rprimd(3).
  also make acell(3).

COPYRIGHT

 Copyright (C) 1998-2017 ABINIT group (DCA, XG, GMR)
 This file is distributed under the terms of the
 GNU General Public License, see ~abinit/COPYING
 or http://www.gnu.org/copyleft/gpl.txt .

INPUTS

  rprimd(3,3)=dimensional real space primitive translations (bohr)
              where: rprimd(i,j)=rprim(i,j)*acell(j)

OUTPUT

  acell(3)=unit cell length scales (bohr)
  rprim(3,3)=dimensionless real space primitive translations

PARENTS

      gstate,gstateimg,ingeo,m_ddk,m_pimd,m_use_ga,pred_steepdesc
      predict_pimd,wvl_memory,xfpack_vin2x

CHILDREN

SOURCE

33 #if defined HAVE_CONFIG_H
34 #include "config.h"
35 #endif
36 
37 #include "abi_common.h"
38 
39 
40 subroutine mkradim(acell,rprim,rprimd)
41 
42  use defs_basis
43  use m_profiling_abi
44 
45 !This section has been created automatically by the script Abilint (TD).
46 !Do not modify the following lines by hand.
47 #undef ABI_FUNC
48 #define ABI_FUNC 'mkradim'
49 !End of the abilint section
50 
51  implicit none
52 
53 !Arguments ------------------------------------
54 !arrays
55  real(dp),intent(out) :: acell(3),rprim(3,3)
56  real(dp),intent(in) :: rprimd(3,3)
57 
58 !Local variables-------------------------------
59 !scalars
60  integer :: ii
61 
62 ! *************************************************************************
63 
64 !Use a representation based on normalised rprim vectors
65  do ii=1,3
66    acell(ii)=sqrt(rprimd(1,ii)**2+rprimd(2,ii)**2+rprimd(3,ii)**2)
67    rprim(:,ii)=rprimd(:,ii)/acell(ii)
68  end do
69 
70 end subroutine mkradim