|
Algorithm 2 Simulated Annealing for HP Lattice Model |
-
1:
Input: S, , , iterations, lattice_type ▹ S - HP String, - initial temperature
-
2:
Initialize a valid conformation
-
3:
Compute energy of ,
-
4:
-
5:
for to do
-
6:
▹ Generate a new conformation, by random mutation
-
7:
if is valid then ▹ Check for overlaps and chain connectivity
-
8:
Compute energy
-
9:
-
10:
if then
-
11:
Accept : , ,
-
12:
else
-
13:
-
14:
▹ Compute acceptance probability
-
15:
Generate random number
-
16:
if then
-
17:
Accept : ,
-
18:
else
-
19:
Reject : ,
-
20:
end if
-
21:
end if
-
22:
else
-
23:
Reject : ,
-
24:
end if
-
25:
end for
-
26:
return
|