コード例 #1
0
 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)
コード例 #2
0
ファイル: displace.py プロジェクト: borislavujo/pele
 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)
コード例 #3
0
ファイル: take_step.py プロジェクト: js850/pele
 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 )
コード例 #4
0
ファイル: buildingblocks.py プロジェクト: cjforman/pele
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)
コード例 #5
0
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)