Example #1
0
    def test_relax2_copy(self):
        ct = CopyVaspOutputs(calc_dir=self.relax2_outdir, additional_files=["IBZKPT"])
        ct.run_task({})
        files = ["INCAR", "KPOINTS", "POTCAR", "POSCAR", "IBZKPT"]
        for f in files:
            self.assertTrue(os.path.exists(os.path.join(self.scratch_dir, f)))

        no_files = ["CONTCAR", "EIGENVAL"]
        for f in no_files:
            self.assertFalse(os.path.exists(os.path.join(self.scratch_dir, f)))
Example #2
0
    def test_missing_kpoints_copy(self):
        ct = CopyVaspOutputs(calc_dir=self.nokpts_outdir)
        ct.run_task({})
        files = ["INCAR", "POTCAR", "POSCAR"]
        for f in files:
            self.assertTrue(os.path.exists(os.path.join(self.scratch_dir, f)))

        no_files = ["CONTCAR", "EIGENVAL", "KPOINTS"]
        for f in no_files:
            self.assertFalse(os.path.exists(os.path.join(self.scratch_dir, f)))
Example #3
0
    def test_gzip_copy(self):
        ct = CopyVaspOutputs(calc_dir=self.gzip_outdir)
        ct.run_task({})
        files = ["INCAR", "KPOINTS", "POTCAR", "POSCAR"]
        for f in files:
            self.assertTrue(os.path.exists(os.path.join(scratch_dir, f)))

        no_files = ["CONTCAR", "EIGENVAL"]
        for f in no_files:
            self.assertFalse(os.path.exists(os.path.join(scratch_dir, f)))
Example #4
0
    def test_relax2_copy(self):
        ct = CopyVaspOutputs(calc_dir=self.relax2_outdir,
                             additional_files=["IBZKPT"])
        ct.run_task({})
        files = ["INCAR", "KPOINTS", "POTCAR", "POSCAR", "IBZKPT"]
        for f in files:
            self.assertTrue(os.path.exists(os.path.join(self.scratch_dir, f)))

        no_files = ["CONTCAR", "EIGENVAL"]
        for f in no_files:
            self.assertFalse(os.path.exists(os.path.join(self.scratch_dir, f)))
Example #5
0
    def test_plain_copy(self):
        ct = CopyVaspOutputs(calc_dir=self.plain_outdir)
        ct.run_task({})
        files = ["INCAR", "KPOINTS", "POSCAR", "POTCAR", "OUTCAR"]
        for f in files:
            self.assertTrue(os.path.exists(os.path.join(self.scratch_dir, f)))

        no_files = ["CONTCAR", "EIGENVAL", "IBZKPT"]
        for f in no_files:
            self.assertFalse(os.path.exists(os.path.join(self.scratch_dir, f)))

        # make sure CONTCAR was copied properly
        with open(os.path.join(self.plain_outdir, "CONTCAR")) as f1:
            with open(os.path.join(self.scratch_dir, "POSCAR")) as f2:
                self.assertEqual(f1.read(), f2.read())
Example #6
0
    def test_plain_copy(self):
        ct = CopyVaspOutputs(calc_dir=self.plain_outdir)
        ct.run_task({})
        files = ["INCAR", "KPOINTS", "POSCAR", "POTCAR", "OUTCAR"]
        for f in files:
            self.assertTrue(os.path.exists(os.path.join(self.scratch_dir, f)))

        no_files = ["CONTCAR", "EIGENVAL", "IBZKPT"]
        for f in no_files:
            self.assertFalse(os.path.exists(os.path.join(self.scratch_dir, f)))

        # make sure CONTCAR was copied properly
        with open(os.path.join(self.plain_outdir, "CONTCAR")) as f1:
            with open(os.path.join(self.scratch_dir, "POSCAR")) as f2:
                self.assertEqual(f1.read(), f2.read())
Example #7
0
    def test_plain_copy_more(self):
        ct = CopyVaspOutputs(calc_dir=self.plain_outdir,
                             contcar_to_poscar=False,
                             additional_files=["IBZKPT"])
        ct.run_task({})
        files = ["INCAR", "KPOINTS", "POSCAR", "POTCAR", "IBZKPT"]
        for f in files:
            self.assertTrue(os.path.exists(os.path.join(self.scratch_dir, f)))

        no_files = ["CONTCAR", "EIGENVAL"]
        for f in no_files:
            self.assertFalse(os.path.exists(os.path.join(self.scratch_dir, f)))

        # make sure CONTCAR was NOT copied and POSCAR was instead copied
        with open(os.path.join(self.plain_outdir, "POSCAR")) as f1:
            with open(os.path.join(self.scratch_dir, "POSCAR")) as f2:
                self.assertEqual(f1.read(), f2.read())
Example #8
0
    def test_plain_copy_more(self):
        ct = CopyVaspOutputs(calc_dir=self.plain_outdir,
                             contcar_to_poscar=False,
                             additional_files=["IBZKPT"])
        ct.run_task({})
        files = ["INCAR", "KPOINTS", "POSCAR", "POTCAR", "IBZKPT"]
        for f in files:
            self.assertTrue(os.path.exists(os.path.join(self.scratch_dir, f)))

        no_files = ["CONTCAR", "EIGENVAL"]
        for f in no_files:
            self.assertFalse(os.path.exists(os.path.join(self.scratch_dir, f)))

        # make sure CONTCAR was NOT copied and POSCAR was instead copied
        with open(os.path.join(self.plain_outdir, "POSCAR")) as f1:
            with open(os.path.join(self.scratch_dir, "POSCAR")) as f2:
                self.assertEqual(f1.read(), f2.read())