25integer is,js,ia,ja,ka,na
27real(8) v1(3),v2(3),v3(3)
30real(8),
allocatable :: dp(:),vp(:,:)
43 if (
natoms(js) == 1)
return
47allocate(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) atposc
integer, dimension(maxspecies) natoms
real(8), dimension(3, 3) avec
real(8), dimension(3, maxatoms, maxspecies) mommtfix
real(8), dimension(3, 3) ainv
real(8), dimension(3, maxatoms, maxspecies) atposl
real(8), dimension(3, maxatoms, maxspecies) bfcmt0