25 integer is,js,ia,ja,ka,na
26 integer i1,i2,i3,i,j,n
27 real(8) v1(3),v2(3),v3(3)
30 real(8),
allocatable :: dp(:),vp(:,:)
43 if (
natoms(js) == 1)
return 47 allocate(dp(n),vp(3,n))
58 t1=abs(v2(1))+abs(v2(2))+abs(v2(3))
63 v3(:)=
atposl(:,ja,js)+v2(:)
67 t1=sum(abs(
atposl(:,ka,js)-v3(:)))
79 dp(n)=sqrt(vp(1,n)**2+vp(2,n)**2+vp(3,n)**2)
87 write(*,
'("Error(findprimcell): cannot find any lattice vectors")')
95 if (dp(i) < t1+
epslat)
then 106 t2=sqrt(v1(1)**2+v1(2)**2+v1(3)**2)
108 if (dp(i) < t1+
epslat)
then 120 t2=dot_product(vp(:,i),v1(:))
121 if (abs(t2) >
epslat)
then 122 if (dp(i) < t1+
epslat)
then 137 t1=sum(abs(
atposl(:,ja,is)-v1(:)))
real(8), dimension(3, maxatoms, maxspecies) bfcmt0
real(8), dimension(3, 3) ainv
real(8), dimension(3, maxatoms, maxspecies) atposl
real(8), dimension(3, 3) avec
pure subroutine r3frac(eps, v)
real(8), dimension(3, maxatoms, maxspecies) mommtfix
integer, dimension(maxspecies) natoms
pure subroutine r3cross(x, y, z)
pure subroutine r3mv(a, x, y)
real(8), dimension(3, maxatoms, maxspecies) atposc