How to use the biopython.structure.io.pdbx.set_structure function in biopython

To help you get started, we’ve selected a few biopython examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github biotite-dev / biotite / tests / structure / pdbx.py View on Github external
def _test_conversion(self, stack):
        for path in self.files:
            with self.subTest(id=path[-8:-4]):
                pdbx_file = pdbx.PDBxFile()
                pdbx_file.read(path)
                if stack:
                    array1 = pdbx.get_structure(pdbx_file)
                else:
                    array1 = pdbx.get_structure(pdbx_file, model=1)
                pdbx.set_structure(pdbx_file, array1)
                if stack:
                    array2 = pdbx.get_structure(pdbx_file)
                else:
                    array2 = pdbx.get_structure(pdbx_file, model=1)
                self.assertEqual(array1, array2)

biopython

Freely available tools for computational molecular biology.

BSD-3-Clause
Latest version published 6 months ago

Package Health Score

94 / 100
Full package analysis

Similar packages