psico.fitting

  1. 2011 Thomas Holder, MPI for Developmental Biology

License: BSD-2-Clause

Functions

alignwithanymethod(mobile, target[, ...])

Align copies of mobile to target with several alignment methods

dyndom(mobile, target[, window, domain, ...])

DynDom wrapper

dyndom_parse_info(filename[, selection, ...])

extra_fit([selection, reference, method, ...])

Like "intra_fit", but for multiple objects instead of multiple states.

gdt_ts(mobile, target[, cutoffs, quiet, _self])

Global Distance Test Total Score (GDT_TS)

get_rmsd_func()

API only.

intra_boxfit([selection, center, _self])

Center selection in simulation box.

intra_center([selection, state, _self])

Center frames on a selection.

intra_promix(selection[, K, prefix, ...])

Finds rigid segments in a multi-state object.

intra_theseus(selection[, state, cov, ...])

Fits all states of an object to an atom selection with maximum likelihood.

intra_xfit(selection[, load_b, cycles, ...])

Weighted superposition of all states of an object to the intermediate structure over all states.

local_rms(mobile, target[, window, ...])

"local_rms" computes the C-alpha RMS fit within a sliding window along the backbone.

promix(mobile, target[, K, prefix, ...])

Finds rigid segments in two objects with different conformation.

prosmart(mobile, target[, mobile_state, ...])

ProSMART wrapper.

theseus(mobile, target[, match, cov, ...])

Structural superposition of two molecules with maximum likelihood.

tmalign(mobile, target[, mobile_state, ...])

TMalign wrapper.

usalign(mobile, target[, mobile_state, ...])

USalign wrapper.

xfit(mobile, target[, mobile_state, ...])

Weighted superposition of the model in the first selection on to the model in the second selection.

Classes

MatchMaker(mobile, target, match, *[, ...])

API only.

class psico.fitting.MatchMaker(mobile, target, match, *, autodelete=True, _self=...)[source]

Bases: object

API only. Matches two atom selections and provides two matched subselections with equal atom count. May involve temporary objects or named selections which will be automatically deleted.

Arguments

mobile = string: first atom selection

target = string: second atom selection

match = string: method how to match atoms
  • none: (dummy)

  • in: match atoms by “in” operator

  • like: match atoms by “like” operator

  • align: match atoms by cmd.align (without refinement)

  • super: match atoms by cmd.super (without refinement)

  • <name of alignment object>: use given alignment

Result

Properties “mobile” and “target” hold the matched subselections as selection strings.

align(mobile, target, match)[source]

Align mobile to target using the alignment method given by “match”

check()[source]
from_alignment(mobile, target, aln_obj)[source]

Use alignment given by “aln_obj” (name of alignment object)

psico.fitting.alignwithanymethod(mobile, target, methods=None, async_=1, quiet=1, *, _self=..., **kwargs)[source]

Align copies of mobile to target with several alignment methods

Arguments

mobile = string: atom selection

target = string: atom selection

methods = string: space separated list of PyMOL commands which take arguments “mobile” and “target” (in any order) {default: align super cealign tmalign theseus}

psico.fitting.dyndom(mobile, target, window=5, domain=20, ratio=1.0, exe='', transform=1, quiet=1, mobile_state=1, target_state=1, match='align', preserve=0, *, _self=...)[source]

DynDom wrapper

DynDom is a program to determine domains, hinge axes and hinge bending residues in proteins where two conformations are available.

http://fizz.cmp.uea.ac.uk/dyndom/

Usage

dyndom mobile, target [, window [, domain [, ratio ]]]

psico.fitting.dyndom_parse_info(filename, selection='(all)', quiet=0, *, _self=...)[source]
psico.fitting.extra_fit(selection='(all)', reference=None, method='align', zoom=1, quiet=0, _self=..., **kwargs)[source]

Like “intra_fit”, but for multiple objects instead of multiple states.

Arguments

selection = string: atom selection of multiple objects {default: all}

reference = string: reference object name {default: first object in selection}

method = string: alignment method (command that takes “mobile” and “target” arguments, like “align”, “super”, “cealign” {default: align}

… extra arguments are passed to “method”

See Also

alignto, cmd.util.mass_align, align_all.py from Robert Campbell

psico.fitting.gdt_ts(mobile, target, cutoffs='1 2 4 8', quiet=1, *, _self=...)[source]

Global Distance Test Total Score (GDT_TS)

psico.fitting.get_rmsd_func()[source]

API only. Returns a function that uses either numpy (fast) or chempy.cpv (slow) to calculate the rmsd fit of two nx3 arrays.

psico.fitting.intra_boxfit(selection='polymer', center=(0.5, 0.5, 0.5), *, _self=...)[source]

Center selection in simulation box.

Arguments

selection = str: atom selection to center {default: polymer}

center = list-of-3-floats: Target position in fractional space {default: [0.5, 0.5, 0.5]}

psico.fitting.intra_center(selection: str = 'polymer', state: int = -1, *, _self=...)[source]

Center frames on a selection. Like intra_fit, but without rotation.

Arguments

selection = str: atom selection to center {default: polymer}

state = int: reference state {default: current state}

psico.fitting.intra_promix(selection, K=0, prefix=None, conformers=0, guide=1, quiet=1, async_=-1, _self=..., **kwargs)[source]

Finds rigid segments in a multi-state object.

Requires CSB, https://github.com/csb-toolbox/CSB

Arguments

selection = string: atom selection

K = integer: Number of segments {default: guess}

prefix = string: Prefix of named segment selections to make

See Also

promix

Reference

Mixture models for protein structure ensembles Hirsch M, Habeck M. - Bioinformatics. 2008 Oct 1;24(19):2184-92

psico.fitting.intra_theseus(selection, state=1, cov=0, cycles=200, exe='theseus', preserve=0, quiet=1, *, _self=...)[source]

Fits all states of an object to an atom selection with maximum likelihood.

THESEUS: Maximum likelihood multiple superpositioning http://www.theseus3d.org

Arguments

selection = string: atoms to fit

state = integer: keep transformation of this state unchanged {default: 1}

cov = 0/1: 0 is variance weighting, 1 is covariance weighting (slower) {default: 0}

See Also

intra_fit, intra_rms_cur

psico.fitting.intra_xfit(selection, load_b=0, cycles=20, guide=1, seed=0, quiet=1, bfit=0, distribution='student', _self=...)[source]

Weighted superposition of all states of an object to the intermediate structure over all states. The weights are estimated with maximum likelihood.

The result should be very similar to “intra_theseus”.

Requires CSB, https://github.com/csb-toolbox/CSB

Arguments

selection = string: atom selection

load_b = 0 or 1: save -log(weights) into B-factor column {default: 0}

Note

Assumes all states to have identical number of CA-atoms.

See Also

xfit, intra_fit, intra_theseus

psico.fitting.local_rms(mobile, target, window=20, mobile_state=1, target_state=1, match='align', load_b=1, visualize=1, quiet=1, *, _self=...)[source]

“local_rms” computes the C-alpha RMS fit within a sliding window along the backbone. The obtained RMS is assigned as a pseudo b-factor to the residue in the middle of the window. This is useful to visualize hinge-regions.

The result is very sensitive to window size.

Usage

local_rms mobile, target [, window ]

Arguments

mobile = string: object to assign b-factors and to visualize as putty cartoon

target = string: object to superimpose mobile to

window = integer: width of sliding window {default: 20}

match = string: in, like, align, none or the name of an alignment object {default: align}

  • in: match all atom identifiers (segi,chain,resn,resi,name)

  • like: match residue number (resi)

  • align: do a sequence alignment

  • none: assume same number of atoms in both selections

  • name of alignment object: take sequence alignment from object

Example

fetch 2x19 2xwu, async=0 remove not chain B or not polymer local_rms 2x19, 2xwu, 40

psico.fitting.promix(mobile, target, K=0, prefix=None, mobile_state=-1, target_state=-1, match='align', guide=1, quiet=1, async_=-1, _self=..., **kwargs)[source]

Finds rigid segments in two objects with different conformation.

Requires CSB, https://github.com/csb-toolbox/CSB

Arguments

mobile, target = string: atom selections

K = integer: Number of segments {default: guess}

prefix = string: Prefix of named segment selections to make

See Also

intra_promix

Reference

Mixture models for protein structure ensembles Hirsch M, Habeck M. - Bioinformatics. 2008 Oct 1;24(19):2184-92

psico.fitting.prosmart(mobile, target, mobile_state=1, target_state=1, exe='prosmart', transform=1, object=None, quiet=0, *, _self=...)[source]

ProSMART wrapper.

http://www2.mrc-lmb.cam.ac.uk/groups/murshudov/

psico.fitting.theseus(mobile, target, match='align', cov=0, cycles=200, mobile_state=1, target_state=1, exe='theseus', preserve=0, quiet=1, *, _self=...)[source]

Structural superposition of two molecules with maximum likelihood.

THESEUS: Maximum likelihood multiple superpositioning http://www.theseus3d.org

Arguments

mobile = string: atom selection for mobile atoms

target = string: atom selection for target atoms

match = string: in, like, align, none or the name of an alignment object (see “local_rms” help for details) {default: align}

cov = 0/1: 0 is variance weighting, 1 is covariance weighting (slower) {default: 0}

See Also

align, super, cealign

psico.fitting.tmalign(mobile, target, mobile_state=1, target_state=1, args='', exe='TMalign', ter=0, transform=1, object=None, quiet=0, *, _self=...)[source]

TMalign wrapper. You may also use this as a TMscore or MMalign wrapper if you privide the corresponding executable with the “exe” argument.

Reference: Y. Zhang and J. Skolnick, Nucl. Acids Res. 2005 33, 2302-9 http://zhanglab.ccmb.med.umich.edu/TM-align/

Arguments

mobile, target = string: atom selections

mobile_state, target_state = int: object states {default: 1}

args = string: Extra arguments like -d0 5 -L 100

exe = string: Path to TMalign (or TMscore, MMalign, USalign) executable {default: TMalign}

ter = 0/1: If ter=0, then ignore chain breaks because TMalign will stop at first TER record {default: 0}

psico.fitting.usalign(mobile: str, target: str, mobile_state: int = 1, target_state: int = 1, *, mm: int = 1, ter: int = 0, args: str = '', exe='USalign', _self=..., **_kwargs)[source]

USalign wrapper. See tmalign for details.

Reference: Zhang et al., Nature Methods 2022 19: 1109-1115 https://zhanggroup.org/US-align/

Note: PyMOL 3.2 adds a native usalign implementation

Arguments

mm = int: 1=multi-chain, 3=circularly permutated {default: 1}

ter = int: 3=stop at the first TER record {default: 0}

Example

fetch 1y39 2zjr usalign 1y39 & chain A+C, 2zjr & chain F+X, object=aln

psico.fitting.xfit(mobile, target, mobile_state=-1, target_state=-1, load_b=0, cycles=10, match='align', guide=1, seed=0, quiet=1, bfit=0, distribution='student', _self=...)[source]

Weighted superposition of the model in the first selection on to the model in the second selection. The weights are estimated with maximum likelihood.

The result should be very similar to “theseus”.

Requires CSB, https://github.com/csb-toolbox/CSB

Arguments

mobile = string: atom selection

target = string: atom selection

mobile_state = int: object state of mobile selection {default: current}

target_state = int: object state of target selection {default: current}

load_b = 0 or 1: save -log(weights) into B-factor column {default: 0}

See Also

intra_xfit, align, super, fit, cealign, theseus