schrodinger.application.jaguar.macro_pka_utils module

class schrodinger.application.jaguar.macro_pka_utils.RowData(name, smiles, pop, pH_pop)

Bases: tuple

__contains__(key, /)

Return key in self.

__len__()

Return len(self).

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

name: str

Alias for field number 0

pH_pop: float

Alias for field number 3

pop: float

Alias for field number 2

smiles: str

Alias for field number 1

schrodinger.application.jaguar.macro_pka_utils.register_file(name, logfile=False)
schrodinger.application.jaguar.macro_pka_utils.get_aligned_mols(smiles: List[str]) List

Align molecules (given as SMILES) by the common core of all compounds using RDKit MCS and return new RDKit mol instances.

Parameters

smiles – list of SMILES strings

Returns

list of of newly-oriented RDKit mol objects

schrodinger.application.jaguar.macro_pka_utils.get_2Dimage(name, mol, scaling: int = 30) Optional[str]

Return image bytes of SVG file depicting a 2D structure. It doesn’t store SVG file in disk.

The optional argument <scaling> allows the image size to be adjusted dynamically according to the span of the 2D coordinates. Else a default size is used for all molecules.

Parameters
  • mol (rdkit.Mol) – RDKit mol structure to generate the image file

  • scaling – scale factor to multiply original image size by, where ‘original’ is derived from the span of the X or Y cartesian coordinates.

Returns

image bytes of 2D structure

schrodinger.application.jaguar.macro_pka_utils.get_2Dimage_png(name: str, mol, scaling: int = 30) Optional[str]

Create a PNG image file name.png depicting a 2D structure.

Note: PNG writing requires graphics libraries, which are not generally available on headless Linux servers. In this case, the method will return None.

Returns

Filename or None if PNG cannot be written

class schrodinger.application.jaguar.macro_pka_utils.PhPopulations(pops: Dict[int, Dict[int, float]], macro_pkas: Dict[Tuple[int, int], float])

Bases: object

Container for pH-dependent and pH-independent tautomer populations from a Macro-pKa calculation.

__init__(pops: Dict[int, Dict[int, float]], macro_pkas: Dict[Tuple[int, int], float])
Parameters
  • pops – Dict of pH-independent tautomer populations of form {charge: {tautomer_index: population}}

  • macro_pkas – Dict of Macro-pKa equilibrium constants of form {(prot_charge, deprot_charge): pKa}

get_populations_at_pH(pH: float) Dict[int, Dict[int, float]]

Get populations of each tautomer at a given pH value.

Parameters

pH – pH at which to compute pH-dependent populations

Returns

pH-dependent populations in form {charge: {tautomer_index: population}}

get_pH_population_factors(pH: float) Dict[int, float]

Get population factors for a given pH value, which may be used to scale the pH-independent tautomer populations to obtain the pH-dependent populations. Note that the factor is the same for all tautomers of a given molecular charge.

Parameters

pH – pH at which to compute population factors.

Returns

dict of population scaling factors keyed by charge.

schrodinger.application.jaguar.macro_pka_utils.write_populations_report(jobname: str, smiles: Dict[int, Dict[int, str]], macro_pkas: Dict[Tuple[int, int], float], populations: schrodinger.application.jaguar.macro_pka_utils.PhPopulations, user_pH: float, page_title: Optional[str] = None, cmdline: Optional[str] = None, names: Optional[Dict[int, Dict[int, str]]] = None, scaling: int = 30, cutoff: float = 0.0001) str

Create a final HTML page summarizing all the dominant tautomers found, the macro-pKa transitions, and pH-dependent and independent populations.

Parameters
  • jobname – name of job to prefix file names.

  • smiles – SMILES for each tautomer indexed by molecular charge and tautomer index.

  • macro_pkas – macro-pKa’s for all charge transitions computed, indexed by prot/deprot charges.

  • populations – pH-dependent and independent tautomer populations, indexed by molecular charge and tautomer index.

  • user_pH – user-requested pH to show populations in table.

  • page_title – title to print at top of report.

  • cmdline – command line string for printing.

  • names – optional names for each tautomer, indexed by molecular charge and tautomer index (same as smiles indices).

  • scaling – scale factor to multiply original image size by, where ‘original’ is derived from the span of the X or Y cartesian coordinates.

  • cutoff – optional cutoff for tautomer populations to include.

Returns

absolute path to HTML file on launch machine

schrodinger.application.jaguar.macro_pka_utils.dump_output_csv_file(jobname: str, pkas: Dict[Tuple[int, int], float])

Write Macro-pKa output to a simple .csv file

Parameters
  • jobname – name of job to prefix file names

  • pkas – Dict of Macro-pKa’s like {(prot_charge, deprot_charge): pKa}