parameters: (self, natoms, nbeads)
docstring: Creates all the data arrays needed in the simulation.
  
        Effectively initializes the whole Beads object, according to the
        specified number of atoms and beads. Is also used, as the name suggests,
        to resize the data to a new number of beads when this is necessary, for
        example in initialization from a simulation with a different number of
        beads.
  
        Also creates, or recreates, the dependency network, as this requires
        the data arrays to be created for it to work.
  
        Args:
           natoms: The number of atoms.
           nbeads: The number of beads.
docstring_summary: Creates all the data arrays needed in the simulation.
docstring_tokens: Creates all the data arrays needed in the simulation .
function: def resize(self, natoms, nbeads):
        """Creates all the data arrays needed in the simulation.
  
        Effectively initializes the whole Beads object, according to the
        specified number of atoms and beads. Is also used, as the name suggests,
        to resize the data to a new number of beads when this is necessary, for
        example in initialization from a simulation with a different number of
        beads.
  
        Also creates, or recreates, the dependency network, as this requires
        the data arrays to be created for it to work.
  
        Args:
           natoms: The number of atoms.
           nbeads: The number of beads.
        """
  
        self.natoms = natoms
        self.nbeads = nbeads
  
        dset(self,"names",
           depend_array(name="names",value=np.zeros(natoms, np.dtype('|S6'))) )
  
        # atom masses, and mass-related arrays
        dset(self,"m",depend_array(name="m",value=np.zeros(natoms, float)) )   # this is the prototype mass array (just one independent of bead n)
        dset(self,"m3",
           depend_array(name="m3",value=np.zeros((nbeads,3*natoms), float),    # this is m conveniently replicated to be (nb,3*nat)
              func=self.mtom3, dependencies=[dget(self,"m")]))
        dset(self,"sm3",
           depend_array(name="sm3",value=np.zeros((nbeads,3*natoms), float),   # this is just the square root of m3
              func=self.m3tosm3, dependencies=[dget(self,"m3")]))
  
        # positions and momenta. bead representation, base storage used everywhere
        dset(self,"q",
           depend_array(name="q",value=np.zeros((nbeads,3*natoms), float)) )
        dset(self,"p",
           depend_array(name="p",value=np.zeros((nbeads,3*natoms), float)) )
  
        # position and momentum of the centroid
        dset(self,"qc",
           depend_array(name="qc",value=np.zeros(3*natoms, float),
              func=self.get_qc, dependencies=[dget(self,"q")] ) )
        dset(self,"pc",
           depend_array(name="pc",value=np.zeros(3*natoms, float),
              func=self.get_pc, dependencies=[dget(self,"p")] ) )
  
        # create proxies to access the centroid and the individual beads as Atoms objects
        self.centroid = Atoms(natoms, _prebind=(self.qc, self.pc, self.m, self.names))
        self._blist = [Atoms(natoms, _prebind=( self.q[i,:], self.p[i,:], self.m,  self.names )) for i in range(nbeads) ]
  
        # path springs potential and force
        dset(self,"vpath",
           depend_value(name="vpath", func=self.get_vpath,
              dependencies=[dget(self,"q")]))
        dset(self,"fpath",
           depend_array(name="fpath", value=np.zeros((nbeads,3*natoms), float),
              func=self.get_fpath, dependencies=[dget(self,"q")]))
  
        # kinetic energies of thhe beads, and total (classical) kinetic stress tensor
        dset(self,"kins",
           depend_array(name="kins",value=np.zeros(nbeads, float),
              func=self.kin_gather,
                 dependencies=[dget(b,"kin") for b in self._blist]))
        dset(self,"kin",
           depend_value(name="kin", func=self.get_kin,
              dependencies=[dget(self,"kins")]))
        dset(self,"kstress",
           depend_array(name="kstress",value=np.zeros((3,3), float),
              func=self.get_kstress,
                 dependencies=[dget(b,"kstress") for b in self._blist]))
function_tokens: def resize ( self , natoms , nbeads ) : self . natoms = natoms self . nbeads = nbeads dset ( self , "names" , depend_array ( name = "names" , value = np . zeros ( natoms , np . dtype ( '|S6' ) ) ) ) # atom masses, and mass-related arrays dset ( self , "m" , depend_array ( name = "m" , value = np . zeros ( natoms , float ) ) ) # this is the prototype mass array (just one independent of bead n) dset ( self , "m3" , depend_array ( name = "m3" , value = np . zeros ( ( nbeads , 3 * natoms ) , float ) , # this is m conveniently replicated to be (nb,3*nat) func = self . mtom3 , dependencies = [ dget ( self , "m" ) ] ) ) dset ( self , "sm3" , depend_array ( name = "sm3" , value = np . zeros ( ( nbeads , 3 * natoms ) , float ) , # this is just the square root of m3 func = self . m3tosm3 , dependencies = [ dget ( self , "m3" ) ] ) ) # positions and momenta. bead representation, base storage used everywhere dset ( self , "q" , depend_array ( name = "q" , value = np . zeros ( ( nbeads , 3 * natoms ) , float ) ) ) dset ( self , "p" , depend_array ( name = "p" , value = np . zeros ( ( nbeads , 3 * natoms ) , float ) ) ) # position and momentum of the centroid dset ( self , "qc" , depend_array ( name = "qc" , value = np . zeros ( 3 * natoms , float ) , func = self . get_qc , dependencies = [ dget ( self , "q" ) ] ) ) dset ( self , "pc" , depend_array ( name = "pc" , value = np . zeros ( 3 * natoms , float ) , func = self . get_pc , dependencies = [ dget ( self , "p" ) ] ) ) # create proxies to access the centroid and the individual beads as Atoms objects self . centroid = Atoms ( natoms , _prebind = ( self . qc , self . pc , self . m , self . names ) ) self . _blist = [ Atoms ( natoms , _prebind = ( self . q [ i , : ] , self . p [ i , : ] , self . m , self . names ) ) for i in range ( nbeads ) ] # path springs potential and force dset ( self , "vpath" , depend_value ( name = "vpath" , func = self . get_vpath , dependencies = [ dget ( self , "q" ) ] ) ) dset ( self , "fpath" , depend_array ( name = "fpath" , value = np . zeros ( ( nbeads , 3 * natoms ) , float ) , func = self . get_fpath , dependencies = [ dget ( self , "q" ) ] ) ) # kinetic energies of thhe beads, and total (classical) kinetic stress tensor dset ( self , "kins" , depend_array ( name = "kins" , value = np . zeros ( nbeads , float ) , func = self . kin_gather , dependencies = [ dget ( b , "kin" ) for b in self . _blist ] ) ) dset ( self , "kin" , depend_value ( name = "kin" , func = self . get_kin , dependencies = [ dget ( self , "kins" ) ] ) ) dset ( self , "kstress" , depend_array ( name = "kstress" , value = np . zeros ( ( 3 , 3 ) , float ) , func = self . get_kstress , dependencies = [ dget ( b , "kstress" ) for b in self . _blist ] ) )