Querying

flat.querying

Module for querying data from molecular objects.

flat.querying.count(selection='all', *, _self=cmd)
DESCRIPTION

Count number of atoms, residues, and mass in selection.

USAGE

count [ selection ]

ARGUMENTS
selectionstr, optional

Atom selection.

flat.querying.density(selection='all', state=0, *, quiet=1, _self=cmd)
DESCRIPTION

Calculate density of current state. Useful for simulations.

USAGE

density [ selection [, state ]]

ARGUMENTS
selectionstr, optional

Atom selection {default: all}

stateint, default = 0

Object state (0 for current state).

RETURNS
: float

Density in \(kg/m^3\).

flat.querying.ext_coef(selection='all', state=-1, *, quiet=0, _self=cmd)
DESCRIPTION

Calculate extinction coefficient and absorbance for native and folded protein. Extinction coefficients are in units of M^-1 cm^-1, at 280 nm measured in water.

USAGE

ext_coef [ selection [, state ]]

ARGUMENTS
selectionstr, optional

Atom selection.

stateint, default = -1

Object state (-1 for current state).

RETURNS
coef, absfloat

Extinction coefficients and absorbance for native protein.

coef0, abs0float

Extinction coefficients and absorbance for denatured protein.

REFERENCE
  • C.N. Pace, et. al, Protein Sci., 1995, doi:10.1002/pro.5560041120

    1. Edelhoch, Biochemistry, 1967, doi:10.1021/bi00859a010

  • C.G. Gill & P.H. von Hippel, Anal. Biochem., 1989, doi:10.1016/0003-2697(89)90602-7

flat.querying.get_contacts(selection1, selection2, name='contacts', state=0, hb_cutoff=3.6, sb_cutoff=4.0, pi_cutoff=4.8, *, _self=cmd)
DESCRIPTION

Returns the average number of each contacts between two selections (the good, the bad, and the ugly): hydrogen bonds, salt bridges, pi-cation, and pi-pi interactions.

USAGE

get_contacts selection1, selection2 [ name [, cutoff [, state ]]]

ARGUMENTS
selection1, selection2str

Atom selections.

namestr, default = ‘contacts’

Name of output group.

stateint, default = 0

Object state (0 for all states).

hb_cutofffloat, default = 3.6

Cutoff distance for hydrogen bonds in Angstroms.

sb_cutofffloat, default = 4.0

Cutoff distance for salt bridges in Angstroms.

pi_cutofffloat, default = 3.6

Cutoff distance for pi-cation and pi-pi interactions in Angstroms.

RETURNS
: List[float]

Average number of each type of interactions: hydrogen bonds, salt bridges, pi-cation, and pi-pi.

SEE ALSO

get_raw_distances(), prolif()

flat.querying.get_dipole(selection='all', state=0, var='formal_charge', vis=1, quiet=1, *, _self=cmd)
DESCRIPTION

Get electric dipole momentum for atoms in selection. For var use either partial_charge or formal_charge.

USAGE

get_dipole [ selection [, state [, var [, vis ]]]]

ARGUMENTS
selectionstr, optional

Atom selection.

stateint

Object state (0 for current state).

varstr, default = ‘formal_charge’

Property used for calculation: partial_charge or formal_charge

visint, default = True

Visualize output.

RETURNS
: ndarray

Dipole moment vector of size (3,) in Debyes.

flat.querying.get_longest_distance(selection='(all)', vis=True, *, _self=cmd)
DESCRIPTION

Get longest distance in a selection.

USAGE

get_longest_distance [ selection [, vis ]]

ARGUMENTS
selectionstr, optional

Atom selection.

visbool, default = True

Visualize output.

RETURNS
: ndarray

Distance vector of size (3,) in Angstroms.

flat.querying.get_raw_distances(names='', state=0, selection='all', quiet=1, *, _self=cmd)
DESCRIPTION

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

USAGE

get_raw_distances [ names [, state [, selection ]]]

ARGUMENTS
namesstr, optional

Names of distance objects (no wildcards!). Defaults to all measurement objects.

stateint

Object state (0 for current state).

selectionstr, default = ‘all’

Atom selection.

RETURNS
: List

A list of pair items from distance objects. Each list item is a tuple of indices pair and distance in Angstroms.

SEE ALSO

select_distances, cmd.find_pairs, cmd.get_raw_alignment

flat.querying.get_sasa(selection='polymer', state=0, dot_density=4, *, quiet=1, _self=cmd)
DESCRIPTION

Get solvent accessible surface area for selection.

USAGE

get_sasa selection [, state [, dot_density ]]

ARGUMENTS
selectionstr, optional

Atom selection.

stateint, default = 0

Object state (0 for all states).

dot_densityint, default = 4

Sampling density (1-4). Higher density (more dots) means higher accuracy but slower performance.

RETURNS
: float

Solvent accessible surface area in square Angstroms.

SEE ALSO

get_area, get_sasa_relative

flat.querying.get_seq(selection, chainbreak='/', unknown='?', quiet=1, *, _self=cmd)
DESCRIPTION

Gets the one-letter sequence, including residues without coordinates.

USAGE

get_seq selection [, chainbreak [, unknown ]]

ARGUMENTS
selectionstr

Atom selection.

chainbreakstr, default = ‘/’

Symbol to mark chain breaks.

unknownstr, default = ‘?’

Symbol for unknown residues.

RETURNS
: str

One-letter sequence of selection.

SOURCE

From PSICO (c) 2010-2012 Thomas Holder, MPI for Developmental Biology

flat.querying.get_ss(selection='all', chainbreak='/', unknown='?', *, quiet=1, _self=cmd)
DESCRIPTION

Get secondary structure of selection as string.

USAGE

get_ss [ selection [, chainbreak [, unknown ]]]

ARGUMENTS
selectionstr, optional

Atom selection.

chainbreakstr, default = ‘/’

Symbol to mark chain breaks.

unknownstr, default = ‘?’

Symbol for unknown structure element.

flat.querying.iterate_state_to_list(state, selection, expression, *, space=None, _self=cmd)
DESCRIPTION

Capture “iterate_state” results in a list.

USAGE

iterate_state_to_list state, selection, expression

ARGUMENTS
stateint

Object state.

selectionstr

Atom selection.

expressionstr

Property or list of properties in valid PyMOL syntax.

spaceDict(), optional

Namespace dictionary. Defaults to PyMOL namespace.

RETURNS
: List

List of specified properties for selection.

flat.querying.iterate_to_list(selection, expression, *, space=None, _self=cmd)
DESCRIPTION

Capture “iterate” results in a list.

USAGE

iterate_to_list selection, expression

ARGUMENTS
selectionstr

Atom selection.

expressionstr

Property or list of properties in valid PyMOL syntax.

spaceDict(), optional

Namespace dictionary. Defaults to PyMOL namespace.

RETURNS
: List

List of specified properties for selection.

flat.querying.length(selection='all', num=10, *, _self=cmd)
DESCRIPTION

Return the chain, residue, and atoms lengths in selection.

USAGE

length [ selection [, num ]]

ARGUMENTS
selectionstr, optional

Atom selection.

numint, default = 10

Number of list items to display.

flat.querying.rgyro(selection='all', state=0, vis=True, *, quiet=1, _self=cmd)
DESCRIPTION

Calculate radius of gyration for selection.

USAGE

rgyro [ selection [, state [, vis ]]]

ARGUMENTS
selectionstr, optional

Atom selection.

stateint, default = 0

Object state (0 for current state).

visbool, default = True

Visualize output.

RETURNS
: ndarray

Radius of gyration vector of size (3,) in Angstroms.