20 ps[0].add_attribute(ik, 0)
21 ps[1].add_attribute(ik, 1)
22 ps[2].add_attribute(ik, 0)
23 ps[3].add_attribute(ik, 1)
30 def do_get_inputs(self, m, pis):
32 return [m.get_particle(i)
for i
in pis]
34 def get_value_index(self, m, pis):
36 if not all(m.get_has_attribute(ik, pi)
for pi
in pis):
37 print(
"particle pair %s is untyped" % str(pis))
40 ts = sorted(m.get_attribute(ik, pi)
for pi
in pis)
41 ind = (ts[1] * ts[1]+1) // 2 + ts[0]
42 print(
"particle pair %s types %s map to %d" % (pis, ts, ind))
58 r.set_is_complete(
False)
62 print(
"Score is", sf.evaluate(
False))
Strings setup_from_argv(const Strings &argv, std::string description, std::string positional_description, int num_positional)
Various classes to hold sets of particles.
XYZRs create_xyzr_particles(Model *m, unsigned int num, Float radius, Float box_side=10)
Create a set of particles with random coordinates.
Applies a PairScore to each Pair in a list based on a predicate.
Create a scoring function on a list of restraints.
Return all close unordered pairs of particles taken from the SingletonContainer.
Score distance between two particle centers using a harmonic function.
Class for storing model, its restraints, constraints, and particles.
Store a list of ParticleIndexes.
Basic functionality that is expected to be used by a wide variety of IMP users.
Abstract predicate function.
Functionality for loading, creating, manipulating and scoring atomic structures.