schrodinger.application.desmond.fepana module¶
Tools for various FEP-related analyses.
Copyright Schrodinger, LLC. All rights reserved.
-
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, column)¶ Parses a eneseq file and returns a list of number lists. Each element of the returned list is a list, where the first element is the time, followed by numbers from the selected columns.
Parameters: - eneseq_fname – eneseq file name.
- column – a list of column indices. Data of these columns will be returned.
-
schrodinger.application.desmond.fepana.init_bennett(dir, 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')¶
-
schrodinger.application.desmond.fepana.run_bennett(bar, begin_time=100.0, end_time=-1.0, nresamples=None)¶
-
schrodinger.application.desmond.fepana.run_bennett_orig(dir, n_win, temperature=300.0, begin_time=100.0, end_time=-1.0, random_seed=2111839, result_fname='result', description='Desmond bennett analysis')¶
-
schrodinger.application.desmond.fepana.are_times_insane(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-
__cause__¶ exception cause
-
__class__¶ alias of
builtins.type
-
__context__¶ exception context
-
__delattr__¶ Implement delattr(self, name).
-
__dict__= mappingproxy({'__module__': 'schrodinger.application.desmond.fepana', '__weakref__': <attribute '__weakref__' of 'TimeSanityException' objects>, '__doc__': None})¶
-
__dir__() → list¶ default dir() implementation
-
__eq__¶ Return self==value.
-
__format__()¶ default object formatter
-
__ge__¶ Return self>=value.
-
__getattribute__¶ Return getattr(self, name).
-
__gt__¶ Return self>value.
-
__hash__¶ Return hash(self).
-
__init__¶ Initialize self. See help(type(self)) for accurate signature.
-
__init_subclass__()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__¶ Return self<=value.
-
__lt__¶ Return self<value.
-
__module__= 'schrodinger.application.desmond.fepana'¶
-
__ne__¶ Return self!=value.
-
__new__()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__()¶ helper for pickle
-
__reduce_ex__()¶ helper for pickle
-
__repr__¶ Return repr(self).
-
__setattr__¶ Implement setattr(self, name, value).
-
__setstate__()¶
-
__sizeof__() → int¶ size of object in memory, in bytes
-
__str__¶ Return str(self).
-
__subclasshook__()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__suppress_context__¶
-
__traceback__¶
-
__weakref__¶ list of weak references to the object (if defined)
-
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
-
class
schrodinger.application.desmond.fepana.DeltaEnergy¶ Bases:
object-
__init__()¶ Initialize self. See help(type(self)) for accurate signature.
-
__class__¶ alias of
builtins.type
-
__delattr__¶ Implement delattr(self, name).
-
__dict__= mappingproxy({'__module__': 'schrodinger.application.desmond.fepana', '__doc__': '\n\n ', '__init__': <function DeltaEnergy.__init__>, '__dict__': <attribute '__dict__' of 'DeltaEnergy' objects>, '__weakref__': <attribute '__weakref__' of 'DeltaEnergy' objects>})¶
-
__dir__() → list¶ default dir() implementation
-
__eq__¶ Return self==value.
-
__format__()¶ default object formatter
-
__ge__¶ Return self>=value.
-
__getattribute__¶ Return getattr(self, name).
-
__gt__¶ Return self>value.
-
__hash__¶ Return hash(self).
-
__init_subclass__()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__¶ Return self<=value.
-
__lt__¶ Return self<value.
-
__module__= 'schrodinger.application.desmond.fepana'¶
-
__ne__¶ Return self!=value.
-
__new__()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__()¶ helper for pickle
-
__reduce_ex__()¶ helper for pickle
-
__repr__¶ Return repr(self).
-
__setattr__¶ Implement setattr(self, name, value).
-
__sizeof__() → int¶ size of object in memory, in bytes
-
__str__¶ Return str(self).
-
__subclasshook__()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__¶ list of weak references to the object (if defined)
-
-
schrodinger.application.desmond.fepana.read_dE_file(dE_fname, time_range=[0.0, inf])¶
-
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=[0.0, inf], 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)¶
-
schrodinger.application.desmond.fepana.calc_convergence_rate(first_length, last_length, length_incr, traj_start, traj_end, n_win, dir='.', temperature=300.0, random_seed=2111839)¶
-
class
schrodinger.application.desmond.fepana.FreeEnergyContrib(coulomb=None, vdw=None, bonded=None)¶ Bases:
object-
__init__(coulomb=None, vdw=None, bonded=None)¶
-
__class__¶ alias of
builtins.type
-
__delattr__¶ Implement delattr(self, name).
-
__dict__= mappingproxy({'__module__': 'schrodinger.application.desmond.fepana', '__doc__': '\n\n ', '__init__': <function FreeEnergyContrib.__init__>, '__dict__': <attribute '__dict__' of 'FreeEnergyContrib' objects>, '__weakref__': <attribute '__weakref__' of 'FreeEnergyContrib' objects>})¶
-
__dir__() → list¶ default dir() implementation
-
__eq__¶ Return self==value.
-
__format__()¶ default object formatter
-
__ge__¶ Return self>=value.
-
__getattribute__¶ Return getattr(self, name).
-
__gt__¶ Return self>value.
-
__hash__¶ Return hash(self).
-
__init_subclass__()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__¶ Return self<=value.
-
__lt__¶ Return self<value.
-
__module__= 'schrodinger.application.desmond.fepana'¶
-
__ne__¶ Return self!=value.
-
__new__()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__()¶ helper for pickle
-
__reduce_ex__()¶ helper for pickle
-
__repr__¶ Return repr(self).
-
__setattr__¶ Implement setattr(self, name, value).
-
__sizeof__() → int¶ size of object in memory, in bytes
-
__str__¶ Return str(self).
-
__subclasshook__()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__¶ list of weak references to the object (if defined)
-
-
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, 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, 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 dtheta_i sintheta_i exp( -beta ka (theta_i - theta_{i0})^2 ) Prod_{i = 1, 2, 3} int_{psi_{i0} - pi}^{psi_{i0} + pi} dpsi_i exp( -beta kd (psi_i - psi_{i0})^2 )
The integration over theta is approximated by integration over {-inf, inf}.
-
schrodinger.application.desmond.fepana.violate_midpoint(model, atom, r_clone2)¶ `atom’ is a list of atom indices and Nones.
-
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[typing.List[str], str]]¶ process the
dataand write png files.Return a dictionary with format {‘url’: url, ‘dF’: df, ‘dG’: dG_fname}