Return all particle coordinates in this compound including ports.

        Returns
        -------
        pos : np.ndarray, shape=(n, 3), dtype=float
            Array with the positions of all particles and ports.
766776
def xyz_with_ports(self):
        
        if not self.children:
            pos = self._pos
        else:
            arr = np.fromiter(
                itertools.chain.from_iterable(
                    particle.pos for particle in self.particles(
                        include_ports=True)), dtype=float)
            pos = arr.reshape((-1, 3))
        return pos
193081
def processor_coordinates_to_pnum(mesh_shape, coord):
  
  ret = 0
  multiplier = 1
  for c, d in zip(coord[::-1], mesh_shape.to_integer_list[::-1]):
    ret += multiplier * c
    multiplier *= d
  return ret
1269781
def get_centered_molecule(self):
        
        center = self.center_of_mass
        new_coords = np.array(self.cart_coords) - center
        return self.__class__(self.species_and_occu, new_coords,
                              charge=self._charge,
                              spin_multiplicity=self._spin_multiplicity,
                              site_properties=self.site_properties)
1275727
def _kick(self):
        
        xyz_init = self.xyz
        for particle in self.particles():
            particle.pos += (np.random.rand(3,) - 0.5) / 100
        self._update_port_locations(xyz_init)
141329
def parameters(self):
        
        all_parameters = collections.OrderedDict()

        for component in self._components.values():

            for par in component.shape.parameters.values():

                all_parameters[par.path] = par

        for par in self.position.parameters.values():

            all_parameters[par.path] = par

        return all_parameters
647646
def points(self):
        ''''''
        if self._points is None:
            _points = self.soma.points.tolist()
            for n in self.neurites:
                _points.extend(n.points.tolist())
            self._points = np.array(_points)

        return self._points
793933
def translate(self, pos):
        
        self.matrix = np.dot(self.matrix, transforms.translate(pos[0, :3]))
428431
def get_barycenter(self):
        
        try:
            mass = self['mass'].values
        except KeyError:
            mass = self.add_data('mass')['mass'].values
        pos = self.loc[:, ['x', 'y', 'z']].values
        return (pos * mass[:, None]).sum(axis=0) / self.get_total_mass()
563730
def to_positions(self):
        
        if self.coords_are_displacement:
            cumulative_displacements = np.cumsum(self.frac_coords, axis=0)
            positions = self.base_positions + cumulative_displacements
            self.frac_coords = positions
            self.coords_are_displacement = False
        return
865409
def points(self):
        
        vtk_data = self.GetPoints().GetData()
        arr = vtk_to_numpy(vtk_data)
        return vtki_ndarray(arr, vtk_data)
719924
def get_position_i(self):
        
        data = []
        data.append(0x09)
        data.append(self.servoid)
        data.append(RAM_READ_REQ)
        data.append(POSITION_KI_RAM)
        data.append(BYTE2)
        send_data(data)
        rxdata = []
        try:
            rxdata = SERPORT.read(13)
            return (ord(rxdata[10])*256)+(ord(rxdata[9])&0xff)
        except HerkulexError:
            raise HerkulexError("Could not read from motors")
355763
def translate(compound, pos):
    
    atom_positions = compound.xyz_with_ports
    atom_positions = Translation(pos).apply_to(atom_positions)
    compound.xyz_with_ports = atom_positions
643134
def points(self):
        
        x = vtk_to_numpy(self.GetXCoordinates())
        y = vtk_to_numpy(self.GetYCoordinates())
        z = vtk_to_numpy(self.GetZCoordinates())
        xx, yy, zz = np.meshgrid(x,y,z, indexing='ij')
        return np.c_[xx.ravel(), yy.ravel(), zz.ravel()]
1349121
public Point3d[] getVertices() {
        Point3d[] vtxs = new Point3d[numVertices];
        for (int i = 0; i < numVertices; i++) {
            vtxs[i] = pointBuffer[vertexPointIndices[i]].pnt;
        }
        return vtxs;
    }
973543
def dipole(self):
        
        dipole = np.zeros(3)
        mid_pt = np.sum(self.cart_coords, axis=0) / len(self)
        normal = self.normal
        for site in self:
            charge = sum([getattr(sp, "oxi_state", 0) * amt
                          for sp, amt in site.species.items()])
            dipole += charge * np.dot(site.coords - mid_pt, normal) * normal
        return dipole
399161
def get_vectors(self, indices=None):
        ''''''
        H_ = self._deflated_solver.H
        (n_, n) = H_.shape
        coeffs = self.coeffs if indices is None else self.coeffs[:, indices]
        return numpy.c_[self._deflated_solver.V[:, :n],
                        self._deflated_solver.projection.U].dot(coeffs)
774073
def hull_points(obj, qhull_options='QbB Pp'):
    
    if hasattr(obj, 'convex_hull'):
        return obj.convex_hull.vertices

    initial = np.asanyarray(obj, dtype=np.float64)
    if len(initial.shape) != 2:
        raise ValueError('points must be (n, dimension)!')

    hull = spatial.ConvexHull(initial, qhull_options=qhull_options)
    points = hull.points[hull.vertices]

    return points