示例#1
0
 def test_find_structure(self):
     # nosetests pymatgen/matproj/tests/test_rest.py:MPResterTest.test_find_structure
     m = MPRester()
     ciffile = os.path.join(test_dir, 'Fe3O4.cif')
     data = m.find_structure(ciffile)
     self.assertTrue(len(data) > 1)
     s = CifParser(ciffile).get_structures()[0]
     data = m.find_structure(s)
     self.assertTrue(len(data) > 1)
示例#2
0
 def test_find_structure(self):
     # nosetests pymatgen/matproj/tests/test_rest.py:MPResterTest.test_find_structure
     m = MPRester()
     ciffile = os.path.join(test_dir, 'Fe3O4.cif')
     data = m.find_structure(ciffile)
     self.assertTrue(len(data) > 1)
     s = CifParser(ciffile).get_structures()[0]
     data = m.find_structure(s)
     self.assertTrue(len(data) > 1)
示例#3
0
 def test_find_structure(self):
     # nosetests pymatgen/matproj/tests/test_rest.py:MPResterTest.test_find_structure
     # self.rester points to rest/v2 by default which doesn't have the find_structure endpoint
     m = MPRester(endpoint="https://www.materialsproject.org/rest")
     ciffile = os.path.join(test_dir, 'Fe3O4.cif')
     data = m.find_structure(ciffile)
     self.assertTrue(len(data) > 1)
     s = CifParser(ciffile).get_structures()[0]
     data = m.find_structure(s)
     self.assertTrue(len(data) > 1)
示例#4
0
 def test_find_structure(self):
     # nosetests pymatgen/matproj/tests/test_rest.py:MPResterTest.test_find_structure
     # self.rester points to rest/v2 by default which doesn't have the find_structure endpoint
     m = MPRester(endpoint="https://www.materialsproject.org/rest")
     ciffile = os.path.join(test_dir, 'Fe3O4.cif')
     data = m.find_structure(ciffile)
     self.assertTrue(len(data) > 1)
     s = CifParser(ciffile).get_structures()[0]
     data = m.find_structure(s)
     self.assertTrue(len(data) > 1)