original_docstring: 
          Calculate the SNAP descriptors based on a Quantum Espresso outfile.
  
          Parameters
          ----------
          qe_out_file : string
              Name of Quantum Espresso output file for snapshot.
  
          qe_out_directory : string
              Path to Quantum Espresso output file for snapshot.
  
          Returns
          -------
          snap_descriptors : numpy.array
              Numpy array containing the SNAP descriptors with the dimension
              (x,y,z,snap_dimension)
  
          
docstring: Calculate the SNAP descriptors based on a Quantum Espresso outfile.
  Parameters
  
  qe_out_file : string
  Name of Quantum Espresso output file for snapshot.
  
  qe_out_directory : string
  Path to Quantum Espresso output file for snapshot.
  
  Returns
  
  snap_descriptors : numpy.array
  Numpy array containing the SNAP descriptors with the dimension
  (x,y,z,snap_dimension)
docstring_tokens: Calculate the SNAP descriptors based on a Quantum Espresso outfile . Parameters qe_out_file : string Name of Quantum Espresso output file for snapshot . qe_out_directory : string Path to Quantum Espresso output file for snapshot . Returns snap_descriptors : numpy . array Numpy array containing the SNAP descriptors with the dimension ( x y z snap_dimension )
code: def calculate_from_qe_out(self, qe_out_file, qe_out_directory):
          """
          Calculate the SNAP descriptors based on a Quantum Espresso outfile.
  
          Parameters
          ----------
          qe_out_file : string
              Name of Quantum Espresso output file for snapshot.
  
          qe_out_directory : string
              Path to Quantum Espresso output file for snapshot.
  
          Returns
          -------
          snap_descriptors : numpy.array
              Numpy array containing the SNAP descriptors with the dimension
              (x,y,z,snap_dimension)
  
          """
          self.in_format_ase = "espresso-out"
          printout("Calculating SNAP descriptors from", qe_out_file, "at",
                    qe_out_directory)
          # We get the atomic information by using ASE.
          infile = os.path.join(qe_out_directory, qe_out_file)
          atoms = ase.io.read(infile, format=self.in_format_ase)
  
          # Enforcing / Checking PBC on the read atoms.
          atoms = self.enforce_pbc(atoms)
  
          # Get the grid dimensions.
          qe_outfile = open(infile, "r")
          lines = qe_outfile.readlines()
          nx = 0
          ny = 0
          nz = 0
  
          for line in lines:
              if "FFT dimensions" in line:
                  tmp = line.split("(")[1].split(")")[0]
                  nx = int(tmp.split(",")[0])
                  ny = int(tmp.split(",")[1])
                  nz = int(tmp.split(",")[2])
                  break
  
          return self.__calculate_snap(atoms,
                                       qe_out_directory, [nx, ny, nz])
code_tokens: def calculate_from_qe_out ( self , qe_out_file , qe_out_directory ) : self . in_format_ase = "espresso-out" printout ( "Calculating SNAP descriptors from" , qe_out_file , "at" , qe_out_directory ) infile = os . path . join ( qe_out_directory , qe_out_file ) atoms = ase . io . read ( infile , format = self . in_format_ase ) atoms = self . enforce_pbc ( atoms ) qe_outfile = open ( infile , "r" ) lines = qe_outfile . readlines ( ) nx = 0 ny = 0 nz = 0 for line in lines : if "FFT dimensions" in line : tmp = line . split ( "(" ) [ 1 ] . split ( ")" ) [ 0 ] nx = int ( tmp . split ( "," ) [ 0 ] ) ny = int ( tmp . split ( "," ) [ 1 ] ) nz = int ( tmp . split ( "," ) [ 2 ] ) break return self . __calculate_snap ( atoms , qe_out_directory , [ nx , ny , nz ] )
short_docstring: Calculate the SNAP descriptors based on a Quantum Espresso outfile.
short_docstring_tokens: Calculate the SNAP descriptors based on a Quantum Espresso outfile .
comment: """
          Calculate the SNAP descriptors based on a Quantum Espresso outfile.
  
          Parameters
          ----------
          qe_out_file : string
              Name of Quantum Espresso output file for snapshot.
  
          qe_out_directory : string
              Path to Quantum Espresso output file for snapshot.
  
          Returns
          -------
          snap_descriptors : numpy.array
              Numpy array containing the SNAP descriptors with the dimension
              (x,y,z,snap_dimension)
  
          """$SEP$# We get the atomic information by using ASE.$SEP$# Enforcing / Checking PBC on the read atoms.$SEP$# Get the grid dimensions.