Atom

This module defines classes to handle individual atoms.

class Atom(ag, index, acsi)[source]

A class for handling individual atoms in an AtomGroup.

copy()

Return a copy of atoms (and atomic data) in an AtomGroup instance.

getACSIndex()

Return index of the coordinate set.

getACSLabel()

Return active coordinate set label.

getAltloc()

Return alternate location indicator of the atom. Alternate location indicator can be used in atom selections, e.g. 'altloc A B', 'altloc _'.

getAnisou()

Return anisotropic temperature factor of the atom.

getAnistd()

Return standard deviations for anisotropic temperature factor of the atom.

getAtomGroup()

Return associated atom group.

getBeta()

Return β-value (temperature factor) of the atom. β-value can be used in atom selections, e.g. 'beta 555.55', 'beta 0 to 500', 'beta 0:500', 'beta < 500'.

getCSLabels()

Return coordinate set labels.

getCharge()

Return partial charge of the atom. Partial charge can be used in atom selections, e.g. 'charge 1', 'abs(charge) == 1', 'charge < 0'.

getChid()

Return chain identifier of the atom. Chain identifier can be used in atom selections, e.g. 'chain A', 'chid A B C', 'chain _'. Note that chid is a synonym for chain.

getChindex()

Return chain index of the atom. Chain indices are assigned to subsets of atoms with distinct pairs of chain identifier and segment name. Chain indices start from zero, are incremented by one, and are assigned in the order of appearance in AtomGroup instance. Chain index can be used in atom selections, e.g. 'chindex 0'.

getCoords()[source]

Return a copy of coordinates of the atom from the active coordinate set.

getCoordsets(indices=None)[source]

Return a copy of coordinate set(s) at given indices.

getData(label)[source]

Return a copy of data associated with label, if it is present.

getDataLabels(which=None)

Return data labels. For which='user', return only labels of user provided data.

getDataType(label)

Return type of the data (i.e. data.dtype) associated with label, or None label is not used.

getElement()

Return element symbol of the atom. Element symbol can be used in atom selections, e.g. 'element C O N'.

getFlag(label)[source]

Return atom flag.

getFlagLabels(which=None)

Return flag labels. For which='user', return labels of user or parser (e.g. hetatm) provided flags, for which='all' return all possible Atom Flags labels in addition to those present in the instance.

getFragindex()

Return fragment index of the atom. Fragment indices are assigned to connected subsets of atoms. Bonds needs to be set using AtomGroup.setBonds() method. Fragment indices start from zero, are incremented by one, and are assigned in the order of appearance in AtomGroup instance. Fragment index can be used in atom selections, e.g. 'fragindex 0', 'fragment 1'. Note that fragment is a synonym for fragindex.

getIcode()

Return insertion code of the atom. Insertion code can be used in atom selections, e.g. 'icode A', 'icode _'.

getIndex()[source]

Return index of the atom.

getIndices()[source]

Return index of the atom in an numpy.ndarray.

getMass()

Return mass of the atom. Mass can be used in atom selections, e.g. '12 <= mass <= 13.5'.

getName()

Return name of the atom. Name can be used in atom selections, e.g. 'name CA CB'.

getOccupancy()

Return occupancy value of the atom. Occupancy value can be used in atom selections, e.g. 'occupancy 1', 'occupancy > 0'.

getRadius()

Return radius of the atom. Radius can be used in atom selections, e.g. 'radii < 1.5', 'radii ** 2 < 2.3'.

getResindex()

Return residue index of the atom. Residue indices are assigned to subsets of atoms with distinct sequences of residue number, insertion code, chain identifier, and segment name. Residue indices start from zero, are incremented by one, and are assigned in the order of appearance in AtomGroup instance. Residue index can be used in atom selections, e.g. 'resindex 0'.

getResname()

Return residue name of the atom. Residue name can be used in atom selections, e.g. 'resname ALA GLY'.

getResnum()

Return residue number of the atom. Residue number can be used in atom selections, e.g. 'resnum 1 2 3', 'resnum 120A 120B', 'resnum 10 to 20', 'resnum 10:20:2', 'resnum < 10'. Note that resid is a synonym for resnum.

getSecstr()

Return secondary structure assignment of the atom. Secondary structure assignment can be used in atom selections, e.g. 'secondary H E', 'secstr H E'. Note that secstr is a synonym for secondary.

getSegindex()

Return segment index of the atom. Segment indices are assigned to subsets of atoms with distinct segment names. Segment indices start from zero, are incremented by one, and are assigned in the order of appearance in AtomGroup instance. Segment index can be used in atom selections, e.g. 'segindex 0'.

