def test_construction_from_content(self): " Make sure we can construct xyz file object from content string." content = """ 19\nSTEP = 208\nH 1.2205526 1.2669640 7.889939\nC 0.6099598 2.3301233 8.089289\nO 0.4463443 2.7548679 9.193083\nNi 0.3159743 0.0807476 0.1953107\nNi 0.3159743 2.5693302 0.1953107\nNi 2.4711501 -1.1635438 0.1953107\nNi 2.4711501 1.3250389 0.1953107\nNi 1.0343662 1.3250389 2.22723\nNi 1.0343662 3.8136215 2.22723\nNi 3.1895420 0.0807476 2.22723\nNi 3.1895420 2.5693302 2.22723\nNi 1.7497810 0.0876549 4.241213\nNi 3.9059343 -1.1526532 4.244936\nNi 1.7448029 2.5773365 4.245788\nNi 3.8955944 1.3376415 4.262553\nNi 2.4322196 1.3387538 6.300457\nNi 0.2766297 2.6108661 6.334991\nNi 0.2884736 0.0896520 6.252682\nNi 2.4521349 -1.1427412 6.231869\n""" xyz = XyzFile(content=content) ret_content = xyz.get_xyz_content() self.assertEqual(ret_content, content)
def test_construction_from_content(self): " Make sure we can construct xyz file object from content string." content = """ 19\nSTEP = 208\nH 1.22055264 1.26696399 7.88993886\nC 0.6099598 2.33012325 8.08928947\nO 0.44634426 2.75486791 9.19308296\nNi 0.3159743 0.08074755 0.19531066\nNi 0.3159743 2.5693302 0.19531066\nNi 2.47115009 -1.16354378 0.19531066\nNi 2.47115009 1.32503887 0.19531066\nNi 1.03436623 1.32503887 2.22722988\nNi 1.03436623 3.81362152 2.22722988\nNi 3.18954202 0.08074755 2.22722988\nNi 3.18954202 2.56933019 2.22722988\nNi 1.749781 0.08765486 4.24121319\nNi 3.90593433 -1.15265324 4.24493562\nNi 1.74480294 2.57733648 4.24578757\nNi 3.89559445 1.33764149 4.26255328\nNi 2.43221958 1.33875376 6.3004568\nNi 0.27662972 2.61086614 6.33499111\nNi 0.28847357 0.08965201 6.25268207\nNi 2.45213494 -1.14274124 6.23186924\n""" xyz = XyzFile(content=content) ret_content = xyz.get_xyz_content() self.assertEqual(ret_content, content)