|
Algorithm 1 Metropolis Monte Carlo Algorithm for HP lattice Model |
-
1:
Input: S, iterations, lattice_type ▹ HP sequence: with
-
2:
Output: ▹ RULDFB string (Best conformation found)
-
3:
Initialize a valid conformation
-
4:
Compute energy of ,
-
5:
-
6:
for to do
-
7:
▹ Generate a new conformation,
-
8:
if is valid then ▹ Check for overlaps
-
9:
Compute energy
-
10:
-
11:
if then
-
12:
Accept : , ,
-
13:
else
-
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;
|