8 from __future__
import print_function
24 for i
in range(0, np):
25 p = m.add_particle(
"p%d" % i)
26 m.add_attribute(ik, p, i)
34 print(
"without", [(m.get_particle_name(x[0]), m.get_particle_name(x[1]))
35 for x
in cpc.get_contents()])
41 IMP.PairPredicate.__init__(self,
"ConsecutiveFilter%1%")
43 def get_value(self, pp):
44 diff = pp[0].get_value(ik) - pp[1].get_value(ik)
45 if diff == -1
or diff == 1:
49 def do_get_inputs(self, m, pis):
50 return [m.get_particle(i)
for i
in pis]
52 def do_show(self, out):
54 f = ConsecutiveFilter()
55 cpc.add_pair_filter(f)
57 print(
"with", [(m.get_particle_name(x[0]), m.get_particle_name(x[1]))
58 for x
in cpc.get_contents()])
Strings setup_from_argv(const Strings &argv, std::string description, std::string positional_description, int num_positional)
Various classes to hold sets of particles.
static XYZR setup_particle(Model *m, ParticleIndex pi)
Return all close unordered pairs of particles taken from the SingletonContainer.
Vector3D get_random_vector_in(const Cylinder3D &c)
Generate a random vector in a cylinder with uniform density.
Class for storing model, its restraints, constraints, and particles.
Store a list of ParticleIndexes.
void set_log_level(LogLevel l)
Set the current global log level.
Basic functionality that is expected to be used by a wide variety of IMP users.
Abstract predicate function.
General purpose algebraic and geometric methods that are expected to be used by a wide variety of IMP...