Supporting Functions

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


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


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


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.


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


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, secclass, secid, secindex, 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.