Supporting Functions
This module defines some functions for handling atomic classes and data.
- prody.atomic.functions.extendAtomicData(data, nodes, atoms, axis=None)[source]
Extend a coarse grained data obtained for nodes to atoms.
- Parameters:
data (
ndarray) – any data arraynodes (
Atomic) – a set of atoms that has been used as nodes in data generationatoms (
Atomic) – atoms to be selected fromaxis (int) – the axis/direction you want to use to slice data from the matrix. The options are 0 or 1 or None like in
numpy. Default is None (all axes)
- prody.atomic.functions.extendAtoms(nodes, atoms, is3d=False)[source]
Returns extended mapping indices and an
AtomMap.
- prody.atomic.functions.findFragments(atoms)[source]
Returns list of fragments, connected subsets in atoms. See also
iterFragments().
- prody.atomic.functions.isReserved(word)[source]
Returns True if word is reserved for internal data labeling or atom selections. See
listReservedWords()for a list of reserved words.
- prody.atomic.functions.iterFragments(atoms)[source]
Yield fragments, connected subsets in atoms, as
Selectioninstances.
- prody.atomic.functions.listReservedWords()[source]
Returns list of words that are reserved for atom selections and internal variables. These words are: abs, acidic, acos, acyclic, aliphatic, all, altloc, aminoacid, and, aromatic, as, asin, at, atan, backbone, backbonefull, basic, bb, bbfull, bend, beta, bmap, bonded, bonds, bridge, buried, ca, calpha, carbon, ceil, cg, chain, charge, charged, chid, chindex, coil, coordinates, cos, cosh, cslabels, cyclic, dummy, element, exbonded, exp, extended, exwithin, floor, fragindex, fragment, heavy, helix, helix310, helixpi, heme, hetero, hydrogen, hydrophobic, icode, index, ion, large, lipid, log, log10, mapped, mass, medium, n_atoms, n_csets, name, neutral, nitrogen, noh, none, nonstdaa, not, nucleic, nucleobase, nucleoside, nucleotide, numbonds, occupancy, of, or, oxygen, polar, protein, purine, pyrimidine, radius, resid, resindex, resname, resnum, same, sc, secclass, secid, secindex, secondary, secstr, segindex, segment, segname, sequence, serial, sidechain, siguij, sin, sinh, small, sq, sqrt, stdaa, sugar, sulfur, surface, tan, tanh, title, to, turn, type, water, within, x, y, z.
- prody.atomic.functions.loadAtoms(filename)[source]
Returns
AtomGroupinstance loaded from filename usingnumpy.load()function. See alsosaveAtoms().
- prody.atomic.functions.saveAtoms(atoms, filename=None, **kwargs)[source]
Save atoms in ProDy internal format. All
Atomicclasses are accepted as atoms argument. This function saves user set atomic data as well. Note that title of theAtomGroupinstance is used as the filename when atoms is not anAtomGroup. To avoid overwriting an existing file with the same name, specify a filename.
- prody.atomic.functions.sliceAtomicData(data, atoms, select, axis=None)[source]
Slice a matrix using indices extracted using
sliceAtoms().