def setUpClass(cls): state.update({ "resource_paths": os.path.join(os.path.dirname(os.path.abspath(__file__)), "../static/calphy_test_files") }) cls.execution_path = os.path.dirname(os.path.abspath(__file__)) # cls.file_location = os.path.dirname(os.path.abspath(__file__)) cls.project = Project(os.path.join(cls.execution_path, "test_calphy")) cls.job = Calphy( project=ProjectHDFio(project=cls.project, file_name="test_calphy"), job_name="test_calphy", ) filepath = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../static/") cls.output_project = Project(os.path.join(filepath, "test_files"))
def setUpClass(cls): cls.execution_path = os.path.dirname(os.path.abspath(__file__)) cls.project = Project(os.path.join(cls.execution_path, "test_job")) cls.job = AtomisticGenericJob( project=ProjectHDFio(project=cls.project, file_name="test_job"), job_name="test_job", ) cls.job.structure = CrystalStructure(element="Al", bravais_basis="fcc", lattice_constants=4).repeat(4)
def setUpClass(cls): cls.file_location = os.path.dirname(os.path.abspath(__file__)) cls.project = Project( os.path.join(cls.file_location, "../static/sphinx")) pt = PeriodicTable() pt.add_element(parent_element="Fe", new_element="Fe_up", spin="0.5") Fe_up = pt.element("Fe_up") cls.basis = Atoms( elements=[Fe_up, Fe_up], scaled_positions=[[0.0, 0.0, 0.0], [0.5, 0.5, 0.5]], cell=2.6 * np.eye(3), ) cls.sphinx = cls.project.create_job("Sphinx", "job_sphinx") cls.sphinx_band_structure = cls.project.create_job( "Sphinx", "sphinx_test_bs") cls.sphinx_2_3 = cls.project.create_job("Sphinx", "sphinx_test_2_3") cls.sphinx_2_5 = cls.project.create_job("Sphinx", "sphinx_test_2_5") cls.sphinx_aborted = cls.project.create_job("Sphinx", "sphinx_test_aborted") cls.sphinx.structure = cls.basis cls.sphinx.fix_spin_constraint = True cls.sphinx_band_structure.structure = cls.project.create_structure( "Fe", "bcc", 2.81) cls.sphinx_band_structure.structure = cls.sphinx_band_structure.structure.create_line_mode_structure( ) cls.sphinx_2_3.structure = Atoms( elements=["Fe", "Fe"], scaled_positions=[[0.0, 0.0, 0.0], [0.5, 0.5, 0.5]], cell=2.6 * np.eye(3), ) cls.sphinx_2_5.structure = Atoms( elements=["Fe", "Ni"], scaled_positions=[[0.0, 0.0, 0.0], [0.5, 0.5, 0.5]], cell=2.83 * np.eye(3), ) cls.sphinx_2_5.structure.set_initial_magnetic_moments([2, 2]) cls.sphinx_aborted.structure = Atoms( elements=32 * ["Fe"], scaled_positions=np.arange(32 * 3).reshape(-1, 3) / (32 * 3), cell=3.5 * np.eye(3), ) cls.sphinx_aborted.status.aborted = True cls.current_dir = os.path.abspath(os.getcwd()) cls.sphinx._create_working_directory() cls.sphinx_2_3._create_working_directory() cls.sphinx.input["VaspPot"] = False cls.sphinx.structure.add_tag(selective_dynamics=(True, True, True)) cls.sphinx.structure.selective_dynamics[1] = (False, False, False) cls.sphinx.load_default_groups() cls.sphinx.fix_symmetry = False cls.sphinx.write_input() cls.sphinx_2_3.to_hdf() cls.sphinx_2_3.decompress() cls.sphinx_2_5.decompress() cls.sphinx_2_5.collect_output()
def setUpClass(cls): cls.file_location = os.path.dirname(os.path.abspath(__file__)) cls.project = Project( os.path.join(cls.file_location, "../static/sxextopt")) cls.basis = cls.project.create_structure("Fe", "bcc", 2.8) job = cls.project.create_job(cls.project.job_type.AtomisticExampleJob, "job_single") job.server.run_mode.interactive = True job.structure = cls.basis cls.sxextoptint = cls.project.create_job("SxExtOptInteractive", "job_sxextopt") cls.sxextoptint.ref_job = job
def setUpClass(cls): cls.file_location = os.path.dirname(os.path.abspath(__file__)) cls.project = Project(os.path.join(cls.file_location, "../static/sphinx")) cls.sphinx = cls.project.create_job("Sphinx", "job_sphinx") cls.sphinx.structure = Atoms(elements=['Fe']*2, scaled_positions=[3*[0.0], 3*[0.5]], cell=2.6*np.eye(3)) cls.sphinx.structure.set_initial_magnetic_moments(np.ones(2)) cls.current_dir = os.path.abspath(os.getcwd()) cls.sphinx._create_working_directory() cls.sphinx.input["VaspPot"] = False cls.sphinx.load_default_groups() cls.sphinx.write_input() cls.sphinx.version = "2.6.1" cls.sphinx.server.run_mode.interactive = True
def setUpClass(cls): cls.lattice_constant = 3.5 cls.file_location = os.path.dirname(os.path.abspath(__file__)) cls.project = Project( os.path.join(cls.file_location, "structure_testing")) cls.basis = cls.project.create_structure( element="Fe", bravais_basis="fcc", lattice_constant=cls.lattice_constant) cls.structure_container = cls.project.create_job( cls.project.job_type.StructureContainer, "structure_container") cls.structure_container.structure = cls.basis cls.structure_container.run()
def setUpClass(cls): cls.file_location = os.path.dirname(os.path.abspath(__file__)) cls.project = Project(os.path.join(cls.file_location, "test_sqs")) cls.project.remove_jobs_silently(recursive=True)
def setUpClass(cls): cls.file_location = os.path.dirname(os.path.abspath(__file__)) cls.project = Project( os.path.join(cls.file_location, "../static/minim"))
def tearDownClass(cls): cls.execution_path = os.path.dirname(os.path.abspath(__file__)) project = Project(os.path.join(cls.execution_path, "test_job")) project.remove_jobs_silently(recursive=True) project.remove(enable=True)
def tearDownClass(cls): file_location = os.path.dirname(os.path.abspath(__file__)) project = Project(os.path.join(file_location, "structure_testing")) ham = project.load(project.get_job_ids()[0]) ham.remove() project.remove(enable=True)
def tearDownClass(cls): cls.execution_path = os.path.dirname(os.path.abspath(__file__)) project = Project(os.path.join(cls.execution_path, "test_calphy")) project.remove_jobs(silently=True, recursive=True) project.remove(enable=True) filepath = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../static/") out_project = Project(os.path.join(filepath, "test_files")) out_project.remove_jobs(silently=True, recursive=True) out_project.remove(enable=True) state.update()
def setUpClass(cls): cls.art = ARTInteractive(art_id=0, direction=[1, 0, 0]) cls.file_location = os.path.dirname(os.path.abspath(__file__)) cls.project = Project(os.path.join(cls.file_location, 'art'))
def tearDownClass(cls): cls.file_location = os.path.dirname(os.path.abspath(__file__)) cls.project = Project(os.path.join(cls.file_location, 'qn')) cls.project.remove_jobs_silently(recursive=True) cls.project.remove(enable=True)
def tearDownClass(cls): file_location = os.path.dirname(os.path.abspath(__file__)) project = Project( os.path.join(file_location, "testing_serial_non_modal")) project.remove(enable=True, enforce=True)
def setUpClass(cls): cls.file_location = os.path.dirname(os.path.abspath(__file__)) cls.project = Project( os.path.join(cls.file_location, "vasp_import_testing"))
def setUpClass(cls): cls.execution_path = os.path.dirname(os.path.abspath(__file__)) cls.project = Project(os.path.join(cls.execution_path, "table")) cls.project.create_table()
def tearDownClass(cls): cls.file_location = os.path.dirname(os.path.abspath(__file__)) project = Project( os.path.join(cls.file_location, "vasp_import_testing")) project.remove_jobs_silently(recursive=True) project.remove(enable=True)
def setUpClass(cls): cls.file_location = os.path.dirname(os.path.abspath(__file__)) cls.project = Project(os.path.join(cls.file_location, 'qn'))
def tearDownClass(cls): cls.file_location = os.path.dirname(os.path.abspath(__file__)) cls.project = Project( os.path.join(cls.file_location, "../static/sxextopt")) cls.project.remove_jobs_silently(recursive=True)