parameters: (self)
return_statement: return beads
docstring: Creates a beads object.
  
        Returns:
           A beads object of the appropriate type and with the appropriate
           properties given the attributes of the InputBeads object.
docstring_summary: Creates a beads object.
docstring_tokens: Creates a beads object .
function: def fetch(self):
        """Creates a beads object.
  
        Returns:
           A beads object of the appropriate type and with the appropriate
           properties given the attributes of the InputBeads object.
        """
  
        super(InputBeads,self).fetch()
        beads = Beads(self.natoms.fetch(),self.nbeads.fetch())
  
        # tries to fill up with as much data as available and valid
        q = self.q.fetch()
        if (q.shape == (beads.nbeads,3*beads.natoms)):
           beads.q = q
        elif (beads.nbeads == 1 and q.shape == (3*beads.natoms,)):
           beads.q = q
        elif len(q) != 0:
           raise ValueError("Array shape mismatches for q in <beads> input.")
  
        p = self.p.fetch()
        if (p.shape == (beads.nbeads,3*beads.natoms)):
           beads.p = p
        elif (beads.nbeads == 1 and p.shape == (3*beads.natoms,)):
           beads.p = p
        elif len(p) != 0:
           raise ValueError("Array shape mismatches for p in <beads> input.")
  
        m = self.m.fetch()
        if (m.shape == (beads.natoms,)):
           beads.m = m
        elif len(m) != 0:
           raise ValueError("Array shape mismatches for m in <beads> input.")
  
        n = self.names.fetch()
        if (n.shape == (beads.natoms,)):
           beads.names = n
        elif len(n) != 0:
           raise ValueError("Array shape mismatches for names in <beads> input.")
  
        return beads
function_tokens: def fetch ( self ) : super ( InputBeads , self ) . fetch ( ) beads = Beads ( self . natoms . fetch ( ) , self . nbeads . fetch ( ) ) # tries to fill up with as much data as available and valid q = self . q . fetch ( ) if ( q . shape == ( beads . nbeads , 3 * beads . natoms ) ) : beads . q = q elif ( beads . nbeads == 1 and q . shape == ( 3 * beads . natoms , ) ) : beads . q = q elif len ( q ) != 0 : raise ValueError ( "Array shape mismatches for q in <beads> input." ) p = self . p . fetch ( ) if ( p . shape == ( beads . nbeads , 3 * beads . natoms ) ) : beads . p = p elif ( beads . nbeads == 1 and p . shape == ( 3 * beads . natoms , ) ) : beads . p = p elif len ( p ) != 0 : raise ValueError ( "Array shape mismatches for p in <beads> input." ) m = self . m . fetch ( ) if ( m . shape == ( beads . natoms , ) ) : beads . m = m elif len ( m ) != 0 : raise ValueError ( "Array shape mismatches for m in <beads> input." ) n = self . names . fetch ( ) if ( n . shape == ( beads . natoms , ) ) : beads . names = n elif len ( n ) != 0 : raise ValueError ( "Array shape mismatches for names in <beads> input." ) return beads