class_docstr: Object for working with Tripos Mol2 structure files.
  
  Attributes
  ----------
  df : pandas.DataFrame
      DataFrame of a Mol2's ATOM section
  
  mol2_text : str
      Mol2 file contents in string format
  
  code : str
      ID, code, or name of the molecule stored
  
  pdb_path : str
      Location of the MOL2 file that was read in via `read_mol2`
class_docstr_tok: ["Object","for","working","with","Tripos","Mol2","structure","files",".","Attributes","--","--","--","--","--","df",":","pandas.DataFrame","DataFrame","of","a","Mol2","'s","ATOM","section","mol2_text",":","str","Mol2","file","contents","in","string","format","code",":","str","ID",",","code",",","or","name","of","the","molecule","stored","pdb_path",":","str","Location","of","the","MOL2","file","that","was","read","in","via","`","read_mol2","`"]
docstr: Reads Mol2 files (unzipped or gzipped) from local drive
  
  Note that if your mol2 file contains more than one molecule,
  only the first molecule is loaded into the DataFrame
  
  Attributes
  ----------
  path : Union[str, os.PathLike]
      Path to the Mol2 file in .mol2 format or gzipped format (.mol2.gz)
  
  columns : dict or None (default: None)
      If None, this methods expects a 9-column ATOM section that contains
      the following columns:
  
      {0:('atom_id', int), 1:('atom_name', str),
       2:('x', float), 3:('y', float), 4:('z', float),
       5:('atom_type', str), 6:('subst_id', int),
       7:('subst_name', str), 8:('charge', float)}
  
      If your Mol2 files are formatted differently, you can provide your
      own column_mapping dictionary in a format similar to the one above.
      However, note that not all assert_raise_message methods
      may be supported then.
  
  Returns
  ---------
  self
docstr_tok: ["Reads","Mol2","files","(","unzipped","or","gzipped",")","from","local","drive","Note","that","if","your","mol2","file","contains","more","than","one","molecule",",","only","the","first","molecule","is","loaded","into","the","DataFrame","Attributes","--","--","--","--","--","path",":","Union","[","str",",","os.PathLike","]","Path","to","the","Mol2","file","in",".mol2","format","or","gzipped","format","(",".mol2.gz",")","columns",":","dict","or","None","(","default",":","None",")","If","None",",","this","methods","expects","a","9-column","ATOM","section","that","contains","the","following","columns",":","{","0",":","(","'atom_id","'",",","int",")",",","1",":","(","'atom_name","'",",","str",")",",","2",":","(","'","x","'",",","float",")",",","3",":","(","'","y","'",",","float",")",",","4",":","(","'","z","'",",","float",")",",","5",":","(","'atom_type","'",",","str",")",",","6",":","(","'subst_id","'",",","int",")",",","7",":","(","'subst_name","'",",","str",")",",","8",":","(","'charge","'",",","float",")","}","If","your","Mol2","files","are","formatted","differently",",","you","can","provide","your","own","column_mapping","dictionary","in","a","format","similar","to","the","one","above",".","However",",","note","that","not","all","assert_raise_message","methods","may","be","supported","then",".","Returns","--","--","--","--","-","self"]
code: def read_mol2(self, path, columns=None):
      """Reads Mol2 files (unzipped or gzipped) from local drive
  
      Note that if your mol2 file contains more than one molecule,
      only the first molecule is loaded into the DataFrame
  
      Attributes
      ----------
      path : Union[str, os.PathLike]
          Path to the Mol2 file in .mol2 format or gzipped format (.mol2.gz)
  
      columns : dict or None (default: None)
          If None, this methods expects a 9-column ATOM section that contains
          the following columns:
  
          {0:('atom_id', int), 1:('atom_name', str),
           2:('x', float), 3:('y', float), 4:('z', float),
           5:('atom_type', str), 6:('subst_id', int),
           7:('subst_name', str), 8:('charge', float)}
  
          If your Mol2 files are formatted differently, you can provide your
          own column_mapping dictionary in a format similar to the one above.
          However, note that not all assert_raise_message methods
          may be supported then.
  
      Returns
      ---------
      self
  
      """
      mol2_code, mol2_lines = next(split_multimol2(str(path)))
      self._load_mol2(mol2_lines, mol2_code, columns)
      self.mol2_path = path
      return self
  
file_path: biopandas/biopandas/mol2/pandas_mol2.py
imports: import pandas
  import numpy
  from .mol2_io import split_multimol2
label_desc: Use image node_id 5 for calling the PandasMol2 obj's underlying member method code with example usage: obj.read_mol2(path, columns) and returns: self