import simbios.simtk as simtk
from simbios.unit import angstrom
import unittest

class TestPdb(unittest.TestCase):
    def test_pdbatomlocation(self):
        loc = simtk.PdbAtomLocation(coords=(1,2,3))
        self.assertEqual(str(loc), '  10.000  20.000  30.000  1.00  0.00')
        # self.assertEqual(loc.writePdb(), '  10.000  20.000  30.000  1.00  0.00')
        self.assertEqual(loc.writePdb(simtk.Transform()), '  10.000  20.000  30.000  1.00  0.00')
        # foo = open("test.pdb", "w") # TODO
        # loc.writePdb(foo)
        
    def test_pdbatom(self):
        element = simtk.Element.Hydrogen()
        atom = simtk.PdbAtom(" H1 ", element)
        print str(atom)

if __name__ == '__main__':
    unittest.main()
