10 if 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)
31 contents = nbl.get_contents()
39 xyz, r = m.get_spheres_numpy()
46 dists = numpy.linalg.norm(numpy.diff(xyz[contents], axis=1), axis=2).flatten()
48 print(
"Distribution of center-center particle distances:")
49 print(
"Min %.2f Max %.2f Mean %.2f" % (dists.min(), dists.max(), dists.mean()))
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.