5 from __future__
import division
21 ps[0].add_attribute(ik, 0)
22 ps[1].add_attribute(ik, 1)
23 ps[2].add_attribute(ik, 0)
24 ps[3].add_attribute(ik, 1)
31 def do_get_inputs(self, m, pis):
33 return [m.get_particle(i)
for i
in pis]
35 def get_value_index(self, m, pis):
37 if not all(m.get_has_attribute(ik, pi)
for pi
in pis):
38 print(
"particle pair %s is untyped" % str(pis))
41 ts = sorted(m.get_attribute(ik, pi)
for pi
in pis)
42 ind = (ts[1] * ts[1]+1) // 2 + ts[0]
43 print(
"particle pair %s types %s map to %d" % (pis, ts, ind))
59 r.set_is_complete(
False)
63 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.
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.