Python: module torsionInterpolPotTools
Helper module of torsionInterpolPot.
Tools for setup of torsion angle interpolated potential terms.
When using this module, please cite:
Bermejo, G.A., Clore, G.M., and Schwieters, C.D. (2012). Smooth statistical
torsion angle potential derived from a large conformational database via
adaptive kernel density estimation improves the quality of NMR protein
structures. Protein Sci. 21, 1824-1836.
and possibly also:
Hu, K.N., Qiang, W., Bermejo, G.A., Schwieters, C.D., and Tycko, R. (2012).
Restraints on backbone conformations in solid state NMR studies of uniformly
labeled proteins from quantitative amide N-15-N-15 and carbonyl C-13-C-13
dipolar recoupling data. J. Magn. Reson. 218, 115-127.
Functions |
| |
- create_TorsionInterpolPot(name='', data=None, ext='.dat', verbose=False)
- Return a potList.PotList of torsion angle potential terms.
Sets up torsion angle interpolated potential terms of the type defined in
the torsionInterpolPot module. The name argument gives the name to the
returned potList.PotList. data argument is a string with the name of
either a data file containing the energy points to be interpolated, or a
directory containing one or more such data files (in the latter case, only
filenames with the extension given by the ext argument are considered).
Alternatively, a sequence with several such filenames can be provided as the
data argument. For documentation on the format of data files see the
README.format file in the databases/torsions directory within the Xplor-NIH
directory. If verbose=True, some information is printed about the setup
process.
Each data file (indicated by the data argument) may specify one or more
potential terms, which are packed into a potList.PotList. The latter is
appended to the returned potlist, which thus consists of a potlist of
potlists.
- getdatafilepath(data=None, ext='.dat')
- Return a list with the path(s) of data file(s).
Argument data is a string with the name of either a data file or a directory
containing one or more data files (with filename extention given by the ext
argument, a string). Alternatively, a sequence with several such filenames
can be provided as the data argument. If data is not provided, all files in
the current directory with filename extention matching that ext are assumed
to be data files.
- setup_pot(name, info, data, selstrings=None, verbose=False, sim=None)
- Return an N-dimensional torsionInterpolPot.TorsionInterpolPotND.
The name argument (a string) is the name of the potential. info is a
comment string that can be retrieved from the returned potential via the
comment method. The data argument is a dictionary that contains all the
numerical data of the potential; its keys are integers used to identify the
different torsion angles and energy values. For example, in a 2D case we
may have keys 1, 2, and 999, respectively corresponding to the first and
second torsion angle, and the energy values (the largest key labels the
energy). The numbers associated with the torsion angle axes and energy are
provided by the dict values in the form of a list. The selstrings argument
is a list of strings, each an XPLOR selection string for an atom that, along
with the rest, define the torsion angle(s) to which the potential applies.
For example,
selstrings = ["name C and bondedto (resid 25 and name N)",
"resid 25 and name N",
"resid 25 and name CA",
"resid 25 and name C", # last atom of first torsion
"resid 25 and name N", # first atom of second torsion
"resid 25 and name CA",
"resid 25 and name C",
"name N and bondedto (resid 25 and name C)"]
applies the 2D potential to phi and psi of residue 25. The order of the
torsion angles in selstrings corresponds to that given by the keys of the
data dict. If selstrings is not provided, the potential term is still
returned, but it does not apply to any torsion. If verbose is True, some
information is printed about the setup process. sim is a simulation object
which defaults to simulation.currentSimulation().
|