docstr: Compute the Root Mean Square Deviation between molecules.
  
  Parameters
  ----------
  df1 : pandas.DataFrame
      DataFrame with HETATM, ATOM, and/or ANISOU entries.
  
  df2 : pandas.DataFrame
      Second DataFrame for RMSD computation against df1. Must have the
      same number of entries as df1.
  
  s : {'main chain', 'hydrogen', 'c-alpha', 'heavy', 'carbon'} or None,
      default: None
      String to specify which entries to consider. If None, considers
      all atoms for comparison.
  
  invert : bool, default: False
      Inverts the string query if true. For example, the setting
      `s='hydrogen', invert=True` computes the RMSD based on all
      but hydrogen atoms.
  
  Returns
  ---------
  rmsd : float
      Root Mean Square Deviation between df1 and df2
docstr_tok: ["Compute","the","Root","Mean","Square","Deviation","between","molecules",".","Parameters","--","--","--","--","--","df1",":","pandas.DataFrame","DataFrame","with","HETATM",",","ATOM",",","and\/or","ANISOU","entries",".","df2",":","pandas.DataFrame","Second","DataFrame","for","RMSD","computation","against","df1",".","Must","have","the","same","number","of","entries","as","df1",".","s",":","{","'main","chain","'",",","'hydrogen","'",",","'","c-alpha","'",",","'heavy","'",",","'carbon","'","}","or","None",",","default",":","None","String","to","specify","which","entries","to","consider",".","If","None",",","considers","all","atoms","for","comparison",".","invert",":","bool",",","default",":","False","Inverts","the","string","query","if","true",".","For","example",",","the","setting","`","s='hydrogen","'",",","invert=True","`","computes","the","RMSD","based","on","all","but","hydrogen","atoms",".","Returns","--","--","--","--","-","rmsd",":","float","Root","Mean","Square","Deviation","between","df1","and","df2"]
code: def rmsd(df1, df2, s=None, invert=False):
      """Compute the Root Mean Square Deviation between molecules.
  
      Parameters
      ----------
      df1 : pandas.DataFrame
          DataFrame with HETATM, ATOM, and/or ANISOU entries.
  
      df2 : pandas.DataFrame
          Second DataFrame for RMSD computation against df1. Must have the
          same number of entries as df1.
  
      s : {'main chain', 'hydrogen', 'c-alpha', 'heavy', 'carbon'} or None,
          default: None
          String to specify which entries to consider. If None, considers
          all atoms for comparison.
  
      invert : bool, default: False
          Inverts the string query if true. For example, the setting
          `s='hydrogen', invert=True` computes the RMSD based on all
          but hydrogen atoms.
  
      Returns
      ---------
      rmsd : float
          Root Mean Square Deviation between df1 and df2
  
      """
      if df1.shape[0] != df2.shape[0]:
          raise AttributeError("DataFrames have unequal lengths")
      get_dict = PandasMmcif._init_get_dict()
      if s:
          if s not in get_dict.keys():
              raise AttributeError(
                  f"s must be in {get_dict.keys()} or None"
              )
          df1 = get_dict[s](df1, invert=invert)
          df2 = get_dict[s](df2, invert=invert)
  
      total = (
          (df1["Cartn_x"].values - df2["Cartn_x"].values) ** 2
          + (df1["Cartn_y"].values - df2["Cartn_y"].values) ** 2
          + (df1["Cartn_z"].values - df2["Cartn_z"].values) ** 2
      )
      return round((total.sum() / df1.shape[0]) ** 0.5, 4)
  
imports: import gzip
  import sys
  import warnings
  from typing import Dict, List, Optional
  from urllib.error import HTTPError, URLError
  from urllib.request import urlopen
  import numpy
  import pandas
  from looseversion import LooseVersion
  from ..pdb.engines import amino3to1dict
  from ..pdb.pandas_pdb import PandasPdb
  from .engines import ANISOU_DF_COLUMNS, MMCIF_PDB_COLUMN_MAP, MMCIF_PDB_NONEFIELDS, PDB_COLUMN_ORDER, mmcif_col_types
  from .mmcif_parser import load_cif_data
label_desc: Use image node_id 17 for calling the PandasMmcif obj's underlying member method code with example usage: obj.rmsd(df1, df2, s, invert) and returns: round