pdbsearch.nodes

pdbsearch.nodes.full_text_node(term)[source]

Creates a full text node for some search term.

Parameters:

term (str) – the search term.

Return type:

TerminalNode

pdbsearch.nodes.text_node(**kwargs)[source]

Creates a text node for some search term. Only one key=value pair can be provided, and it must correspond to a valid term in the schema.

Return type:

TerminalNode

pdbsearch.nodes.text_chem_node(**kwargs)[source]

Creates a chem_text node for some search term. Only one key=value pair can be provided, and it must correspond to a valid term in the schema.

Return type:

TerminalNode

pdbsearch.nodes.sequence_node(protein=None, dna=None, rna=None, identity=None, evalue=None)[source]

Creates a sequence node, for a protein, DNA, or RNA sequence. One and only one of protein, dna, or rna must be provided.

Parameters:
  • protein (str) – the protein sequence.

  • dna (str) – the DNA sequence.

  • rna (str) – the RNA sequence.

  • identity (float) – the identity cutoff.

  • evalue (float) – the evalue cutoff.

Return type:

TerminalNode

pdbsearch.nodes.seqmotif_node(protein=None, dna=None, rna=None, pattern_type='simple')[source]

Creates a seqmotif node for a protein, DNA, or RNA pattern search. One and only one of protein, dna, or rna must be provided.

Parameters:
  • protein (str) – the protein pattern.

  • dna (str) – the DNA pattern.

  • rna (str) – the RNA pattern.

  • pattern_type (str) – simple, prosite, or regex.

Return type:

TerminalNode

pdbsearch.nodes.structure_node(structure, operator='strict_shape_match')[source]

Creates a structure node for a structure search. You can either provide a <entry>-<assembly> identifier, or a URL to a CIF or BCIF file.

Parameters:
  • structure (str) – the structure identifier or URL.

  • operator (str) – the operator to use for the search.

Return type:

TerminalNode

pdbsearch.nodes.strucmotif_node(entry, residues, rmsd=None, exchanges=None)[source]

Creates a strucmotif node for a structure motif search. You provide a PDB ID and a list of residues as tuples of (chain ID, residue number). You can also provide residue exchanges, as mappings of (chain ID, residue number) to a list of allowed residue names.

Parameters:
  • entry (str) – the entry ID.

  • residues (tuple) – the residues to search for.

  • rmsd (float) – the RMSD cutoff.

  • exchanges (dict) – the exchanges to search for.

Return type:

TerminalNode

pdbsearch.nodes.chemical_node(smiles=None, inchi=None, match_type='graph-exact')[source]

Creates a chemical node for a chemical search. You can either provide a SMILES or InChI string.

Parameters:
  • smiles (str) – the SMILES string.

  • inchi (str) – the InChI string.

  • match_type (str) – the matching algorithm to use.

Return type:

TerminalNode