parameters: (self)
return_statement: return kmd
docstring: Calculates the total MD kinetic stress tensor.
  
        Note that this does not correspond to the quantum kinetic stress tensor
        estimate for the system.
  
        Returns:
           The sum of the MD kinetic stress tensor contributions from each NM.
docstring_summary: Calculates the total MD kinetic stress tensor.
docstring_tokens: Calculates the total MD kinetic stress tensor .
function: def get_kstress(self):
        """Calculates the total MD kinetic stress tensor.
  
        Note that this does not correspond to the quantum kinetic stress tensor
        estimate for the system.
  
        Returns:
           The sum of the MD kinetic stress tensor contributions from each NM.
        """
  
        kmd = np.zeros((3,3),float)
        sm = depstrip(self.beads.sm3[0])
        pnm = depstrip(self.pnm)
        nmf = depstrip(self.nm_factor)
  
        for b in range(self.nbeads):
           sp = pnm[b]/sm  # mass-scaled momentum of b-th NM
  
           for i in range(3):
              for j in range(3):
                 # computes the outer product of the p of various normal modes
                 # singling out Cartesian components to build the tensor
                 # also takes care of the possibility of having non-RPMD masses
                 kmd[i,j] += np.dot(sp[i:3*self.natoms:3],sp[j:3*self.natoms:3])/nmf[b]
  
        return kmd
function_tokens: def get_kstress ( self ) : kmd = np . zeros ( ( 3 , 3 ) , float ) sm = depstrip ( self . beads . sm3 [ 0 ] ) pnm = depstrip ( self . pnm ) nmf = depstrip ( self . nm_factor ) for b in range ( self . nbeads ) : sp = pnm [ b ] / sm # mass-scaled momentum of b-th NM for i in range ( 3 ) : for j in range ( 3 ) : # computes the outer product of the p of various normal modes # singling out Cartesian components to build the tensor # also takes care of the possibility of having non-RPMD masses kmd [ i , j ] += np . dot ( sp [ i : 3 * self . natoms : 3 ] , sp [ j : 3 * self . natoms : 3 ] ) / nmf [ b ] return kmd