psico.querying
(c) 2011 Thomas Holder, MPI for Developmental Biology (c) 2011 Tsjerk Wassenaar (gyradius code)
License: BSD-2-Clause
Functions
|
Calculates the center of mass. |
|
Charge Symmetry Parameter between two selections. |
|
Extinction coefficient at 280 nm. |
|
API only function. |
|
API only. |
|
API only. |
|
Returns the object name for given selection. |
|
Returns the effective object state. |
|
Get the list of pair items from distance objects. |
|
Get solvent accesible surface area |
|
Get solvent accesible surface area using BALL.NumericalSAS |
|
Get the set of segment identifiers. |
|
Returns the effective object state for all objects in given selection. |
|
Radius of gyration |
|
Compute isoelectric point and charge at given pH. |
|
API-only function to capture "iterate_state" results in a list. |
|
API-only function to capture "iterate" results in a list. |
|
API-only function to get a selection expression for "iterate" results which evaluate to True. |
|
Finds the shortest pairwise distance between two selections. |
- psico.querying.centerofmass(selection='(all)', state=-1, quiet=1, *, _self=...) List[float][source]
Calculates the center of mass. Considers atom mass and occupancy.
Notice: Atoms with occupancy 0 are ignored. This differs from PyMOL’s cmd.centerofmass which treats occupancy 0 as 1.
Arguments
selection = string: atom selection {default: all}
state = integer: object state, -1 for current state, 0 for all states {default: -1}
Example
from psico.querying import * x = centerofmass(‘chain A’) r = gyradius(‘chain A’) cmd.pseudoatom(‘com’, pos=x, vdw=r)
See Also
gyradius
- psico.querying.csp(sele1: str, sele2: str = '', quiet=1, var='formal_charge', _self=...) float[source]
Charge Symmetry Parameter between two selections. Can be used to compute FvCSP according to Sharma 2014.
If only sele1 is given, it must contain excatly two chains.
- psico.querying.extinction_coefficient(selection='all', state=-1, *, quiet=1, _self=...) Tuple[int, float][source]
Extinction coefficient at 280 nm.
- psico.querying.get_alignment_coords(name: str, active_only=0, state=-1, quiet=0, *, _self=...)[source]
API only function. Returns a dictionary with items
(object name, Nx3 coords list)
N is the number of alignment columns without gaps.
Example
import numpy from psico.multistuff import * from psico.querying import *
extra_fit(‘name CA’, cycles=0, object=’aln’) x = get_alignment_coords(‘aln’) m = numpy.array(x.values())
- psico.querying.get_color(selection, which=0, mode=0, *, _self=...) int | str | Tuple[float, float, float][source]
API only. Returns the color of the first/middle/… guide atom in selection.
Arguments
which = 0: color of first atom which = 1: color of middle atom which = 2: most frequent color
mode = 0: color index or color string mode = 1: color tuple mode = 2: color string in hash-hex format (for HTML, matplotlib, …)
- psico.querying.get_ensemble_coords(selection: str, *, _self=...) np.ndarray[tuple[int, int, Literal[3]], np.dtype[np.float32]][source]
API only. Returns the (nstates, natoms, 3) coordinate matrix. Considers the object rotation matrix.
- psico.querying.get_object_name(selection: str, strict=0, *, _self=...) str[source]
Returns the object name for given selection.
Arguments
selection = string: atom selection strict = 0: allow multiple objects in selection but only return the first strict = 1: raise exception if selection spans multiple objects
- psico.querying.get_object_state(name: str, *, _self=...) int[source]
Returns the effective object state.
- psico.querying.get_raw_distances(names: str = '', state=1, selection='all', quiet=1, *, _self=...)[source]
Get the list of pair items from distance objects. Each list item is a tuple of (index1, index2, distance).
Based on a script from Takanori Nakane, posted on pymol-users mailing list. http://www.mail-archive.com/pymol-users@lists.sourceforge.net/msg10143.html
Arguments
names = string: names of distance objects (no wildcards!) {default: all measurement objects}
state = integer: object state {default: 1}
selection = string: atom selection {default: all}
See Also
select_distances, cmd.find_pairs, cmd.get_raw_alignment
- psico.querying.get_sasa(selection: str, state=-1, dot_density=5, quiet=1, *, _self=...) float[source]
Get solvent accesible surface area
See Also
get_area pymol.util.get_sasa (considered broken!)
- psico.querying.get_sasa_ball(selection: str, state=-1, quiet=1, *, _self=...) float[source]
Get solvent accesible surface area using BALL.NumericalSAS
- psico.querying.get_segis(selection='all', *, quiet=1, _self=...) set[str][source]
Get the set of segment identifiers.
- psico.querying.get_selection_state(selection: str, *, _self=...) int[source]
Returns the effective object state for all objects in given selection. Raises exception if objects are in different states.
- psico.querying.gyradius(selection='(all)', state=-1, quiet=1, *, _self=...) float[source]
Radius of gyration
Based on: http://pymolwiki.org/index.php/Radius_of_gyration
See Also
centerofmass
- psico.querying.isoelectric_point(selection: str = 'polymer', *, ph: float = 7, quiet: int = 1, _self=...) float[source]
Compute isoelectric point and charge at given pH.
- psico.querying.iterate_state_to_list(state: int, selection: str, expression: str, *, space: dict | None = None, _self=...) list[source]
API-only function to capture “iterate_state” results in a list.
- psico.querying.iterate_to_list(selection: str, expression: str, *, space: dict | None = None, _self=...) list[source]
API-only function to capture “iterate” results in a list.
- psico.querying.iterate_to_sele(selection: str, expression: str, *, space: dict | None = None, _self=...) str[source]
API-only function to get a selection expression for “iterate” results which evaluate to True.
- psico.querying.shortest_distance(selection1: str, selection2: str, state1: int = -1, state2: int = -1, name: str = 'shortest', *, quiet: int = 1, _self=...)[source]
Finds the shortest pairwise distance between two selections.
Arguments
selection1 = string: first atom selection
selection2 = string: second atom selection
state1 = state of selection1 {default: current state}
state2 = state of selection2 {default: current state}
name = string: name of the object to create {default: shortest}
quiet = 0 or 1: print results to the terminal {default: 1}
Example
fetch 2xwu shortest_distance chain A, chain B