Beispiel #1
0
    def test_setup(self):
        if "VASP_PSP_DIR" not in os.environ:
            os.environ["VASP_PSP_DIR"] = test_dir
        os.chdir(os.path.join(test_dir, 'setup_neb'))

        v = VaspNEBJob("hello", half_kpts=True)
        v.setup()

        incar = Incar.from_file("INCAR")
        count = multiprocessing.cpu_count()
        if count > 1:
            self.assertGreater(incar["NPAR"], 1)

        kpt = Kpoints.from_file("KPOINTS")
        kpt_pre = Kpoints.from_file("KPOINTS.orig")
        self.assertEqual(kpt_pre.style.name, "Monkhorst")
        self.assertEqual(kpt.style.name, "Gamma")

        shutil.copy("KPOINTS.orig", "KPOINTS")
        os.remove("INCAR.orig")
        os.remove("KPOINTS.orig")
        os.remove("POTCAR.orig")
        poscars = glob.glob("[0-9][0-9]/POSCAR.orig")
        for p in poscars:
            os.remove(p)
Beispiel #2
0
    def test_setup(self):
        if "VASP_PSP_DIR" not in os.environ:
            os.environ["VASP_PSP_DIR"] = test_dir
        os.chdir(os.path.join(test_dir, 'setup_neb'))

        v = VaspNEBJob("hello", half_kpts=True)
        v.setup()

        incar = Incar.from_file("INCAR")
        count = multiprocessing.cpu_count()
        if count > 1:
            self.assertGreater(incar["NPAR"], 1)

        kpt = Kpoints.from_file("KPOINTS")
        kpt_pre = Kpoints.from_file("KPOINTS.orig")
        self.assertEqual(kpt_pre.style.name, "Monkhorst")
        self.assertEqual(kpt.style.name, "Gamma")

        shutil.copy("KPOINTS.orig", "KPOINTS")
        os.remove("INCAR.orig")
        os.remove("KPOINTS.orig")
        os.remove("POTCAR.orig")
        poscars = glob.glob("[0-9][0-9]/POSCAR.orig")
        for p in poscars:
            os.remove(p)
Beispiel #3
0
    def test_setup(self):
        with cd(os.path.join(test_dir, 'setup_neb')):
            with ScratchDir('.', copy_from_current_on_enter=True) as d:
                v = VaspNEBJob("hello", half_kpts=True)
                v.setup()

                incar = Incar.from_file("INCAR")
                count = multiprocessing.cpu_count()
                if count > 3:
                    self.assertGreater(incar["NPAR"], 1)

                kpt = Kpoints.from_file("KPOINTS")
                kpt_pre = Kpoints.from_file("KPOINTS.orig")
                self.assertEqual(kpt_pre.style.name, "Monkhorst")
                self.assertEqual(kpt.style.name, "Gamma")
Beispiel #4
0
    def test_setup(self):
        with cd(os.path.join(test_dir, 'setup_neb')):
            with ScratchDir('.', copy_from_current_on_enter=True) as d:
                v = VaspNEBJob("hello", half_kpts=True)
                v.setup()

                incar = Incar.from_file("INCAR")
                count = multiprocessing.cpu_count()
                if count > 3:
                    self.assertGreater(incar["NPAR"], 1)

                kpt = Kpoints.from_file("KPOINTS")
                kpt_pre = Kpoints.from_file("KPOINTS.orig")
                self.assertEqual(kpt_pre.style.name, "Monkhorst")
                self.assertEqual(kpt.style.name, "Gamma")