schrodinger.application.jaguar.macro_pka_utils module¶
- class schrodinger.application.jaguar.macro_pka_utils.RowData(name, mol, pop, pH_pop)¶
Bases:
tuple
- mol: rdkit.Chem.rdchem.Mol¶
Alias for field number 1
- name: str¶
Alias for field number 0
- pH_pop: float¶
Alias for field number 3
- pop: float¶
Alias for field number 2
- class schrodinger.application.jaguar.macro_pka_utils.GraphData(x, y, labels)¶
Bases:
tuple
- labels: Dict[Tuple[int, int], str]¶
Alias for field number 2
- schrodinger.application.jaguar.macro_pka_utils.register_file(name, logfile=False)¶
- schrodinger.application.jaguar.macro_pka_utils.get_aligned_mols(mols: List[rdkit.Chem.rdchem.Mol]) List[rdkit.Chem.rdchem.Mol] ¶
Align molecules by the common core of all compounds using RDKit MCS and return new RDKit mol instances.
- Parameters
mols – list of molecules
- Returns
list of of newly-oriented RDKit mol objects
- schrodinger.application.jaguar.macro_pka_utils.get_2Dimage(mol: rdkit.Chem.rdchem.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 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
- 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.
- replace_calcd_pKas_with_expts(ref_pkas: List[float])¶
Match up the experimental pKas with the calculated macro-pKas such that the differences are minimized. This is done by expanding the exptl pKa list and calculating the differences between the experimental and calculated pKas. The expanded experimental pKa list with the smallest average difference is then used to map the experimental pKas to the calculated macro-pKas. There is a key assumption that all experimental macro-pKas are sequential and contiguous.
- Parameters
ref_pkas – list of reference/experimental pKas
- Returns
mapped experimental pKas
- schrodinger.application.jaguar.macro_pka_utils.write_populations_report(jobname: str, tautomers: Dict[int, Dict[int, rdkit.Chem.rdchem.Mol]], 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.
tautomers – tautomers of all charges, indexed by molecular charge and a unique 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 unique names for each tautomer, indexed by molecular charge and tautomer index (same as
tautomers
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 (0 to 1)
- 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}
- schrodinger.application.jaguar.macro_pka_utils.array_abs_diff(a: numpy.ndarray, b: numpy.ndarray) numpy.ndarray ¶
Find the elementwise difference between two arrays. Used in PhPopulations.replace_calcd_pKas_with_expts()
- Parameters
a – first array
b – second array
- Returns
elementwise absolute difference between a and b