Package schrodinger :: Module structure :: Class _AtomCollection
[hide private]
[frames] | no frames]

Class _AtomCollection

object --+
         |
        _AtomCollection
Known Subclasses:

A set of atoms, usually comprising a subset of the total atoms in a Structure. Initialize using a structure and an iterable of current atom indices.

Important methods include extractStructure and getAtomIndices. Use the atom attribute to iterate over all contained atoms. 1-based indexed access to the atoms is also possible using atom (e.g. atom[1] gets the first atom in the _AtomCollection). The number of atoms can be determined via len(self.atom) or len(self).

Intended as a base class for _Ring, _Molecule, and _Chain.

Instance Methods [hide private]
 
__init__(self, st, atoms)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__len__(self)
Returns number of atoms.
list of ints
getAtomIndices(self)
Return a list of atom indices for all atoms in this object.
 
getAtomList(self)
Deprecated.
 
extractStructure(self, copy_props=False)
Return a new Structure containing only the atoms associated with this substructure.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  structure
Return the parent Structure object for this atom collection.
  atom
Iterate over all atoms.
  temperature_factor
Average B (tempearture) factor for all atoms that have it assigned.

Inherited from object: __class__

Method Details [hide private]

__init__(self, st, atoms)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

getAtomIndices(self)

 

Return a list of atom indices for all atoms in this object.

Returns: list of ints
List of atom indicies.

getAtomList(self)

 

Deprecated. Use getAtomIndices() method instead.

extractStructure(self, copy_props=False)

 

Return a new Structure containing only the atoms associated with this substructure. Structure properties, including the title, are inherited only if copy_props is set to True.


Property Details [hide private]

structure

Return the parent Structure object for this atom collection.

Get Method:
unreachable.structure(self) - Return the parent Structure object for this atom collection.

atom

Iterate over all atoms. Also allows 1-based indexed access to the atoms.

Get Method:
unreachable.atom(self) - Iterate over all atoms.

temperature_factor

Average B (tempearture) factor for all atoms that have it assigned. Setting this property will set the B factor to the given value for each atom.

Get Method:
unreachable.temperature_factor(self) - Average B (tempearture) factor for all atoms that have it assigned.
Set Method:
unreachable.temperature_factor(self, tfactor)