12 nproc = rem.get_number_of_replicas()
14 temp = rem.create_temperatures(TEMPMIN_, TEMPMAX_, nproc)
16 myindex = rem.get_my_index()
18 rem.set_my_parameter(
"temp", [temp[myindex]])
28 d.set_coordinates_are_optimized(
True)
45 mc.set_kt(temp[myindex])
46 mc.set_return_best(
False)
50 log = open(
"log" + str(myindex),
"w")
53 for istep
in range(0, 100):
59 score = m.evaluate(
False)
61 myindex = rem.get_my_index()
62 mytemp = rem.get_my_parameter(
"temp")[0]
64 myscore = score / mytemp
67 log.write(
"%4d %2d %6.3f\n" % (istep, myindex, score))
70 findex = rem.get_friend_index(istep)
71 ftemp = rem.get_friend_parameter(
"temp", findex)[0]
73 fscore = score / ftemp
76 flag = rem.do_exchange(myscore, fscore, findex)
A class to implement Hamiltonian Replica Exchange.
static XYZ setup_particle(kernel::Model *m, ParticleIndex pi)
Modify a set of continuous variables by perturbing them within a ball.
Distance restraint between two particles.
See IMP.mpi for more information.
Class to handle individual model particles.
See IMP.core for more information.
Apply a list of movers one at a time.
Class for storing model, its restraints, constraints, and particles.
Harmonic function (symmetric about the mean)