18 nproc = rem.get_number_of_replicas()
20 temp = rem.create_temperatures(TEMPMIN_, TEMPMAX_, nproc)
22 myindex = rem.get_my_index()
24 rem.set_my_parameter(
"temp", [temp[myindex]])
34 d.set_coordinates_are_optimized(
True)
51 mc.set_scoring_function(sf)
52 mc.set_kt(temp[myindex])
53 mc.set_return_best(
False)
57 log = open(
"log" + str(myindex),
"w")
60 for istep
in range(0, 100):
62 score = mc.optimize(100)
65 myindex = rem.get_my_index()
66 mytemp = rem.get_my_parameter(
"temp")[0]
68 myscore = score / mytemp
71 log.write(
"%4d %2d %6.3f\n" % (istep, myindex, score))
74 findex = rem.get_friend_index(istep)
75 ftemp = rem.get_friend_parameter(
"temp", findex)[0]
77 fscore = score / ftemp
80 flag = rem.do_exchange(myscore, fscore, findex)
A class to implement Hamiltonian Replica Exchange.
Strings setup_from_argv(const Strings &argv, std::string description, std::string positional_description, int num_positional)
Create a scoring function on a list of restraints.
Move continuous particle variables by perturbing them within a ball.
Distance restraint between two particles.
static XYZ setup_particle(Model *m, ParticleIndex pi)
Class for storing model, its restraints, constraints, and particles.
Code that uses the MPI parallel library.
Basic functionality that is expected to be used by a wide variety of IMP users.
Class to handle individual particles of a Model object.
Applies a list of movers one at a time.
Harmonic function (symmetric about the mean)