def takeStep(self, coords, **kwargs): """ take a random orientational step """ c = coords[self.srange] for x in c.reshape(old_div(c.size, 3), 3): rotations.takestep_aa(x, self.stepsize)
def takeStep(self, coords, **kwargs): """ take a random orientational step """ c = coords[self.srange] for x in c.reshape(c.size/3,3): rotations.takestep_aa(x, self.stepsize)
def orientational_step(self, coords): """ take a random orientational step """ nmol = len(coords) / 2 / 3 maxtheta = self.getOStep() for j in range(nmol): rot.takestep_aa( coords[3*nmol + 3*j : 3*nmol + 3*j + 3], maxtheta )
def rotate(stepsize, coords, indices=None): """uniform random rotation of angle axis vector Parameters ---------- coords : array like x(:,3) coordinates indices : list, optional list of coordinates to displace, None for all coordinates in array """ if indices: for i in indices: rotations.takestep_aa(coords[i], stepsize) return for x in coords: rotations.takestep_aa(x, stepsize)