19 nproc = rem.get_number_of_replicas()
21 temp = rem.create_temperatures(TEMPMIN_, TEMPMAX_, nproc)
23 myindex = rem.get_my_index()
25 rem.set_my_parameter(
"temp", [temp[myindex]])
35 d.set_coordinates_are_optimized(
True)
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.
Low level functionality (logging, error handling, profiling, command line flags etc) that is used by ...
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.
Code that uses the MPI parallel library.
Class to handle individual model particles.
Basic functionality that is expected to be used by a wide variety of IMP users.
Strings setup_from_argv(const Strings &argv, std::string description, std::string positional_description, int num_positional)
Applies a list of movers one at a time.
Class for storing model, its restraints, constraints, and particles.
Harmonic function (symmetric about the mean)