rmd.filedump(run_specs, filename) phonopy_specs = run_specs['phonopy'] phonopy_specs['dim'] = ' '.join(map(str, phonopy_specs['dim'])) incar = rmd.read_incar(run_specs) if os.path.isfile('../properties.json'): properties = rmd.fileload('../properties.json') if 'ISPIN' not in incar: if rmd.detect_is_mag(properties['mag']): incar.update({'ISPIN': 2}) else: incar.update({'ISPIN': 1}) # higher priority for run_specs if 'poscar' in run_specs: structure = rmd.get_structure(run_specs) elif os.path.isfile('../POSCAR'): structure = mg.Structure.from_file('../POSCAR') rmd.insert_elem_types(run_specs, structure) kpoints = rmd.read_kpoints(run_specs, structure) run_volume_dirname = phonopy_specs['volumes_and_structures']['from']\ if 'volumes_and_structures' in phonopy_specs and \ 'from' in phonopy_specs['volumes_and_structures'] and \ phonopy_specs['volumes_and_structures']['from'] else 'run_volume' if isinstance(run_volume_dirname, str): fitting_results = rmd.fileload(os.path.join('..', run_volume_dirname, 'fitting_results.json'))[-1] volume = fitting_results['volume']
kpoints_test: density_change: [1000, 2000, 4000] force_gamma: True Obviously, 'kpoints' tag should be omitted. """ run_specs, filename = rmd.get_run_specs_and_filename() rmd.chdir(rmd.get_run_dir(run_specs)) rmd.filedump(run_specs, filename) rmd.init_stdout() rmd.infer_from_json(run_specs) structure = rmd.get_structure(run_specs) incar = rmd.read_incar(run_specs) kpoints_specs = run_specs['kpoints_test'] if 'force_gamma' in kpoints_specs: force_gamma = kpoints_specs['force_gamma'] else: force_gamma = False if 'density_change' in kpoints_specs: density_change = np.array(kpoints_specs['density_change']) else: density_change = np.array(range(kpoints_specs['begin'], kpoints_specs['end'], kpoints_specs['step'])) energy = np.zeros(len(density_change)) for i, kp in enumerate(density_change):