2
0
mirror of https://github.com/LCPQ/DEHam synced 2024-07-07 11:55:55 +02:00
DEHam/src/conv.irp.f

21 lines
616 B
FortranFixed
Raw Normal View History

subroutine conv(ideter,deti,dethi)
2016-12-19 23:26:16 +01:00
implicit none
BEGIN_DOC
! this routine converts a detrminant in the old
! format into the new one and returns the determinant.
END_DOC
integer,INTENT(INOUT)::ideter(natomax)
integer(kind=selected_int_kind(16)),INTENT(INOUT)::deti
integer(kind=selected_int_kind(16)),INTENT(INOUT)::dethi
2016-12-19 23:26:16 +01:00
integer::i
deti=0
dethi=0
2016-12-19 23:26:16 +01:00
do i=1,natom
if(ideter(natom-i+1).eq.2 .and. ideter(natom-i+1).ne.3)then
deti=IBSET(deti,i-1)
2016-12-19 23:26:16 +01:00
elseif(ideter(natom-i+1).eq.3)then
dethi=IBSET(dethi,i-1)
2016-12-19 23:26:16 +01:00
endif
enddo
end