getSegname()

Return segment name of the atom. Segment name can be used in atom selections, e.g. 'segment PROT', 'segname PROT'. Note that segname is a synonym for segment.

getSelstr()[source]

Return selection string that will select this atom.

getSerial()

Return serial number (from file) of the atom. Serial number can be used in atom selections, e.g. 'serial 1 2 3', 'serial 1 to 10', 'serial 1:10:2', 'serial < 10'.

getType()

Return type of the atom. Type can be used in atom selections, e.g. 'type CT1 CT2 CT3'.

isDataLabel(label)

Return True if data associated with label is present.

isFlagLabel(label)

Return True if flags associated with label are present.

iterAtoms()[source]

Yield atoms.

iterBonded()[source]

Yield bonded atoms. Use setBonds() for setting bonds.

iterBonds()[source]

Yield bonds formed by the atom. Use setBonds() for setting bonds.

iterCoordsets()[source]

Yield copies of coordinate sets.

numAtoms(flag=None)[source]

Return number of atoms, or number of atoms with given flag.

numBonds()[source]

Return number of bonds formed by this atom. Bonds must be set first using AtomGroup.setBonds().

numCoordsets()

Return number of coordinate sets.

select(selstr, **kwargs)

Return atoms matching selstr criteria. See select module documentation for details and usage examples.

setACSIndex(index)

Set coordinates at index active.

setAltloc(data)

Set alternate location indicator of the atom. Alternate location indicator can be used in atom selections, e.g. 'altloc A B', 'altloc _'.

setAnisou(data)

Set anisotropic temperature factor of the atom.

setAnistd(data)

Set standard deviations for anisotropic temperature factor of the atom.

setBeta(data)

Set β-value (temperature factor) of the atom. β-value can be used in atom selections, e.g. 'beta 555.55', 'beta 0 to 500', 'beta 0:500', 'beta < 500'.

setCharge(data)

Set partial charge of the atom. Partial charge can be used in atom selections, e.g. 'charge 1', 'abs(charge) == 1', 'charge < 0'.

setChid(data)

Set chain identifier of the atom. Chain identifier can be used in atom selections, e.g. 'chain A', 'chid A B C', 'chain _'. Note that chid is a synonym for chain.

setCoords(coords)[source]

Set coordinates of the atom in the active coordinate set.

setData(label, data)[source]

Update data associated with label.

Raises AttributeError:
 when label is not in use or read-only
setElement(data)

Set element symbol of the atom. Element symbol can be used in atom selections, e.g. 'element C O N'.

setFlag(label, value)[source]

Update flag associated with label.

Raises AttributeError:
 when label is not in use or read-only
setIcode(data)

Set insertion code of the atom. Insertion code can be used in atom selections, e.g. 'icode A', 'icode _'.

setMass(data)

Set mass of the atom. Mass can be used in atom selections, e.g. '12 <= mass <= 13.5'.

setName(data)

Set name of the atom. Name can be used in atom selections, e.g. 'name CA CB'.

setOccupancy(data)

Set occupancy value of the atom. Occupancy value can be used in atom selections, e.g. 'occupancy 1', 'occupancy > 0'.

setRadius(data)

Set radius of the atom. Radius can be used in atom selections, e.g. 'radii < 1.5', 'radii ** 2 < 2.3'.

setResname(data)

Set residue name of the atom. Residue name can be used in atom selections, e.g. 'resname ALA GLY'.

setResnum(data)

Set residue number of the atom. Residue number can be used in atom selections, e.g. 'resnum 1 2 3', 'resnum 120A 120B', 'resnum 10 to 20', 'resnum 10:20:2', 'resnum < 10'. Note that resid is a synonym for resnum.

setSecstr(data)

Set secondary structure assignment of the atom. Secondary structure assignment can be used in atom selections, e.g. 'secondary H E', 'secstr H E'. Note that secstr is a synonym for secondary.

setSegname(data)

Set segment name of the atom. Segment name can be used in atom selections, e.g. 'segment PROT', 'segname PROT'. Note that segname is a synonym for segment.

setSerial(data)

Set serial number (from file) of the atom. Serial number can be used in atom selections, e.g. 'serial 1 2 3', 'serial 1 to 10', 'serial 1:10:2', 'serial < 10'.

setType(data)

Set type of the atom. Type can be used in atom selections, e.g. 'type CT1 CT2 CT3'.

Read the Docs v: v1.5
Versions
latest
v1.5
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.