10if not IMP.IMP_KERNEL_HAS_NUMPY:
11 print(
"IMP was not built with NumPy support.")
20 p = m.add_particle(
"p")
24 d.set_coordinates_are_optimized(
True)
31contents = nbl.get_contents()
39xyz, r = m.get_spheres_numpy()
46dists = numpy.linalg.norm(numpy.diff(xyz[contents], axis=1), axis=2).flatten()
48print(
"Distribution of center-center particle distances:")
49print(
"Min %.2f Max %.2f Mean %.2f" % (dists.min(), dists.max(), dists.mean()))
Class for storing model, its restraints, constraints, and particles.
Return all close unordered pairs of particles taken from the SingletonContainer.
Store a list of ParticleIndexes.
static XYZR setup_particle(Model *m, ParticleIndex pi)
VectorD< D > get_random_vector_in(const BoundingBoxD< D > &bb)
Generate a random vector in a box with uniform density.
Various classes to hold sets of particles.
void setup_from_argv(int argc, char **argv, std::string description)
Parse the command line flags and return the positional arguments.