Skip to content

Commit

Permalink
MMTF loader HETATM test (#8)
Browse files Browse the repository at this point in the history
See #295
  • Loading branch information
speleo3 authored Jul 20, 2023
1 parent 45e8f36 commit 6c0da3b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Binary file added testing/data/1x8x.mmtf.gz
Binary file not shown.
10 changes: 10 additions & 0 deletions testing/tests/api/importing.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,10 +541,20 @@ def testLoadMMTF(self):
self.assertEqual(169, cmd.count_atoms())
self.assertEqual(36, cmd.count_atoms('ss S'))
self.assertEqual(25, cmd.count_atoms('solvent'))
self.assertEqual(25, cmd.count_atoms('not polymer'))
symmetry = cmd.get_symmetry()
self.assertArrayEqual(symmetry[:6], [19.465, 21.432, 29.523, 90.0, 90.0, 90.0], delta=1e-4)
self.assertEqual(symmetry[6], 'P 21 21 21')

@testing.requires_version('2.6')
def testLoadMMTF_polymer(self):
cmd.load(self.datafile("1x8x.mmtf.gz"))
self.assertEqual(2780, cmd.count_atoms())
self.assertEqual(2544, cmd.count_atoms('polymer'))
self.assertEqual(218, cmd.count_atoms('solvent'))
self.assertEqual(13, cmd.count_atoms('organic'))
self.assertEqual(5, cmd.count_atoms('inorganic'))

@testing.requires_version('1.8.4')
def testLoadMMTFEmpty(self):
cmd.load(self.datafile("mmtf/empty-all0.mmtf"))
Expand Down

0 comments on commit 6c0da3b

Please sign in to comment.