Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
test_PDB.Atom_Element Class Reference

List of all members.

Public Member Functions

def setUp
def test_AtomElement
def test_ions

Public Attributes

 residue

Detailed Description

induces Atom Element from Atom Name

Definition at line 760 of file test_PDB.py.


Member Function Documentation

Definition at line 763 of file test_PDB.py.

00763 
00764     def setUp(self):
00765         warnings.simplefilter('ignore', PDBConstructionWarning)
00766         pdb_filename = "PDB/a_structure.pdb"
00767         structure=PDBParser(PERMISSIVE=True).get_structure('X', pdb_filename)
00768         warnings.filters.pop()
00769         self.residue = structure[0]['A'][('H_PCA', 1, ' ')]

Atom Element 

Definition at line 770 of file test_PDB.py.

00770 
00771     def test_AtomElement(self):
00772         """ Atom Element """
00773         atoms = self.residue.child_list
00774         self.assertEqual('N', atoms[0].element) # N
00775         self.assertEqual('C', atoms[1].element) # Alpha Carbon
00776         self.assertEqual('CA', atoms[8].element) # Calcium

Element for magnesium is assigned correctly.

Definition at line 777 of file test_PDB.py.

00777 
00778     def test_ions(self):
00779         """Element for magnesium is assigned correctly."""
00780         pdb_filename = "PDB/ions.pdb"
00781         structure=PDBParser(PERMISSIVE=True).get_structure('X', pdb_filename)
00782         # check magnesium atom
00783         atoms = structure[0]['A'][('H_ MG', 1, ' ')].child_list
00784         self.assertEqual('MG', atoms[0].element)


Member Data Documentation

Definition at line 768 of file test_PDB.py.


The documentation for this class was generated from the following file: