schrodinger.application.jaguar.macro_pka_utils module¶
- schrodinger.application.jaguar.macro_pka_utils.get_aligned_mols(molecules)¶
Align molecules (given as SMILES) by the common core of all compounds using RDKit MCS and return new RDKit mol instances.
- Parameters
molecules (list(str)) – list of SMILES strings
- Return type
dict
- Returns
dictionary of newly-oriented molecules indexed by SMILES
- schrodinger.application.jaguar.macro_pka_utils.get_2Dimage(name, mol, scaling=30)¶
Generate an SVG image file <name>.svg depicting a 2D structure.
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 filescaling (int) – scale factor to multiply original image size by, where ‘original’ is derived from the span of the X or Y cartesian coordinates.
- Return type
str
- Returns
name of newly-created SVG file
- schrodinger.application.jaguar.macro_pka_utils.get_2Dimage_png(name: str, mol, scaling=30)¶
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
- Return type
str or NoneType
- schrodinger.application.jaguar.macro_pka_utils.write_html_results_summary(pH, macro_pka, populations, jobname, cmdline=None, scaling=30, titles=(), page_title=None)¶
Create a final HTML page and PDF document summarizing tautomer populations (pH-dependent and independent) and the macro-pKa transitions.
- Parameters
pH (float) – compute populations at this pH
macro_pka (dict) – macro-pKa values and (prot_charge, deprot_charge) keys
populations (dict(list(namedtuple('smiles pop pH_pop'))) – population data keyed by formal charge. For each charge, a list of tautomer-data should be given with three attributes: (1) smiles: SMILES string denoting tautomer structure (2) pop: pH-independent population (3) pH_pop: pH-dependent population
jobname (str) – name of job to prefix file names
cmdline (str) – command line string for printing
scaling (int) – scale factor to multiply original image size by, where ‘original’ is derived from the span of the X or Y cartesian coordinates.
titles (dict) – optional structure titles keyed by SMILES; if provided, this triggers incorporation of a pH-dependent populations graph, which is expected to exist in the CWD as a .png file.
page_title (str) – optional title to print at top of HTML page
- Returns
filename of PDF document if it succeeds, otherwise filename of HTML file. PDF generation will fail if graphics libraries are missing.
- schrodinger.application.jaguar.macro_pka_utils.graph_populations_at_pH(jobname, macropKas, all_label, all_x, all_y, input_abs_charge=0, user_pH=None)¶
Create pH-dependent populations graph.
- Parameters
jobname (str) – name of job to prefix file names
macroPkas (list[float]) – list of macro-pKa values to plot
all_label (dict[tuple, list]) – dict of labels (tautomer name). Must be in the desired order for the legend
all_x (dict[tuple, list]) – dict of x values (pH) for each tautomer. Must have same keys as
all_label
all_y (dict[tuple, list]) – dict of y values (% population). Must have same keys as
all_label
input_abs_charge (int) – offset to convert relative to absolute charge
user_pH (float) – user-input pH value for reference