Change
charge_log_probabilities(state, pka, ph)
¶
Scores each charge a pKa site is enumerated with, so that truncation can keep the likeliest states rather than the first ones generated.
Uses the Henderson-Hasselbalch fraction at the site's mean pKa. A state with only one charge shifts every variant's score equally, so it scores 0 rather than a large constant that would cost precision.
| PARAMETER | DESCRIPTION |
|---|---|
state
|
The site's target state at the pH range.
TYPE:
|
pka
|
The site's mean pKa.
TYPE:
|
ph
|
The pH to score at.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[float]
|
log10 of the fraction in each charge state, in the order of |
list[float]
|
state.get_charges(). |
log10_one_plus_pow10(x)
¶
protonate_site(mols, site, ph_min, ph_max, precision)
¶
Protonate a specific site in a list of molecules.
| PARAMETER | DESCRIPTION |
|---|---|
mols
|
List of molecule objects.
TYPE:
|
site
|
ProtonationSite object with protonation information.
TYPE:
|
ph_min
|
Minimum pH to expose the site to.
TYPE:
|
ph_max
|
Maximum pH to expose the site to.
TYPE:
|
precision
|
pKa standard deviation prefactor to consider.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[Mol]
|
List of appropriately protonated molecule objects. If there is any issue, this will return an empty list. |
set_protonation_charge(mols, idx, charges, prot_site_name)
¶
Set atomic charge on a specific site for a set of molecules.
| PARAMETER | DESCRIPTION |
|---|---|
mols
|
List of input molecule objects.
TYPE:
|
idx
|
Index of the atom to modify.
TYPE:
|
charges
|
List of charges to assign at this site. |
prot_site_name
|
Name of the protonation site.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[Mol]
|
List of processed molecule objects. If anything goes wrong, then we return an empty list. |
site_log_probabilities(site, ph_min, ph_max, precision, ph)
¶
Scores every variant protonate_site makes from one parent molecule, in the same order, so callers can rank the variants it returns.
| PARAMETER | DESCRIPTION |
|---|---|
site
|
The protonation site.
TYPE:
|
ph_min
|
Minimum pH of the range, which sets each pKa's state.
TYPE:
|
ph_max
|
Maximum pH of the range.
TYPE:
|
precision
|
pKa standard deviation prefactor.
TYPE:
|
ph
|
The pH to score at.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[float]
|
log10 probability of each variant, relative to its parent. |