schrodinger.application.desmond.fepana module¶
Tools for various FEP-related analyses.
Copyright Schrodinger, LLC. All rights reserved.
- class schrodinger.application.desmond.fepana.Restraint(atom, ref, k)¶
Bases:
object
- __init__(atom, ref, k)¶
- schrodinger.application.desmond.fepana.get_energy_table(fname, term_list)¶
columns: (0, 0) (0, 1) (1, 1) … “total” rows : frame1, frame2, frame3, …
Separate table for each term. table[row][col]
- schrodinger.application.desmond.fepana.get_global_quantity(fname, quantity_list)¶
- schrodinger.application.desmond.fepana.get_mean(ene, index=- 1, data_structure='table')¶
Returns (mean, std_error, std_dev,).
- schrodinger.application.desmond.fepana.parse_eneseq(eneseq_fname)¶
Returns a 1D structured array with names equal to the column names
- Parameters
eneseq_fname – eneseq file name.
- schrodinger.application.desmond.fepana.init_bennett(data: Union[str, numpy.ndarray], n_win=12, temperature=300.0, begin_time=100.0, end_time=- 1.0, random_seed=2111839, result_file=None, nresamples=0, file_pattern='gibbs.%d.dE')¶
- Parameters
data – Either a directory or a numpy array.
As a directory, it must contain the dE files, which are named after the pattern specified by the
file_pattern
argument.As a numpy array, it is the dE data read from the dE files. The data is an MxNx3 array, where M is the number of lambda windows, N the number of time points, and the 3 are (time, forward energy, reverse energy).
- schrodinger.application.desmond.fepana.run_bennett(bar, begin_time=100.0, end_time=- 1.0, nresamples=None)¶
- schrodinger.application.desmond.fepana.are_times_invalid(begin_time, end_time)¶
Are the given begin and end times reasonable?
- schrodinger.application.desmond.fepana.get_delta_time(begin_time, end_time, delta_time, window=0)¶
- schrodinger.application.desmond.fepana.calc_free_energy_time_function(dir, last_time, n_win, temperature=300.0, begin_time=100.0, end_time=- 1.0, delta_time=30.0, random_seed=2111839)¶
Calculates the free energy as a function of time.
- schrodinger.application.desmond.fepana.calc_free_energy_rtime_function(dir, last_time, n_win, temperature=300.0, begin_time=100.0, end_time=- 1.0, delta_time=30.0, random_seed=2111839)¶
Calculates the free energy as a function of reversed time.
- schrodinger.application.desmond.fepana.calc_free_energy_stime_function(dir, last_time, n_win, temperature=300.0, begin_time=100.0, end_time=- 1.0, delta_time=30.0, window=500.0, random_seed=2111839)¶
Calculates the free energy as a function of time with sliding window.
- schrodinger.application.desmond.fepana.calc_freeenergy_time_function(dir, last_time, n_win, temperature=300.0, begin_time=100.0, end_time=- 1.0, delta_time=30.0, random_seed=2111839)¶
Calculates the free energy as a function of time.
- schrodinger.application.desmond.fepana.calc_freeenergy_rtime_function(dir, last_time, n_win, temperature=300.0, begin_time=100.0, end_time=- 1.0, delta_time=30.0, random_seed=2111839)¶
Calculates the free energy as a function of reversed time.
- schrodinger.application.desmond.fepana.calc_freeenergy_stime_function(dir, last_time, n_win, temperature=300.0, begin_time=100.0, end_time=- 1.0, delta_time=30.0, window=500.0, random_seed=2111839)¶
Calculates the free energy as a function of time with sliding window.
- exception schrodinger.application.desmond.fepana.TimeSanityException¶
Bases:
Exception
- __init__(*args, **kwargs)¶
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- schrodinger.application.desmond.fepana.cleanup_time(begin_time, end_time, last_time, delta_time, window=0)¶
- schrodinger.application.desmond.fepana.calc_time_curve(dir, n_win, temperature, begin_time, end_time, random_seed, time_ranges)¶
Calculates the free energy as a function of time_ranges
- schrodinger.application.desmond.fepana.read_dE_file(dE_fname, time_range=None)¶
- schrodinger.application.desmond.fepana.calc_work_prob_distr(energy, energy_range=None)¶
- schrodinger.application.desmond.fepana.calc_forward_reversed_work_overlap(dE0, dE1)¶
- schrodinger.application.desmond.fepana.calc_lambda_window_overlap(dE_fname0, dE_fname1, time_range)¶
- schrodinger.application.desmond.fepana.plot_lambda_window_overlap(dE_fname0, dE_fname1, out_fname=None, legend=None, time_range=None, filename=None, reporter=None)¶
- schrodinger.application.desmond.fepana.calc_lambda_sim_matrix(num_lambda, *gibbs_dname, **kw)¶
- schrodinger.application.desmond.fepana.get_pathway(mat)¶
- schrodinger.application.desmond.fepana.print_pathway(pathway)¶
- class schrodinger.application.desmond.fepana.FreeEnergyContrib(coulomb=None, vdw=None, bonded=None)¶
Bases:
object
- __init__(coulomb=None, vdw=None, bonded=None)¶
- schrodinger.application.desmond.fepana.calc_contrib(fname, cfg_fname)¶
- schrodinger.application.desmond.fepana.correct_restr(egout0, egout1, fname_out)¶
- schrodinger.application.desmond.fepana.long_range_dispersion_energy(r_cut, c6, rho)¶
r_cut: cutoff radius (Angstrom). c6: average dispersion coefficient (kcal/mol * Angstrom**6). rho: number density (1/ Angstrom**3)
- schrodinger.application.desmond.fepana.get_field_from_log(field, fname)¶
- schrodinger.application.desmond.fepana.get_number_density_from_cms(model)¶
Returns a tuple of elements as follows: 1. the number density in the unit of 1 / Angstrom**3 2. number of atoms in the system 3. volume of the system
- schrodinger.application.desmond.fepana.get_average_box_volume(fname)¶
‘fname’ must be a
*_simbox.dat
file.
- schrodinger.application.desmond.fepana.calc_long_range_dispersion_energy(model, atom_list, log_fname=None, simbox_fname=None, cfg_fname=None, r_cut=- 1, average_coefficient=- 1)¶
- schrodinger.application.desmond.fepana.calc_free_energy_for_abfe_cross_link(restr: List[schrodinger.application.desmond.fepana.Restraint], temperature=300.0)¶
Calculates correction for the cross link restraints in absolute binding free energy simulations.
Reference: Boresch, Stefan, Franz Tettinger, Martin Leitgeb, and Martin Karplus. Absolute Binding Free Energies: A Quantitative Approach for Their Calculation. The Journal of Physical Chemistry B 107, no. 35 (September 2003): 9535-9551. http://pubs.acs.org/doi/abs/10.1021/jp0217839.
Note: We could not reproduce the numbers on the 5th row of Table 5 in the reference.
- schrodinger.application.desmond.fepana.calc_free_energy_for_abfe_cross_link_xu(restr: List[schrodinger.application.desmond.fepana.Restraint], temperature=300.0)¶
Calculates correction for the cross link restraints in absolute binding free energy simulations.
We use Huangfeng Xu’s formula. The partition function of the restraint terms is this:
Z = \int dr r^2 exp( -\beta kr (r - r0)^2 ) \Prod_{i = 1, 2 } \int_0^\pi d\theta_i \sin\theta_i exp( -\beta ka (\theta_i - \theta_{i0})^2 ) \Prod_{i = 1, 2, 3} \int_{\psi_{i0} - \pi}^{\psi_{i0} + \pi} d\psi_i exp( -\beta kd (\psi_i - \psi_{i0})^2 )
The integration over theta is approximated by integration over {-inf, inf}.
- schrodinger.application.desmond.fepana.calc_free_energy_correction_due_to_restraint(r, fc, temperature) float ¶
- Parameters
r – Cross-link restraint to calculate the free energy correction for
fc – Three force constants for the stretch, the angle, and the torsion restraints, respectively.
- schrodinger.application.desmond.fepana.get_abfep_cross_link(model, ligand, r_clone, traj_fname, first_frame=0, max_frame=256)¶
the model should be created by the topo.read_cms function
ligand
is a list of ligand atoms’ indices.
- schrodinger.application.desmond.fepana.calc_free_energy(dir, last_time: float, n_win: int, temperature: float, bennett_options: Dict, random_seed: int) Dict ¶
Return forward, reverse and slide energies.
- schrodinger.application.desmond.fepana.plot_convergence(data, dG_fname, dF_fname_pattern, x_label, dF_color, dG_color='black', reporter=None) Dict[str, Union[List[str], str]] ¶
process the
data
and write png files.Return a dictionary with format {‘url’: url, ‘dF’: df, ‘dG’: dG_fname}