We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7adbc5a commit 896bc28Copy full SHA for 896bc28
src/heuristics.f90
@@ -18,7 +18,8 @@ subroutine movebad(n,x,fx,movebadprint)
18
19
! Internal variables
20
integer :: n, i, j, icart, itype, iatom, imol, ilubar, ilugan, &
21
- ilubar2, ilugan2, nbad, igood, ibad, nmove, nmove_total, itype_tmp
+ ilubar2, ilugan2, nbad, igood, ibad, nmove, nmove_total,&
22
+ itype_tmp, iitype_tmp
23
double precision :: x(n), fx, rnd, frac
24
double precision :: fdist_mol, frest_mol
25
logical :: movebadprint, hasbad
@@ -60,12 +61,15 @@ subroutine movebad(n,x,fx,movebadprint)
60
61
end if
62
nmove_total = 0
63
hasbad = .false.
- icart = 0
64
move_itype : do itype_tmp = 1, ntype
65
itype = rand_type(itype_tmp)
66
if(.not.comptype(itype)) then
67
- icart = icart + nmols(itype)*natoms(itype)
+ cycle move_itype
68
else
69
+ icart = 0
70
+ do iitype_tmp = 1, itype - 1
71
+ icart = icart + nmols(iitype_tmp)*natoms(iitype_tmp)
72
+ end do
73
74
! Checking the function value for each molecule
75
0 commit comments