Supporting Functions

This module defines some functions for handling atomic classes and data.

iterFragments(atoms)[source]

Yield fragments, connected subsets in atoms, as Selection instances.

findFragments(atoms)[source]

Returns list of fragments, connected subsets in atoms. See also iterFragments().

loadAtoms(filename)[source]

Returns AtomGroup instance loaded from filename using numpy.load() function. See also saveAtoms().

saveAtoms(atoms, filename=None, **kwargs)[source]

Save atoms in ProDy internal format. All Atomic classes are accepted as atoms argument. This function saves user set atomic data as well. Note that title of the AtomGroup instance is used as the filename when atoms is not an AtomGroup. To avoid overwriting an existing file with the same name, specify a filename.

isReserved(word)[source]

Returns True if word is reserved for internal data labeling or atom selections. See listReservedWords() for a list of reserved words.

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, anisou, 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, secondary, secstr, segindex, segment, segname, sequence, serial, sidechain, siguij, sin, sinh, small, sq, sqrt, stdaa, sugar, sulfur, surface, tahn, tan, title, to, turn, type, water, within, x, y, z.

sortAtoms(atoms, label, reverse=False)[source]

Returns an AtomMap pointing to atoms sorted in ascending data label order, or optionally in reverse order.