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

Class Atom



Known Subclasses:
HetAtom

Atom in a PDB structure

Instance Methods [hide private]
  __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 [hide private]

__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.

__repr__(self)
(Representation operator)

 

__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

__str__(self)
(Informal representation operator)

 

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