mpinterfaces.mat2d.intercalation.tests package

Submodules

mpinterfaces.mat2d.intercalation.tests.test_intercalation module

class mpinterfaces.mat2d.intercalation.tests.test_intercalation.StartupTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

This will be hard to test, since inject_ions requires Zeo++
to be installed...
def test_inject_ions(self):

os.chdir(ROOT) os.chdir(‘MoS2’) structure = Structure.from_file(‘POSCAR’) structure = inject_ions(structure, ‘Li’, 0.25) structure.to(fmt=’POSCAR’, filename=’test_intercalated_POSCAR’) control_lines = open(‘control_intercalated_POSCAR’).readlines() test_lines = open(‘control_intercalated_POSCAR’).readlines() for i in range(len(control_lines)):

self.assertEqual(control_lines[i], test_lines[i])

Module contents