Package Scientific :: Package IO :: Module PDB :: Class Atom
[frames] | no frames]

Class Atom

Known Subclasses:

Atom in a PDB structure

Instance Methods
 
__getitem__(self, item)
Returns: the property value
 
__init__(self, name, position, **properties)
 
__repr__(self)
 
__setitem__(self, item, value)
 
__str__(self)
str
type(self)
Returns: the six-letter record type, ATOM or HETATM
 
writeToFile(self, file)
Write an atom record to a file
Method Details

__getitem__(self, item)
(Indexing operator)

 
Parameters:
  • item (str) - the name of a property, including "name" or "position"
Returns:
the property value

__init__(self, name, position, **properties)
(Constructor)

 
Parameters:
  • name (str) - the atom name
  • position (Scientific.Geometry.Vector) - the atom position
  • properties - any other atom properties as keyword parameters. These properties are stored in the atom object and can be accessed by indexing, as for dictionaries.

__setitem__(self, item, value)
(Index assignment operator)

 
Parameters:
  • item (str) - the name of an existing or to be defined property
  • value - the new value for the property

type(self)

 
Returns: str
the six-letter record type, ATOM or HETATM

writeToFile(self, file)

 

Write an atom record to a file

Parameters:
  • file (PDBFile or str) - a PDB file object or a filename