IMP  2.3.0
The Integrative Modeling Platform
_randomize.py
1 # python files placed in this src directory are automatically added to the module.
2 # The function below can be accessed as
3 # IMP.example.randomize.randomize_particles().
4 
5 import IMP.core
6 
7 
8 def randomize_particle(p):
9  d = IMP.core.XYZ(p)
10  d.set_coordinates(IMP.algebra.get_random_vector_in(
11  IMP.algebra.get_unit_bounding_box_3d()))
Vector3D get_random_vector_in(const Cylinder3D &c)
Generate a random vector in a cylinder with uniform density.
A decorator for a particle with x,y,z coordinates.
Definition: XYZ.h:30
Basic functionality that is expected to be used by a wide variety of IMP users.