src/amuse/datamodel/particles.py
def as_set(self):
        """
        Returns a subset view on the set containing this particle. The
        subset view includes this particle and no other particles.

        >>> particles = Particles(2)
        >>> particles.x = [1.0, 2.0] | units.m
        >>> particle2 = particles[1]
        >>> print particle2.x
        2.0 m
        >>> particles_with_one_particle = particle2.as_set()
        >>> len(particles_with_one_particle)
        1
        >>> print particles_with_one_particle.x
        [2.0] m
        """
        return ParticlesSubset(self.particles_set, [self.key])

        Returns a subset view on the set containing this particle. The
        subset view includes this particle and no other particles.

        >>> particles = Particles(2)
        >>> particles.x = [1.0, 2.0] | units.m
        >>> particle2 = particles[1]
        >>> print particle2.x
        2.0 m
        >>> particles_with_one_particle = particle2.as_set()
        >>> len(particles_with_one_particle)
        1
        >>> print particles_with_one_particle.x
        [2.0] m
        
Returns a subset view on the set containing this particle. The
subset view includes this particle and no other particles.


Returns a subset view on the set containing this particle . The subset view includes this particle and no other particles .
def as_set(self):
        return ParticlesSubset(self.particles_set, [self.key])
def as_set ( self ) : return ParticlesSubset ( self . particles_set , [ self . key ] )
Returns a subset view on the set containing this particle.
Returns a subset view on the set containing this particle .
"""
        Returns a subset view on the set containing this particle. The
        subset view includes this particle and no other particles.

        >>> particles = Particles(2)
        >>> particles.x = [1.0, 2.0] | units.m
        >>> particle2 = particles[1]
        >>> print particle2.x
        2.0 m
        >>> particles_with_one_particle = particle2.as_set()
        >>> len(particles_with_one_particle)
        1
        >>> print particles_with_one_particle.x
        [2.0] m
        """
self